Searching \ for '[OT] Are ULN 2803 Darlington drivers Back-EMF proo' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: massmind.org/techref/index.htm?key=are+uln+2803+darlington
Search entire site for: 'Are ULN 2803 Darlington drivers Back-EMF proo'.

Exact match. Not showing close matches.
PICList Thread
'[OT] Are ULN 2803 Darlington drivers Back-EMF proo'
1999\05\26@221323 by Dave Vandenberg

flavicon
face
Will a ULN 2803 (8 darlington drivers) protect its inputs from back-EMF?
In the case of a PIC driving a 2803 which drives the stepper motor coils,
is there any danger of hurting the pic?

I have mounted 2 5-wire stepper motors on a chassis (steering by
differential drive).
4 PIC pins will drive both motors, with 2 XORs and 4 Inverters to derive the
other signals for bi-phase (uni-polar) drive (0011, 0110, 1100, 1001) from
(00,01,10,11).
I will be trying the motors out with my parallel port first, to get the hang
of them.

Will any spikes get back to the PIC?
Should I stick a 0.1uF or <what value> uF cap on each of the 4 PIC pins?
Would the values of capacitance required depend on the speed of the stepping
motors?
Would opto-couplers be justified?
What have I not considered?
Any suggestions appreciated.

</David_V>

1999\05\26@234542 by ShadeDemon

picon face
 Yes, this chip is just transistor drivers, so it doesn't
require power.  The V+ pin goes to the + power of the motor
supply, and connects reverse diodes to the transistors.
Works great on the parallel port.  I've been doing a lot
with steppers lately, so feel free to ask anything..  2064
is another good chip, only good for 1 motor but handles 1.5A
(I think, could be just 1 A) vs the 2803's ~.5 A.  Actually
the 2803 seems to stand up ok at 1A, but runs hot and won't
last forever like that..
 Could send you some very simple pic and PC code if you
like..
Alan


Dave Vandenberg wrote:
{Quote hidden}

1999\05\27@060326 by Russell McMahon

picon face
>Will a ULN 2803 (8 darlington drivers) protect its inputs from
back-EMF?
>In the case of a PIC driving a 2803 which drives the stepper motor
coils,
>is there any danger of hurting the pic?


Careful!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Yes, the ULN2803 has protection diodes and they all connect to a
single pin. The normal and simple approach is to connect this to V+.
However, this is the WRONG thing to do when driving certain loads
including certain stepper motors. Consdier, when any output tries to
rise above V+ the diode internal will conduct and clamp that pin to a
diode drop above V+. If you have a stepper motor with a centre tapped
winding with the centre tap connected to V+ you efrfectively have a
transformer. When you ground one end of the winding the other end
rises to 2 x V+ - or, it tries to. If you have the other end
connected to V+ by a diode interesting things happen. You will
certainly affect the operation of the stepper adversely and probably
draw more current. There are several solutions.
i - Leave the common pin open - no protection agaunst overshoot.
ii - Connect the protection pin to a voltage of 2 X V+. Fine but
where do you get it in a normal system?
iii - Connect an electrolytic capacitor and a "largish" resistor to
V+. When windings go high the capacitor will be charged to 2 x V+.
Any overshoot will charge it somewhat higher but the resistor to V+
will drop the voltage over time. R must be sized to suit - as highh
as reasonab;e without having the capacitor pump up to far above V+ in
operation.
iv - Resistor only from protection pin to V+ - a reasonable solution.
Size resistor to limit oversjhoot while not being so low as to
severely impact stepper operation.

More than meets the eye at first glance!

All this MAY not apply to your stepper (but most likely will).
Test: Apply a square wave such as you expect to apply in system
across one winding (limit with serties R if you wish). Measure
voltage (a scope is best) of all other leads while doing this. If any
rise higher than the voltage being applied look at the above
comments.

>Will any spikes get back to the PIC?
>Should I stick a 0.1uF or <what value> uF cap on each of the 4 PIC
pins?

Ensure power supplie are adequately decoupled.

Shouldnt really need caps on PIC drive pins.
IF they are used there should be extra resistors from the PIC pins to
the 2803 with the caps on the 2803 pins. Putting caps directly on PIC
pins will result in large loads on the PIC when the cct is first
switched. While a PIC will probably take this without murmur it is
nad design practice and will definitely destroy things in some
circumstances. As far as functionality, caps will not do too much
harm as long as RC time constant is small compared with stepping
time.

I have a design which drives a stepper using a ULN2803 direct driven
by a 16F84. I've had no problems.AFAIR I leave the protection
connection o/c for the reasons mentioned above. I use small resistors
between the driver and the stepper but this is due to the
application - I PWM the stepper drivers and this achieves a pseudo
variable-constant-current :-) drive which allows me to "microstep"
the motor - a whole new and rather arcane area.


regarrds

           Russell McMahon

1999\05\27@065531 by Tjaart van der Walt

flavicon
face
Russell McMahon wrote:
>
> >Will a ULN 2803 (8 darlington drivers) protect its inputs from
> back-EMF?
> >In the case of a PIC driving a 2803 which drives the stepper motor
> coils,
> >is there any danger of hurting the pic?
>
> Careful!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>
> Yes, the ULN2803 has protection diodes and they all connect to a
> single pin. The normal and simple approach is to connect this to V+.
> However, this is the WRONG thing to do when driving certain loads
> including certain stepper motors. Consdier, when any output tries to
> rise above V+ the diode internal will conduct and clamp that pin to a
>

Tying V+ to Vdd (or Vcc) effectively dumps all the spikes on the
output of your regulator. I agree - bad idea. A better approach
is to keep the GND connection, but connect the V+ to a 1.5kE
tranzorb. (almost) No spike will break it.

--
Friendly Regards          /"\
                         \ /
Tjaart van der Walt        X  ASCII RIBBON CAMPAIGN
spam_OUTtjaartTakeThisOuTspamwasp.co.za  / \ AGAINST HTML MAIL
|--------------------------------------------------|
|             Cellpoint Systems SA                 |
|             http://www.cellpt.com                |
|--------------------------------------------------|
|     http://www.wasp.co.za/~tjaart/index.html     |
|Voice: +27-(0)11-622-8686  Fax: +27-(0)11-622-8973|
|          WGS-84 : 26¡10.52'S 28¡06.19'E          |
|--------------------------------------------------|

1999\05\27@162034 by w. v. ooijen / f. hanneman
picon face
> Will a ULN 2803 (8 darlington drivers) protect its inputs from back-EMF?
> In the case of a PIC driving a 2803 which drives the stepper motor coils,
> is there any danger of hurting the pic?

A 2803 has bleeder diodes to the Vcc, which is the only function of the Vcc
pin. Don't forget to connect it, otherwise things will work normally but
only for a short time. The bleeder diodes protect the 2803, the circuit
driving the 2803 won't notice any spikes.

> 4 PIC pins will drive both motors, with 2 XORs and 4 Inverters to derive
the
> other signals for bi-phase (uni-polar) drive (0011, 0110, 1100, 1001)
from
> (00,01,10,11).

If you can spare the pins use 2 x 4 for the motors, driving one 2803
directly.

> Should I stick a 0.1uF or <what value> uF cap on each of the 4 PIC pins?

No, what for?

