two-wire control of unipolar stepper with ULN2003

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?

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).

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?

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.

"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!

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!

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

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.

clip83.jpeg

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)

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)

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.

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've gotten this code to work at 2000 steps/sec using 12v.
http://arduino.cc/forum/index.php/topic,89159.0.html

sbright33:
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.

My point is that you do not need to change the hardware from the stock ULN2003 to achieve 2000 steps/sec.