Maker Pro
Maker Pro

stepper motor power issues...

V

vwkafer

Jan 1, 1970
0
I have a pair of unipolar stepper motors that I am trying to drive
with a combination of a PIC16F877 and ULN2003A. My code and
connections seem to be fine, but I am having trouble finding a power
supply/voltage regulator combination that has enough juice to power
both motors. Any suggestions? I thought each motor needed 2Amps, but
it is clearly using more than that because it works when only one is
going but not two. If I assume that they are actually 4amps each
instead of 4 amps total, then how could I get 5volts, 8.5amps (I have
a few other parts drawing a small amount of current)? I don't want to
spend a fortune but I am willing to buy some parts if need be.
 
B

Baron

Jan 1, 1970
0
vwkafer said:
I have a pair of unipolar stepper motors that I am trying to drive
with a combination of a PIC16F877 and ULN2003A. My code and
connections seem to be fine, but I am having trouble finding a power
supply/voltage regulator combination that has enough juice to power
both motors. Any suggestions? I thought each motor needed 2Amps, but
it is clearly using more than that because it works when only one is
going but not two. If I assume that they are actually 4amps each
instead of 4 amps total, then how could I get 5volts, 8.5amps (I have
a few other parts drawing a small amount of current)? I don't want to
spend a fortune but I am willing to buy some parts if need be.
Grab a computer PSU. 5 volts @ 15 amps or so..........
 
R

Randy Day

Jan 1, 1970
0
vwkafer said:
I have a pair of unipolar stepper motors that I am trying to drive
with a combination of a PIC16F877 and ULN2003A. My code and
connections seem to be fine, but I am having trouble finding a power
supply/voltage regulator combination that has enough juice to power
both motors. Any suggestions? I thought each motor needed 2Amps, but
it is clearly using more than that because it works when only one is
going but not two. If I assume that they are actually 4amps each
instead of 4 amps total, then how could I get 5volts, 8.5amps (I have
a few other parts drawing a small amount of current)? I don't want to
spend a fortune but I am willing to buy some parts if need be.

One option might be to have separate supplies
for each motor, if two 4 amp supplies cost
less than one 8-9 amp supply. You could still
run the other circuitry off one of the supplies,
but I'd recommend using a diode and filter cap
to isolate the micro from the motor.

+----------+---|<------+ V1 V2
.------+------. | | |
| | | C| C|
| | |+ C| C|
| | === C| C|
| Micro | /-\ | |
| | | .----+-------+---.
| |----------| ULN2003 |
'-------------' | | |
| | '--------+-------'
| | |
+---------+---------------+ Gnd
(created by AACircuit v1.28.6 beta 04/19/05 www.tech-chat.de)


HTH
 
J

Jamie

Jan 1, 1970
0
vwkafer said:
I have a pair of unipolar stepper motors that I am trying to drive
with a combination of a PIC16F877 and ULN2003A. My code and
connections seem to be fine, but I am having trouble finding a power
supply/voltage regulator combination that has enough juice to power
both motors. Any suggestions? I thought each motor needed 2Amps, but
it is clearly using more than that because it works when only one is
going but not two. If I assume that they are actually 4amps each
instead of 4 amps total, then how could I get 5volts, 8.5amps (I have
a few other parts drawing a small amount of current)? I don't want to
spend a fortune but I am willing to buy some parts if need be.
You clearly need more power how ever, before jumping to that have you
checked to make sure you are leaving a little gap between phase chances
from the uC code ? You may want to scope the actual drive signals to
evaluate this.
Also, are you driving the motors with separate ULN2003A chips?
 
D

David Harmon

Jan 1, 1970
0
On Sat, 26 Jan 2008 23:32:13 -0800 (PST) in sci.electronics.basics,
vwkafer said:
I have a pair of unipolar stepper motors that I am trying to drive
with a combination of a PIC16F877 and ULN2003A. My code and
connections seem to be fine, but I am having trouble finding a power
supply/voltage regulator combination that has enough juice to power
both motors. Any suggestions? I thought each motor needed 2Amps, but
it is clearly using more than that because it works when only one is
going but not two.

To begin with, a ULN2003 will not drive that much current without
overheating. http://www.allegromicro.com/datafile/2801.pdf

Your steppers do not have to be driven from a regulated supply.
A big enough transformer, rectifier, and capacitor should do it.
The logic supply can be regulated down from that separately.
 
W

whit3rd

Jan 1, 1970
0
I have a pair of unipolar stepper motors that I am trying to drive
with a combination of a PIC16F877 and ULN2003A.  My code and
connections seem to be fine, but I am having trouble finding a power
supply/voltage regulator combination that has enough juice

Regulated voltage is good for PIC chips, but completely
senseless for stepper motors. Best performance of a
stepper power source requires regulated current, not voltage.

Use a current limit resistor for each motor, and connect to the
power supply at the isolated unregulated point (for a linear
power supply, the terminals of the big filter capacitor).
Don't try to give the steppers lots of current, they are unlikely
to need the maximum specified torque anyhow...

And always remember that stepper motor windings are inductors,
there will be stored energy that can burn up your switches
instead of turning off... you'll need to put protection diodes into
the circuit.
 
V

vwkafer

Jan 1, 1970
0
I have taken several of your suggestions and definitely appreciate the
help. My situation is much improved. I bought a 350 Watt PC power
supply and am now using the +5V to power the motors and the +12V
(regulated to +5V) to power the microcontroller. I also added more
ULN2003A (paralleled), so I am using four channels for each lead of
the motor (500mA x4 = 2A). When I used an ammeter on the motor I
measured 1.9A, so I think this should be correct. When I turn
everything on the motors work beautifully, my joystick (controlling
the motors) works beautifully. But...the ULN2003A's start to overheat.
I turned everything off before they got too hot (could still touch),
but they are getting hot within the first few minutes.

I have a few possible problems:
1) Right now, I have two motors sharing one of the chips (separate
channels of course). Is that a problem?

2) I am using no protection diodes whatsoever. On the ULN2003A
datasheet (http://www.ortodoxism.ro/datasheets/
SGSThomsonMicroelectronics/mXtyyvx.pdf). It looks like there are
diodes. I thought this might be sufficient. Could someone please
explain where the diodes would go?

3) Jamie mentioned, "make sure you are leaving a little gap between
phase chances
from the uC code." I am not sure what this means. In my current
microcontroller code, I am sending a command to switch one lead to
high, one to low simultaneously, but then I am forcing it to wait
500ms before doing anything else. I don't need the motors to rotate
quickly for my application but I do need to have at least one lead
high on each motor at all times to maintain torque.

4) On the ULN2003As, I have pin 8 grounded and pin 9 connected to the
same +5V as the motor leads (different than the regulated +5V going to
the PIC, clock, etc).

Thanks again for the huge help. Any additional feedback is greatly
appreciated.
 
B

Bob Monsen

Jan 1, 1970
0
vwkafer said:
I have taken several of your suggestions and definitely appreciate the
help. My situation is much improved. I bought a 350 Watt PC power
supply and am now using the +5V to power the motors and the +12V
(regulated to +5V) to power the microcontroller. I also added more
ULN2003A (paralleled), so I am using four channels for each lead of
the motor (500mA x4 = 2A). When I used an ammeter on the motor I
measured 1.9A, so I think this should be correct. When I turn
everything on the motors work beautifully, my joystick (controlling
the motors) works beautifully. But...the ULN2003A's start to overheat.
I turned everything off before they got too hot (could still touch),
but they are getting hot within the first few minutes.

I have a few possible problems:
1) Right now, I have two motors sharing one of the chips (separate
channels of course). Is that a problem?

2) I am using no protection diodes whatsoever. On the ULN2003A
datasheet (http://www.ortodoxism.ro/datasheets/
SGSThomsonMicroelectronics/mXtyyvx.pdf). It looks like there are
diodes. I thought this might be sufficient. Could someone please
explain where the diodes would go?

3) Jamie mentioned, "make sure you are leaving a little gap between
phase chances
from the uC code." I am not sure what this means. In my current
microcontroller code, I am sending a command to switch one lead to
high, one to low simultaneously, but then I am forcing it to wait
500ms before doing anything else. I don't need the motors to rotate
quickly for my application but I do need to have at least one lead
high on each motor at all times to maintain torque.

4) On the ULN2003As, I have pin 8 grounded and pin 9 connected to the
same +5V as the motor leads (different than the regulated +5V going to
the PIC, clock, etc).

Thanks again for the huge help. Any additional feedback is greatly
appreciated.

I just looked at the datasheet here:

http://focus.ti.com/lit/ds/symlink/uln2003a.pdf

There are several numbers that are interesting. Look in the "absolute
maximum ratings" section. The peak collector current for each output is
500mA. That is OK in your setup.

Now, move down to "electrical characteristics". At 350mA, the device has a
typical Vf of 1.7V. That means that it'll be dissipating .35 * 1.7 = 595mW
here. If it does not have a heat sink, you can calculate how hot it'll get
using the 'package thermal impedance' back up in the 'absolute maximum
ratings' section by multiplying the power dissipated by the thermal
impedance. If you are using an N package, you can compute this to be

67 C/W * .595W = 40 C

That is temperature above room temp.

The maximum junction temp is 150C, so that isn't so bad, for their example.
It can run in an environment up to 110 C, which is hotter than I want to be.

Now, try it with 2A:

67 C/W * (2A * 1.7V) = 228 C

That is well beyond the 150C, so you'd have to be operating at room temp
of -80C to fall within the limits.

So, while they say you can run each channel at 500mA, they don't really mean
it. There is a maximum power dissipation, which is limited by how much heat
the device can shed. That in turn is governed by the thermal impedance.
Also, the devices are spec'd at 25C, so if you get them hotter, they may not
perform the same as in the spec.

Sometimes, devices have nice charts showing the 'safe operating area'. This
datasheet doesn't seem to have one.

You CAN heat sink a pdip package. Combined with a fan, you may be able to
get it to work. However, it may be more workable if you split up the current
between 4 devices. Using discrete darlingtons, and driving them yourself is
another option, of course.

They also point out that 'Operating at the absolute maximum TJ of 150°C can
affect reliability.' in note 4 of the maximums section, so if you continue
using the chip like this, you may cause it to fail.

If you decide to go the discrete component route, use diodes to prevent the
'flyback emf' from destroying the devices. The problem is that motors are
big inductors, and if you suddenly cut current, the voltage can spike.
Assuming you are driving the motor winding from the collector of the device,
you need a diode from the collector to the V+ input of the motor, which does
not conduct in the normal case. However, when you shut off the current, and
the voltage spikes, the diode will conduct, causing the current to loop
through the motor. This can cause the motor to be slightly less responsive
(since the current does not drop off as quickly) but it is better for the
transistor switch.

Regards,
Bob Monsen
 
D

David Harmon

Jan 1, 1970
0
On Fri, 01 Feb 2008 15:44:26 GMT in sci.electronics.basics, "Bob
Monsen said:

Good datasheet. Did you read figure 15?
I think it answers your questions.

The Allegro I linked to before is also good.
The Motorola datasheet is terrible.
So, while they say you can run each channel at 500mA, they don't really mean
it.

One channel at a time, only. See figure 15.
 
Top