🇧🇷🇺🇸🇪🇸
Engenharia Eletrônica

Electronic design with ESP32, GPS, LoRa and sensors for traceability

ESP32 project with GPS, LoRa and sensors for traceability

ESP32 project with GPS, LoRa and sensors for traceability

An ESP32-based tracking design was the starting point of this ECK development, which brought location, wireless communication, sensors and battery operation together on a single board.

The project combined location, wireless communication, temperature monitoring, motion detection and battery operation on one board.

The goal was for the device to log events that occurred during transport, storage or handling of sensitive materials, providing information that could later be analyzed by the client’s system.

ESP32 project architecture

The client already understood the application and worked with the ESP32, but needed the hardware developed to turn the concept into an integrated electronic product.

The information that could be logged included:

  • device location;
  • movements and impacts;
  • temperature of the monitored material;
  • ambient temperature and humidity;
  • time spent outside a defined storage condition;
  • events during transport or handling.

This architecture makes it possible, for example, to track materials that must remain within certain temperature conditions and log situations that could compromise their storage or transport.

Electronic architecture

The project used the ESP32 as the main processing and communication platform.

The ESP32 also provides Wi-Fi and Bluetooth connectivity, allowing the device to communicate with other equipment or with the infrastructure available on site.

For location, we used the Quectel L80 module, which integrates a GPS receiver and a patch antenna in the module itself, reducing the board area required.

Placing the GPS module on the board required attention to the radio frequency interference sources present in the device itself.

LoRa communication / LoRaWAN support

For long-range communication, the hardware was designed with an RFM95 module from HopeRF.

This transceiver uses LoRa modulation and can be used in both proprietary LoRa links and LoRaWAN applications, depending on the firmware implementation and the infrastructure used by the system.

In this project, ECK was responsible for the hardware. Firmware and the final definition of the communication protocol were the client’s responsibility, so we cannot say whether the final application used proprietary LoRa or LoRaWAN.

From a hardware standpoint, the design was prepared to support this type of long-range, low-power communication.

Motion detection

The device also included an MPU6050, which combines an accelerometer and a gyroscope.

With it, the system can detect movement of the device and log events related to transport or handling of the monitored product.

This information can be combined with the other sensors to build a history of the conditions the device or material was subjected to.

Temperature monitoring

External temperature was measured with the DS18B20, a digital sensor with a 1-Wire interface.

The component operates over a wide temperature range, from -55 °C to +125 °C, with a specified accuracy of ±0.5 °C between -10 °C and +85 °C.

Using a digital interface makes it easier to mount the sensor on a cable and reduces the number of signals needed to communicate with the processor.

Ambient temperature and humidity

Local temperature and humidity were measured with the HTU21D, a digital sensor with an I²C interface.

The component provides relative humidity and temperature readings in a compact package and has low power consumption, an important feature in battery-powered devices.

Power supply and battery management

Since the device had to operate on the move, power management was an important part of the development.

We used a battery charger IC with power path capability.

This architecture powers the system directly from the external source while managing battery charging at the same time.

One advantage is that the device keeps working even when the battery is completely flat, as long as external power is available.

The USB interface was used both for programming the ESP32 and for powering the device and charging the battery.

Main development challenges

The main challenge was integrating all the subsystems on a small board.

The same hardware included:

  • ESP32 with Wi-Fi and Bluetooth;
  • GPS receiver with integrated antenna;
  • LoRa radio;
  • accelerometer and gyroscope;
  • temperature and humidity sensors;
  • battery management and charging;
  • USB interface.

Component placement had to take electrical, thermal and radio frequency requirements into account at the same time.

The position of the GPS module, for example, had to minimize the influence of interference sources on the board itself.

Likewise, the layout of the RF interfaces and the location of the sensors required special care so that each subsystem could work properly within the available space.

Result

The hardware was developed, integrated and approved by the client.

The project is an example of how different technologies can be combined in a single electronic product: embedded processing, sensors, power management, Wi-Fi, Bluetooth, GPS and LoRa communication.

More than selecting components, developing a product like this requires all these subsystems to work together within the space, power, interference and cost constraints of the application.

Learn more about ECK’s electronic product development service.

Technologies involved

ESP32GPSLoRa / LoRaWANWi-FiBluetoothSensorsBattery

Have an electronic product to develop?

Tell us the problem. The conversation starts with engineering, not with an off-the-shelf package.