What Electrical Component Can Reverse the Polarity of a Circuit

spookyjack:
I want to reverse the polarity of a circuit with some type of electrical component, that doesn't require a human to do a task to change the polarity of the circuit every time (such as a switch, that wont do). What component is capable of doing this ?

A single relay with DPDT contacts can reverse the polarity of voltage wired to a load if wired correctly.

Lefty

How do i wire it correctly ? what is your advice ?

spookyjack:
How do i wire it correctly ? what is your advice ?

OK, a DPDT relay contact has six contact pins, 2 normally closed, 2 normally open and 2 common. Wire the load (motor) between the 2 common contacts. Wire a jumper from one normally open to opposite normally closed contact. Wire another jumper wire between the other normally open contact and the other opposite normally closed contact (the two wire jumpers will look like an X ) . Now wire your source voltage between the two normally open contacts.

The relay coil will most likely have to be controlled by a transistor switch if the coil current is higher then a arduino output pin can supply but their are plenty of example circuits on how to control relay coils from an arduino.

That make sense?
Lefty

spookyjack:
I had to deal with H-bridges a while back, they are terrible, plain terrible. I don't want to use those things ever again, is there anything else that JUST changes polarity ? becasue i already have two transistors for on/off control

I'm just curious, what was terrible about working with H-bridges. In my experience they have been extremely easy to use, especially in the 3 volt motor range you are talking about.

growler:

spookyjack:
I had to deal with H-bridges a while back, they are terrible, plain terrible. I don't want to use those things ever again, is there anything else that JUST changes polarity ? becasue i already have two transistors for on/off control

I'm just curious, what was terrible about working with H-bridges. In my experience they have been extremely easy to use, especially in the 3 volt motor range you are talking about.

Well from just a cost point a relay is quite a bit cheaper then a H-drive.

Lefty

retrolefty:

growler:

spookyjack:
I had to deal with H-bridges a while back, they are terrible, plain terrible. I don't want to use those things ever again, is there anything else that JUST changes polarity ? becasue i already have two transistors for on/off control

I'm just curious, what was terrible about working with H-bridges. In my experience they have been extremely easy to use, especially in the 3 volt motor range you are talking about.

Well from just a cost point a relay is quite a bit cheaper then a H-drive.

Lefty

That may be true, but that is a different issue. Besides its not like low power h-bridge IC's are so expensive as to make a huge difference anyway.

That may be true, but that is a different issue. Besides its not like low power h-bridge IC's are so expensive as to make a huge difference anyway.

