Introduction to the H-bridge motor controller

[Chris] sent us this fantastic tutorial, introducing beginners to H-bridge motor drivers. While many of you will consider this stuff basic, those who are trying to expand from building only things the arduino board can handle to bigger more expansive (and powerful) projects will find this quite helpful.  [Chris's] tutorial is very in depth, not only going through the construction of the basic circuit but also showing you how to make your own PCB.  Pop on over there and learn some theory and some practice. Then you can build that battle bot you’ve always been dreaming of!

Comments

  1. Ikari-Pt says:

    My H-BRIDGE based on vnh3sp30 can hadle 30A and as corrent measure so…

  2. ds2ktj says:

    Ikari,

    Post your link.

    The PCB in the article here is clearly missing a couple traces in the above link…use caution – he didn’t show his “fib” with careful photography nor does he mention it.

  3. ds2ktj says:

    I stand corrected – he does mention the missing trace.

    •Single Unrouted Trace
    One yellow line still exists, and that is because it was a trace that would cut off a good ground connection to one of the power transistors. To fix this, a simple jumper wire will be used instead of a PCB trace.

  4. PeterM says:

    I hate to be “that guy” but use this circuit with all due caution. Apart from running rough-as-guts due to the lack of micro-stepping, there are no diodes to protect against back EMF, no thermal protection and no active current limiting or over-current protection. When you’re running at 10A you really do want all of these things.

    Or in the spirit of a true hacker you could just throw caution to the wind and say hey, it’s a great tutorial, let’s build one! :)

  5. fartface says:

    Wonderful. About time we got something useful.

  6. SparkyGSX says:

    I don’t mean to be a hater, but that circuit really is a piece of crap. No synchronous rectification, 2 darlingtons dropping 2.8V of the power supply, and worst of all: no flyback diodes!

    It’s horribly inefficient, and the transistors won’t live very long. The latter can be fixed by adding some decent (fast, 10A+ rated) diodes anti-parallel to the transistors. The inefficiency is a direct consequence of the choice of the switches.

    The latter may not matter to some, and if at least the damn diodes are included, it would be a reasonable circuit for beginners.

    I understand why using all N-channel MOSFETs wouldn’t be a good choice for an introductory circuit, and using P-channel MOSFETs has its disadvantages, but bipolar darlington transistors don’t allow a lot of upscaling either, so P-channel MOSFETs would have been a better choice, I think.

  7. Haku says:

    I’ve salvaged a bunch of IRFZ46N’s from an old APC UPS and wish to turn them into a dual h-bridge for a tracked chassis, I have a pre-made L298N board running the motors in the chassis but it’s an awkward size so won’t fit in the chassis easily and not as efficient as a MOSFET setup.

    I’m still learning about properly using MOSFETs so have been scouring the web for proper information and a little breadboard testing without a load just a multimeter, I realise that because they’re n-channel I need a gate driver for them.

    Does anyone have any suggestions on gate drivers or more detailed information on learning about creating a MOSFET h-bridge from scratch? I did notice the lack of protection diodes in the circuit so I wondered what other corners were cut.

  8. zing says:

    Perhaps he thought the tiny built-in antiparallel diodes were sufficient.

  9. mstone says:

    Granted the circuit is basic, but let’s remember that this is an article for the raw beginner. We can talk about synchronous rectification once people know what a push-pull output stage is.

    For anyone who’s new to H-bridges, yes, flyback protection diodes are important.. they’re diodes installed ‘upside down’ at each lead going into the motor.

    The winding in a motor is an inductor, which means it resists sudden changes in current flow. A sudden increase in current expands the magnetic field, a sudden drop in current collapses the field. In both cases, the change in magnetic field is accompanied by a spike in voltage. That means the voltage in the windings can go far higher than Vcc and far below GND.. as much as several hundred volts, which can lead to arcing and component breakdown.

    The upside-down diodes eliminate those spikes by passing current from the coil to Vcc when the coil voltage goes higher than Vcc, and passing current from GND into the coil when the coil voltage goes below GND.

    I do have one nitpick about the circuit description on the third page: he says power goes into the collectors of the PNP transistors, which is a mistake. The schematic shows the emitters going to Vcc (a PNP emitter always goes toward Vcc, an NPN emitter always goes toward GND).

  10. mstone says:

    @Haku: Here are a couple of good discussions of mosfet H-bridges:

    http://roko.ca/robotics/h-bridge-fundamentals

    http://www.cadvision.com/blanchas/hexfet/

    and here’s a really good discussion of BJT H-bridges:

    http://www.mcmanis.com/chuck/robotics/tutorial/h-bridge/

    If you’re trying to build an H-bridge entirely out of N-channel mosfets, you’ll end up using what’s called a ‘totem pole’ output for either half-bridge.. one mosfet sitting above the other. That works, but the voltage to the motor will max out one Vgs (the voltage required to turn the mosfet on) below Vcc, unless you do what’s called ‘high-side drive’.

    High-side drive basically involves building a charge pump to generate a voltage at least one Vgs above Vcc, and using that to drive the gate of your upper mosfet. It isn’t all that hard, since the current through the gate of a mosfet is measured in nanoamps, but it does make the circuit more complicated.

  11. malone says:

    @ Haku

    i too got a bunch of fets from a UPS (irf3710).
    i simulated (falstad.com), and read a lot about them fets.

    in the end i use them to sink the unipolar load, driving them with a pull up on the V rail(before chopping), and pull them down with a transistor via protected uC output, with a bunch of diodes and stuff in there.

    yes they do saturate very well and run 2-3 amps warm with no heatsinks.

  12. tim says:

    How is it possible that people in 2011 are still using this rotten bipolar L298 when there are so many nice mosfet hbridge around.

  13. TheCreator says:

    There are several more advanced h-bridge and dual h-bridge circuits. One of which that wasn’t mentioned was the guy that created the Lawnbot 4000 he has created a 24 mosfet dual H-Bridge that is decent other than his lack of circuit protection. His site is located at: http://www.rediculouslygoodlooking.com/

    also for some good schematics you can check out the OSMC (open source motor controller) page at: http://www.robotpower.com/downloads/

    There are several designs here that range from a simple single channel H-bridge to more advance 160A continuous current applications.

  14. WestfW says:

    It needs heatsinks. Really.
    (very all-inclusive tutorial, though.)

    The transistors specified DO have internal flyback diodes. I couldn’t tell from datasheets whether they’re “sufficient”, but since this is a bipolar part, they’re not just a byproduct of the chip process (as they are in MOSFETs), so I’d expect them to be OK.

    There is THIS tutorial that is a little more rigorous and results in a more professional bridge: http://www.mcmanis.com/chuck/robotics/tutorial/h-bridge/

  15. WestfW says:

    @tim: please recommend a “nice mosfet Hbridge” widely available in hobbyist-friendly package…

  16. Haku says:

    @tim, the L298N board cost me $15 shipped and works out-of-the-box to easily control my RP5 tracked chassis, so I wouldn’t call it rotten by any means, but I do realise that the motors aren’t being run to their full potential (speed) from the batteries because of the voltage drop so I would like a nice (up to 2A) MOSFET h-bridge that doesn’t cost more than the chassis+other components put together.

    What do you reccomend?

  17. therian says:

    this is a bad circuit and neither the simplest one

  18. strider_mt2k says:

    The “H” doesn’t have to mean hatred, fellas.

    Sheesh. You’d think it was connected to your life support system and not someone’s project.

  19. jmz says:

    Lol, in addition to everything else which has been mentioned, there’s also no protection against both legs being turned on at the same time, causing a dead short.

  20. Matthew says:

    “an” H-Bridge not “a” H-Bridge

  21. mayur says:

    i want to design a moter driver circuit in following manner..:
    1] There are 3 signal coming from microcontroller
    a) pwm signal : depending upon this my moter speed is contol
    b) 0 or 1 bit: depending on 0 or 1 my moter run in clockwise or anticlockwise .
    c)0 or 1 bit: depending on 0 or 1 my moter run or stop;

    >>> how should i perform this????
    plz reply

  22. mayur says:

    plz someone reply on above comment….m waiting

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 93,780 other followers