Jump to content
Electronics-Lab.com Community

Simple Unipolar Stepper Driver


Recommended Posts

Hello everyone... it looks like you all have a great forum here!

Brief introduction... I have some basic experience with electronics.  My problem is I have been out of it for a number of years, and most of the basic concepts that had to come easy to me, have been forgotten about.  A few days ago I set off attempting to design a simple stepper circuit primarily to help my self re-learn some basic electronics skills.  The re-learning curve has been very steep for me.  So treat me like I am a newb because at this point... I am!  ;)

Project background...  I have a computer program (EMC... if people are interested, I can talk a bit more about it) that has a built in pulse generator which can be assigned to the pins of my parallel port.  I plan to feed the signal the signal through an photocoupler, and which will then trigger some mosfets which in turn power a combination of phases in the stepper.  I have manged to make a test circuit to set the software setup and general circuit idea, and it seems to work pretty good.  I am now attempting to refine the circuit for real use.  This is what I have so far:



For starters... any general comments on this? Notice the power resistors (R1)....  I started with those because V=IR is a concept I remember.  Problem is, its not the most efficient way to control current.  Today I started looking at using some bipolar transistors at providing a constant current source.... its a slightly better option for driving a phase of the stepper. This is where I have started to run into some major hurdles.  I started with this:



Will this work?  Is my device in the right place?  I need some help choosing components.  I thought there was a way to to this with some diodes and 1 transistor, but I cannot remember. 

Again... this is primarily a learning experience for myself.  I welcome questions comments and criticisms! Thank you.

Link to comment
Share on other sites


Hi Adam,
The original circuit used power resistors as an inefficient way to use a 5.4V stepper motor on a 24V supply. The coils are 1.5A, not 3A.

Your new current source is good for low currents where a small transistor can be used that has a high current gain. In your circuit with 3A (it should be 1.5A) then a power transistor must be used that has a low current gain so the base current and the current in the diodes is high.

A stepper motor doesn't need a current source, why not just use the proper 5.4V supply for it?
The diodes across the coils are important to arrest the high voltage spike produced by their inductance each time they are turned off.

Link to comment
Share on other sites

Your original circuit fed 6V to each coil and wasted 18V in the resistors.
You can use 12V safely if you reduce the width of the pulses to half to avoid too much heat.

The coils are inductors that build current slowly. Therefore at high speeds they have less average current so increasing the voltage is necessary.

Link to comment
Share on other sites

Alright... lets try this:


Found out my stepper voltage rating... can be safely ignored... the 1.5A is what cant be exceeded.  My power source is a 140W ATX.

I have added a constant current source to each coil.  If I make D3 a 2V Zener... that means R4 should be ~1.3Ohms ... which will limit the phase to 1.5A.  Is that accurate?  How do I estimate R3? 

For power issues R3... 5W adequate?  Could I get some help sizing the other components for power?

Link to comment
Share on other sites

Ok thank you, I will get rid of the zener and add in a regular diode.  IIRC... that will give me about 0.65V a peice... so say I use 1.. I need a 0.4 or 0.5 ohm R4.  If I use two diodes (3 total now)  I have R4 at 0.9 Ohms... and so on.

So any advice on sizing R3 and power rating the components?

You had mentioned before that it is good for low currents, but went on to talk about my currents.  Will this work for me?  Low current gain.. so hFE < 70 ?

Link to comment
Share on other sites

A TIP31 is rated for a max of 3A. At 1.5A its minimum current gain is only about 20 so it will need a max base current of 75mA. The current in the diodes should be at least twice as much which is too high.

Your 24V power supply has a voltage way too high for this little motor. If the supply voltage is lower then you don't need a constant current sink for each coil.

Link to comment
Share on other sites

Thank you audioguru... I appreciate the time you are taking to help me along.


Your original circuit fed 6V to each coil and wasted 18V in the resistors.

Yes, this makes sense to me.  But.. to make sure we are on the same page... a stepper coil supplied directly with 6V and 1.5A reacts slower than a stepper plus resistor (or current sink) supplied with  more Voltage that has been current limited to 1.5A. 


You can use 12V safely if you reduce the width of the pulses to half to avoid too much heat.
I assume you are recommending PWM here? (If not what did you mean?)  As of right now I do not have the ability to do PWM with my setup.  I would like to look at PWM in the future, but I am content to have a space heater for a driver at the moment  ;D


Your 24V power supply has a voltage way too high for this little motor. If the supply voltage is lower then you don't need a constant current sink for each coil.

I am fairly certain that this 150 oz-inch stepper can be driven with a higher voltage source as long as the current is limited to 1.5A (in fact it is recommended).  However on my last schematic I had lowered the voltage to 12V. 


A TIP31 is rated for a max of 3A. At 1.5A its minimum current gain is only about 20 so it will need a max base current of 75mA. The current in the diodes should be at least twice as much which is too high.

I take it this means I need to search for a power transistor that has a lower current gain at 1.5A?

Again, I really do appreciate you help. :)
Link to comment
Share on other sites


a stepper coil supplied directly with 6V and 1.5A reacts slower than a stepper plus resistor (or current sink) supplied with  more Voltage that has been current limited to 1.5A.

I haven't seen a stepper operating from a current-limited higher voltage. Maybe the current in the inductance builds up faster when the voltage is higher. But it seems to be a huge waste of power in the current-limiter.

I assume you are recommending PWM here?

There are many ways to reduce the width of the pulses so that overheating doesn't occur.

I am fairly certain that this 150 oz-inch stepper can be driven with a higher voltage source as long as the current is limited to 1.5A (in fact it is recommended).

Try it.

I take it this means I need to search for a power transistor that has a lower current gain at 1.5A?

No, the opposite. The transistor needs to have a high current gain so that the current in the voltage regulating diodes isn't changed by it. Maybe a darlington power transistor is needed, or an LM317 linear voltage regulator instead of the diodes.
Link to comment
Share on other sites


I haven't seen a stepper operating from a current-limited higher voltage. Maybe the current in the inductance builds up faster when the voltage is higher. But it seems to be a huge waste of power in the current-limiter.

Yes, you are right it is a huge waste of power, which is probably why most modern drivers use a current chopper. 


There are many ways to reduce the width of the pulses so that overheating doesn't occur.

Could you list a couple, so that I could look into them a bit more?


Try it.

I have, but used a very different method.  I had some low power transistors that I attempted to match and stack.  The transistors acted as the switch, and with the base resistor I controlled the collector emitter current.  Stepper stays cool under load, and is capable of moving significantly faster.  Problem is, those transistors were not dissipating  power while standing still.  I actually liked this method, except since hFE was different for each group of transistors, I needed to use different resistor arrangements for each phase of the stepper. 

I wouldn't mind perusing this method of current control... it greatly reduces the number of components... I am just having problems finding a power transistor that I can drive with 20mA... and get CE current of 1.5A.  Any thoughts on this approach?


No, the opposite. The transistor needs to have a high current gain so that the current in the voltage regulating diodes isn't changed by it. Maybe a darlington power transistor is needed, or an LM317 linear voltage regulator instead of the diodes.

so something like a TIP120?  http://www.st.com/stonline/books/pdf/docs/4128.pdf
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
  • Create New...