Power supply to control arduino and solenoids

Hello all. Im working on a project in which I want to use an arduino to control some solenoid valves. These valves require 500 mA @ 12V and Im going to have 4 of them, but they will only operate one at a time. I want to use a wall-wart power source, and I want the one power source to power both the arduino and the valves. The only things I found in searching regarding what I wanted to do was the suggest to use this site ( Link ) as a guide to make sure the operation of the solenoids doesn't disturb the arduino. I was thinking of using the TIP102 transistor as shown in the solenoid guide on this site, this inductor ( Link ), and this powersupply ( Link ).

I put together a schematic which I've attached, does this look like the right way to go about it? Thanks!

I think you're overdoing it a bit. The decoupling is not a bad idea (capacitor near the Arduino) the "inductor" is not necessary. Here's a basic circuit for controlling an inductive load (like a solenoid):

http://ruggedcircuits.com/html/circuit__7.html

This circuit talks about speed control (with PWM) but you can just ignore that and turn the transistor on and off. A TIP102 would work but a MOSFET wastes less power (like in the circuit).

Just duplicate the circuit (or one like it) 4 times, one for each solenoid and don't worry so much about decoupling. Switching a 500mA source on and off (relatively slowly due to the 1k series resistors at each MOSFET gate) is not going to aggravate the Arduino too much.

--
The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons

I know that schematic shows +5V for the board and +12V for the fan, is it safe to assume in my case that I can just supply 12V off the power supply to the arduino and let the internal regulator handle it? Just out of curiosity, at what sort of load would I have to worry about de-coupling and taking steps to protect the board? Thanks for your help!

Yes, you can just send the 12V from your power supply to the Arduino and let it regulate it. It has a decoupling capacitor right there at the regulator so you probably won't need your own.

I'd say once you get to the 1A-2A range you have to start thinking about more careful wiring. Decoupling shouldn't be necessary if the wiring is done right: make sure you use a single point ground so the "current loop" for the Arduino and that of the solenoid do not share any wiring. If you take your finger, start at the power supply, and trace the path that electrons take to get to the Arduino and back to the power supply, that path should have as little in common as possible with the path that electrons take to get to the solenoid and back to the power supply.

--
Beat707: MIDI drum machine / sequencer / groove-box for Arduino

So, a 12V 1A small wall supply should be OK, IF you're sure you won't turn on more than one valve at a time, but that Mouser supply looks good.

I'll suggest one of my favorite drivers for big LED strips, small motors and valves:
http://arduino-direct.com/sunshop/index.php?l=product_detail&p=60

But if you want to build your own that's a good learning experience.. The http://ruggedcircuits.com/html/circuit__7.html circuit is similar.

IF you need to put the valves a distance from the Arduino the 4-FET board is optically-isolated which gets around some of the decoupling issues, ground loops etc.

It's a little surprising to me how many Arduino projects are controlling power devices of some type...

DISCLAIMER: I mentioned stuff from my own Shop...

So bought that driver (good deal) along with the "sensor cables" for my project. Which two wires are the ones that are going to power once the FET is activated? Also, does an LED light up when the FET is activated? I wasnt sure if I was seeing things.

Also, the power regulator on the Arduino gets really hot, Im assuming from dropping down the 12V input. Is this something I should worry about?

Thanks!

blackmesa:
So bought that driver (good deal) along with the "sensor cables" for my project. Which two wires are the ones that are going to power once the FET is activated? Also, does an LED light up when the FET is activated? I wasnt sure if I was seeing things.
Also, the power regulator on the Arduino gets really hot, Im assuming from dropping down the 12V input. Is this something I should worry about?
Thanks!

Take a look at some info about this 4-FET driver board: http://arduino-info.wikispaces.com/Brick-4ChannelPowerFetSwitch I need to add example of an inductive load like yours..

Make SURE you do have the reverse diode across the solenoid coils like you showed in the first diagram. I don't think the capacitor is needed and may be a potential problem with spike current. You will see a photo that shows the + and - 12V connections. The loads (Solenoids) go from (+) to the S1 thru S4 terminals. I would strongly suggest that you get the whole thing wired up with small 12V lamps as the loads and make sure it all works... You can just use the BLINK program to test and change the pin number(s).. And Yes, there is an LED for each channel on that board that lights up when active.

Regulator Hot?? Hmmm. what other 5V loads do you have on the Arduino? Usually does not get hot with only Arduino running... Check this out....

Keep us posted.. other people need to stuff like this for plant growing etc..

Can you point to a reference on the valves you are using??

Sure can. These (http://cgi.ebay.com/1-2-Gravity-Feed-Electric-Solenoid-Valve-DDT-CD-12VDC-/300547461801?pt=LH_DefaultDomain_0&hash=item45fa0652a9) are the valves Im using.

So looking at that page I just realized I totally had the circuit backwards. :blush: I had assume that the connectors label S1-S4 were the inputs from the ardunio and the sensor cable connectors were the outputs of the FETs. OOPS! Do I need the sensor shield to properly control this board or can I just use the digital output pins straight from the arduino?

Im also running this shield (http://www.sparkfun.com/products/9363), Im guessing thats why its heating up the regulator?