mirror of
https://github.com/timmbogner/Farm-Data-Relay-System
synced 2024-11-08 13:10:29 +00:00
Update README.md
This commit is contained in:
parent
5a65510dd2
commit
990cd6853a
25
README.md
25
README.md
@ -1,8 +1,27 @@
|
|||||||
# Farm-Data-Relay-System
|
# Farm-Data-Relay-System
|
||||||
|
|
||||||
I designed this system for the purpose of retrieving sensor data from my community farm, which is out of range of any WiFi access point.
|
The goal of the Farm Data Relay System is to provide a way for sensor data to be collected from areas out of wifi range, while not straying from the popular and presentable ESP8266 or soon, the ESP32. I have tested ESP-NOW range to be reliable within at least 500 feet with line of sight, effectively double what would be possible with regular WiFi connections. Another goal is to make the system straight-forward and easy to use, as the primary user will not necessarily be familiar with Arduino.
|
||||||
|
Other than the sensors, each device in the system has a one-byte address. To make things easier, it's good to keep their addresses consecutive with their order in the system. At boot, each device changes its MAC address to "AA:BB:CC:DD:EE:xx" where xx is the device's address identifier.
|
||||||
|
There are three types of units in the FDRS: the terminal, the relays, and the gateway.
|
||||||
|
|
||||||
Each sensor is connected to an ESP8266, which sends its data reading, along with a unique identifier to another ESP8266 known as the terminal via ESP-NOW. The terminal collects each reading in an array, and periodically submits the array to a data relay. Each data relay is programmed with the address of a device both upsteam and downstream, and will simply send every ESP-NOW packet it recieves to the opposite of where it came. The final relay should be within distance of the gateway, which accesses the cloud and does something with the data. In this case, the gateway sets some variables within Blynk.
|
# Terminal
|
||||||
|
The terminal receives individual ESP-NOW packets from the sensor modules and stores them in an array. At the moment, this is arbitrarily set to a six-item array. At a set interval, the terminal sends its data array to the preprogrammed next device in the system, usually a relay.
|
||||||
|
|
||||||
If you decide to try this code, please drop me a line at bogner1@gmail.com to let me know how it's going, or ask any questions. I plan to continue expanding it throughout this winter, including adding the ability to send messages back through the relays to control devices.
|
# Relays
|
||||||
|
Relays are absolute ESP-NOW repeaters. They are programmed with the address of the previous and next device, and when data is received from one, it delivers it to the other. It also works in reverse, but for the moment the system only supports one-way communication.
|
||||||
|
In the FDRS, one can place as many relays as needed to span the distance to the final device in the system: the gateway.
|
||||||
|
|
||||||
|
# Gateway
|
||||||
|
The gateway takes the packet of ESP-NOW data and interprets it into JSON format, then outputs it over the serial port. From here it can be collected by another microcontroller or a Raspberry Pi for further processing.
|
||||||
|
I've included an ESP8266 sketch for receiving the JSON over serial and posting it to Blynk as well.
|
||||||
|
|
||||||
|
# Sensors
|
||||||
|
The sensors are pre-set with the address of the terminal and their own one-byte identifier. This ID is sent along with each data reading and will define its position in the larger data array at the terminal and beyond.
|
||||||
|
The code is currently all written for ESP8266. The NEXT major addition will be ESP32 support. The two work with ESP-NOW just slightly differently in Arduino, but I will be porting it very soon.
|
||||||
|
Future plans include two-way communication, some basic routing ability for the relays, and optimizing the underlying protocols needed for the first two goals. I'd like to eventually be able to send commands to remotely adjust irrigation/ventilation or even send weather data such as tornado warnings to the terminal in future iterations of this project.
|
||||||
|
|
||||||
|
# Thank you
|
||||||
|
...very much for checking out my project! There are a few topics I've glossed over here that I intend to elaborate on in the future. If you have any questions, please feel free to contact me at bogner1@gmail.com.
|
||||||
|
|
||||||
|
Also a big thank you to both Sola Gratia Farm and the IDEA Store of Urbana, IL, USA, without whom this project would not exist.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user