The steppers work best on 12V.
I make small robots (StepBots) this way.
12V accu pack (10 penlight nicards), PIC, 7805, 2803,
add proximity switches or IR-reflex sensors
and you have a very simple (low performance) robot.
see example 3 (I think) in the JAL manual
( http://www.xs4all.nl/~wf/wouter/pic/jal ) for a
simple software example.

success,
Wouter.

1999\05\27@163306 by Dave VanHorn

flavicon
face
> A 2803 has bleeder diodes to the Vcc, which is the only function of the
Vcc
> pin. Don't forget to connect it, otherwise things will work normally but
> only for a short time. The bleeder diodes protect the 2803, the circuit
> driving the 2803 won't notice any spikes.

The motor windings should not be running from VCC, and returning those
diodes to VCC will be potentially a very interesting experience. You should
return them to the motor supply voltage.

Returned to VCC, all the spikes from motor coil switching are dumped onto
your VCC line. Further, if your motor voltage is more than a diode drop
higher than VCC, you will be running current from the motor supply onto your
VCC, which has serious consequences for any regulation you might be trying
to achieve on VCC.

1999\05\28@003536 by Tjaart van der Walt

flavicon
face
"w. v. ooijen / f. hanneman" wrote:
>
> > Will a ULN 2803 (8 darlington drivers) protect its inputs from back-EMF?
> > In the case of a PIC driving a 2803 which drives the stepper motor coils,
> > is there any danger of hurting the pic?
>
> A 2803 has bleeder diodes to the Vcc, which is the only function of the Vcc
> pin. Don't forget to connect it, otherwise things will work normally but
> only for a short time. The bleeder diodes protect the 2803, the circuit
> driving the 2803 won't notice any spikes.

See my comments on this in one of the other posts.

>
> > Should I stick a 0.1uF or <what value> uF cap on each of the 4 PIC pins?

Never put more than 50pF *directly* on a PIC output - read
the PIC specs carefully. This may caus e latch-up. If you
really want to (but I can't see why), add a series resistor
in first.

--
Friendly Regards          /"\
                         \ /
Tjaart van der Walt        X  ASCII RIBBON CAMPAIGN
.....tjaartKILLspamspam@spam@wasp.co.za  / \ AGAINST HTML MAIL
|--------------------------------------------------|
|             Cellpoint Systems SA                 |
|             http://www.cellpt.com                |
|--------------------------------------------------|
|     http://www.wasp.co.za/~tjaart/index.html     |
|Voice: +27-(0)11-622-8686  Fax: +27-(0)11-622-8973|
|          WGS-84 : 26¡10.52'S 28¡06.19'E          |
|--------------------------------------------------|

1999\05\28@015046 by w. v. ooijen / f. hanneman

picon face
> > A 2803 has bleeder diodes to the Vcc, which is the only function of the
> Vcc
> > pin. Don't forget to connect it, otherwise things will work normally
but
> > only for a short time. The bleeder diodes protect the 2803, the circuit
> > driving the 2803 won't notice any spikes.
>
> The motor windings should not be running from VCC, and returning those
> diodes to VCC will be potentially a very interesting experience. You
should
> return them to the motor supply voltage.
>
> Returned to VCC, all the spikes from motor coil switching are dumped onto
> your VCC line. Further, if your motor voltage is more than a diode drop
> higher than VCC, you will be running current from the motor supply onto
your
> VCC, which has serious consequences for any regulation you might be
trying
> to achieve on VCC.

But would that have any negative consequences when the motor's
Vcc is 12V and the PICs uses 5V derived from the 12V via a 7805?
At least I used this setup for some time without noticing any
problems. The impedance of my 12V is very low (nicads, big C).

Wouter.

1999\05\28@095535 by Dave VanHorn

flavicon
face
> > Returned to VCC, all the spikes from motor coil switching are dumped
onto
> > your VCC line. Further, if your motor voltage is more than a diode drop
> > higher than VCC, you will be running current from the motor supply onto
> your
> > VCC, which has serious consequences for any regulation you might be
> trying
> > to achieve on VCC.
>
> But would that have any negative consequences when the motor's
> Vcc is 12V and the PICs uses 5V derived from the 12V via a 7805?
> At least I used this setup for some time without noticing any
> problems. The impedance of my 12V is very low (nicads, big C).
>
> Wouter.

This is very similar to a printer I once looked at. They used similar
drivers for the printhead and stepper motors, with the diodes returned to
5V.

On measuring the 5V supply (7805) we discovered it was at 5.24V  This is
highly unusual for a 7805. Despite the specs, all I've ever seen were well
within 1% of 5V.
What was happening was his raw supply, which ran the motors and printhead,
was feeding through the motor and printhead resistances, and the diodes, and
into the 5V supply, pushing it dangerously close to the TTL supply limit. In
fact, the 7805 was completely shut down, until the printer began working the
motors and printhead, and thereby cutting off it's own "extra power supply".

We got a lot of these printers back with fried printheads, it seems that the
VCC transitions would occasionally crash the processor, and leave a
printhead element on for too long..

1999\05\28@113020 by paulb

flavicon
face
Wouter wrote:

> But would that have any negative consequences when the motor's
> Vcc is 12V and the PICs uses 5V derived from the 12V via a 7805?
> At least I used this setup for some time without noticing any
> problems. The impedance of my 12V is very low (nicads, big C).

 You are interpreting "Vcc" as "the supply for the motors" and your
observations are almost correct as such.  Dave's objection was to the
implication that the flyback diodes were returned incorrectly to the +5V
logic (PIC) supply.  This would of course feed current via *all* the
motor windings through the flyback diodes to the supposedly regulated
supply.

 The nasty trick to this mistake is that the steppers would still
operate (poorly) as the "sneaker" currents would tend to balance out.
OTOH, the logic would be running at excess voltage.

 As previously explained, when unipolar drive is applied to a stepper,
switching one winding on causes, by transformer effect, the opposite
winding to kick up to twice the supply voltage.  Limiting this by diode
to the supply voltage serves to delay current build-up considerably and
cause excess heating overall.

 Further, the "flyback" of each coil is already limited to some extent
by the inverse diode across the driver transistor.  (I am unsure from
the Allegro datasheets why such diode is shown dotted however.)

 The common for the flyback diodes should return to a Zener of twice
the supply voltage.
--
 Cheers,
       Paul B.

1999\05\28@203514 by Dave Vandenberg

flavicon
face
So far I'm thinking the best connections are:

If Vmotor is the stepper motor's common supply point, derived via a high
power Resistor from +12Vcc,
(and each of the 4 coils' other ends gets pulled down to 0V, by the ULN 2803
o/p.)
Then the clamp diodes' common (cathode) pin will connect to Vmotor. This
effectively puts each diode directly across it's coil.

Paul B. said:
>  The common for the flyback diodes should return to a Zener of twice
>the supply voltage.

Is this an alternative to that above, or an additional protection?
Would I stick a zener across the 'common' and 'ground' pins of the 2803?

I've been watching the discussion closely, thanks for everyones input.

</Dave.V>

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...