Escolar Documentos
Profissional Documentos
Cultura Documentos
http://www.instructables.com/id/Connecting_a_12V_Relay_to_Arduino/
Image Notes 1. 12V Relay 2. Arduino Duemilanove 3. 1N4007 Diode 4. Transistor 5. Wire
Image Notes 1. max rating of things you could connect in this case: Not more than 10 Ampere 125V AC 2. german for coil 3. 12V DC thats the Voltage the Relay needs to switch
Image Notes
http://www.instructables.com/id/Connecting_a_12V_Relay_to_Arduino/
Image Notes 1. Pin 1 COM 2. Pin 2 Coil A 3. Pin 5 Coil B 4. Pin 3 NO (= Normally Open) 5. Pin 4 NC (= Normally Closed)
1. The measured Resistance 0.41 KOhm means 410 Ohm 2. Range 20k 3. If this Button is pressed the Value will stay at 0.00
step 4: Calculating R1
You can find the value of hfe in your datasheet: Mine says for BC548 its 75 at 10mA at 10V. Its not very precise cause its very difficult to build transistor with a accurate hfe. hfe = Ic / Ib We know hfe and Ic so lets calculate Ib: Ib = Ic / hfe For BC548: Ib = 0.03 A / 75 Ib = 0.0004 A => 0.4 mA Due to Ohms Law: R1 = U / Ib R1 = 5V / 0.0004 A R1 = 12500 Ohm
http://www.instructables.com/id/Connecting_a_12V_Relay_to_Arduino/
Image Notes 1. Connect the ground of your 12V source to the ground of your Arduino 2. If you forget that Diode you could destroy your Arduino. 3. The coil of your relay 4. R1 limits Ib 5. B 6. C 7. E
http://www.instructables.com/id/Connecting_a_12V_Relay_to_Arduino/
Image Notes 1. Many 12V relays work also at a bit lower voltage (like 9V) 2. The relay 3. R1 4. D1 5. Transistor 6. Connection between Arduino and the relay ground 7. USB conneection
Related Instructables
Build a real bellstriking clock for your PC and a fire extinguisherstriking clock. by 5Volt
Advertisements
Comments
18 comments Add Comment
Decypher4 says:
Jan 19, 2009. 7:44 AM REPLY Why are you using a 12V excitation relay with the Arduino? 5V excitation SSRs that can handle a 120V 40A AC load are cheap and readily available. Did you just have a 12V relay laying around?
gandalfsz says:
Yes it was the only I had @home, its from an old washing machine. Where do you get cheap 5V SSRs ? In here the are expensive. greetz Daniel
Doom2099 says:
SPDT 5v amp realy $5.08 radioshack direct2U order
http://www.instructables.com/id/Connecting_a_12V_Relay_to_Arduino/
Decypher4 says:
I guess it also depends on your definition of cheap. This one is $15.00 US http://www.allelectronics.com/make-a-store/item/SSRLY-42/40-AMP-SOLID-STATE-RELAY/1.html
There are a bunch here too. There's a million different options to sort through, and I've seen them as cheap as $9.00 US. http://search.digikey.com/scripts/DkSearch/dksus.dll?Cat=1048664&keywords=solid%20state%20relay Happy hunting. Cheers
andrew101 says:
well i can get a 12 volt relay with 2 seperate switches for 4 $ canadian at my local ripoff store. i suppose i could get them cheaper online but its eaiser to buy them there.
gandalfsz says:
Ok in here you can get one like mine for ~1 (= 1,2951$) greetz Daniel
Decypher4 says:
That's cheaper than 9 bucks. Good instructable.
andrew101 says:
Aug 15, 2009. 5:15 PM REPLY cool. i made oneawhile ago that i can trigger thru serial to turn on and off some relays. i didn't realise i should add a diode. good tip :)
jtbz76 says:
Jun 29, 2009. 10:40 AM REPLY I made this circuit and when the 5v signal from arduino is off the the relay stays on until the 12 volts is disconnected. Its like the transistor is staying on. Any hints??
gandalfsz says:
What is the number on your transistor ? Sure that its a transistor not a triac or something ?
jtbz76 says:
Jun 29, 2009. 9:24 PM REPLY Nope i didnt pay attention that the diagram said view from bottom so i had the emitter and collector reversed. works great thanks!!!
inane says:
Feb 17, 2009. 2:23 PM REPLY Can I do without the transistor? I have a reed relay that claims a nominal current of 20mA...shouldnt the Arduino be able to drive it directly?
gandalfsz says:
If it really only needs 20mA it should be ok with Arduino, but it is better for the Controller if you use a transistor.
russ_hensel says:
Jan 20, 2009. 5:31 PM REPLY Microwave ovens ( the control panel ) usually have this type of relay ( more or less ) sometimes 3 of them. Coil voltage typically 12 or 24 volts. Voltage need not be very exact or regulated. Cost normally 0, priceless if you manage to kill yourself on the high voltage.
RCURV says:
super useful, I'm planning a sub project an this is just the thing
joejoerowley says:
Great! I was just looking for something like this! Thanks, Joe
http://www.instructables.com/id/Connecting_a_12V_Relay_to_Arduino/
Bongmaster says:
usefull :)
gandalfsz says:
Thanks :-)
http://www.instructables.com/id/Connecting_a_12V_Relay_to_Arduino/