go_away

### Author Topic: A Better H-Bridge?  (Read 4382 times)

0 Members and 1 Guest are viewing this topic.

#### Nyx

• Robot Overlord
• Posts: 204
##### A Better H-Bridge?
« on: May 27, 2008, 06:04:41 AM »

In the h-bridge tutorial you mentioned two things that caught my attention:
- The signal to the MOSFETs should be amplified
- A = 1, B = 1 means a short

So I have 3 questions regarding the circuit....

A) How do you amplify the signal? I'm fairly new to electronics and I don't know how one would go about that. Would it be possible to provide a diagram of an enhanced h-bridge featuring amplification, if possible with specific part numbers for the transistors/ICs used.

B) Can you prevent a short somehow? Is there some kind of inverse-MOSFET out there that could shut off the current to B when A = 1, and vice versa? If so, could you also implement short-circuit protection in an improved circuit?

C) As far as us newbies are concerned, is there really any difference between PNP and NPN MOSFETs, besides which direction the current flows in when power is applied to the base?

The invitation to make such an improved circuit also goes for other forum goers... But please, if you do, tell us about the specific part numbers used.

#### SixRingz

• Full Member
• Posts: 76
• Bit's and pc's = Robot.
##### Re: A Better H-Bridge?
« Reply #1 on: May 27, 2008, 09:26:23 AM »
I would like to add a question:
D) I've been warned by some not to try building H-bridges for DC motors myself since they tend to not withstand the massive currents from DC motors. (I'm talking regular 1:10 RC-car motor, 7,2V). I therefore bought an expensive one (118 USD) instead of making my own. What are your experiences from home made H-bridges? What size motors have you guys driven with them?
« Last Edit: May 27, 2008, 09:36:50 AM by SixRingz »
Grounding things properly means burying them in the backyard...

#### Nyx

• Robot Overlord
• Posts: 204
##### Re: A Better H-Bridge?
« Reply #2 on: May 27, 2008, 10:38:54 AM »
Relating to the previous Q....

E) Can one stack a bunch of MOSFETs in parallel, using them as a single unit, in the hope of reducing the overheating and allowing more power to flow through? Would that risk overloading the ICs doing the signalling? Perhaps one could use a small transistor to switch the MOSFETs on?

#### humble_robot

• Beginner
• Posts: 2
##### Re: A Better H-Bridge?
« Reply #3 on: May 27, 2008, 10:56:15 AM »
Hello Friends,
humble_robot

#### bens

• Expert Roboticist
• Supreme Robot
• Posts: 335
##### Re: A Better H-Bridge?
« Reply #4 on: May 27, 2008, 01:32:18 PM »

In the h-bridge tutorial you mentioned two things that caught my attention:
- The signal to the MOSFETs should be amplified
- A = 1, B = 1 means a short

B) Can you prevent a short somehow? Is there some kind of inverse-MOSFET out there that could shut off the current to B when A = 1, and vice versa? If so, could you also implement short-circuit protection in an improved circuit?

The H-bridge schematic in the tutorial is drawn in a somewhat non-standard way (at least non-standard in my experience).  Envision relabeling it so that on the left side you have as inputs A (top) and !A (bottom), and on the right side you have as inputs B (top) and !B (bottom).

Now you get the following (typical) truth table:
A B effect
1 0 motor forward
0 1 motor reverse
0 0 brake high (both motor inputs tied to the high voltage rail)
1 1 brake low (both motor inputs tied to the low voltage rail)

By controlling the top MOSFET with one signal and the bottom MOSFET on the same side with that signal inverted, you will never have a short.  The only problem you might experience is shoot-through, which can happen if your MOSFETS don't turn on or off quickly enough.  As one is turning off and the other is turning on, you have a brief period where there is a somewhat resistance-free path from power to ground, and you get a very short-duration high current spike.  The effect of this is that your PWM frequency is limited by shoot-through.

- Ben

#### Commanderbob

• Robot Overlord
• Posts: 146
• Embeddedmicro.com
##### Re: A Better H-Bridge?
« Reply #5 on: May 27, 2008, 10:08:09 PM »
Depending on your motor size and power draw you could use an IC H-bridge like this one. I use that one in all my small robots. You never get a short from a bad signal and it is easy to use. I normally connect the enable pins to a PWM pin and use the other pins to set the direction.
Justin

#### ALZ

• Full Member
• Posts: 75
##### Re: A Better H-Bridge?
« Reply #6 on: May 27, 2008, 10:41:08 PM »
Hi:

