Let's Make Robots!

h bridge

Hi, I have been trying to get this h bridge right for almost a month now, ( see attached pdf)

 

I have a 1K res in front of the opto isolators Collector for current limiting. The opto isolator's LED is powered by a micro-controller. According to my code. When 1 is high 4 is high and when 2 is high 3 is high.

 

So current has to flow from 1 to 4 and from 2 to 3 according to me respectively depending on what is high. But guess what, if the base has no power, then current flows freely from collector to emitter and the other way round as well. So it has no effect if I put a high on the base. And then one of the FET's goes up in smoke if I did not jet put a high on the base, or I can put a high on the base, no difference.

 

Can some one please help me with this. I am on the edge of loosing all hope.

AttachmentSize
h_bridge_1.pdf17.81 KB
4128.pdf58.73 KB

Comment viewing options

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

 

Thanks, you are a life saver, it is one of the clearest explanations I have had in a long time. Tried it and everything works fine now. Thanks. 

sorry typing error. the top 2 are PNP and the bottom 2 are NPN. if i understand you correctly then for a transistor to work as a switch, the collector voltage needs to be lower than the emitter voltage, how is this achieved? if i use say 10volt and the collector and 12volt at the base, what will happen? I can use 5 volt at the base, any other voltage between 5 and 12 at the collector, how do i know that i will get 12volt at the emitter? i need to use 12volt because i use 12volt motors.

so just to be absolutely sure, in NPN i connect negative to C, positive to B and negative to E. and the other way round in PNP?  

Nope. Sorry if I was unclear. NPN and PNP transistors need to be hooked up differently. Look at the arrow on the symbol for each. Current flows in the direction of that arrow.

PNP

  • Current flows from emitter to collector
  • Connect your positive voltage (e.g., 12V) directly to the emitter.
  • Connect the collector to one motor lead.
  • Signal the base with a LOW voltage to turn it on.

NPN

  • Current flows from collector to emitter
  • Connect the collector to one motor lead.
  • Connect the emtter to ground.
  • Signal the base with a HIGH voltage to turn it on.

If you search the site for 'h-bridge matrix' you'll find lots of examples of h-bridges. There are also many good resources on the Internet that explain how h-bridges and transistors work.

Do you need to be working with a +/- 12 volt system? Just curious why.

BTW, your schematic is incorrect. The TIP122 is NPN, and the TIP127 is PNP. So I'm not sure which is incorrect in your diagram. Are the top two power transistors NPN or PNP? Your PNP transistors are going to want to see a negative bias from collector to emitter. Meaning the emitter voltage needs to be higher than the collector voltage. Then to turn the PNP transistor on, you'll want a logical low on the base.

Here's a post showing a typical h-bridge using NPN and PNP transistors.

http://letsmakerobots.com/node/9450