Help building a h-bridge for a stepper motor

Thread Starter

Zapnologica

Joined Jun 15, 2012
41
Hello guys,

I am new to electronics i have been playing around with them for some time.

I have recently started up a new project, i want to build a cnc router.

I have build a h bridge on a bread board and that seemed to work. But now i have build one onto proto board and i am having some trouble.

I am using tip-122 (npn) and tip-127 (pnp),

here is the schematic that i based my design on.

http://www.pocketmagic.net/wp-content/uploads/2009/03/hbridge-radu1.jpg

For a stepper motor i needed two of these h-bridges for each motor as each h-bridge controls a coil. (im using bi-polar steppers). the control signals (input) comes from an arduino.

The problem that i am having with my 1st attempt is that when i put in my power source (for the h bridge) even 5v now to test, the transistors are getting warm.. and i cant find out why?? (even with no motors or inputs connected).

I left out the diodes from the schematic as i thought they are for dc motors which might spin and cause feed back power, but that shouldnt happen with steppers? are these necessary?

Only thing that i can think of is that both the halves of the h bridge are "enabled" and power is shorting directly from the pnp to the npn. ( even with no motor connected)

Could this maybe be from the smaller transistors picking up voltage and enabling the 4 tip-122 and tip-127 transistors??


Please if any one could give me some assistance, I dono if the info i have given is sufficient, but it will be greatly appreciated!

Thanks
 
Last edited:

colinb

Joined Jun 15, 2011
351
I would say first measure the current through various paths to see where the heat is coming from. As you say, it could be a short from high to low side, but if the motor is not connected, that would require an explicit short somewhere.

Another possibility is that a series base resistor is missing. If it is missing, the current through the transistor's base and emitter will be huge even with no load.

Check to see how much current is flowing into the transistor bases.
Check the current into the high side and out of the low side of the drive circuit.
Follow out your actual circuit on protoboard and draw a fresh schematic from it. Post it and let's see if we can find the problem.
 

ronv

Joined Nov 12, 2008
3,770
You still need the diodes for the stepper.
Make sure both of your inputs are grounded when you power it on.
 

Thread Starter

Zapnologica

Joined Jun 15, 2012
41
@colinb
The resisters are not missing. i originally had a 1k resister in there and it got warm when operating at 24v (on the working bread board) so i put in a 2.2k (red,red,red,gold) and that seemed to stay cool.

I will try make a schematic of mine...

You still need the diodes for the stepper.
Make sure both of your inputs are grounded when you power it on.
Is there not a way which i can connect the inputs to be grounded unless there is an input voltage? Cant i put a high resister between the input and ground? then when i apply a input voltage it will not go through there cause its a high resistance? or will this not work?

@ RRITESH KAKKAR
I shal have a look at that thanks!!
 

Stoney

Joined Jun 7, 2012
7
you have full rail voltage almost across the 2n5551's, this will result in a small leakage current, this will flow into and out of the driver bases and hfe will result in possibly 100 times the current flowing through both drivers.
some pull up and pull downs on the driver bases will remove that.
 

Thread Starter

Zapnologica

Joined Jun 15, 2012
41
Oh ok.

So i need some resistors between the PNP's gate and the 2N5551 and then between the 2N5551 and the NPN's Gate?

Is this correct? So will the voltage on these wires determine what resisters i wil need? But will these not change if i have a different rail voltage? say 24v or 12v ?

Or is there a universal option for like 5v to 24v ? (as that is ideally what i would like)
 

Stoney

Joined Jun 7, 2012
7
needs to be between base and emitter of each if the drivers, would also be a good idea to tie the inputs to ground to ensure further stability.
something like 470 or even 220 for pulldowns off the top of my head, the max voltage across them will only be 0.7v but it should ensure the drivers are fully off.
 

Thread Starter

Zapnologica

Joined Jun 15, 2012
41
needs to be between base and emitter of each if the drivers, would also be a good idea to tie the inputs to ground to ensure further stability.
something like 470 or even 220 for pulldowns off the top of my head, the max voltage across them will only be 0.7v but it should ensure the drivers are fully off.
Thanks allot!!

1> Ok so you are saying that i must put a 220 or 470 ohm resister between ground, and the base of the 2N5551's. ? This will stop the transistor from turning on unless it is told to do so? OR must i do this on the Driver transistors (tip-12x)?

2> When measuring the voltage, im not 100% sure what i must do? Must i measure the voltage between the emitter and the base of the drivers? Must i do each one seperatly? or must the + of the tester go on base and the - go on emitter. also must i test this with the full 24v volts?

Thanks allot for your help
 

Thread Starter

Zapnologica

Joined Jun 15, 2012
41
Also in regards to the diode that i need to put in, I have a whole bunch of 1N6276A Diodes lying around. Will these work for my stepper motor ~20vand not more than 4A ?

Thanks

Sorry, i re-read your post and i understood it differently. i must put a 440omh resister between each resisters base and emitter of each transistor?
 
Last edited:

Thread Starter

Zapnologica

Joined Jun 15, 2012
41
Update:

OK i have done some voltage readings, all the inputs where connected to ground! Check the image below for a reference to where i tested.

please note that i have two h bridges ie 4 inputs.
READINGS
hb1 hb2
AB 3.32
BL 0 0
BM 0 0
BC 0 0
BG 0 0

BD 3.24 3.9
BF ~2.25 ~3.6
BE 1.24 0
BH 0 0
IJ 1.58 1.6

~ meant it wasn't stable
Now i tested this whit my 5v power supply (those ones u can switch the power) which is not very good as i realized it volts changed. as u can see AB is less that half the voltages there. i tired annotation 9v power supply but the transistors got very hot so i turned it off.

What on earth could be happening? all my inputs are grounded? when i plugged the 9v in the one led came on in output ( i put leds in there to see if it working, two for each in oppesit directions)

Could the change in voltage be due to a transistor shorting or some thing?

Also a question, can all the heat sinks of the transistors touch?
 

colinb

Joined Jun 15, 2011
351
Also, I think someone just suggested putting a resistor between each transistor's base and emitter terminals, to shut off the transistor when its base input would otherwise be floating.
 

Thread Starter

Zapnologica

Joined Jun 15, 2012
41
oh flip that could be one of the problems!

Can all the pnp's touch and all the NPNs touch?


What size resister should i put between the base and the emmiter?
 

colinb

Joined Jun 15, 2011
351
oh flip that could be one of the problems!

Can all the pnp's touch and all the NPNs touch?
No. That would create a short across the right and left of the H (short across the motor). But you should be able to have the left side PNP and NPN's tabs in contact, and the right side PNP and NPN's tabs in contact, since their collector terminals are already connected on your schematic. It's not obvious from some data sheets that don't clearly list the pin assignments, but the heat sink tab is connector to the collector.

What size resister should i put between the base and the emmiter?
I think something from 10Kohm to 100Kohm would be reasonable. Just enough to ensure that Vbe stays at 0 volts when it's supposed to be off.
 

Thread Starter

Zapnologica

Joined Jun 15, 2012
41
Oh ok,
Yea i know what you mean. i have noticed that in the data sheets. Flip thats gonna screw up my design fairly significantly. Cause im gonna have 16 tranisters and i cant share a common heat sink, i also places them so that they toutch. that sucks.


And with the resister. must i just put it on the drivers? or also the small input transistors?


And will those Diodes i mentioned work?

Thanks allot.
 
Last edited:

colinb

Joined Jun 15, 2011
351
Oh ok,
Yea i know what you mean. i have noticed that in the data sheets. Flip thats gonna screw up my design fairly significantly. Cause im gonna have 16 tranisters and i cant share a common heat sink, i also places them so that they toutch. that sucks.
You can use an electrically insulating layer such as mica or other.
Some ideas at:


And with the resister. must i just put it on the drivers? or also the small input transistors?
I think mainly the drivers, but it wouldn't hurt to put on the input transistors too. The gain of the small transistor is multiplied with the driver gain so only a very tiny current is needed in the small transistor to pass much larger drive current. Maybe this won't be an issue if you resolve the short circuit caused by the collectors of the left and right side transistors?

I have a whole bunch of 1N6276A Diodes lying around. Will these work for my stepper motor ~20vand not more than 4A
...
And will those Diodes i mentioned work?
No: those are unidirectional transient voltage suppressors rated for 13.6 V reverse working voltage. They are NOT suitable for flyback protection of your motor coil when you have 20 V working voltage. Use a standard silicon rectifier diode or Shottky diode.
 

Thread Starter

Zapnologica

Joined Jun 15, 2012
41
I think mainly the drivers, but it wouldn't hurt to put on the input transistors too. The gain of the small transistor is multiplied with the driver gain so only a very tiny current is needed in the small transistor to pass much larger drive current. Maybe this won't be an issue if you resolve the short circuit caused by the collectors of the left and right side transistors?
Ok i will do so. I am gonna have to redo my proto board though. :eek:

Do you know what is the best computer program that i can design my schematic and it then helps me design a PCB layout so that every thing works, doesn't touch etc?


Thanks allot for you help Colin.
 

colinb

Joined Jun 15, 2011
351
The three main free circuit design and PCB layout tools are

  • Eagle (free of charge limited-capability version)
  • KiCad (free and open source)
  • gEDA (free and open source)
Personally, I use gEDA and find it to be amazingly powerful, but I would probably recommend you start with KiCad since I think in general it has a slightly easier learning curve, and better Windows support (gEDA is developed most widely on Linux). There are some good KiCad tutorials out there. If you learn KiCad, you won't be locked in to the Eagle program.

The free Eagle version limits your board size etc. in the free version, and also the license prevents you from selling your boards for profit--you need to spend about $500 to get a version capable of making reasonable-sized boards (especially if you want to panelize). You might not care about this now, but I'll just tell you that KiCad is going to ultimately be much more powerful than the free or low-cost Eagle versions.

The schematic capture will probably come pretty quickly to you as you learn it, but it might take some time to get productive with PCB layout in particular if you've never used any PCB layout EDA tools before. The only way to get good at PCB layout is to do it. That means you get in there and start making stuff, read tutorials, figure out what you can improve your design, and layout more PCBs or re-layout the same one again to improve it. Have fu
 
Top