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.
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.
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.