Timm Bogner's Farm Data Relay System Uses ESP8266, ESP32 Nodes and Gateways for Sensor Networks

Based on ESP-NOW, with LoRa and cellular to follow, this simple sensor network setup is low-cost but impressively featured.

Timm Bogner has launched a project to make it easier to deploy a remote sensor network using Espressif's ESP-NOW protocol, with a firm eye on agricultural automation: the Farm Data Relay System.

"The Farm Data Relay System is an easy way to collect data from remote sensors without relying on Wi-Fi," Bogner explains. "It is based around the ESP-NOW protocol, which is readily available on ESP32 and ESP8266 microcontroller boards. The system can be used to collect and transmit sensor data in situations where it would be too difficult or energy-consuming to provide full Wi-Fi coverage."

At its simplest, an FDRS installation is built around low-cost microcontroller development boards for both the sensors and the gateways. The sensors use the ESP-NOW protocol to transmit packets with a unique sensor ID and the MAC address of the ESP-NOW side of the gateway β€” which then receives the packet and re-transmits it as JSON over serial.

That serial connection goes to a second gateway, which takes the JSON and retransmits it in an MQTT topic via Wi-Fi to a front-end server β€” a Raspberry Pi, in Bogner's example, though it could be any Wi-Fi capable computer. The data is then passed through Node-RED for manipulation, stored in InfluxDB, and made accessible to Grafana for visualization.

For those creating larger networks, Bogner proposes an "advanced" FDRS mode: sensors transmit to local gateways that then re-transmit to ever-more-distant gateways before being received by the final dual-mode gateway β€” which can be any distance away from the farthest sensor node, so long as at least one gateway in the mesh can reach.

"The next generation of FDRS will define a second type of packet, used to communicate between FDRS devices," Bogner writes of his future plans for the project. "With this new type of packet, a sensor will be able to seek out the nearest gateway and send to it. This will also allow controller devices to register with and receive packets from gateways.

"[This will offer] the ability to send data in reverse, and have nodes to control irrigation, ventilation, and LED illumination. [I will also add] support for several new devices and protocols: Ethernet, nRF24L01, 4G LTE, and the E5 LoRa module from Seeed Studio."

More details, and full source code, for the project are available on the FDRS GitHub repository, published under the permissive MIT license.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles