Pages: [1]   Go Down
Author Topic: two-wire control of unipolar stepper with ULN2003  (Read 3875 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?


* clip82.jpeg (32.43 KB, 710x435 - viewed 298 times.)
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

0
Online Online
Shannon Member
****
Karma: 214
Posts: 12412
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

[ I won't respond to messages, use the forum please ]

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
God Member
*****
Karma: 4
Posts: 813
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

"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?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.


* clip83.jpeg (11.52 KB, 228x264 - viewed 48 times.)
« Last Edit: March 24, 2012, 11:34:49 am by 8bar » Logged

0
Online Online
Shannon Member
****
Karma: 214
Posts: 12412
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

[ I won't respond to messages, use the forum please ]

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Online Online
Shannon Member
****
Karma: 214
Posts: 12412
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

[ I won't respond to messages, use the forum please ]

Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Pages: [1]   Go Up
Jump to: