Automatic plant watering project using Arduino.
Build the sketch with Arduino IDE and upload to Arduino Nano.
Connect power to the device. Submerge the pump into water and connect hoses for watering. Place humidity sensors into soil.
When connected to computer over USB-C, the device opens a 9600 baud serial connection, and handles these commands:
/sshow current status: date, time, humidity and settings/hshow command help/t HHMMSSset new time, e.g./t 120403for 12:04:03/d YYMMDDset new date, e.g./d 240815for 2024-08-15/w Wset weekday, e.g./w 4for Thursday/a HHMM HHMMset watering times, e.g./a 1015 1830to water at 10:15 and 18:30- watering times between 12:00 and 15:00 will be rejected
/b TTset humidity treshold to skip watering, e.g./b 60to not water if average soil humidity is bigger than 60%/c Sset watering time duration in seconds/lprint recent log in a machine and human-readable format
Each command ends with a new line character.
- Build and upload the code to Arduino
- Connect the real-time clock
- Parse commands sent on the serial
- Update the real-time clock from commands
- Save configuration to external memory
- Measure humidity with sensors
- Detect pump running dry
- Measure the current
- Implement the watering algorithm
- Log data into external memory:
- Watering times
- Pump running without water
- Humidity throughout the day
- Process log data
- Graph time history
- Publish online