Smart Crop Monitoring and Irrigation System with LoRaWANObjectives:
Software:
Read more- Monitor soil moisture and air/soil temperature in real-time to optimize irrigation decisions.
- Transmit data wirelessly over long distances using LoRaWAN via The Things Stack, making it ideal for agricultural applications over large areas.
- Provide accurate information for irrigation decision-making, contributing to waterefficiency and crop health.
- Visualize data on a cloud platform and configure alerts for critical conditions (e.g., soil too dry or wet, extreme temperatures).
Objective Level: Intermediate
Prerequisites:- Fundamentals of Arduino (C/C++) programming.
- Basic concepts of electronics and sensors.
- Familiarity with the Arduino IDE or PlatformIO development environment.
- Understanding of LoRaWAN communication and The Things Stack operation.
- Basic knowledge of cloud IoT platforms.
- 📷WISBLOCK Base: RAK1907 Base Board Rind Gen
- WISBLOCK Core: RAK3172 STM32WL5 (with integrated LoRaWAN)
- WISBLOCK Sensor:
- 📷RAK12035 Soil Moisture Sensor
RAK12003 Temperature Sensor (for soil or water temperature)
- RAK1906 Environment Sensor (for air temperature and humidity)
- WISBLOCK Miscellaneous: RAK1921 OLED Display (optional, for local reading and debugging)
- Other Components / Accessories:
- WisGate Edge Lite 2 (LoRaWAN Gateway
- Battery Connector Cable
- Solar Panel Connector
- Solar Panel
- Screwdriver
- Arduino IDE or PlatformIO
- Arduino libraries for RAK modules (e.g., RAKwireless_RAK3372_BSP) and libraries for each sensor (e.g., DallasTemperature, OneWire, Adafuit_BME680, Adafruit_SSD1306, Adafruit_GFX).
- Configuration software for the RAK7268V2 gateway.
- Account on The Things Stack (for the LoRaWAN network) and a cloud IoT platform (e.g., Ubidots, ThingsBoard).
Estimated Duration: 8-12 hours.
Learning Outcomes:- Ability to design and implement a specific monitoring system for agricultural applications.
- Skill in integrating and calibrating sensors for measuring soil and air parameters.
- Mastery of LoRaWAN communication for rural and field environments using The Things Stack.
- Experience in optimizing power consumption for long-term deployments in remote locations.
- Knowledge in creating customized dashboards for crop management and decision-making.
- Hardware Assembly: Connect the RAK3372 (Core) module to the RAK1907 (Base). Connect the sensors (Soil Moisture, DS18B20, BME680) to the appropriate ports. Connect the OLED Display if it will be used for local readings. Connect the battery cable and solar panel.
- Development Environment Configuration: Install Arduino IDE/PlatformIO and support for the RAK3372 board. Install the necessary libraries for the sensors and the OLED.
- Node Programming (RAK3372):
- Write code to read data from the soil moisture, soil temperature (DS18B20), and air temperature/humidity (BME680) sensors.
- Configure the RAK3372 as a LoRaWAN node (OTAA or ABP).
- Package sensor data into an efficient payload and send it periodically via LoRaWAN.
- Implement low-power modes (deep sleep) to extend battery life, crucial for agricultural deployments.
- Gateway Configuration (RAK7268V2): Connect the gateway to the network and configure it to connect to The Things Stack.
- The Things Stack Configuration:
- Access The Things Stack console.
- Register the Gateway: Add the RAK7268V2 gateway.
- Create an Application: Create a new application.
- Register the Device (RAK3372 Node): Register the device with its LoRaWAN credentials (DevEUI, AppEUI, AppKey for OTAA).
- Configure the Payload Formatter (Decoder): In the application's "Payload formatters" section, write Javascript code to decode the binary sensor payload into a readable JSON object.
- Integrate with the Cloud IoT Platform: In the application's "Integrations" section, add an integration (e.g., "Webhook" for Ubidots or "MQTT" for ThingsBoard) to forward the decoded data.
- Cloud IoT Platform Configuration (Ubidots/ThingsBoard): Create a dashboard to visualize sensor data in real-time. Configure alert rules (e.g., if soil moisture falls below a critical threshold).
- Testing and Deployment: Test the system in a real cultivation environment. Calibrate the soil moisture sensor for the specific soil type. Ensure components are weather-protected if deployed outdoors.
- Soil Moisture Sensor Calibration: Moisture sensors can provide relative readings. It's crucial to calibrate them for the specific soil type and crop conditions (e.g., by measuring actual moisture with a reference method and adjusting sensor values).
- Protection Against Elements: Electronic components must be adequately protected from water, dust, direct sunlight, and animals if deployed outdoors. Use waterproof and breathable enclosures.
- LoRaWAN Range: Perform range tests in the field to ensure the node and gateway communicate effectively in all areas of interest. Topography and vegetation can affect the signal.
- Power Management: Monitor battery level and solar panel charging efficiency. Adjust data transmission frequency to balance data freshness with battery life.
- The system accurately monitors soil moisture and air/soil temperature.
- Data is reliably transmitted to the gateway and The Things Stack.
- The cloud platform displays data usefully for irrigation management and allows for effective alert configuration.
- The device operates autonomously with solar power for the desired monitoring period.
- The code is robust, power-efficient, and easy to understand.
11 projects • 9 followers
Teacher at Maude Studio & Erasmus+ project member: "Developing Solutions to Sustainability Using IoT" (2022-1-PT01-KA220-VET-000090202)
Thanks to Jose Miguel fuentes.
Comments