[Valentin] is an engineering student and hobbyist gardener. He was planning on going home for a 3 week semester break and certainly could not leave his balcony plants to fend for themselves. The clearly obvious solution was to make an automated watering system!
The most interesting part of this build is the valve. Anyone could have bought an off-the-shelf solenoid valve, not [Valentin], he designed his own. It is simple and just pinches the water supply tube to stop the flow of water coming from the elevated 20-liter water container. The ‘pinching’ arm is raised and lowered by an RC Car servo. When the valve is in the closed position, the servo does not need to continually apply pressure, the servo is powered down and the valve stays closed. This works because when the valve is closed, all forces are acting in a strictly radial direction on the servo’s drive disk. Since there is no rotation force, the drive disk does not rotate and the valve stays closed.
The servo is controlled by a microcontroller. Instead of rotating the servo to a certain degree, the servo rotates until it hits a limit switch. Those limit switches tell the microcontroller that the valve is either in the open or closed position. You must be asking yourself ‘what happens if the limit switch fails and the servo wants to keep rotating?’ [Valentin] thought of that too and has his code measure how long it is taking to reach the limit switch. If that time takes too long, the servo is powered down.