CST3135 — Arduino Powered Watering System Coursework

Published on April 12, 2024.

Microcontroller boards are powerful hardware devices as they can be programmed to achieve a variety of tasks. Within this coursework, I developed an Arduino Controlled Plant Watering System using a Soil Hygrometer and a Submersible pump.


Microcontroller boards are powerful hardware devices as they can be programmed to achieve a variety of tasks

Within this project, I utilized my Arduino starter kit to develop an Automated Plant watering system called SproutCare. I wrote an Arduino program to trigger a water pump to water the soil based on the level of humidity in the Soil.

Before you read further, here's a demonstration of the Arduino project in operation ☺️.

Project Components:

The following list outlines the various components used to develop this project;

  • Arduino Uno R3 — as a microcontroller.

  • Soil Hygrometer — for detecting soil humidity as water levels.

  • Buzzer — for making a sharp alerting sound when the pump runs.

  • LED Light — to visually inform users when the pump runs.

  • Submersible Water Pum p — to draw water from the pump via a hose into the soi.

Wiring Diagram

The following wiring diagram depicts how ports and the breadboard connect the Arduino Uno 3, Buzzer, submersible water pump, and Hygrometer components.

Project Code Explanation

The complete code for this project is available within my mdx-cst3135-arduino-proj repository on GitHub. I developed and executed these blocks of code using the Arduino IDE software on my M1 MacBook Max.

In the block of code, I am leveraging the SoilHygrometer library written by Giuseppe Martini to read the analog input from the Hygrometer device. The code sets the Submersible Water Pump to use pin 8, the LED alert bulb to pin 9, and the buzzer to pin 4.

Using a conditional statement, the code above will switch on the Pump, Buzzer, and LED alert bulbs when the soil humidity value falls below 65 and turn them off when above 65.

Further Improvements

Soon, I plan to extend this project by introducing the ESP32 WiFi module shown in the image below for improved observability.

Introducing a WiFi Module into this project will enable me to integrate the AWS IoT Core service to stream logs from the project into the IoT Core service, and then into a mobile device rather than printing logs to the Arduino Serial Monitor.

Further Reading Resources