Let's Make Robots!

H Bridge Matrix


Description

An H-bridge circuit typically provides motor control in robotic designs. Low voltage, low amperage control signals (TTL) are used to control motors. The H-Bridge can interpret these signals into a Motor Go Forward, Motor Go Backward, Motor Stop commands. Often speed can be implemented using PWM (Pulse-width modulation) through a H-Bridge. H-Bridges are extremely important in robotics. It is like the connection between the brains and the muscle of a robot. The brains being a computer or micro-Processor, and the muscles being a motor. This Matrix (when it is somewhat completed) should help you step through the process of selecting an appropriate H-Bridge design for your application.

 Terms

  • Ampere  - (symbol A) the unit of measure for electrical current
  • BJT - a common often inexpensive transistor
  • Ground - the negative part of a battery :)
  • Inductance - The magnetic field that is generated when a current is passed through an inductor, typically a wire coil. Important, because a motor which is spinning is also a generator. The current generated from this can (and has) put many H-bridges in Magic Smoke mode.
  • Load - the work a motor is doing
    • No-load - is the speed and current drawn by a motor when there is no external load
    • Stalled - is the current and torque of a motor when so much load is put on the shaft, the motor does not turn
    • Rated - maximum load conditions which the motor can be operated continuously
  • Magic Smoke - (slang) the smoke released from your circuit, which previously made it work. When a circuit becomes overloaded and components burn, they make magic smoke.
  • MOSFET - a silicon switch which is capable of switching a considerable amount of current, typically more than BJTs. Due to the fact that MOSFETs conduct less when heated, they can be ganged together to provide massive current capability. BJTs in contrast conduct more when they get hot, and will destroy themselves in similar conditions.
  • Ohm - a unit of measure for electrical resitance
  • Ohm's law - a helpful formula for figuring out how much work your circuit can do, before going into "Magic Smoke" mode. I = V/R. Current = Voltage / Resistance
  • Shoot Through - a term describing when some of the switches in an h-bridge do not open or close at the appropriate time. Shoot through shorts the power and can lead to circuit destruction. It is a good thing to avoid when possible. Some h-bridges are designed to prevent shoot through, other designs leave it to control circuitry.
  • Short - a term describing power from a circuit going directly to ground without resistance. Another good thing to avoid. It can destroy batteries, circuits, and the wire or trace which was shorted.
  • VCC, VDD, V+, VS+, PWR, + Positive supply voltage
  • VEE, VSS, V-, VS-, GND, - Negative supply voltage
  • Volt- (symbol V) the unit of measure for electrical potential/pressure
  • Sign Magnitude - a method of using 2 inputs to an h-bridge, in which one input signals direction, and a PWM input gives the magnitude of drive.
  • Locked Antiphase - input method where direction and magnitude are a single PWM input. At 50% duty the motor is stopped, lowering the duty percent would increase drive one direction, raising the duty cycle would increase in the opposite direction. Offers true 4 quadrant control of motors (CW driven, CW regenerating, CCW driven, CCW regenerating), but increases switching which increases heat.

How it works

 

 How to select the appropriate H-Bridge design

Measure resistance of the coil of your motor To find the stall current of your motor use Ohm's Law V/R=I (Current = Voltage/Resistance). For example if you measure the resistance of a motors leads at 2.4 Ohms and your battery is 24 volts, your stall current will be : 24 volts / 2.4 Ohms = 10 Amps. So if your motor stalls, your circuit should be protected or capable of handling 10 amps.

 BOA's Brilliant Hybrid H Bridge

BOA's Brilliant Hybrid H Bridge
DescriptionBaseOverApex's design of a great Hybrid H-bridge. The hybrid is a combination of relays and MOSFETs. The relays are for forward and reverse switching. The MOSFETS can accept a high frequency PWM for speed control. This design has been built (not just theory) and is currently powering one of BOA's great bots. Hopefully he will post a version of the PCB art - although it might be good to rework it so that the PIC is not part of the design, as others might be using different methods of control.
Original AuthorBaseOverApex
Built ByBaseOverApex,
Max Current10 Amps
Max Voltage12 Volts
Build Time3 Days?
Pros 
ConsSchematic is completely wrong at the moment - will fix
Max PWM Frequency 
Featuresforward, reverse, pwm speed control, current overload protection, fuse
Parts List 
Schematic
BreadBoard
Gerber

 

 BOA's Brilliant Hybrid H Bridge - Robologist Mod

