Sometimes the garden just needs a bit of extra water. As a way of not having to run the hose out there, this allows you to turn on the underground sprinklers with your phone.
The theory is simple. Wire up an ESP8266 as an Access Point. Code the ESP8266 so that it serves a web page allowing a user to select options for the sprinkler. Have the ESP8266 then turn on a relay which supplies power to the sprinkler board which turns on the solenoid which turns on the water.
The circuit in between the two boards is just a basic NPN transistor switch with a 1k resistor on the base and a 1k resistor between the emitter and ground. The collector is tied to +5v. The voltage to the relay comes from the junction between the emitter and the 1k resistor going to ground.
The board I chose to use is a basic ESP8266 which did happen to have a +5v output so that I didn't have to worry about providing a +5v for the relay. The relay I used did prefer to have a +5v signal instead of +3.3v that the ESP8266 normally would use. It also specified using +5v to power it and I didn't bother to check if it would actually run on +3.3v.
The relay is hooked into an underground sprinkler system controller box. The solenoids run on 26v AC and the existing controller board is essentially just a bunch of relays to enable that voltage to go to the solenoid. One pole of the relay is wired to the powered junction on the controller board. The other pole of the relay is wired to the sprinkler junction fo the zone we want to control.
When you serve the web page and a client selects an option to turn on the sprinkler, this writes a pin high (3.3v). That 3.3v causes the transistor to turn on. That provides +5v to the input of the relay. That causes the relay to turn on joining the 26v AC power to the junction for the sprinkler zone causing power to flow to the solenoid and water to flow.
The code does implement a timer so that it will automatically turn itself off after the selected duration.
Selecting a different option on the web page to turn the sprinklers off will write the pin low (0v) causing the transistor to turn off and zero the voltage to the relay. That causes the relay to turn off and the power to no longer go to the solenoid. That causes the valve to turn off.
Overall, it's a very simple way to control a sprinkler zone from your phone.
Comments
Please log in or sign up to comment.