Driving solenoid valve - diode

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
sumalee
 
Posts: 4
Joined: Sun Jun 16, 2013 9:34 pm

Driving solenoid valve - diode

Post by sumalee »

Hi,

I am currently building something to fill my pool up automatically and I have an issue driving my solenoid valve. I attached a drawing of my current "circuit"(sorry for the quality but I'm not the best at drawing things), and I would like to know where I have to put a diode and why? I soldered the whole thing on a perfboard (DIY arduino shield) and had to cut my diode since I was shorting something out and my TO-220 was getting insanely hot fast.

I based my circuit of that following example : http://playground.arduino.cc/uploads/Le ... driver.pdf, I can see that the diode is between the two leads of the solenoid but I can't figure its use.

I'm sorry if the question seems trivial, but I'm starting with electronics and my only knowledge in that matter is physic's laws from college and close to nothing in hardware ;)

Components :
TO-220
1N4004
Solenoid brass valve 12dc

Thanks!
Attachments
My circuit hand drawn
My circuit hand drawn
IMG_1192.JPG (90.33 KiB) Viewed 436 times

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Driving solenoid valve - diode

Post by adafruit_support_bill »

I can see that the diode is between the two leads of the solenoid but I can't figure its use.
A solenoid creates a magnetic field when energized. Then when de-energized, the magnetic field collapses creating a strong reverse current that can destroy your transistor. The diode shot-circuits that reverse current to protect the transistor.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”