Skip to main content
Version: ACS CC

Smart Plant Watering System

Automatically waters a plant based on real-time soil humidity and temperature readings.

info

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 System 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

  1. Raspberry Pi Pico 2 W:

    • Purpose: Central control unit.
    • Function: Runs Rust code to control sensors, pump, and LEDs.
  2. Capacitive Soil Moisture Sensor v2.0:

    • Purpose: Measure soil humidity with better stability and waterproofing.
    • Function: Sends analog voltage proportional to soil moisture.
  3. DHT22 Sensor:

    • Purpose: Measure ambient temperature and air humidity.
    • Function: Provides digital temperature and humidity data via a GPIO pin.
  4. Mini Submersible Water Pump (5V):

    • Purpose: Water the plant automatically.
    • Function: Powered separately and switched using MOSFET.
  5. MOSFET STP55NF06L:

    • Purpose: Switching the water pump safely at 5V with logic-level control.
    • Function: Acts as an electronic switch controlled by Pico.
  6. LEDs (Red, Yellow, Green):

    • Purpose: Visual indicator of soil moisture status.
    • Function: Light up according to defined moisture thresholds.
  7. 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

DeviceUsagePrice
Raspberry Pi Pico 2WMain microcontroller~40 RON
Capacitive Soil Moisture Sensor v2.0Soil humidity sensing~20 RON
DHT22 SensorAmbient temperature/humidity sensor~35 RON
Mini Submersible Water Pump 5VWatering plant~30 RON
MOSFET STP55NF06LSwitching the pump~9 RON
LM2596 Step-Down ModuleVoltage regulation~12 RON
2x 18650 Batteries + HolderPump power supply~20 RON
1-meter water pump hoseTransports water~7 RON
LEDsIndicators of soil status~2 RON
BreadboardFor building and testing the plant watering circuit~12 RON
330-ohm resistorsUsed to limit current to LEDs and other components~3 RON
10k-ohm resistorsUsed as pull-up/pull-down resistors or in voltage dividers~3 RON
20 cm male-to-male jumper wireUsed to connect elements~9 RON
20 cm male-to-female jumper wireUsed to connect elements~9 RON

Software

LibraryDescriptionUsage
embassy-rpRP2040 async embedded supportCore hardware abstraction
dht-sensorReading DHT22 sensor dataTemperature and humidity
embedded-halHardware abstraction layerGPIO, ADC, PWM

  1. Rust Embedded Book
  2. Embassy Rust Project
  3. Raspberry Pi Pico SDK Documentation