Plant Watering System

by ntupham20 in Living > Homesteading

21 Views, 0 Favorites, 0 Comments

Plant Watering System

fb7cr7Ut6ZCu3c4VZkYQ9T.jpg

This system monitors soil moisture, light level, temperature, and water level to automatically water a plant. The system uses a Pycom microcontroller running MicroPython, along with sensors and a relay-controlled pump.

Supplies

Pycom Expansion Board

Soil Moisture Sensor

BME280 Sensor

Light Sensor (Grove)

Analog Water Sensor

Relay Module (3.3V)

Water Pump

LED Bar (v2.1)

Tubing + Water Container

Gather All Required Components

WhatsApp Image 2025-06-23 at 12.37.56 PM.jpeg

Make sure you have the following:

  1. Pycom Expansion Board (with MicroPython firmware)
  2. Soil Moisture Sensor
  3. BME280 (Temperature & Humidity Sensor – I²C)
  4. Grove Light Sensor
  5. Analog Water Level Sensor
  6. Relay Module (3.3V compatible)
  7. Water Pump + Tubing + Water Container
  8. (Optional) LED Bar v2.1
  9. Jumper wires, breadboard, USB cable

Connect the Sensors to the Pycom Board

Screenshot 2025-06-23 124239.png

Use the attachment pin mapping.

Knowing that, in this project, we use Pycom Expansion 3, version 5

Install MicroPython on the Pycom Board

If not already done:

  1. Download MicroPython firmware for your Pycom model
  2. Flash it using Pycom’s update tool

Set Up the Development Environment

Install and configure one of the following:

  1. Thonny IDE

Prepare the Main.py Script

Use the provided code (main_final.py) that does the following:

  1. Reads sensor values
  2. Makes decisions based on threshold values
  3. Controls the relay and pump
  4. Prints status to the console

Downloads

Upload the Script to the Pycom Board

  1. Connect the Pycom board to your computer via USB
  2. In Thonny, open and upload main_final.py to the board’s filesystem

Run the Script and Observe Output

  1. Run the script in the IDE
  2. Observe terminal output like:

Soil: 3450 | Light: 1050 | Water: 950 | Temp: 26.5°C

Soil is dry → Watering for 5 seconds

Watering complete.

Test Auto-Watering Behavior

  1. Dry the soil sensor with air → It should trigger watering
  2. Put the soil sensor in wet soil → It should stop watering
  3. Test light and temperature variations
  4. Make sure there's enough water in the tank