Over the last few years, I decided to make my “Outdoor automation” a little more permanent and indoors. The Pi lived outside in my garage or screwed to a floor joist in my basement. My goat was to provide the same functionality but in a safer case, and have it permanently installed. The tasks the solution needed to perform were as follows.
- Water the lawn during the summer
- Control the Christmas lights during the winter
- Play music for Halloween on Oct 31.
I controlled the watering with a 4 bank relay. My plan was to have the ability to control 4 watering zones. I still only have the one water valve but I do want the ability to add up to 4.
During the month of December, I wanted to control the Christmas lights. 1 relay for the eve lights and 3 more for the floodlights on the lawn. The floods alternate colour ever 30 seconds.
The Hardware & Software
I already owned most of the hardware for the Pi. It was the outdoor box to house the outlets and pipe. I also wanted a box inside to mount the relays, transformer and the Pi.
I used an 8 channel relay board. I soldered 4 relays together for the 25V AC side and the other 4 for the 120V AC side. If at any point I need to change the board, I will be replacing this one with 2 x 4 channel boards. This will then separate the high and low voltage.
The Pi was always the best candidate for these tasks. The Christmas lights and Sprinkler projects were built in Python3. You can find the code for these here.
The Halloween project just plays some scary music to a speaker I place just near the door. I ordered a 15′ 3.5mm cable extension to get the audio from the Pi out to the front lawn. This cable I run through the window because it’s used once a year for one day. The code for this is available here.