Dataset on Real-Time IoT-Based Fertigation, Irrigation, and Hydroponics Smart Agriculture System for Precision Farming Applications Using STM32F401RE Microcontroller Architecture

Published: 1 June 2026| Version 1 | DOI: 10.17632/96nj4yyzkg.1
Contributors:
Reuben Samuel Diarah,
,
,
,

Description

The dataset for the real-time IoT-based fertigation, irrigation, and hydroponics smart agriculture system was collected through an experimental smart farming platform developed using the STM32F401RE microcontroller as the central processing and control unit. The system integrated multiple environmental and nutrient monitoring sensors, including a 7-in-1 RS485 soil sensor, pH sensor, electrical conductivity (EC) sensor, DHT22 temperature and humidity sensor, ultrasonic water level sensor, and flow monitoring units. These sensors were installed across both hydroponic and soil-based cultivation sections to continuously monitor critical agricultural parameters such as soil temperature, soil moisture, ambient humidity, pH, EC, nutrient concentration, and water levels. Sensor readings were acquired at predefined intervals and processed in real time by the STM32F401RE microcontroller using embedded control algorithms developed in the STM32CubeIDE environment. The acquired data were displayed locally through an LCD/OLED interface and simultaneously transmitted to an IoT cloud platform through an ESP8266 Wi-Fi communication module for remote monitoring and storage.

Files

Steps to reproduce

Steps to Reproduce the Data Assemble the smart agriculture experimental setup using the STM32F401RE microcontroller as the central control and data acquisition unit. Integrate the required sensors, including the 7-in-1 RS485 soil sensor, DHT22 temperature and humidity sensor, pH sensor, EC sensor, ultrasonic water level sensor, and flow monitoring sensors. Connect the actuators such as irrigation pumps, nutrient dosing pumps, and solenoid valves to the STM32 controller through relay modules or driver circuits. Configure the hydroponic and fertigation system by installing the nutrient reservoirs, NFT hydroponic channels, irrigation pipelines, and water circulation units within the experimental environment. Prepare nutrient solutions according to the crop requirements and calibrate all sensors using standard calibration procedures before data acquisition begins. Develop and upload the embedded control firmware to the STM32F401RE microcontroller using STM32CubeIDE or a compatible embedded development environment. The firmware should include real-time sensor acquisition routines, threshold-based control logic, actuator switching algorithms, SD card data logging functions, and ESP8266 Wi-Fi communication protocols for IoT cloud synchronization. Power the system and initialize all sensors and communication modules. Configure the sampling interval for data acquisition, typically between 1 and 10 minutes depending on the required monitoring resolution. Ensure that timestamps are synchronized using the RTC module for accurate temporal logging of environmental and operational parameters. Begin experimental cultivation by planting crops in both hydroponic NFT channels and soil-based cultivation sections. Continuously monitor environmental parameters such as soil temperature, humidity, soil moisture, pH, electrical conductivity (EC), nutrient concentration, and water level. The STM32F401RE controller should automatically process sensor readings and activate irrigation pumps, nutrient dosing systems, or solenoid valves whenever predefined threshold values are exceeded or not met. Store all sensor measurements, actuator states, irrigation events, fertigation activities, and operational logs locally on the SD card module in CSV or text file format. Simultaneously transmit the real-time data to the IoT cloud dashboard using the ESP8266 module for remote visualization and monitoring. Continue data acquisition throughout different crop growth stages, including seedbed preparation, germination, vegetative growth, and nutrient management periods. Export the recorded datasets into spreadsheet or CSV formats for preprocessing, statistical analysis, visualization, and further precision farming or machine learning applications.

Institutions

Categories

Real Time Optimization, Agriculture

Licence