This Firmware is a slightly modified variant of the original OpenSprinkler firmware to run with an inexpensive 4 Channels Relay Module AC/DC ESP-12F Development Board (a.k.a. "ESP12F_Relay_X4")
See also ESP12F_Relay_X4_Schema.pdf
- 4 OpenSprinkler station, controlled by the board relays
- 3 Buttons
- OLED Display (SSD1306, 128x64)
- Only 4 sprinkler stations are supported (no support for Zone Expander)
- Sensor 1 and 2 are not supported yet (GPIO1 and GPIO3 could be used)
- RF Transmitter not supported yet (GPIO10 could be used)
- Current sensing is not supported (disabled on the OLED display)
-
- Solder all supplied pin headers
- Attach the relay jumper
RY1
<—>IO16
RY2
<—>IO14
RY3
<—>IO12
RY4
<—>IO13
-
- Wiring:
Display
<—>ESP12F_Relay_X4
:GND
<—>GND
VCC
<—>3.3V
SCL
<—>IO5
SDA
<—>IO4
- Wiring:
-
Real Time Clock (DS1307)
Since this is a 5V module it's important to remove the pull up resistors (5V!) on SDA and SCL.
It's also important to use a rechargeable battery LIR2332!- Wiring:
RTC
<—>ESP12F_Relay_X4
:GND
<—>GND
VCC
<—>5V
SCL
<—>IO5
SDA
<—>IO4
- Wiring:
-
- Wiring:
ESP12F_Relay_X4
<—>Button
<—>Powering
:IO2
<—>Button 1
<—>GND
IO0
<—>Button 2
<—>GND
(IO0 has an external pull up resistor on the board!)IO15
<—>Button 3
<—>3.3V
(IO15 has an external pull down resistor on the board!)
- Wiring:
-
USB to TTL Serial Adapter 3.3V
- Assure that the Adapter is set to 3.3V (in case it supports also 5V)
- Wiring:
TTL-Adapter
<—>ESP12F_Relay_X4
(only needed during programming):GND
<—>GND
RXD
<—>TXD
TXD
<—>RXD
3.3V
<—>3.3V
-
Valve Power Supply (e.g. 24V~Bell-Transformer, in case you use 24V AC valves.)
Important: If you want to turn on the transformer via a relay (as OpenSprinkler Master Zone) you should consider to use a "RC Circuit" aka "Snubber" to protect the relay contacts.
-
Enclosure (e.g. TRU COMPONENTS TC-9065652 Universal enclosure, in case you want to place the transformator into the enclosure)
- In PlatformIO select the "esp12f_4ch_relay_board" task of the Project
- Build the firmware
- To activate the Flash-Mode Press and hold Button 2 until the reset button on the ESP12F_Relay_X4 board was also pressed
- Upload the Firmware
- Press the RST button of the ESP12F_Relay_X4 board
- Follow the instructions of the OpenSprinkler User Manual
Distributed under the GNU General Public License license. See LICENSE.txt for more information.
Since the WiFi connectitivity was quite poor I added an external antenna. See https://www.instructables.com/External-Antenna-for-ESP8266/ for more details.
I added the branch "NODEMCU_74HC595" branch that uses a NodeMCU, 74HC595 ShiftRegister and an 8Ch 5V Relay board.