thomasnewmancomputer engineer
  • work
  • writing
  • about
  • contact
All projects

Thomas Newman / Computer Engineer

Explore projects ↗GitHub ↗Get in touch ↗

Autonomous Plant-Watering System

Project 04Sensing / control systems

A soil-moisture controller that switches between three watering levels and plots readings on a live Java chart.

JavaI2CArduino (Firmata)Sensors
Autonomous Plant-Watering System
Embedded systems1 min read
View source

Role: Solo course project.

I developed this project for my coursework in EECS 1011 using the Seeeduino Beginner kit.

The problem#

One fixed watering amount either drowns a plant that's slightly dry or under-waters one that's very dry. I wanted the response to scale with how dry the soil actually is.

Three-state control#

Soil readingStateAction
WetIdleNo pump
Slightly dryTop-upSmall pump
Very dryRecoverBig pump
Source codetext
Moisture sensor -> I2C -> Java state machine -> Small / big pump

There is a small cooldown between each pump (around 1 second), and threshold values were based on experimental testing with a real plant. The moisture sensor provided the Arduino with a value between 1-1000, where 1000 is dry and 1 is wet. Therefore, my thresholds were anything above 620 was dry and needed significant water, between 620 and 580 just needed a little bit of water to top it off, and above 580 did not need water, so no pumping was required.

Live monitoring#

Moisture readings are plotted on a live Java chart, so you can watch each watering event pull the moisture level back up.

Challenges
  • Choosing thresholds, and avoiding rapid on/off switching right at a boundary
  • Calibrating the sensor between dry air and a cup of water

On this page

  1. The problem
  2. Three-state control
  3. Live monitoring
  4. Source code

Source code

Open repository

Last edited on October 27, 2026 at 12:17 AM EDT

← Previous projectArduino RadarNext project →Automatic Wall-Avoiding Robot