Automatic Irrigation System
The project consists of an intelligent irrigation system for plants that constantly monitors essential parameters for optimal irrigation.
Author: Murarescu Carmen-Maria
GitHub Project Link: https://github.com/UPB-PMRust-Students/proiect-CarmenMaria17
Description
The project consists of an intelligent irrigation system for plants that constantly monitors three essential parameters for optimal irrigation:
Soil humidity - determines when plants need water
Reservoir level - checks water availability for irrigation
Light intensity - prevents irrigation during periods of strong light
When soil moisture drops below a preset threshold, the system checks if the reservoir contains enough water and if the light intensity is suitable. If all conditions are met, it automatically activates a mini-pump that irrigates the plants. The system includes a display to show levels (low, medium, high) for the 3 parameters.
Motivation
I chose to develop this automatic irrigation system because I wanted to solve a practical problem many plant owners face, that being the inconsistent watering due to busy schedules or forgetfulness. Second, this project allows me to apply embedded systems knowledge in a hands-on way, working with multiple sensors and including a display for easy reading of the parameters.
Architecture
The main architectural components are:
-
ON/OFF Buttons - for starting and shutting down the irrigation system
-
RTC Clock with Battery - a clock that keeps the microcontroller sleeping, it wakes it at intervals of 10 minutes and completes 20 measurements for accuracy and then puts it back to sleep
-
Humidity Sensor & Photoresistor & Float Sensor - measures the soil humidity and if it is too low, the light is not too strong and there is water in the reservoir then the realy module starts the water pump and it waters the plant
-
Display - shows all the parameters and messages for the start of the process etc.
Architectural Diagram
Log
Week 5 - 11 May
- will do
Week 12 - 18 May
- will do
Week 19 - 25 May
- will do
Hardware
Sensors
-
DHT22 Humidity Sensor: A precision capacitive humidity sensor with digital output that measures soil moisture.
-
Photoresistor: A light-dependent resistor that exhibits variable resistance inversely proportional to light intensity, enabling the system to monitor ambient light conditions for optimal plant growth.
-
Float Sensor: A mechanical sensor triggers when water levels reach predefined thresholds, preventing both reservoir depletion and overflow conditions.
Control and Timing Components
-
RTC (Real-Time Clock) Module: Incorporates a DS3231 enabling programmed sleep cycles for the microcontrollers via interrupt-based wakeup, significantly reducing power consumption.
-
Push Buttons: Two tactile momentary switches providing digital input signals for system control functions including power toggling.
Actuation
-
Relay Module: A 5V relay that provides safe switching of the higher-current water pump circuit.
-
Water Pump: A pump capable of delivering appropriate water volume for plant irrigation.
Display
- ST7735 LCD Display: A 1.8" TFT color display with SPI interface and embedded controller, providing visual representation of system status, sensor readings, and operational modes.
Schematics
Bill of Materials
Device | Usage | Price |
---|---|---|
2x Raspberry Pi Pico W | The microcontroller | 35 RON |
2x Buttons | ON/OFF Buttons | 8 RON |
Humidity Sensor DHT22 | Soil Humidity Measurement | 23 RON |
Photoresistor | Light Measurement | 2 RON |
!!!Float Sensor | Checks Water Level | 20 RON |
RTC Clock with Battery | Sleep Mode for MCU | 20 RON |
Relay Module | Controls the Water Pump | 5 RON |
Water Pump | Waters the Plant | 16 RON |
LCD Screen ST7735 | Displays the measurements | 28 RON |
Power Source - 5V | Displays the measurements | 5 RON |
[Power Source (Battery Support and Battery) - 12V] | Poweres the Water Pump | 15 RON |
[Others (wires, breadboards, pins etc)] | Used for connections | 10 RON |
Software
Library | Description | Usage |
---|---|---|
embassy-executor | Async/await runtime for embedded systems | Provides the core async runtime for concurrent task execution |
embassy-time | Time handling for embedded systems | Manages timers, delays, and time-related operations |
embassy-rp | Raspberry Pi Pico for Embassy | Hardware abstraction layer for RP2040 microcontroller with GPIO, I2C, SPI support |
embedded-hal | Hardware abstraction layer traits | Core traits for peripheral access |
dht-sensor | DHT22 temperature/humidity sensor driver | Provides interface for DHT22 soil humidity measurements |
embassy-rp::adc | ADC module for Embassy RP | Reads analog values from photoresistor for light measurement |
ds323x | DS3231 RTC driver | Manages the real-time clock with alarm functionality for sleep mode |
st7735-lcd | ST7735 display driver | Controls the ST7735 LCD screen |
embedded-graphics | graphics library | Drawing routines for text and graphics on the display |
embassy-rp::gpio | GPIO module for Embassy RP | Controls the float sensor, relay, buttons, and other digital I/O |