controlling a 3 way solenoid valve

Background: I want to control a 3 way solenoid valve with my arduino. The purpose is to spray a cardiac myocyte with caffeine at a particular time. When not spraying there will be a small negative pressure from the 3rd port so that caffeine does not diffuse out too much.

The valve:

http://www.theleeco.com/EFSWEB2.NSF/51afc74e7f2112c9852563a9005db170/2428a688bbf1aa1c8525742d0069c8d0!OpenDocument

I'm using the 5V version. The power consumption is 850mW, which I make to be 170mA at 5V.

I've been reading up and although nothing I've found seems to be exactly what I'm looking for my guess is:

  1. output pin to gate of NPN transistor via a 1K resistor.
  2. 5V pin I think can supply 170mA to Base of NPN
  3. Emitter of NPN to solenoid via diode to prevent inducting current effecting the NPN when the valve shuts.

However,I would guess that there might be a significant voltage drop across the NPN/diode so the solenoid would not get 5V? I could use VIN and power at a higher voltage or use an external power supply from a wall-socket type DC transformer?

Unfortunately I am waiting on the valve so can't experiment. Is this how you would try to operate the valve?

Also what is likely to be a very stupid question. Why can I not connect 6 pins of the arduino to the solenoid valve? I could switch them simultaneously using the bit register: 6x40mA =240mA = > 170mA?

thanks for an advice you have!

Solenoids are like relays, look to see how you control them here:-

http://www.thebox.myzen.co.uk/Workshop/Motors_1.html

However,I would guess that there might be a significant voltage drop across the NPN/diode so the solenoid would not get 5V?

No.

I could switch them simultaneously using the bit register:

You could also fry the outputs that way if they didn't switch all at the same time. Even using direct port output it would not switch simultaneously. There is no guarantee that outputs would share the current.

thanks Mike,

i had the diode in the wrong position for a start. Other than that it looks quite simple, particularly if I can drive the solenoid from the 5V pin.

Is there anything I should be looking for when buying a transistor? I would guess it would need to operate at >= 5V and have a current ratio large enough to drive the 170mA.

thanks!

it would need to operate at >= 5V

They will all do that.

current ratio large enough to drive the 170mA.

well it is called gain and typically will be around the 100-200 mark so that is not an issue. You should look out for a transistor that will handle at least 250mA this is often called Ic or collector current. A 2n2222 is a typical low cost transistor that would do, easy to remember as well.

thanks Mike!