BOA's Brilliant Hybrid H Bridge - Robologist Mod
DescriptionBaseOverApex's design of a great Hybrid H-bridge. The hybrid is a combination of relays and MOSFETs. The relays are for forward and reverse switching. The MOSFETS can accept a high frequency PWM for speed control. This design has been built (not just theory) and is currently powering one of BOA's great bots. Hopefully he will post a version of the PCB art - although it might be good to rework it so that the PIC is not part of the design, as others might be using different methods of control.
Original AuthorBaseOverApex robologist
Built By 
Max Current15 Amps - limit by relay
Max Voltage12 Volts to 15 Volts
Build Time3 Days?
Prosstrong, low cost
Consnot quicklyswitchable forward to reverse, limit by relay
Max PWM Frequency 
Featuresreverse flyback diodes, MOSFET driver
Parts List
Desig  Qty  Part#           Each  Total    Dist      Description
*K1,K2 2 PB897-ND $4.44 $8.88 Digikey Tyco PCLH-202D1SP,000 12VDC/75 mA coil, 15A relay
*Q1,Q2 2 IRFZ44NPBF-ND $1.89 $3.78 Digikey IRF IRFZ44NPBF 49A 55v N-chan FET TO-220
*Q3,Q4 2 P2N2222AGOS-ND 0.36 0.72 Digikey On Semi P2N2222AG 600mA 40v NPN GP BJT TO-92
*D1-D8 8 497-2753-5-ND $1.09 $8.72 Digikey STMicro STPS1545D 15A 45v Schottky rectifier diode
*U1 1 TC4427CPA-ND $1.05 $1.05 Digikey Microchip TC4427CPA 1.5A MOSFET driver
*C1 1 4035PHCT-ND 0.81 0.81 Digikey Vishay 220 uF 35 v Electrolytic Cap
* Total $23.96
Schematic
BreadBoard
Gerber

 SINGLE CHIP N-CHANNEL FET BRIDGE

SINGLE CHIP N-CHANNEL FET BRIDGE
DescriptionDesign which contains a very small amount of components for a very large capacity H-Bridge.
Original AuthorGroG
Built By 
Max Current30 Amps
Max Voltage50 Volts
Build Time3 Days?
ProsVery small number of components, includes a under current protection line, will not "shoot through"
ConsSchematic is completely wrong at the moment - will fix
Max PWM Frequency 
Featuresforward, reverse, pwm speed control, current overload protection
Parts List 
Schematic
BreadBoard
Gerber

 

 

 SIMPLE LOW POWER NPN PNP H-Bridge

SIMPLE LOW POWER NPN PNP H-Bridge
DescriptionDesign which contains a very small amount of components for a very small capacity H-Bridge. The NPN transistors can be substituted with a variety of differently rated components. 2N2222 TIP120, etc.
Original AuthorGroG
Built By 
Max CurrentDependent on the transistor used - 2n2222 can sink ~800 mA, a TIP 120 can drive 5 amps with proper heat sink
Max Voltage50 Volts
Build Time 
Prossmall, inexpensive
Consno protection of shoot through, will only drive small motors
Max PWM Frequency 
Featuresforward, reverse, pwm speed control
Parts List 
Schematic
BreadBoard
Gerber

 SINGLE CHIP CONTOLLERS

SINGLE CHIP CONTOLLERS
DescriptionDesign which contains a very small amount of components for a very small capacity H-Bridge. The NPN transistors can be substituted with a variety of differently rated components. 2N2222 TIP120, etc.
Original AuthorKrumlink
Built ByKrumlink - It is being implemented in my revised AREV-RSPF232
Max Current1.2 Amps per line
Max Voltage4.5 VDC to 40 volts (Forgot max but it is around 40 VDC) for motor lines / VCC2
Build Time 
Prossingle chip, no external peripheral stuff needed, just hook up the motors, input and enable lines and you are good.
ConsThe SN754410 does not have build in clamp diodes, so you need to add them. The internal diodes are for ESD protection  Pulldown resistors may be wanted to prevent the enable lines drifting high Low max voltage for motors but with internal diodes it drops the voltage to 3.1VDC anyways.
Max PWM Frequency 
FeaturesSimple to hook up, you do not need PWM and it is easy to throw together and use with LED's too
Parts ListSN754410 - optional pulldown resistors (1-10k usually)
Schematic
BreadBoard
Gerber 

 Simple P-channel over N-channel h-bridge

Simple P-channel over N-channel h-bridge
DescriptionBasic low part count P over N h-bridge
Original Authorrobologist
Built By 
Max Current80 Amps?
Max Voltage12-15 Volts limit by driver and configuration
Build Time2 hours?
ProsVery few parts, cheap
Cons

No shoot through protections, uses 4 inputs, untested

Could be improved by connecting upper and lower inputs, then adding an inverter attached between right and left sides for lock antiphase single input drive. Test shoot-through with uppers/lowers connected for feasibility.

