Abstract
Smart Irrigation is an open-source Internet of Things (IoT) project. IoT-based smart agriculture system using STM32, DHT11, ESP8266 & SIM800L for automated monitoring, irrigation control, and SMS alerts. IoT-based automatic irrigation system using STM32F407, ESP8266 WiFi, and environmental sensors with web dashboard control. It is built using C. Key capabilities include: Automatic Irrigation: Activates watering when soil humidity ≤ 50%, stops when ≥ 80%; Manual Override: Remote control via web dashboard; Real-time Monitoring: Temperature/humidity updates every 2 seconds. The complete source code is publicly available on GitHub under the MIT License, making it a useful reference for students building an Internet of Things (IoT) mini project or final-year project.
1. Introduction
IoT-based automatic irrigation system using STM32F407, ESP8266 WiFi, and environmental sensors with web dashboard control.
2. Objective
IoT-based smart agriculture system using STM32, DHT11, ESP8266 & SIM800L for automated monitoring, irrigation control, and SMS alerts.
This project demonstrates how C can be applied to a real-world Internet of Things (IoT) problem.
3. Key Features / Modules
- Automatic Irrigation: Activates watering when soil humidity ≤ 50%, stops when ≥ 80%
- Manual Override: Remote control via web dashboard
- Real-time Monitoring: Temperature/humidity updates every 2 seconds
- SMS Alerts: Temperature threshold notifications (33°C) with 5-minute cooldown
- Web Dashboard: Live data and controls accessible from any device
- Dual Mode Operation: Seamless AUTO/MANUAL mode switching
- Tested configuration (4.0V): 4.0V × 0.667 = 2.67V Safe for STM32
- With 3.7V Li-Ion: 3.7V × 0.667 = 2.47V Safe for STM32
- With 4.2V (fully charged): 4.2V × 0.667 = 2.80V Safe for STM32
4. Technology Stack
- MCU: STM32F407VGT6 (168MHz ARM Cortex-M4F)
- WiFi: ESP8266 (802.11 b/g/n, 2.4GHz)
- Sensor: DHT11 (0-50°C, 20-90% RH, ±2°C/±5% accuracy)
- Communication: UART, USB CDC, WiFi, MQTT, GSM
- Update Rate: 2-second sensor intervals
- Power: 5V (STM32), 3.3V (ESP8266), 4V (SIM800L)
5. System Requirements
General requirements for this technology stack — check the README for exact versions.
- Arduino IDE / PlatformIO or a C compiler (gcc)
- Target board where applicable
- Git (to clone the repository)
6. Installation & Setup
git clone https://github.com/Yassineg07/smart-irrigation.git
cd smart-irrigation- Download from mosquitto.org
- Install and run as service
sudo apt update
sudo apt install mosquitto mosquitto-clients
sudo systemctl start mosquitto
sudo systemctl enable mosquittodocker run -d -p 1883:1883 --name mosquitto eclipse-mosquittocd websocket
npm install
npm run setup # Automated configuration script
npm startcd websocket
npm install
# Edit server.js and replace YOUR_MQTT_BROKER_IP with your broker IP
npm startFull setup instructions are in the project README.
7. Future Enhancements
Suggested extensions you can add to make this your own project.
- Add a mobile dashboard using Blynk or Firebase
- Store readings in a cloud database for history charts
- Add alerts via SMS / Telegram when thresholds are crossed
8. Viva / Review Questions
Common questions examiners ask for projects in this domain.
- Which microcontroller / board and sensors are used and why?
- How does the device send data (Wi-Fi, MQTT, HTTP, Bluetooth)?
- Where is the sensor data stored and visualised?
- How is power consumption managed?
- How would you secure the device and its communication?
9. Source Code & License
This project is developed by Yassineg07 and published on GitHub under the MIT License. Please follow the license terms and credit the original author when you use or modify this code.
Want to build this as your internship project?
Work on an Internet of Things (IoT) project like this with mentor guidance, weekly reviews and an internship certificate from Training Trains, Erode — online or offline.
Apply for Internet of Things (IoT) Internship