Go Down

Topic: Arduino + SPDT Relay (Read 2266 times) previous topic - next topic

x11kjm

Hello all, I have a very simple question (im pretty new), I am using an Arduino Duemilanove connected to an spdt relay (thats controlling a 12v motor), turning it on for about 30 second periods or less.  Im not using PWM, just simply turning it on and off.  What components do i need in order to keep it working, but not fry the Arduino, or is it okay by itself?  Also, what would i need to protect it when using LEDs?  Would this be a resistor? If so, what type?

Thanks for the help

CrossRoads

#1
Feb 19, 2011, 07:43 am Last Edit: Feb 19, 2011, 07:52 am by CrossRoads Reason: 1
You just need some simple things like I show here.
Specific values will depend on the parts you want to use.
For single LEDs, 270 ohm resistors.
For switches, 10K pullup or pull down resistors.
For relay not needing much current, maybe a 2N2222, NPN type transistor.  Can switch 5V or 12V coil in a small relay, bunch are listed here:
http://www.dipmicro.com/store/index.php?searchStr=relay&act=viewCat&Submit=Search
Don't forget a diode across the coil.

If using larger current coil, then find a logic level N-channel MOSFET instead.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

x11kjm

#2
Mar 02, 2011, 12:19 am Last Edit: Mar 02, 2011, 02:48 am by x11kjm Reason: 1
I was wondering if for the relays if any of these would work? http://www.radioshack.com/family/index.jsp?categoryId=2032279, or if there is any alternative which would still be able to protect the arduinos. I am using 30 amp 12v relays (which work w/ 5v).

Thanks

x11kjm

Finally!, found out that the transistors can be found in a bundle.  Thanks for the help

retrolefty

#4
Mar 02, 2011, 02:53 am Last Edit: Mar 02, 2011, 03:00 am by retrolefty Reason: 1
To actually give you a detailed useful answer we need to know what coil voltage your relay is designed to use and how much coil current it draws at that rated coil voltage. Do you have a link to a datasheet for the relay?

Lefty


x11kjm

well, the coil voltage of the relay is 12v, however it fires with the power the arduino gives out.  How would i be able to find out what the transistors should be?  Heres the part: http://www.radioshack.com/product/index.jsp?productId=2062477

charliehorse55

Do you need a 30A switch? If you only need <5A you can just use a small transistor and no need for a SPDT switch.

retrolefty


well, the coil voltage of the relay is 12v, however it fires with the power the arduino gives out.  How would i be able to find out what the transistors should be?  Heres the part: http://www.radioshack.com/product/index.jsp?productId=2062477


You really should be using 12vdc for a 12 relay coil. Here is the classic drawing of how you can drive your relay from an arduino. Just substitute your relay coil terminals where the solenoid coil is shown.

However the simpler method would be to just drive your motor directly using this solenoid circuit, no need for a relay in the middle.

http://arduino.cc/playground/uploads/Learning/solenoid_driver.pdf

Lefty

Go Up