My first H-bridge


While working on my latest autonomous tank project, something very annoying happened: I needed to control 2 motors for the turret and the firing of the gun, BUT out of the 3 completely different motor controllers that I had laying around (a L293D based one, a pololu serial controller and a micro RC ESC) NONE was working… !!!

This was so frustrating, that it forced me to want to build my very first H-Bridge from scratch. This is something I had always avoided, thinking that “I had better things to do”, ie spend time on higher level stuff …

I started with this schema, taken from the Internet and slightly modified (it initially used 2.2KOhms resistors, but on all the other sites people were using 1K, as a better compromise):

TIP120 base H-Bridge motor controller

The big advantage for me, was its small parts count and the fact that I had everything readily available.

So let’s build the prototype:

Really few and simple parts: 4x TIP120, 4x1KOhm resistors and 4x1N4148 diodes

Done in less thatn 5 minutes... impressive

Nice and clean... impressively simple !

Now let’s quickly add on the same stripboard, another TIP120 for the gun fire control. NO H-Bridge, just a simple transitor as the gun motor can only spin in one direction…

Basic TIP120 use case

Extra TIP120 added, for another uni-directional motor control

That’s it…

+es

  1. quick and easy to build
  2. cheap

-es

  1. these TIP120 darlington transitor are quite inefficient
  2. MOST IMPORTANT : the motor and logic voltage are the SAME !

So, if your MCU controlling this is a 3V3 one, then the max voltage for your motors will be 3.3Volts… Or alternatively, it won’t be able to completely “open” the darlington transistors.

In my case, I had a 12V voltage for the motors, and a 3.3V FEZ Domino. When I “opened” the bridge, the motor would receive only around 25% of te voltage/power available…

I tried to “fix” this, by regulating the motor’s power to 5V by using a L7805 IC:

L7805 circuit (do NOT FORGET the capacitors !)

(don’t forget the capacitors I’ve just spend a few hours trying to understand why  my circuit didn’t work ! lol… )

This kind of worked, as in 100% of 5V was giving better results than 25% of 12V, but I had to use a 5V Arduino instead of my 3.3V FEZ board, and was still frustrated by not being able to spin the motor as fast as I should…

About these ads

13 Responses to My first H-bridge

  1. Jarek says:

    You’re supposed to use TIP125’s for the ‘top’ transistors. Search for TIP120 TIP125 H Bridge in google.

    • trandi says:

      Indeed I see some bridges examples with a mix of 2 TIP120 and 2 TIP125, but I don’t really understand the reason / difference.

      My bridge DOES work, so could you please elaborate what are the main differences between the 125 and the 120 and why it’s better to combine them ?

      Many thanks,
      Dan

      • Jarek says:

        I’m doing research on my own H-bridge, and stumbled across this page and another concurrently which used TIP120s for all 4 transistors. I found the reason listed underneath the other post, so I’m reposting the reply:

        Your upper transistors, being NPN are operating as emitter followers. You’ll never get a higher voltage on the emitters than you’ve applied to the bases. To remedy this, you must either use PNPs for the upper transistors or provide a base voltage to the NPNs that’s at least your desired drive voltage, plus 1.2V (for Darlingtons).

        From: http://forums.parallax.com/showthread.php?101534-H-Bridge-delivering-half-voltage-what-s-up

      • trandi says:

        Thanks for the explanation, this actually makes sense ! It also fits well with my observation that even though I was using 12V for the motors, it seemed they never got more than 5V, which was the “logic” voltage… I always thought it was either “normal” or the “quality” of the transistors, but it seems that my H bridge, even though it works it’s clearly suboptimal !

        Thanks, Dan

  2. angelo says:

    I had the same arrangement made but my problem was that the change of +/- at the threshold, was so delicate to find and I constantly had to trim the channel… to stop the motor from drifting…
    I have thought of utilizing an opamp as a comparator to cut off the very small voltage before and after the zero point…
    any suggestions?

    • trandi says:

      Don’t really know… to be honest this was really my first attempt and it worked well enough for the purpose…

  3. Pingback: » Pont en H pas cher - H bridge

  4. Pingback: Tiger 1 BB airsoft RC Tank « Robotics / Electronics / Physical Computing

  5. Pingback: How to Electronically Generate a DC Motor From a DC Power Supply Employing Variable Speed and Direction

  6. Pingback: Let’s Develop a Robot

  7. Pingback: How to Electronically Push a DC Motor From a DC Power Supply Utilizing Variable Velocity and Course

  8. Pingback: Tiger 1 BB airsoft RC Tank « Robotics / Electronics / Physical Computing

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 150 other followers

%d bloggers like this: