General Hardware Description
An ESP8266 with 4MB (32Mb) of flash is required. The software makes extensive
use of the flash storage for both OTA updates and spiffs. Generally this is
an ESP-12x, but other models may be used. In my case I used a WeMos D1 Mini
as the ESP8266 board. I had some in the junk box and it has the 3.3v
regulator, and the usb to serial interface built on board. It also includes
a nodemcu type reset and programming circuit.
The 8 relays are controlled through a 74HC595 8 bit shift register. This is
simply wired to the SPI interface of the ESP8266 (CS (GPIO15), CLK (GPIO14),
MOSI (GPIO13) connected to Latch, Clock and Data In of the 74HC595).
The shift register outputs are then connected via resistors (10k or so) to the
8 NPN transistors acting as relay drivers. In my particular case I had some
quad transistors in a 14 pin dip package in my junk box.
These transistors then drive 8 mini 5v relays. The relay contacts connect
24vac to the corresponding output, and therefore energize a sprinkler solenoid.
A 24vac center tapped transformer powers it all. One leg of the transformer
output is ground for the circuit, the other side is routed to the relays to
control the solenoids. The center tap is rectified through a single diode
to feed the input of a buck type dc-dc switch mode converter. The output
of the convert is set to 5v and is routed to the relays and to the D1 Mini.
The ST1306 OLED is an I2C device and therefore connected to SCL (GPIO5)
and SDA (GPIO4) of the ESP8266.
For the optional real time clock (pcf8563 or ds1307), I rigged that up on a
proto board stacked on the D1 Mini using stacking pins.
The following schematic can be used as a guide. A Fritzing file is also
included. It is also just a guide. Again DIY assembly and soldering skills
are required to complete this project.