Powering a 24 Volt sensor with an arduino?

 Ok here is the issue. Right now I am designing a rain water collection system by having my down spout drain into a 55 gallon plastic drum. I want to cap the drum to avoid spillage. The problem is what happens when the drum is full and the rain is still coming in. I know there are plenty of mechanical ways to solve this problem but I wanna have fun with an Arduino I have laying around. What I am thinking is run a pipe out of the bottom that has an irrigation valve installed (for anyone who is reading that that isn't aware of what an irrigation valve is, it is and inexpensive solenoid valve that is used for unground sprinkler systems). I figure I will add a water level sensor to the inside of the barrel and then hook the sensor and valve together via my Arduino. From there type a little code and violaa I have an over fill protection device!

Here is the problem: An irrigation valve is 24v and the Arduino is 6volts. I know I can get the 24 volts from a power supply down to 6volts via resister, but then how would power the valve? My goal is to NOT have to buy a 12volt 1" solenoid (i didn't want to spend a lot of money on this project). I am not sure if there is a solution to this problem, but being a very green/inexperienced electronics hobbyist figured could hurt to ask.

sort by: active | newest | oldest
kjsrocks2 years ago

To open the valve you will need a relay for the arduino then all you do is hook up your valve to the relay like it is a switch.

Here is one from amazon http://www.amazon.com/Arduino-Module-Development-A...

For the sensor this one would measure the top 12 inches of your barrel http://www.adafruit.com/products/464

And personally i would use a 12v valve because it is easier to find 12v power supply.

All you need is a transistor, a resistor, and a diode.

Try this for ideas.


A simple overflow back to the drain would be sooo much easier....
Valves and electronics fail, same for power supplies, a simple pipe won't ;)
And with the max. voltage the Arduino can handle you need a boost converter for the valve and of course a suitable transistor to switch it on.
Although some people might just use a float connected to a drain valve on huge tanks.
Guess I am just too old and fail to understand why everything need an Arduino these days.
Still waitin for an Arduino light switch though ;)

Mpc1055 (author)  Downunder35m2 years ago


You are 100% right!!! But how cool is it to make it using motors and sensor hahaha:-)

Mpc1055 (author) 2 years ago

thanks Stevastrouk!