The new-to-us home we moved into last year has a in-ground sprinkler system. However, it's getting a bit long in the tooth. Also, It's "user interface" leaves a lot to be desired.
<photo of current controller>
Being 30 year old technology, there's no way to remotely monitor or control the system. Further, many of the sprinkler heads are worn out, function erratically, or don't function at all. The system needs a bit of an overhaul. Our overhaul of the system begins with the controller.Overview
In general, the sprinkler system control is fairly simple. The yard is divided into 7 zones, each of which can be turned on and off independently. Each zone is controlled by an electrically actuated valve. When 24 volts of DC is applied to the valve, it opens and water flows through the pipes and sprinkler heads in that section of the yard. A 7-channel relay is used to control the valves.
A schedule can be programmed into the controller to tell the zones when to turn on and off automatically. Zones can also be turned on and off manually.
Our new controller will function in a very similar way. One key difference - a Particle Photon will be at the helm in our new controller. This will enable remote access to the system's current status and will also enable remote control of the system. We'll be able to modify the schedule and turn zones on and off from anywhere on the internet! We'll also be able to integrate the sprinkler system into our home automation system, which will provide monitoring and control on the same user platforms as the rest of our home's automated devices.
This new technology platform will also open the door to more advanced features in the future. We'll be able to incorporate moisture meters and/or rain gauges so the system only runs when the grass truly needs water. We can enter multiple and/or more complex schedules. Etc. All it takes is a firmware update, which, thanks to the Photon's capability, can also be done from anywhere on the internet.Construction
Set-up the Photon
Setting up the Photon is pretty easy. It involves a smart phone app and applying power to the Photon. The app will walk you through the set-up. You'll give your Photon a name and configure it to connect to your wifi network. When all is said and done, your Photon will be connected to the internet, have a demo app installed that you can "tinker" with from the app, and it'll be integrated into the Particle cloud platform.
Flash Custom Firmware
Now it's time to program our Photon to control our sprinkler system. Version 1 of our custom firmware will include the following functionality:
- Read a schedule from persistent storage whenever the Photon starts up.
- Read a schedule from persistent storage on-demand. This permits the schedule to be edited remotely/externally. Once schedule updates are completed, a command can be sent to the Photon instructing it to read the update schedule.
- Write the schedule to EEPROM so that the schedule can be loaded and executed even if the Photon has lost its wifi connection.
- Receive commands via MQTT - this allows remote control from our home automation system or any other system that speaks MQTT.
- Send status updates via MQTT - this permits the sprinkler system to broadcast its current state to external systems such as our HA system.
- Toggle zones on or off - based on schedules or manual commands.
- Enable/Disable the system - it's too cold during the winter to run the system.
We created a Star Trek-themed touchscreen that we use to manually control the sprinkler control Details on that project can be found here.