Let's Make Robots!

The darn H-bridge

I just want to be able to reverse a current. How hard can it be?

I just want to be able to decide direction of the motor to my pic, why does it have to be so complicated?

Well - perhjaps it doesnt! Jip / Jimmy, the most clever guy in here just drew me this and send it to me.P2290333.jpg

The smallest and most-likely-to-burn-something H-bridge in the world!

If it works, I will make a full walkthrough about it.

If it burns my robot.. well.. he did warn me ;) 




Transistors are seen from top (usually you see them drawn from below) 


Motor will turn one way when


A = low, B = low, C = high, D = high

Other way when A = high, B = high, C = low, D = low


Motor will halt if A = high, B = high, C = high, D = high


... shortcut and smoke if A = low og B = high or C = low and D = high




Comment viewing options

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

You could contruct it so that you only need 2 inputs. Also, if you do that it would be preferable to use MOSFET transistors instead as they work for both directions. If you use an combination between NPN and PNP transistors you'll have to use a total of 6 transistors.

Societyofrobots has a really good tutorial that covers H-bridges though it only covers it with MOSFET transistors: http://www.societyofrobots.com/schematics_h-bridgedes.shtml

No rotation, nothing, does not work, something is wrong.

Will try to just use a L293D

Hate this shite!


Thanks, Fredrik, but I am too stupid for this, and I just want to make robots, hate electronics, am too stupid ;/

/ Frits

Yes, there is a 1.5V voltage drop within the L293D, and yes, it can only take so much of a load.. But it is simple, and it works.

I am going to make a L293D walkthrough for dummies - I have so far only used it in the picaxe 28 project board.. But it is actually very nice as a quick stand alone-fix!

More later,

/ Frits 

There is also an L298 chip that can handle more current and can sense the motor voltage (this can be used for telling how fast the motor is running - I think :-))

 - Jimmy

Frits I did warn you about not putting the darn thing online before you tested if it worked :-). I'm no electronics wizard so things that I conjure up are bound to be broken from the start :-D

A little note on the above H-bridge: it is not recommended for use by others than Frits who apparently wants to burn his transistors and chips :-). I think the design is correct but I didn't really test it :-D. At the very least there should be some schottky diodes for transistor protection and capacitors on the motor for spike protection (I think that's how it works anyway).

Fredrik you're quite right in that MOSFETs should be used instead of BJTs and if you really want a good and effective H-bridge you should use only N-channel MOSFETs since these have a lower internal resistance than P-channel (this does impose some requirements on your supply voltages though). Looks like a nice tutorial you found but the design it shows doesn't allow for electronic braking.

It would be nice to see some different motor controller designs. I was thinking of building something which works kind of like L293 with having a voltage for the motor and still being able to control it from TTL voltage levels directly from the picaxe. I think maybe this can be done by using an op-amp to drive each transistor (and you can get four op-amps in one chip with the LM339)... I should make a drawing so you guys can see and tell me if it is crap and not working :-).

- Jimmy

I just saw that I turned the NPN transistors in the wrong direction on the picture! They should be rotated 180 degrees... The collector pins from PNP and NPN are supposed to be connected.

- Jimmy

There are two problems with this design. 1 is the transistors. the 547 and 557 are designed for low current. I doubt you can drive a motor with it. 2 is that if you turn on A+B and/or C+D then yes, the motor will halt, but you will most likely see the whole thing go up in a puff of smoke. If you open both transistors in either side, you create a short between Vmotor and GND...

Yes it's true that the transistors are only rated for about 100 mA of current which I also pointed out to Frits in the mail I sent him. I guess he left that bit of information out when putting the thing online :-).

Aren't motor drivers supposed to go up in a puff of smoke? :-D... I'm going for drama and not movement ;-).

- Jimmy


There is an error in the pin description. To turn the motor one way, open C+B. The other way is A+D. Think of the transistors as a switch and follow the power from Vmotor, through the open transistor (A or C), through the motor and through the other open transistor (B or D)

I think the pin description is right. Remember that PNP transistors turn on when input is low and not high. NPN transistors are the other way around. Did I miss something else?

- Jimmy