Switching power and polarity with relays.

Thread Starter

Falven

Joined Feb 27, 2010
15
Hello!
I am pretty new at electronics.
I need to create a circuit to switch a 12v motor on and off; also reverse it's polarity.

I have:
3 SPST relays 5v 5A cr.
2 DPDT relays 12v 5A cr.
My control is a 5v source that needs to switch the circuit on/off and reverse the polarity (a microcontroller).

Specifically, what I need is to be able to:
1. Cut power to the circuit on or off using the 5v source.
2. Switch the polarity of the motor using the 5v source.

I have been trying to draw a circuit but I can't wrap my head around the polarity switching.

Thanks,
-Francisco
 

PaulEE

Joined Dec 23, 2011
423
Hello!
I am pretty new at electronics.
I need to create a circuit to switch a 12v motor on and off; also reverse it's polarity.

I have:
3 SPST relays 5v 5A cr.
2 DPDT relays 12v 5A cr.
My control is a 5v source that needs to switch the circuit on/off and reverse the polarity (a microcontroller).

Specifically, what I need is to be able to:
1. Cut power to the circuit on or off using the 5v source.
2. Switch the polarity of the motor using the 5v source.

I have been trying to draw a circuit but I can't wrap my head around the polarity switching.

Thanks,
-Francisco
I assume you have two separate signals, one for polarity, and one for on/off...right?
 

praondevou

Joined Jul 9, 2011
2,942
Yeah I couldn't find a 5v dpdt 5a cr relay anywhere... Radioshack, mouser, digikey...
ok then, 2x 5V spst, 1x 12V dpdt. If these are polarized relays (with built in diode) make sure you connect them correctly.



edit: you may want to put the upper SPST relay in series with the motor power supply... that way you will also cut the power supply to the DPDT relay in case "polarity" is activated
 

Attachments

Last edited:

SgtWookie

Joined Jul 17, 2007
22,220
Wait a minute -
Get a couple of SPDT relays from an auto parts store.
Use NPN transistors (2n2222) to open/close the ground path for the relay coils.

You will need diodes across the relay coils, or you will "zap" the transistors/uC.

Will someone please locate the schematic I've posted on this subject a number of tiimes? It's hard for me to search on this "WebTV".
 
Last edited:

praondevou

Joined Jul 9, 2011
2,942
I also think you mentioned "microcontroller"?

Are you sure the uC can actually directly drive the 5V relays?

What uC is it and what is the current consumption of the 5V relay coils?
 

Thread Starter

Falven

Joined Feb 27, 2010
15

Thread Starter

Falven

Joined Feb 27, 2010
15
I also think you mentioned "microcontroller"?

Are you sure the uC can actually directly drive the 5V relays?

What uC is it and what is the current consumption of the 5V relay coils?
ATMEGA328 or ATMEGA1280
Both say they can write 5V to a pin.
http://arduino.cc/en/Reference/DigitalWrite

Stop lookin', I found it;
http://forum.allaboutcircuits.com/showpost.php?p=344028&postcount=14
CHANGE THE 5V RELAY AND 5V SOURCE TO 12V.
Change the base resistors from 470 to 220 Ohms.
Can't change the 5v source, it's a microcontroller that can write 5v at most. I have used it to switch 5v relays before so that should work.
 

praondevou

Joined Jul 9, 2011
2,942
Wookie, like this?

No idea what current can be supplied by the uC nor what relay the OP has...


EDIT: Come on Sgt! How can you be so fast on a WebTV??? I wasn't even trying to find the post you referred to, looking through more than 20000 posts... :-/
 

Attachments

Last edited:

SgtWookie

Joined Jul 17, 2007
22,220
It's not that I was so fast; it's simply that I remkembered the exact filename of the image:
MotorReverseRelayTransistor.PNG
Then seaching was quite fast.
 

praondevou

Joined Jul 9, 2011
2,942
ATMEGA328 or ATMEGA1280
Both say they can write 5V to a pin.
http://arduino.cc/en/Reference/DigitalWrite
How much current can you draw from it? Will it supply 24mA each output?


Can't change the 5v source, it's a microcontroller that can write 5v at most. I have used it to switch 5v relays before so that should work.
If you use Sgts' circuit you can drive it with 5V. The uC output drives a transistor, the transistor drives a relay.
 

Thread Starter

Falven

Joined Feb 27, 2010
15
How much current can you draw from it? Will it supply 24mA each output?




If you use Sgts' circuit you can drive it with 5V. The uC output drives a transistor, the transistor drives a relay.
From http://arduino.cc/en/Tutorial/DigitalPins:

Pins configured as OUTPUT with pinMode() are said to be in a low-impedance state. This means that they can provide a substantial amount of current to other circuits. Atmega pins can source (provide positive current) or sink (provide negative current) up to 40 mA (milliamps) of current to other devices/circuits.
I do have some transistors (3x) laying around.
1. http://www.radioshack.com/product/index.jsp?productId=2062617
2. http://www.radioshack.com/product/index.jsp?productId=2062618
3. http://www.radioshack.com/product/index.jsp?productId=2062613

Thanks
 

Thread Starter

Falven

Joined Feb 27, 2010
15
Wookie, like this?

No idea what current can be supplied by the uC nor what relay the OP has...


EDIT: Come on Sgt! How can you be so fast on a WebTV??? I wasn't even trying to find the post you referred to, looking through more than 20000 posts... :-/
So will this circuit work but instead of using the 2k2 resistors I should use 220 ohm resistors?.
 

praondevou

Joined Jul 9, 2011
2,942
So will this circuit work but instead of using the 2k2 resistors I should use 220 ohm resistors?.
Yes. The SPST is a 12V relay though.

Your options are either to drive transistors which then drive directly 12V relays OR the uC drives the 2x 5V relays, one of them driving the 12V DPDT. I posted the other option below.

If you already bought the relays I'd think just using relays would be easier.

BUT the contact rating of the relays you linked to is 5A max for resistive load. A motor is not a resistive load. You also said 5A would be the maximum load current. The relays are then not suitable . The circuit is only suitable for a smaller load current. If you want to use it the way it is you'd need relays with higher contact rating. (only the relays that carry load current)

I included the diodes.


I have to go now, sorry.
 

Attachments

Top