Help building a h-bridge for a stepper motor

Discussion in 'General Electronics Chat' started by Zapnologica, Jun 15, 2012.

  1. Zapnologica

    Thread Starter Member

    Jun 15, 2012
    41
    0
    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.
    [​IMG]
    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: Jun 15, 2012
  2. colinb

    Active Member

    Jun 15, 2011
    351
    35
    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.
     
  3. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,292
    1,255
    You still need the diodes for the stepper.
    Make sure both of your inputs are grounded when you power it on.
     
  4. RRITESH KAKKAR

    Senior Member

    Jun 29, 2010
    2,831
    89
  5. Zapnologica

    Thread Starter Member

    Jun 15, 2012
    41
    0
    @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...

    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!!
     
  6. Stoney

    New Member

    Jun 7, 2012
    7
    0
    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.
     
  7. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,292
    1,255
    Measure the voltage at the collectors of the 2N5551's.
     
  8. Zapnologica

    Thread Starter Member

    Jun 15, 2012
    41
    0
    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)
     
  9. Stoney

    New Member

    Jun 7, 2012
    7
    0
    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.
     
  10. Zapnologica

    Thread Starter Member

    Jun 15, 2012
    41
    0
    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
     
  11. Zapnologica

    Thread Starter Member

    Jun 15, 2012
    41
    0
    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: Jun 18, 2012
  12. Zapnologica

    Thread Starter Member

    Jun 15, 2012
    41
    0
    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.
    [​IMG]
    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?
     
  13. colinb

    Active Member

    Jun 15, 2011
    351
    35
    No! The MJE2955T TO-220 tab is connected to the collector pin. Your left and right leg of the H-bridge will be shorted if all 4 are on the same heat sink.
     
  14. colinb

    Active Member

    Jun 15, 2011
    351
    35
    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.
     
  15. Zapnologica

    Thread Starter Member

    Jun 15, 2012
    41
    0
    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?
     
  16. colinb

    Active Member

    Jun 15, 2011
    351
    35
    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.

    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.
     
  17. Zapnologica

    Thread Starter Member

    Jun 15, 2012
    41
    0
    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: Jun 22, 2012
  18. colinb

    Active Member

    Jun 15, 2011
    351
    35
    You can use an electrically insulating layer such as mica or other.
    Some ideas at:


    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?

    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.
     
  19. Zapnologica

    Thread Starter Member

    Jun 15, 2012
    41
    0
    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.
     
  20. colinb

    Active Member

    Jun 15, 2011
    351
    35
    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
     
Loading...