Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
United Kingdom
Asked — Edited

H-Bridge / Sabertooth Etc

I tried searching, but I can't find the answer, so here goes...

I understand that the EzB doesn't provide enough oomph (Technical terms!) to drive a motor. However, what exactly does an H bridge do, and why is it necessary?

I pose this question purely as an educational question. I haven't a clue, and I'm curious:)

- Bill.

United Kingdom
#1  
That is the correct terminology.

Basically what happens is the HBridge uses 4 Digital inputs to drive 2 motors. The signals tell the HBridge what motor to move and in which direction.
For instance, on D0, D1, D2 and D3 where D0 is Right forward, D1 is Right revers, D2 is left Forwards and D3 is left Reverse.
In ARC the HBridge control is set up with the above info. A forward command will then ask the EZB to say "Hey Mr HBridge, Motor 1 and Motor 2 need to both be at full speed in a clockwise direction" by using the signal of D0 and D2 on the motor 1a and motor 2a input pins.
This will move the motors and make the robot move forwards.

Why it's necessary is as you said, the EZB doesn't have the balls to drive the motors (another technical terms that's acceptable). The HBridge has it's own supply to it so no voltage to the motors is taken from the EZB itself. It also means you can use 6V, 12v, 7.4v, whatever to supply the motors and you never have to worry about the EZB's regulators working too hard.

Here is a web page detailing it all in a much better way than I can.
United Kingdom
#2  
Ahh, I see. ... Mostly.:D

I guess my confusion is based around the fact an Hbridge can cost up to ~£100 (Thinking sabertooth), and all it does is, well, exactly what I do with my current servo-driven bot with the addition of a voltage regulator

+Left + +right = Forward
-Left + -right = Backward
+ left + -right = Turn right
- Left + +right = Turn Left

As an aside...

I see for sale on [blahblahblah] a Sabertooth motor driver for R/C, which has only two sets of 3 wires attached. I'm assuming these are the wires one would connect to the EzB(? and if so, how come only 2 digital channels (6 leads) worth?), with the 6 blank screw-based connectors being supply vcc/gnd, motor 1 vcc/gnd, motor 2 vcc/gnd?

Hope that all made some sense?:D
United Kingdom
#3  
I know nothing of the sabertooth so can't help there. For my projects the TB6612FNG Motor Controller is a good, low cost option.

You can also make one out of busted servos apparently but I've never looked in to that.
United Kingdom
#4  
Thanks for your input, Rich..

I'm browsing a few different L298N HBridges on [PopularAuctionSite] (the EZ page says "The most populare chipset is the L298N, which can be found nearly anywhere that electronic components are sold.", so I figured I might start there), and they are priced around 8 quid, free shipping to the UK for what is listed as a "Dual H Bridge DC Stepper Motor Drive Controller BOard Module Arduino L298N" (Wow, long winded!)..

Now it says it's for Arduino, but looking at the pinouts as compared to the pinouts on the EZ help page for the HBridge, it looks identical. It also says it can be used for stepper motors or 2 DC motors, so I'm guessing that's about right. I'm assuming with a rated 2Amp max, it would drive two motors at a max 1Amp each side.

...Or I'm wrong. Both options are perfectly possible!
#5  
Not wrong at all. Not two steppers, but two dc motors...

H-Bridges can be acquired from this site for 10 USD. They include installation instructions. Or use more of your time figuring them out and buy one from ebay for 5 bucks. Yes, you can translate *almost* and hardware sketches from arduino to EZ-B at least that's been my experience.


The simple way...
#6  
H-Bridges or Motor controllers must be used with DC motors. It has it's own circuitry that will handle the load of the DC motor you want to move. Rich is correct that with a H-Bridge you can reverse the direction of your DC motor. Common H-Bridges or Motor Controllers are available that run one or two DC motors but there are also other that can run more then that. When buying a H-Bridge you must consider how many amps and what the voltage requirements are on the motor you are going to run through it. Amps are more important. DC motors can run at various DC voltages but you don't want to over supply the motor. For example if you have a 24vdc motor you don't want to supply above 24vdc. Personally I have a 24vdc motor in my robot that is attached to a 12vdc power supply. It only runs slower. Another thing a good H-Bridge or motor controller can do is adjust the speed of the DC motor with what is called Pulse-width modulation (PWM). Usually you need to have this line hooked up and enable it with the micro controller to even get the motor to move. All PWM really does is change the pulse-width to adjust the voltage up or down and in turn speed up or slow down the motor.

I mentioned above about the circuitry of the controller. When buying one you need to also consider protection. DC motors buildup a magnetic charge in the windings and when you suddenly stop it and reverse direction you can get what is called "flyback" voltage slammed back into your controller. This can sometimes be twice the value of the supply voltage. So if your supplying 24vdc to the motor through the controller, when you reverse directions you could have 50vdc slammed back into your control circuit. This could burn out not only a unprotected or under protected H-bridge but also make its way into the micro controller (in our case the EZ-B). It's a fact and it has happened to me in my current build. I burnt out 3 H-bridges before I learned this lesson. This is not such a big issue with smaller DC motors. The H-Bridge/Motor Controller EZ-Robot sells in their store is just fine for the smaller robots most build here. I'm using one for a couple small DC motors in the head section of my full sized B9 and it's doing just fine. However I had to buy a couple heftier controllers to handle the waist and hip DC motors in my B9. Pololu VNH5019 Motor Driver Carrier and VNH3SP30 Motor Driver Carrier MD01B are good choices and are nicely protected controllers but you must research your needs and match them up.

This may not tell you much but here's one of the motors in my leg section that needed a larger and better protected H-Bridge:
User-inserted image


Here's a motor in the head section that EZ-B's controller works fine on:
User-inserted image


Hope this all helped.
Dave Schulpius
United Kingdom
#7  
Thank you all for your input on this one, it's definitely given me a better understanding of the reason for, and usage of an HBridge... My background in electronics is pretty limited, so every little thing helps!

- Bill.
Canada
#8  
Ah, so this is essential in changing RC to having robotic cababilitys, or is that an entire other post?
United Kingdom
#9  
@Erreul You could do it that way. For instance, an RC car, if it has a DC motor for the drive wheels this would just connect up to a HBridge. If just the one motor you would only need half of the 2 motor HBridge and as a result only 2 digital ports (based on the TB6612FNG Motor Controller I used in Melvin).

Depending on how they work, and I assume steering is a servo on the front wheels/steering rack, which would just go on to a digital port, servo position 50 would be centre, change position up or down to turn left or right.

Or my Hearoid, an Omnibot, Omnibot 2000, RAD etc. uses 2 DC motors and gearbox to drive the wheels. 1 does the left hand wheels, the other the right hand wheels. Smack a HBridge in there, left hand motor on one output, right hand on the other output.

Not entirely essential, some RC items like the Wall-E U-Command can be modified to use modified servos for continuous rotation. But more often than not a HBridge is the easiest and most efficient method.