Plant Watering System

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

Make sure you have the following:
- Pycom Expansion Board (with MicroPython firmware)
- Soil Moisture Sensor
- BME280 (Temperature & Humidity Sensor – I²C)
- Grove Light Sensor
- Analog Water Level Sensor
- Relay Module (3.3V compatible)
- Water Pump + Tubing + Water Container
- (Optional) LED Bar v2.1
- Jumper wires, breadboard, USB cable
Connect the Sensors to the Pycom Board

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:
- Download MicroPython firmware for your Pycom model
- Flash it using Pycom’s update tool
Set Up the Development Environment
Install and configure one of the following:
- Thonny IDE
Prepare the Main.py Script
Use the provided code (main_final.py) that does the following:
- Reads sensor values
- Makes decisions based on threshold values
- Controls the relay and pump
- Prints status to the console
Downloads
Upload the Script to the Pycom Board
- Connect the Pycom board to your computer via USB
- In Thonny, open and upload main_final.py to the board’s filesystem
Run the Script and Observe Output
- Run the script in the IDE
- 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
- Dry the soil sensor with air → It should trigger watering
- Put the soil sensor in wet soil → It should stop watering
- Test light and temperature variations
- Make sure there's enough water in the tank