Smart Plant Watering System
Automatically waters a plant based on real-time soil humidity and temperature readings.
Author: Iulia-Andreea Lovin
GitHub Project Link: https://github.com/UPB-PMRust-Students/proiect-iuliaandreea30
Description
A device that monitors soil humidity and ambient temperature to automatically water a plant when needed. It also uses LED indicators to visually display the current moisture level of the soil.
-
The system uses a capacitive soil moisture sensor v2.0 to measure soil humidity.
-
A DHT22 sensor detects the air temperature and humidity.
-
A mini water pump is activated automatically via a MOSFET (STP55NF06L), controlled by the Raspberry Pi Pico 2 W.
-
LEDs (green, yellow, red) indicate the soil moisture status visually.
-
The water pump is powered separately via a 2x18650 battery pack and a step-down voltage module to ensure stable 5V output.
Diagram
Motivation
This project reflects my interest in diving deeper into embedded systems using Rust, a language known for its speed and safety. It also solves a practical problem — helping maintain healthy plants automatically.
While planning this system, I realized it's not only about writing code, but also about integrating hardware, sensors, and electronics — a hands-on approach that connects creativity with engineering.
Architecture
The Raspberry Pi Pico 2 W acts as the central controller, managing all components in the system.
The capacitive soil moisture sensor v2.0 provides a more accurate and stable analog reading of soil water content.
The DHT22 sensor reads the ambient air temperature and humidity.
The MOSFET STP55NF06L controls the activation of the mini water pump based on moisture and temperature conditions.
LED indicators:
- Green LED: Soil is well-watered
- Yellow LED: Soil is moderately moist
- Red LED: Soil is dry (triggers watering)
The 2x18650 battery pack supplies power to the water pump, regulated to 5V by an LM2596 step-down module.
Log
Week 5 - 11 May
Week 12 - 18 May
Week 19 - 25 May
Hardware
-
Raspberry Pi Pico 2 W:
- Purpose: Central control unit.
- Function: Runs Rust code to control sensors, pump, and LEDs.
-
Capacitive Soil Moisture Sensor v2.0:
- Purpose: Measure soil humidity with better stability and waterproofing.
- Function: Sends analog voltage proportional to soil moisture.
-
DHT22 Sensor:
- Purpose: Measure ambient temperature and air humidity.
- Function: Provides digital temperature and humidity data via a GPIO pin.
-
Mini Submersible Water Pump (5V):
- Purpose: Water the plant automatically.
- Function: Powered separately and switched using MOSFET.
-
MOSFET STP55NF06L:
- Purpose: Switching the water pump safely at 5V with logic-level control.
- Function: Acts as an electronic switch controlled by Pico.
-
LEDs (Red, Yellow, Green):
- Purpose: Visual indicator of soil moisture status.
- Function: Light up according to defined moisture thresholds.
-
Power System:
- 2x 18650 battery pack to power the pump.
- LM2596 Step-Down Converter to regulate voltage to 5V.
Hardware Overview
- The Pico 2 W reads moisture and temperature.
- Based on soil conditions, it controls the pump via the STP55NF06L MOSFET.
- LEDs give real-time feedback on soil humidity.
Schematics
Bill of Materials
Device | Usage | Price |
---|---|---|
Raspberry Pi Pico 2W | Main microcontroller | ~40 RON |
Capacitive Soil Moisture Sensor v2.0 | Soil humidity sensing | ~20 RON |
DHT22 Sensor | Ambient temperature/humidity sensor | ~35 RON |
Mini Submersible Water Pump 5V | Watering plant | ~30 RON |
MOSFET STP55NF06L | Switching the pump | ~9 RON |
LM2596 Step-Down Module | Voltage regulation | ~12 RON |
2x 18650 Batteries + Holder | Pump power supply | ~20 RON |
1-meter water pump hose | Transports water | ~7 RON |
LEDs | Indicators of soil status | ~2 RON |
Breadboard | For building and testing the plant watering circuit | ~12 RON |
330-ohm resistors | Used to limit current to LEDs and other components | ~3 RON |
10k-ohm resistors | Used as pull-up/pull-down resistors or in voltage dividers | ~3 RON |
20 cm male-to-male jumper wire | Used to connect elements | ~9 RON |
20 cm male-to-female jumper wire | Used to connect elements | ~9 RON |
Software
Library | Description | Usage |
---|---|---|
embassy-rp | RP2040 async embedded support | Core hardware abstraction |
dht-sensor | Reading DHT22 sensor data | Temperature and humidity |
embedded-hal | Hardware abstraction layer | GPIO, ADC, PWM |