Build them yourself, that how you learn and save money. The one I built for a outdoors base was 10 amps per motor.   I used a IRL3705 MOSFET \$1.37 ea. needed one per motor. One DPDT relay per motor. Took the two relay I needed along with the 4 heat sinks and capacitors  off a board I paid \$1.99 for. Two transistor 8 cents. Voltage regalator 64 cents, rectifiers  about 80 cents, connectors was around \$2. So the two 10 amp H-bridges cost me less than \$9. Next year if I get to it I will be building a 40 amp per motor H-bridges for wheel chair motors. That should cost about \$30 total for the two.

I would like to add a question:
D) I've been warned by some not to try building H-bridges for DC motors myself since they tend to not withstand the massive currents from DC motors. (I'm talking regular 1:10 RC-car motor, 7,2V). I therefore bought an expensive one (118 USD) instead of making my own. What are your experiences from home made H-bridges? What size motors have you guys driven with them?

#### SixRingz

• Full Member
• Posts: 76
• Bit's and pc's = Robot.
##### Re: A Better H-Bridge?
« Reply #7 on: May 28, 2008, 05:44:44 AM »
ALZ, could you post schematics of your setup? I don't really see why people warned me so much, apparently you can make your own and if built right they're much cheaper and with similar performance. Thanks ALZ.
Grounding things properly means burying them in the backyard...

#### Nyx

• Robot Overlord
• Posts: 204
##### Re: A Better H-Bridge?
« Reply #8 on: May 28, 2008, 03:13:04 PM »
And.... Can you put MOSFETs in parallel to get twice the amp rating?

#### bens

• Expert Roboticist
• Supreme Robot
• Posts: 335
##### Re: A Better H-Bridge?
« Reply #9 on: May 28, 2008, 03:16:19 PM »
Yes.

#### ALZ

• Full Member
• Posts: 75
##### Re: A Better H-Bridge?
« Reply #10 on: May 30, 2008, 12:40:14 AM »
Hi: I'll see if I can post something by Sunday.

I just got done with a tutorial at:

http://www.instructables.com/contest/robotcontest/?show=ENTRIES

My is: A Practical Robot
by
Al1970

Vote for me !

ALZ, could you post schematics of your setup? I don't really see why people warned me so much, apparently you can make your own and if built right they're much cheaper and with similar performance. Thanks ALZ.

I think what it is is people think it would cost alot and then you would be out all that money if it doesn't work. When you build things yourself, it is very cheap. So even if it doesn't work it cost you very little.

#### ALZ

• Full Member
• Posts: 75
##### Re: A Better H-Bridge?
« Reply #11 on: June 02, 2008, 02:16:27 AM »
Hi: SixRingz

You can go to my new web site at:
http://robotics.scienceontheweb.net

For the details on the H-bridge

ALZ, could you post schematics of your setup? I don't really see why people warned me so much, apparently you can make your own and if built right they're much cheaper and with similar performance. Thanks ALZ.

#### SixRingz

• Full Member
• Posts: 76
• Bit's and pc's = Robot.
##### Re: A Better H-Bridge?
« Reply #12 on: June 02, 2008, 02:51:32 AM »
Thanks ALZ!! I'll look into that, and hopefully save 118 USD next time...
Grounding things properly means burying them in the backyard...

• Supreme Robot
• Posts: 11,699
##### Re: A Better H-Bridge?
« Reply #13 on: June 07, 2008, 05:03:55 PM »
To amplify the voltage signal, use an op-amp or better yet a mosfet driver IC.

As for pnp and npn, there is an error in that tutorial I've never gotten around to correcting . . .

The top mosfets need to be pnp, and the bottom two should be npn.

But personally, I don't recommend making an H-bridge if you can buy a motor driver . . .

#### kf6snj

• Jr. Member
• Posts: 17
##### Re: A Better H-Bridge?
« Reply #14 on: June 08, 2008, 07:53:15 AM »
I am planning to build my H-bridge circuits and am considering using heatsinks to help dissapate the heat. My question is whether or not that would be effective? I am also going to include a couple of small computer fans for internal cooling.

• Supreme Robot
• Posts: 11,699
##### Re: A Better H-Bridge?
« Reply #15 on: June 08, 2008, 10:54:21 AM »
Look at the mosfet datasheets, they will say how much power (heat) they can dissapate at certain voltage/current draws.

If you calculate more than it can handle, then you should add the cooling extras.

• Full Member
• Posts: 75