Before you judge me for being lazy, let me give you some context. In an earlier post, I showed off the sensor I built for my chicken’s watering bucket. This visual indicator lets me see how much water they have left. And I get this information by simply looking out my back window. After I published the article, I received a very valid question. If I have a sensor that knows when the chickens need a refill, why can’t it turn on the hose already? Eureka!
I can now picture a fully-automated system where I no longer worry about chicken hydration. To get to this future state, I needed to tackle two challenges. The first is being able to turn the hose on and off remotely. Which is what this article is about. Step two will be connecting the water level sensor to the hose controller.
And as a quick aside, this multi-step approach to automation is how really awesome projects get built … one working piece at a time.
The major parts for this solution are: a Particle Photon, a “relay”, a sprinkler valve, and a tool in the Particle app called Tinker. I’ll explain what a relay is in a bit. In the meantime, here’s a diagram that shows the building blocks we’re using.
BUILDING THE CIRCUIT
The circuit for this setup is pretty simple. I used the output pin from a Photon to connect to thing called a relay board. This is a switch that allows you to control a big voltage from a much smaller one. In this case, the small voltage is coming from the Photon, which runs at 3.3V DC. This is a little bigger than what you’d get if you put two AA batteries together. The big voltage is what controls the sprinkler valve, which is 24V AC. Even if you don’t know anything about electricity, you can see there’s a big difference. The relay helps bridge the gap, and prevents the Photon from frying. Below is what the circuit looks like conceptually. Whenever you send an “on” signal from the Photon to the relay, it closes the switch on the other side. This turns on the sprinkler valve and lets the water flow.
After you get everything wired up, the final step is to open the Particle app and load the Tinker tool. In case you missed my Photon/Tinker setup article, here’s the link.
And as I promised earlier, this project doesn’t require a single line of code. Tinker does everything for you. The screenshot below shows how you can control each pin on the Photon with the tap of a finger.
The final picture below shows the sprinkler valve connected to the hose. I can now turn my water on from anywhere I have cell or WiFi service. As it turns out, I’ve actually found this project so useful I’ve built two copies. One for my chicken waterer. The other for my 200’ garden hose … maybe I really am lazy. ????
- Particle Photon
- Sockit Dry Box
- USB Charger
- USB Cable
- 24V AC Power Supply
- Irrigation Solenoid
- 5-Conductor Irrigation Wire
SOFTWARE / CLOUD SERVICES
- Particle Cloud Services
- Particle’s Tinker App
I’m using the built-in software on the Particle Photon and the Tinker application. As a result, I get off easy for this project and don’t need to do any coding.