Go Down

Topic: two-wire control of unipolar stepper with ULN2003 (Read 4215 times) previous topic - next topic

8bar

There is a circuit diagram for two-wire control of unipolar stepper motors at:
http://www.tigoe.net/pcomp/code/circuits/motors/stepper-motors/
attributed to Sebastian Gassner.

I don't see the need for either the diode connected to COM, nor the two input resistors, all marked in yellow in the diagram attached.

All three should be removed and replaced with simple connections.

The diode on COM is particularly worrisome as it blocks the back EMF escape route that can damage the Darlingtons in the ULN2003 when driving an inductive load, such as a stepper motor.

Am I correct in making these changes, or am I missing something?

8bar

After further reflection, I may have a better understanding of why the two 1k resistors are on the inputs. Those two darlingtons are serving as inverters, and sink only 5mA, compared to the other four, which are sinking upwards of 300mA each (at 50% duty cycle). So perhaps the resistors are lowering the base current to accommodate the lower sunk current? Taking the resistors out should still be fine though, right?

It would just mean a little more current draw on the control line (I'm measuring 1.9 mA vs 2.2 mA base current per control line for with and without the resistor).

8bar

A followup question:

When the stepper is not in use, I wish to cut the high voltage motor supply so the motor can cool down. If I cut the motor supply without cutting the input control voltage, will it hurt the UNL2003?

In other words, is it hard on a darlington to have voltage applied to the base when the collector is floating?

MarkT

The input resistors are probably to prevent the inverting darlingtons from saturating loads (they take a lot longer to switch off if heavily saturated) - or to reduce the current load on the microcontroller.

The diode probably protects against reverse polarity supply connection.

I can't see a problem with reducing the darlington's supply voltage - the inputs are already resistor protected.
[ I won't respond to messages, use the forum please ]

8bar

"The diode probably protects against reverse polarity supply connection."

Perhaps so, but the back EMF from the stepper coils will hammer the darlingtons without that escape path!

jwatte


"The diode probably protects against reverse polarity supply connection."

Perhaps so, but the back EMF from the stepper coils will hammer the darlingtons without that escape path!


Isn't that's why you put a snubber diode, and perhaps a parallel ceramic capacitor, across the motor coil?

8bar

#6
Mar 24, 2012, 05:31 pm Last Edit: Mar 24, 2012, 05:34 pm by 8bar Reason: 1
Quote
Isn't that's why you put a snubber diode, and perhaps a parallel ceramic capacitor, across the motor coil?


The ULN2003 has snubber diodes built in to each darlington, all connected to the COM pin. That's why the COM pin should be connected directly to the motor power supply. I've attached the logic diagram of the ULN2003.

MarkT

Ah yes, that diode is rather suspicious now...  Note that motors aren't pure inductance, each half of each winding is coupled to the other half, which may in practice limit the inductive spikes from a unipolar motor in certain modes.

And there is the issue of step speed - diodes across the windings slow the motor's response down (a diode and zener diode pair per winding can be used to tame the spike and speed up switch-off)
[ I won't respond to messages, use the forum please ]

8bar


Ah yes, that diode is rather suspicious now...  Note that motors aren't pure inductance, each half of each winding is coupled to the other half, which may in practice limit the inductive spikes from a unipolar motor in certain modes.

And there is the issue of step speed - diodes across the windings slow the motor's response down (a diode and zener diode pair per winding can be used to tame the spike and speed up switch-off)


Interesting...how exactly would the diode and zener diode pair be wired? And would it be compatible with the diodes built into the ULN2003? My stepper motors are maxing out at about 400 steps/sec. It would be nice to increase that.

MarkT

You'd have to leave the common lead floating and add the diode/zener-diode pairs back-to-back per channel.  Remember a zener is normally used backwards but conducts in the forward direction.  By placing a rectifier diode back-to-back (anode-to-anode) it blocks the forward conduction of the zener and only allows the zener's reverse breakdown conduction. 

So rectifier cathode to +ve supply, anode-to-anode, zener cathode to the driver output.

Then the switch off will be faster (which should help the motor run a bit faster, but note that you are still limited by the back-EMF from the motor.

If you want more speed then high-voltage bipolar motor drivers are the way to go - the high voltage supply overcomes the backEMF and the PWM driver effectively does DC-DC conversion on the fly to efficiently convert to the actual voltage the motor needs at each instant.  High performance bipolar motors have low inductance windings to allow faster stepping rates.  This also means lower resistance windings (often about 1 ohm).
[ I won't respond to messages, use the forum please ]

sbright33

I've gotten this code to work at 2000 steps/sec using 12v.
http://arduino.cc/forum/index.php/topic,89159.0.html
If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

8bar


I've gotten this code to work at 2000 steps/sec using 12v.
http://arduino.cc/forum/index.php/topic,89159.0.html


This is a hardware issue, not a software issue. Irrelevant post.

sbright33

My point is that you do not need to change the hardware from the stock ULN2003 to achieve 2000 steps/sec.
If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Go Up