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!

22 thoughts on “Introduction To The H-bridge Motor Controller

  1. 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.

  2. 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.

  3. 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! :)

  4. 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.

  5. 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.

  6. 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).

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

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

    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.

  8. @ Haku

    i too got a bunch of fets from a UPS (irf3710).
    i simulated (, 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.

  9. 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:

    also for some good schematics you can check out the OSMC (open source motor controller) page at:

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

  10. 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:

  11. @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?

  12. 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

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.