
BillDerwent
United Kingdom
Asked
— Edited
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.
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.
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?
You can also make one out of busted servos apparently but I've never looked in to that.
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!
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...
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:
Here's a motor in the head section that EZ-B's controller works fine on:
Hope this all helped.
Dave Schulpius
- Bill.
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.