Relay for $1.40 ( http://www.allelectronics.com/make-a-store/item/RLY-532/5-VDC-DPDT-MINI-SIGNAL-RELAY-2A/1.html ) , H-drive you are suggesting costs?

Lefty

H-Bridge Motor Driver 1A - COM-00315 - SparkFun Electronics, $2.35.

Also, I'm not really suggesting anything. I'm just curious if there are some hidden "gotchas" in H-bridge operation that I have been fortunate enough not to encounter, hence the question as to what was terrible about them in the first place since my experience has been good.

And yes, I'm aware 3V is a little low for the recommended minimum motor input voltage but I've had no problems running at 3V with that chip, and with further searching I would guess something suitable would be findable.

It also occurs to me that you can feed the chip 4.5V and use pwm to limit the voltage seen at the motor to 3V. if you wire the two sides of the chip in parallel, you can get 2 amps out of it if you only need to control one motor.

I'm curious too. H-bridges have been used in this kind of case for decades now and I have never heard them get such bad reviews. I'm interested to hear what happened to sour spookyjack on them.

I should say I've got nothing against relays or switches, but I've usually found electronics like transistors in an H-bridge to be more reliable and easier to use than electromechanical devices like relays and switches. That is, unless human intervention is wanted, as it is not here.

I'm interested to hear what happened to sour spookyjack on them.

As he is not coming on and saying my guess is that he tried to make one out of discrete components and had problems with both the top and bottom switches being on at the same time. This is called 'shoot through' and causes short circuits and overheating. It comes about through not designing the circuit correctly. The easiest way is to use a H-bridge chip then you know it is designed correctly. In the mean time wiring up relays is easy as well see:-
http://www.thebox.myzen.co.uk/Workshop/Motors_1.html

I bet your right, the first H-bridge I used I made out of discretes, then remade it, then did the math, then remade it and then it worked.

Then I started just using IC's and the time to design/build went down significantly as did the size of the final product.

retrolefty:

That may be true, but that is a different issue. Besides its not like low power h-bridge IC's are so expensive as to make a huge difference anyway.

Relay for $1.40 ( http://www.allelectronics.com/make-a-store/item/RLY-532/5-VDC-DPDT-MINI-SIGNAL-RELAY-2A/1.html ) , H-drive you are suggesting costs?

Lefty

L293: http://www.alltronics.com/cgi-bin/item/LIC_L293D_Pulls/search/L293D-Pulls-Linear-IC - $1.00

...then again, it won't handle 2 amps your relay in theory could.

L298: http://www.alltronics.com/cgi-bin/item/LIC_L298N/search/L298N-Linear-IC - $3.90

...more expensive, though closer in spec to the relay - although it would require a heatsink, making it cost even more.

Then again, a single DPDT relay can't allow for switching the motor off, nor can you easily do PWM with it - both of which the L293 and L298 would allow for. To get a relay solution to allow for "off", you need either an extra relay, or you need to use a minimum of two SPDT relays (or four SPST relays - watch out for shoot-thru, though!). You also need to factor in the cost of the driver transistors, flyback diodes, and transistor bias resistors (minor costs, true).

You still wouldn't have PWM control - for that you would need an NPN or n-channel between the low-side and ground to allow PWM switching. At that point, you might as well go for an all-transistor or all-FET based solution (or a dedicated IC). Unless you don't need PWM control, of course...

:slight_smile:

Daanii:
I should say I've got nothing against relays or switches, but I've usually found electronics like transistors in an H-bridge to be more reliable and easier to use than electromechanical devices like relays and switches. That is, unless human intervention is wanted, as it is not here.

At a certain point, it seems - designing an h-bridge to handle high-currents becomes something of an art or an extreme science, or a combination of both. For someone who isn't doing this constantly (and thus building up experience and knowledge), it can quickly become expensive. I'm not sure what that point is, but it is likely somewhere between 5-10 amps; beyond that, unless you have a lot of money and time to burn, it is best to leave it to the "experts", and purchase your h-bridge instead of trying to build one from discrete components. I also recommend the use of h-bridge ICs instead of a discrete component layout for lower power designs, unless cost is a factor (or you have the parts and the time).

Then again - yesterday I found a Roboteq AX2250 for $25.00 (in unknown condition - but it looks OK) - I went to their site for docs and such, and found that new, that controller is anything -but- inexpensive. That might make one consider building their own (then again, its a 120 amp controller). They're local, though - so I am hoping to be able to get some help in finding out whether it still works, or if I simply purchased $25.00 of components (maybe the MOSFETs can be salvaged?).

:slight_smile:

Damn - there I go again - posted "then again" multiple times; I'm so predictable I hate it...gah. :frowning:

And I by no means am against the use of H-drive circuits for specific applications. I was just responding to the OP's original question of 'what component will reverse the polarity of a voltage', and a DPDT relay ( or switch for manual control) certainly is one valid answer. The old electro-mechanical relay is still a valid and useful component today and in some cases is a very good solution. Modern cars still use plenty of them even today. I've found latching relays to sometimes be a very elegant solution to some tricky applications.

Lefty

Latching relay is a nice solution (avoiding the power waste of a continuously powered relay - surely latching ones should dominate the market?) However there are issues of size, reliability and speed that often crop up...

Slightly different flavour of H-bridge rant follows:

One issue with H-bridges is that for low voltage use you pretty much require MOSFETs (otherwise you lose too much power/heat in the output transistors). However most power MOSFET bridges with decent performance (less than 0.1 ohm say) only work at 10 or 12V or more...

I have been looking for a good general purpose MOSFET H-bridge (actually for a class-D audio amplifier output stage) and not found anything that's ideal (either the voltage range is wrong, the on resistance too high or the speed way too slow (some MOSFET H-bridges have 100us switching times, some are 30ns - go figure).

With bipolar H-bridges the outputs are usually darlington stages which are pretty hopeless for low voltage as the high and low stages lose about 2 to 2.5V between them.

If anyone knows of a MOSFET H-bridge that can take a supply from 5V to 30V or so, has 0.1ohm or less Ron per FET, switches in <= 100ns and is compatible with both 3.3V and 5V logic signals I'd like to know. It seems wrong to have to build one out of discrete components...

I think the best compromise I found was the LMD18200.

Ok guys, I;m a little lost here. Relay or H-bridges ? i mean i dont want a serial-controller like the pololu ones (the pololu low voltage dual serial motor controller sucked). the relay seems simpler but the h-bridges seem more effieceint. someone tell me what is better for a 3V motor. like the ones on the tamiya dual gearbox. (p.s im not sour !)

the relay seems simpler but the h-bridges seem more effieceint.

I guess first you need to define what you want your motor to be able to do. Stop, forward, reverse, variable speed? Depending on the modes required a relay alone may not be enough. Certainly a single relay could make a motor go forward or reverse at full speed, but not stop without an additional relay or transistor switch. A relay by itself can not vary the speed of the motor, PWM of a transistor switch would have to be added.

You will have to define what you mean by 'more efficient' because that normally means losses due to heat dissipation across active devices, a relay would only have the power dissipation consumed by the coil, the relay contacts themselves are much more efficient then H-drive output devices normally.

Lefty

spooky, I've used the IC from sparkfun I linked to earlier with the little motors that come with tamiya gearboxes, with both sign-magnitude and locked anti-phase control and I was pleased with the result.

That being said not everything will exactly be within specifications, the biggest issue is that the stall current of those motors is about 2A from what I can tell which exceeds the current rating on the IC. Two possible fixes, have your software detect stall conditions and cut power to the motors (this has worked fine for me but is hardly reliable without feedback, i.e. encoders), or put two of the chips in parallel so they can share the load.

p.s., on the topic of encoders, its pretty easy to make some that sort of poke into the gearbox out of ir led/photodiode pairs. This was the easiest way I could think of to get speed feedback which you will need if you want this thing to drive in a straight line reliably, i.e. at all battery levels and other varying conditions.

Edit: I assume you meant one of these:Pololu - Tamiya 70168 Double Gearbox Kit
Pololu - Tamiya 70097 Twin-Motor Gearbox Kit