More interested in spending an evening creating an automatic houseplant waterer than actually taking the five minutes everyday to water your plants? This project is for you! Very simple to set up, this project utilizes the Time and TimeAlarms libraries to execute a 30 second drip watering at designated times of the day. I chose to build a simple wooden housing to hold the valve-reservoir upright and leave ample space for light to hit the plants. I am an absolute beginner with Arduino, so I can assure you this project can be completed by anyone attempting to get familiar with the basics of Arduino. The code and circuit are very simple to set up, and you will never even need to think about your plants from sowing seeds until that glorious harvest ever again.
This design features a simple MOSFET circuit to give the correct voltage to the solenoid valve. A blue LED is also programmed to turn on at the same time as the valve to indicate that watering is in progress.
This design does not use a moisture sensor to determine when to water the plant; instead, it simply waters the plant at certain times of the day. Depending on the valve used, the delay for how long the valve ought to be on might need to be adjusted. Perhaps only once a day or more than twice a day is suitable... To do this, you can change the alarm times within setup using the format,
Alarm.alarmRepeat(hours, minutes, seconds, function);
Also, feel free to adjust the delay of the valve (mine is set on a 30s watering time) if your valve releases water at a quicker/slower rate by modifying the following elements:
int t = second() + 30;
delay(30000);
If you plan to use the code for this project, be sure to include the libraries for time.h, timealarms.h, and timelib.h. Please feel free to modify any aspects of this project or try out the code for yourself.
Comments
Please log in or sign up to comment.