Max PWM Frequency 
Featuresforward, reverse, pwm speed control
Parts List
Desig  Qty  Part#             Each  Total    Dist      Description  
*U1,U2 2 579-TC4427ACPA $1.36 $2.72 Mouser Microchip TC4427CPA 1.5A MOSFET driver
*Q1,Q2 2 726-SPP80P06P $3.02 $6.04 Mouser Infineon SPP80P06N P-ch 60V 80A FET TO-220
*Q3,Q4 2 726-IPB080N06NG $2.11 $4.22 Mouser Infineon IPB080N06N G N-ch 60V 80A FET TO-220
*C1 1 647-UVY1E221MED1TA 0.11 0.11 Mouser Nichon 220 uF 25 v Electrolytic Cap
*total $13.09
Schematic
BreadBoard 
Gerber 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I've used my own circuit and it doesn't behave as described. I've also used the 298 and 293 and they don't behave as described either. If a switch is on for 75% of the time, it's on for 75% pf the time and it doesn't care what direction the electricity is going. Is this some bizzarre feature of PWM implementation in Picaxe?

I see what you've done. Picaxe only gives you two PWM outputs, so you guys are only PWMing one low-side switch. The BOA L293/8 driver switches over to PWM the opposing LSS when direction changes, so 75%=75% regardless of direction.

The advantage of assembly code: you can make any pin PWM. Show me the raw ones and zeros any day. I will convert you all. I can see the code.

Explain to me how to weld stuff. Cheap.

Are we ready to Rummmble !!!

In this corner weighing in @ 95kg is BOA, inventor of the low side MOSFET topside relay switch H-bridge - "I done need no stinkin bootloader PIC", whizzywriter,  jet engineer, 2's complement techy artist, laser wit from some undisclosed location in Northern Ireland

VS.

CTC, tattooed fingered Rototueur extraordinaire, craftsman beyond compare, only person man enough to show their face on YouTube,  Massachusetts robot madman !

Whoooooooo!

I'm tingling all over again :)

Bring it Baby !

I'm touched that you remembered that I was foolish enough to post my weight.

63.5 kg

Made me think of him as "The Tiny Carpenter" ever since. ;-)

8ik (75 kg)

No way. My wife's not much lighter.
... At just a few cm shy of 2 meters tall! --I lost a bunch of weight in the motorcycle accident... I did get a bunch of screws put in me, though!! 32 to be exact!

 

         V

picture-152.jpg

That makes sence, boa... I was quite surprised that you didn't get it -I forgot you are not a Picaxe basic guy! Damn 1's and 0's! --Now we do have a 4-pin PWM output, it's a "Hpwm" output for h-bridges but no one has ever figured it out! Seriously, no one...

Ok, on to welding... (This is all in reference to Arc Welding)

You got really got two options: Mig and Stick (yeah, yeah I know there is Tig -skip it for now)

There is a high current arc that melts the metal and a filler material is fed into it. Also, it is important to keep oxygen from getting to the molten metal as this is a contaminate and will ruin the weld.

Stick welding uses an electrode (a stick) stuck in a little handle. You have to keep it a certain distance from the work, the right angle and be constantly feeding into the work as it melts away. Also the stick is covered in flux that burns in the arc and produces a shield of gas that keeps the oxygen out. For a begginer set-up I would go with mig.

MIG:

Mig welding uses a coil of wire which is fed to a gun and comes out when you pull the trigger. The amps and feed rate are adjustable at the machine. Unless you are a welding "purist" I would recomend a MIG for your first welder. You don't need to worry about keeping an arc distance and the angle is less crutial than with stick welding. Now, in terms of the shielding some welders use a tank of inert gas (I use a mix of Argon and CO2) but you can also use flux-core wire. In a nut-shell, you can get a good, cheap welder for around $100 U.S. that will weld steel up to about 1/8" thick. This $100 welder will serve you quite well on 90% of what you would want it for and are GREAT to learn on! This is actually my first welder and I still have it. I welded 3 trailers and a couple truck beds with it. I used it for about 3 years before I decided to upgrade to a much more professional unit. --That being said, I still use it on the jobsite from time to time --Remeber, we use 110VAC around here and my big welder is 220VAC so having something I can plug into a regular wall socket is great to have!

Bottome line: Get one of these or something like it and just start burning metal --I promise, you will pick it up in only a few hours.

**Now the real question is: Were you serious about the welding question?

 

Serious enough that I would encourage you to delete the post above (and this one) and create a new Tip / Walkthrough: Beginner's Guide to Welding for Roboteers. Something I wanna have a crack at but just need the starting point and a few technical names for stuff.

I have a lot of 1/10th angle which is crying out to be made into a robot chassis and I don't fancy doing it with M4 bolts.