The paddock monitoring system provides real-time environmental data from agricultural fields. As shown in Figure 1, the system uses a network of sensors connected to microcontrollers that transmit data to a central API server.
- 3 x Heltec WiFi LoRa 32 V3
- 3 x 40 jumper wire cables, 20 cm each M2M/F2M/F2F
- 1 x soldering iron set
- 1 x heat shrink tubing set
- 5 x 1M cable DS18B20 digital stainless steel temperature sensor
- 3 x IP65 electrical project box (20 x 12 x 7.5 cm)
- 5 x Mini Breadboard 400 Pin
- 3 x Bingfu Lora Gateway Antenna 868 MHz 2 dBi RP-SMA Connector Outdoor Antenna
- 1 x Cable Gland Set, IP68 Waterproof Adjustable Cable Gland
The following code snippet shows the platformio.ini
configuration file for the paddock monitoring microcontroller project.
Then PIN-configuration for the LoRa module and the DS18B20 temperature sensor are defined.
The database model consists of 4 entities: Paddock, Microcontroller, Sensor, and Measurement. As shown in Figure 2, each paddock can have multiple microcontrollers, each microcontroller can have multiple sensors, and each sensor can record multiple measurements.
The paddock monitoring system is deployed using a microservices architecture with separate services for the API server and mobile app. The deployment flow is as follows:
paddock-monitoring.tony-luke.de
The paddock monitoring system exposes the following RESTful API endpoints to interact with the application:
/measurements
Retrieve all measurements
/measurements
Create a new measurement
/microcontrollers
Retrieve all microcontrollers
/microcontrollers
Register a new microcontroller
/sensors
Retrieve all sensors
/sensors
Register a new sensor
/paddocks
Retrieve all paddocks
/paddocks
Create a new paddock
The mobile app provides real-time sensor data and paddock status information. As shown in Figure 3, users can view temperature, humidity, and soil moisture levels for each paddock.
