Pages: [1]   Go Down
Author Topic: Best way to drive a 12V DC solenoid valve  (Read 15909 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 42
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm a complete newbee when it comes to electronics, so I need a little help here.

I have a 12V DC solenoid valve, that draws 450 mA at max. I want to be able to control this valve from the Arduino. I guess I can't draw this much current directly from the Arduino, so I have to go through some kind of relay, correct?

What relay should I look for? 5V DC -> 12V DC? Do I need any other components or can I simply hook up the relay to a digital pin + GND on the Arduino board, and the valve on the other side of the relay?
« Last Edit: July 28, 2008, 04:56:45 am by sta » Logged

London
Offline Offline
Tesla Member
***
Karma: 10
Posts: 6255
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Using the keywords: [glow]arduino solenoid  [/glow]in google bring up a number of relevant links including these:
http://www.arduino.cc/playground/uploads/Learning/solenoid_driver.pdf
http://www.arduino.cc/playground/Learning/SolenoidTutorial
« Last Edit: July 28, 2008, 05:21:49 am by mem » Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 620
Posts: 34003
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I used 12V solenoids in this project, her's how I drove them:-
http://www.thebox.myzen.co.uk/Hardware/Glockenspiel.html
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 107
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I used a 2n3904 or a 2n2222a transistor with a 1k resistor from base to the output pin on the arduino.  Emittor to Ground, + direct to the solenoid and collector to second wire from solenoid.  These are NPN style.. You can also use a PNP style and just reverse ground and +12v on the ends.

This will supply up to 500ma with standard to-93 transistor.. There are other transistors to use if you need more current..  Or you could just 'double up' the transistors.
« Last Edit: July 28, 2008, 07:08:19 pm by dnear1 » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 42
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you for the information, it was a great help. I now got it all set-up and it actually works as well.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 42
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have to throw in another Qustion:

What are the cons and pros of using a transistor vs a relay solution for driving the valve?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Transistor is cheaper and much faster.  Relay can generally take much more current.  You also have to worry about back current from relays, but not transistors.

And relays generally make a distinctive clunking noise while transistors are silent.
Logged

Pages: [1]   Go Up
Jump to: