OpenSprinkler › Forums › Hardware Questions › 12-Volt DC Solenoid Valve Supoprt
- This topic is empty.
July 10, 2013 at 3:30 pm #22523
I have the following…
# OpenSprinkler Pi
# Model A Pi
# 12-Volt DC Solenoid
# Power Supply Output: 24V-1.1A
Questions I have…
# Can I power my 12-Volt DC Solenoid with this setup, anything I need to be concerned with that the Solenoid is DC and not AC?
# Is the power supply suitable? Can I use a lover Voltage supply? ie 14V?
Sorry is the questions are a little simple, im not hot on hardware hacking and struggling to get a confident answer while researching online.
timJuly 11, 2013 at 5:41 am #24772
You can but it will require modifications.
1. OpenSprinkler Pi can run on 12V DC. Make sure that when you connect the DC wires to the terminal block, the pin closer to the power switch is ground, so the negative wire should go to that pin. Don’t worry if you accidentally reversed the polarity — there is a rectifier diode that protects the circuit.
2. The more tricky part is the solenoid drivers — because OpenSprinkler Pi is designed to work with AC valves, it uses triacs (ac transistors) to control valves. If you directly plug in DC valves, you will find that they can only be turned on, and once on they can never be turned off. That’s because of the way triacs work. So you will need to either replace the triacs by transistors or MOSFETs, in order to directly interface with DC valves, or you can also use an external relay board. This blog post provides some details about using relay board:
http://rayshobby.net/?p=4717July 11, 2013 at 8:36 am #24773
Hi Ray, thanks for your reply.
I have seen that blog post, would I be correct in saying that I need to…
# replace the following triacs http://rayshobby.net/wordpress/wp-content/uploads/2013/04/IMG_2623-300×168.jpg with a 2N3904 transistor
# swap my 24v AC to a 12v DC power supply
Last few questions…
# I only plan to power one solenoid, would I need to replace all triacs?
# The Pi will be happy with this setup?
Thanks for your help again, the world of triacs and transistors are very new to me 😉
timJuly 11, 2013 at 12:03 pm #24774
You only need to replace the triacs with NPN transistors on the stations you are going to use. The remaining triacs can remain in the circuit. However, you need to clearly label those unmodified stations so they are not used for anything else. With 12V DC applied to the board, the triacs will turn on, but not off.
Don’t forget that you also need a clamping diode across the solenoid to dissipate the spike when the valve is turning off. The cathode of the diode connects to +12V. The anode of the diode connects to the collector of the transistor. 1N4001 rectifier diode is OK here. Depending on the size of the solenoid, a must smaller diode may be OK too. However, 1N4001 or similar diodes are very common. Both the transistor and the diode can be found in the meager parts bin of your local Radio Shack.
Here is a picture of a similar connection using a relay. The concept is the same.July 12, 2013 at 5:02 am #24775
I second mrburns42’s reply. Yes, you only need to replace the triac for the station that you are modifying.
For connecting to relays, you can either interface with a relay directly, and make sure you have a flyback diode installed as suggested by mrburns42. Or you can use a relay board (which typically includes a flyback diode per channel). In fact, if you use a relay board that is of ‘active high’ type (i.e. a logic high activates the relay), you can just solder a wire from the corresponding shift register output to the relay channel pin, and you don’t even need to replace triac.
As a side note, on OpenSprinkler (not the Pi) v2.0 (assembled SMT version), I’ve designed PCB holes to fit the flyback diodes. These are hidden under the SMT triac. So if someone wants to interface with DC devices, they can remove the triac, and then solder a transistor together with flyback diode.July 12, 2013 at 3:52 pm #24776
Thank you Ray and mrburns42.
To be honest im sure this is very simple but I am uncomfortable modifying the board too much with my very limited knowledge on electrics.
I think I may take the hit and purchase a 24-Volt AC Solenoid – at least I will then have a unmodified board and if I have difficulty will be easier to for me to get support 🙂
Thank you again, you have been very helpful!
And thank you Ray for a great system, wish I found this a few years back! 😉August 15, 2013 at 5:26 am #24777
were you able to make it work?
I have a similar solenoid, but it is a DC latching type, normally works with 9V battery. It turns ON the valve if voltage is applied in one direction and the valve is turned off when the voltage is applied in reverse – and that’s likely the different in my case.
The nice thing about it the voltage has to be applied for only a few milli-seconds (30-50ms) and otherwise no more power is needed to keep the valve ON.
I assume your solenoids are DC, but not of a latching type.August 15, 2013 at 7:52 am #24778
Yes I did, I replaced the DC solenoid with an AC one and then after a lot of searching finally found a AC to AC transformer – what was a lot more difficult than you would think!
It does seem that in the UK AC to DC is a lot more common and its easier + cheaper to get DC solenoids – next time when I have more time I think I will give it a go replacing the triacs.
I installed the Mobile Web App yesterday – and its amazing! viewtopic.php?f=33&t=154&hilit=mobileAugust 30, 2013 at 1:43 am #24779
I too am looking to switch a DC load, and intend to replace the triacs with NPN transistors, or FETs seems very straightforward.
The problem has been in finding a transistor that suits – the gate for the triac is on the right side of the SOT-223 package, whereas it seems for all transistors, the gate or base is on left side of the package. So no easy ‘drop in’ replacement here!
Has anyone found an straight forward method for doing this swap?
Many thanks!August 30, 2013 at 2:19 am #24780
Indeed transistors / MOSFETs in SOT223 package are somewhat uncommon. However, since SOT223 is fairly large, you may consider using through-hole replacements. Just bend the pins close to the transistor body, and solder them onto the PCB pads. I’ve done this before and it works well.
If you are going to interface with inductive load (such as DC solenoids), you may find it easier to just get one of those relay boards (http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=relay+board). Will save you a lot of work of having to solder the flyback diodes.August 30, 2013 at 4:24 am #24781
Thanks for the response Ray.
Not an inductive load, actually planning to use your board to drive a bunch of garden lights! Already have your V1.1 Pi board looking after the garden watering, was looking at a method for simply turning the garden lights on at dusk, and off again at midnight (and maybe some other fancy bits), and just could not go past a V1 Pi with a V1 opensprinkler board! All is run by solar and a storage battery, the opensprinkler Pi will sit in a box out in the garden, and can then control all things garden lighting! So using FETs will be that bit more efficient than relays.
So given no drop in part (was hoping that you had heard of an obscure transistor that would suit!), I think the easiest solution will be to use a SOT223 MOSFET (a BSP100), but install it upside down – is not super elegant, but it should work.
What do you think?September 2, 2013 at 7:02 am #24782
If you just need to run garden lights, keep in mind that you may be able to use opensprinkler as is without any modification. This is because you can run dc lights on AC power – it will produce some flickering but usually not noticeable. With 24vac you can connect a light bulb rated 24dc and that should work fine (because 24vac is measured in terms of rms average). If you need to run 12vdc bulb instead, you can connect a 1n4007 diode in series to block half of the AC wave and hence reduce the equivalent rms voltage by half.April 26, 2014 at 1:39 am #24783
Hi danico, I joined the forum so I could enquire about your setup as it sounds like something I want to do. Can you provide more details? Did you get it up and running?
Is your ‘storage battery’ 12v? Are you connecting it directly to your opensprinkler or are you converting it? What types of lights are you running?
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › Hardware Questions › 12-Volt DC Solenoid Valve Supoprt