Searching \ for '[OT] Driving a Stepper' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/io/steppers.htm?key=stepper
Search entire site for: 'Driving a Stepper'.

Exact match. Not showing close matches.
PICList Thread
'[OT] Driving a Stepper'
1999\08\14@170421 by Willis

flavicon
face
Well, new project.  A friend wants help driving the square stepper motor
off of a Teac 5.25" Floppy (the head positioning stepper), at 8Hz or so,
for a ribbon inker, giving him 12 RPM's.

He has yet to get me specs on that motor, anyone know that motor well &
have good details on how to drive 'er?  It's been a while since I drove
one, I'm imagining logic-level hexfets driving the windings, 3 or 4 of
those, any good URL's etc?;  Replying off-list is fine!

 Mark

1999\08\14@171853 by Todd Peterson

flavicon
face
<x-flowed>At 01:56 PM 8/14/1999 -0700, you wrote:
>He has yet to get me specs on that motor, anyone know that motor well &
>have good details on how to drive 'er?  It's been a while since I drove
>one...

If the motor is unipolar (5 or 6 wire), a ULN2003A driver IC works
well.  If it is bi-polar (4 wire), the L293D would be the best
choice.  Both these drive IC's can be sequenced directly, or have a look at
our EDE1200 (unipolar) and EDE1204 (bipolar) IC's for a more convenient
interface.



Ê Todd Peterson
Ê E-Lab Digital Engineering, Inc.
Ê (816) 257-9954
Ê Embedded Control & Integrated Circuit Solutions...
http://www.elabinc.com

</x-flowed>

1999\08\14@180739 by paulb

flavicon
face
Mark Willis wrote:

> A friend wants help driving the square stepper motor off of a Teac
> 5.25" Floppy (the head positioning stepper), at 8Hz or so, for a
> ribbon inker, giving him 12 RPM's.

> He has yet to get me specs on that motor, anyone know that motor well
> & have good details on how to drive 'er?

 Yes.  It's dead simple.  TAKE THE PCB OFF THE FLOPPY DRIVE and connect
the motor to it.  You now have a complete driver operating from a 12V
and 5V supply via a standard power connector, and a logic interface at
TTL (CMOS) levels by Enable, Direction and Step commands.

 How much easier can you want?
--
 Cheers,
       Paul B.

1999\08\14@202655 by Mark Willis

flavicon
face
Paul B. Webster VK2BZC wrote:
>
> Mark Willis wrote:
>
> > A friend wants help driving the square stepper motor off of a Teac
> > 5.25" Floppy (the head positioning stepper), at 8Hz or so, for a
> > ribbon inker, giving him 12 RPM's.
>
> > He has yet to get me specs on that motor, anyone know that motor well
> > & have good details on how to drive 'er?
>
>   Yes.  It's dead simple.  TAKE THE PCB OFF THE FLOPPY DRIVE and connect
> the motor to it.  You now have a complete driver operating from a 12V
> and 5V supply via a standard power connector, and a logic interface at
> TTL (CMOS) levels by Enable, Direction and Step commands.
>
>   How much easier can you want?
> --
>   Cheers,
>         Paul B.

Saw Todd Peterson's post also - Thanks, Todd, good info.

Paul - Definitely! - He and I were talking about that already (Just sent
him a 8Hz LM555 circuit, which should do him nicely to clock that card
<G>) - You know me, though, I want to know MORE, MORE, MORE <G>  I have
a LOT of old steppers around here & will be using them for other uses
(some of which will have to be PIC driven, and are no-where near as
simple as his needs.  I want to automate feeding the cats, some day, for
one thing.)  He wants an absolute minimal cost solution, I'm after
refreshing my DRam brain cells thoroughly <G>  (They're all too much in
need of refreshing.)

I also was already talking to him about half-stepping the motor, which
I'd probably do here - but I doubt he'll do, for finer smoother rotation
of the motor.  (I've wondered - Does half-stepping give you more
effective torque out of the same stepper?  Or no effect there?)

I might scavenge driver parts off floppy boards, but want to be able to
be independent (on some designs) of a PC power supply <G>

 Mark

1999\08\15@063921 by paulb

flavicon
face
Mark Willis wrote:

> <G>) - You know me, though, I want to know MORE, MORE, MORE <G>  I
> have a LOT of old steppers around here & will be using them for other
> uses (some of which will have to be PIC driven, and are no-where near
> as simple as his needs.

 I just feel that someone's done virtually *all* the design work to
make those things and I doubt they would have failed to optimize the
design, at least to any significant extent.  IOW, you should have a 12V
motor with the appropriate driver (chip) driven in the optimal manner.

 Now, you might begrudge the current drawn by the other parts of the
disk drive electronics but of course you will have split off the capstan
motor anyway, and any components obviously unnecessary can be removed
(or disabled) and I doubt you can make any other efficiencies.

>  I want to automate feeding the cats, some day, for one thing.

 Hmmm.  That'll be interesting.

>  He wants an absolute minimal cost solution,

 Using the drive electronics is certainly that.

> I also was already talking to him about half-stepping the motor, which
> I'd probably do here - but I doubt he'll do, for finer smoother
> rotation of the motor.

 Is it *really* necessary?

>  (I've wondered - Does half-stepping give you more effective torque
> out of the same stepper?  Or no effect there?)

 Mmm, various "scraps" on similar topics on this list.  It seems to me
you *may* get marginally more torque by half-stepping (having adjacent
coils simultaneously energized for alternate steps) but really, the half
step from two-coils-driven to one-coil-driven must by definition be cor-
respondingly weaker than its converse.

 Assuming each step is met with limiting friction, if the one-to-two
coil transition is only just sufficient to overcome the friction, the
next half-step would be too weak to overcome that friction and the rotor
would tend to jam.  A subsequent two-coil activation involves the
opposite drive on one of these coils and would have some net torque away
from the previous position, but you'd have lost resolution.  I don't see
that the analysis would be much better in continuous motion with
"flywheel" effect.

> I might scavenge driver parts off floppy boards, but want to be able
> to be independent (on some designs) of a PC power supply <G>

 Well...  The 5¹" drives use 12V motors, so you need a 12V supply for
that.  If you use logic (PICs) to drive them, you need 5V.  The (tiny)
steppers in many 3¸" drives use 5V of course.  You can be independent of
a PC power supply, but you'll end up supplying the same voltages.  And
I'm sure you have *plenty* of spare plugs on the end of RD-BK-BK-YL
leads!
--
 Cheers,
       Paul B.

1999\08\15@072358 by Peter van Hoof

flavicon
face
> Mark Willis wrote:

>  I want to automate feeding the cats, some day, for one thing.

Feed the cats to what?

1999\08\15@130533 by Thomas McGahee

flavicon
face
Mark,

The TEAC Floppy typically uses a 5 wire stepper motor. One of the
wires is a COMMON which is tied to one side of each of the four
unipolar coils. You can easily determine which wire is the COMMON
by using an ohmmeter. There will be only one wire that will measure
the same value with respect to all the other four wires.

Connect the COMMON to +12v. Arbitrarily label one of the wires <A>.
Connect <A> to ground. At this point the stepper motor will lock
into a fixed detent position. One at a time short each of the other
wires to ground. You will find that one wire makes the shaft move
clockwise a small amount, and one wire makes the shaft move counter-
clockwise by the SAME amount. Label the wire that caused the shaft to
rotate CW <B>. Label the wire that made the shaft rotate CCW <D>.
Label the remaining wire <C>.

The stepper motor will rotate full-step CW if the sequence is thus:
A B C D A B C D A B C D etc.

The stepper motor will rotate full-step CCW if the sequence is thus:
A D C B A D C B A D C B etc.

The stepper motor will rotate half-step CW if the sequence is thus:
A AB B BC C CD D DA A AB B BC C CD D DA etc.

The stepper motor will rotate half-step CCW if the sequence is thus:
A AD D DC C CB B BA A AD D DC C CB B BA etc.

A diode should be connected across each coil winding. The Anodes
all connect to the Common wire, and the Cathodes connect to A B C
and D.

The diode will supress high voltage spikes when the coil is
switched from it's ON to it's OFF state.

You can drive the windings to ground via a grounded HexFet, or even
a decent bipolar transistor such as a Motorola MPS6566. The transistor
must be capable of handling the current through the winding, which
can be computed using Ohm's Law: I=E/R  where R is the DC resistance
of the coil.

The transistor or HexFet is used as a switch. When it is OFF
the voltage across it is +12v and the current is zero. When it is
fully ON, the current will be from a few hundred milliamps to
perhaps an amp or so (depending on the stepper motor), and the
voltage across the switching device will be only a few tenths
of a volt. In either case the POWER dissipation of the device
can be kept quite low so long as the switching device is driven
*hard*.

The maximum speed at which the typical floppy stepper motor can
be stepped is between 200 and 300 steps per second. As the speed
increases, torque will decrease until finally the motor becomes
erratic and loses synch.

It is possible to increase the speed significantly by using
a chopper mode with feedback which keeps the ON current constant.
In this case the compliance voltage is raised to over 24 volts.
However, such techniques are normally reserved for driving
large high power stepper motors. It would be over-kill to do
this with a floppy stepper motor.

As to driving the stepper motor via a PIC, it is ridiculously
easy. You assign four I/O pins to drive the ABCD driver
transistors. If using full-step mode, you can simply shift 2
bits left or right in a register and then copy the least
significant 4 bits to the I/O pins. Initial "seed" value would
be binary 00010001. Just make sure that when you shift the carry
value is properly set up based whether you are shifting left
or right.

I have to go right now, but if anyone has any further questions,
ask away. As usual, this is only ONE of MANY POSSIBLE ways to
do things. If you have a preferred method of doing this, share
it with the rest of us.

Fr. Tom McGahee








----------
{Quote hidden}

1999\08\15@150151 by Mark Willis

flavicon
face
Paul B. Webster VK2BZC wrote:
>
> Mark Willis wrote:
>
> > <G>) - You know me, though, I want to know MORE, MORE, MORE <G>  I
> > have a LOT of old steppers around here & will be using them for other
> > uses (some of which will have to be PIC driven, and are no-where near
> > as simple as his needs.
>
>   I just feel that someone's done virtually *all* the design work to
> make those things and I doubt they would have failed to optimize the
> design, at least to any significant extent.  IOW, you should have a 12V
> motor with the appropriate driver (chip) driven in the optimal manner.
>
>   Now, you might begrudge the current drawn by the other parts of the
> disk drive electronics but of course you will have split off the capstan
> motor anyway, and any components obviously unnecessary can be removed
> (or disabled) and I doubt you can make any other efficiencies.

 Oh, sure, all true ...  But, it's no FUN if I cannot breadboard it
myself! <G>

> >  I want to automate feeding the cats, some day, for one thing.
>
>   Hmmm.  That'll be interesting.

 The good thing is the cats'll tell me if the design goes awry (They're
good at leading me to their food dish <G>)

> >  He wants an absolute minimal cost solution,
>
>   Using the drive electronics is certainly that.

 Definitely.  Just a 555 & power source...

> > I also was already talking to him about half-stepping the motor, which
> > I'd probably do here - but I doubt he'll do, for finer smoother
> > rotation of the motor.
>
>   Is it *really* necessary?

 For some things I'll be doing, later, it'd be fun, for his job,
probably not <G>  May have to full step using twin windings activated at
the same time, or may have to spin at 24Hz step rate with a 4:1 gear
down, to get him enough torque to do what he wants to do.  We'll see.

> >  (I've wondered - Does half-stepping give you more effective torque
> > out of the same stepper?  Or no effect there?)
>
>   Mmm, various "scraps" on similar topics on this list.  It seems to me
> you *may* get marginally more torque by half-stepping (having adjacent
> coils simultaneously energized for alternate steps) but really, the half
> step from two-coils-driven to one-coil-driven must by definition be cor-
> respondingly weaker than its converse.

 Makes sense - you can choose to always drive pairs of coils, though,
for higher torque.

>   Assuming each step is met with limiting friction, if the one-to-two
> coil transition is only just sufficient to overcome the friction, the
> next half-step would be too weak to overcome that friction and the rotor
> would tend to jam.  A subsequent two-coil activation involves the
> opposite drive on one of these coils and would have some net torque away
> from the previous position, but you'd have lost resolution.  I don't see
> that the analysis would be much better in continuous motion with
> "flywheel" effect.

 He'll probably gear down and increase the step rate, if he has a
torque problem.

> > I might scavenge driver parts off floppy boards, but want to be able
> > to be independent (on some designs) of a PC power supply <G>
>
>   Well...  The 5¹" drives use 12V motors, so you need a 12V supply for
> that.  If you use logic (PICs) to drive them, you need 5V.  The (tiny)
> steppers in many 3¸" drives use 5V of course.  You can be independent of
> a PC power supply, but you'll end up supplying the same voltages.  And
> I'm sure you have *plenty* of spare plugs on the end of RD-BK-BK-YL
> leads!

 "Never enough", despite the dozen spare power supplies in the garage
<G>

>   Cheers,
>         Paul B.

1999\08\15@152642 by Mark Willis

flavicon
face
Thomas McGahee wrote:
>
> Mark,

Wow, good tutorial here!  Thanks!

> The TEAC Floppy typically uses a 5 wire stepper motor. One of the
> wires is a COMMON which is tied to one side of each of the four
> unipolar coils. You can easily determine which wire is the COMMON
> by using an ohmmeter. There will be only one wire that will measure
> the same value with respect to all the other four wires.

OK, so this one's not split into 2 pairs of windings.  Good data.

{Quote hidden}

Given the 5 wires (instead of 6), I remembered all that, summat vaguely
but well enough as I've been watching the discussions in here.  There's
another rotation scheme used sometimes:

The stepper motor will rotate full-step CW if the sequence is thus:
AB BC CD DA AB BC CD DA AB BC CD DA etc.

similar possibility for CCW.

> A diode should be connected across each coil winding. The Anodes
> all connect to the Common wire, and the Cathodes connect to A B C
> and D.
>
> The diode will supress high voltage spikes when the coil is
> switched from it's ON to it's OFF state.

AKA inductive kicks, yep.  OK, makes sense.

> You can drive the windings to ground via a grounded HexFet, or even
> a decent bipolar transistor such as a Motorola MPS6566. The transistor
> must be capable of handling the current through the winding, which
> can be computed using Ohm's Law: I=E/R  where R is the DC resistance
> of the coil.

Logic-level hexfet'd be a good idea here, too, want to make sure you
saturate the FET <G>  (Or transistor.)

> The transistor or HexFet is used as a switch. When it is OFF
> the voltage across it is +12v and the current is zero. When it is
> fully ON, the current will be from a few hundred milliamps to
> perhaps an amp or so (depending on the stepper motor), and the
> voltage across the switching device will be only a few tenths
> of a volt. In either case the POWER dissipation of the device
> can be kept quite low so long as the switching device is driven
> *hard*.

 Would not need a protection diode across a transistor, either, as
that's already across the coil winding instead - OK, sounds good.
(Hexfet's have their own protection diode, o'course.)

> The maximum speed at which the typical floppy stepper motor can
> be stepped is between 200 and 300 steps per second. As the speed
> increases, torque will decrease until finally the motor becomes
> erratic and loses synch.

OK, good info there, that knocks steppers out of the running for one
project (I need a known speed motor control to spin a little cylinder or
disk at a very high, controlled speed, for playing with a Nipkow
heads-up display design for wearable computers.  Need something like a
30+ Hz refresh rate for that, want some other motor then <G>  (1200
steps per second's pushing these more than they'll run at, IOW)  Well,
still many other projects!

> It is possible to increase the speed significantly by using
> a chopper mode with feedback which keeps the ON current constant.
> In this case the compliance voltage is raised to over 24 volts.
> However, such techniques are normally reserved for driving
> large high power stepper motors. It would be over-kill to do
> this with a floppy stepper motor.

Hmmm.  Makes sense, unless size & weight constraints made it necessary.

> As to driving the stepper motor via a PIC, it is ridiculously
> easy. You assign four I/O pins to drive the ABCD driver
> transistors. If using full-step mode, you can simply shift 2
> bits left or right in a register and then copy the least
> significant 4 bits to the I/O pins. Initial "seed" value would
> be binary 00010001. Just make sure that when you shift the carry
> value is properly set up based whether you are shifting left
> or right.

Knew that, it's the speed & wiring I needed refreshing on - good to be
thorough, though!  Could also do a 2-wire interface through a shift
register, etc., if interface pins are low (12C508A etc.)

> I have to go right now, but if anyone has any further questions,
> ask away. As usual, this is only ONE of MANY POSSIBLE ways to
> do things. If you have a preferred method of doing this, share
> it with the rest of us.
>
> Fr. Tom McGahee

Good thorough info.  These are strongest when static, was the major
thing I needed to remember here <G>  Thanks!

 Mark

1999\08\15@154526 by Dan Creagan

flavicon
face
You should be able to use an L293D for your stepper and decrease your
component count (L293's have built in diodes).  That would make it a PIC and
an L293D.  Cost might drive your decision since the L293 is probably going
to cost a dollar or two  more than the PIC.

Dan

{Original Message removed}

1999\08\15@155801 by Mark Willis

flavicon
face
Looks like a good driver.  I might use that, for things around the house
where I want to build it & never have to fix it, at least.

 Mark

Dan Creagan wrote:
>
> You should be able to use an L293D for your stepper and decrease your
> component count (L293's have built in diodes).  That would make it a PIC and
> an L293D.  Cost might drive your decision since the L293 is probably going
> to cost a dollar or two  more than the PIC.
>
> Dan
> <Snipped>

1999\08\15@193947 by paulb

flavicon
face
You didn't reply to the *other* guy's comment on feeding the cats!

Mark Willis wrote:

>   Makes sense - you can choose to always drive pairs of coils, though,
> for higher torque.

 I can't see that.  The coil which remains energized in this switchover
contributes *nothing* to the torque except that by holding the armature
*in between* positions, it reduces the flux coupling.  This may give an
extra repulsive kick at the start, but as it seems to me, less
attraction at the end of the stroke where it is pulling *away* from the
most-recently-energized pole.

>> I'm sure you have *plenty* of spare plugs on the end of RD-BK-BK-YL
>> leads!
>   "Never enough", despite the dozen spare power supplies in the garage

 It appears you, like me, can't bear to scrap equipment even when
busted!

> Given the 5 wires (instead of 6), I remembered all that, summat
> vaguely but well enough as I've been watching the discussions in here.

 5 and 6-wire units are almost identical, except that a 6-wire can be
used as either a 5-wire or a 4iwire :-).

>> A diode should be connected across each coil winding. The Anodes
>> all connect to the Common wire, and the Cathodes connect to A B C
>> and D.
> AKA inductive kicks, yep.  OK, makes sense.

 If we're getting particular here, the diodes do *not* go to the
common, but to common via a Zener or resistor.

>I need a known speed motor control to spin a little cylinder or disk
> at a very high, controlled speed, for playing with a Nipkow heads-up
> display design for wearable computers.  Need something like a 30+ Hz
> refresh rate for that, want some other motor then <G>

 The complete assembly is available disposals from laser printer
mechanisms.  Including electronics, though that may be a challenge.

 The capstan assembly from a Hard Disk Drive is an alternative.

 And yes, if you have to go *buy* a stepper driver, the L293D is the
way to go as it is created for the job.  I'm miffed, they were available
once disposals but snapped up before I could get my order in.
--
 Cheers,
       Paul B.

1999\08\15@234726 by Russell McMahon

picon face
Excellent tutorial on stepper driving from Tom but there's a
+ACI-gotcha+ACI- here
which has to be avoided -

+AD4-A diode should be connected across each coil winding. The Anodes
+AD4-all connect to the Common wire, and the Cathodes connect to A B C
+AD4-and D.
+AD4-
+AD4-The diode will supress high voltage spikes when the coil is
+AD4-switched from it's ON to it's OFF state.


As noted, effectively you have two coils which are centre tapped and the
two centre taps are connected to supply. Now, each individual centre tapped
winding acts as a transformer. When you put ct to supply and ground one end
the OTHER end goes up to 2 x supply voltage. IF you connect a diode from
this +ACI-high+ACI- end to supply it will prevent the end rising more than
a diode
drop above supply. The system will not be happy. If you want to use anti
flyback diodes like this there are several options. Each must produce the
same result - the +ACI-open circuit+ACI- ends must be allowed to rise to 2
x supply
at least. Some possible ways are is to connect all diode cathodes together
and then connect this point to a capacitor to make a 2 x supply point.
Connect a resistor from here to ground to dissipate flyback energy. Or just
use a resistor here. Or take each diode to Vcc or ground via a resistor
each. Or leave open and ensure that flyback voltages can be handled by your
driver (be careful). Also remember that flyback voltage loading will affect
the time constant of the coil and MAY affect your stepping. Time constant
+AD0-
L/R so smaller R's gives lower voltage peak but longer time constants
(opposite of case for capacitance).

In one design I drive a small unipolar stepper similar to this one with a
ULN2803 darlington driver with built in diodes and I leave the common diode
point open. In this case the driver is happy. YMMV :-).


regards

           Russell McMahon

1999\08\16@001354 by paulb

flavicon
face
Russell McMahon wrote:

> In one design I drive a small unipolar stepper similar to this one
> with a ULN2803 darlington driver with built in diodes and I leave the
> common diode point open. In this case the driver is happy. YMMV :-).

 I'm not sure what you're saying here?  Wouldn't you want to tie it to
a 2xVcc rail like you just described?
--
 Cheers,
       Paul B.

1999\08\16@063956 by Russell McMahon

picon face
Paul B said
+AD4-  I'm not sure what you're saying here?  Wouldn't you want to tie it
to
+AD4-a 2xVcc rail like you just described?


Tying to 2Vcc+- would be SAFEST.
What I am saying is that if you can tolerate the ringing voltage it has
least effect on operation if you leave the diodes open (or with a very
light load).

Operate the circuit  - look at the diode common point on an oscilloscope -
decide whether the result is tolerable for your driver. Depending on your
switching waveforms, relative on and off times and the amount of leakage
inductance you may see very little ringing here as the other end of the
same winding is clamped to ground. This is what produces the 2:1
transformer action but also limits the voltage excursion. Be sure that what
you do is OK in all circuit configurations - eg do you ever suddenly turn
it off rather than stepping? (yes, you do :-)).



RM


-----Original Message-----

+AD4-Russell McMahon wrote:
+AD4-
+AD4APg- In one design I drive a small unipolar stepper similar to this one
+AD4APg- with a ULN2803 darlington driver with built in diodes and I leave
the
+AD4APg- common diode point open. In this case the driver is happy. YMMV
:-).
+AD4-

1999\08\16@090205 by Jose Souto

flavicon
face
Don't miss http://www.cs.uiowa.edu/~jones/step

And for a expensive (?) and very good driver use the
Allegro A3952SB or A3952SW and forget the others.

[]'s
J Souto

1999\08\16@110554 by Wagner Lipnharski

picon face
Recently I made a board to control Nema Size #23 Steppers, 4V x 1.2A,
and they run pretty warm --> hot after some half hour activity, this is
normal, it is a motor anyway. Using current control reduced some of the
temperature, it is just a pulsed system that cuts off the current for
very few time whenever it goes bigger than 1.2A.

Running at low speeds, the motor steps and then settles quiet for some
time, at this point the current increases because the coil impedance
reduces. This is known about stepper motors, running at high speed it
consumes less power than stopped with coils energized.  This is the
reason to use current control, to avoid the motor to super-heat.

After reading several chip specifications, I decided for the (Dual
H-bridge) L2998 (Allegro), considering current, voltage and features,
and the fact of being a dual-H-bridge requires just one chip per motor.
It could not be the best, but for sure it goes over several well known
other chips features, but not about price, it is cheap and available at
NetBuy. The only problem with this chip is that it needs at least 10V to
feed its internal electronics, so the 4V bipolar motor needed to be
connected as unipolar (8V).

There are several other chips around, but I think the H-bridge is the
most versatile, since you can connect unipolars, bipolars (connected as
unipolar), or even a bipolar with center tap to +VCC (since the bridge
would use only the lower section transistors). By this way, the H-Bridge
drivers can accept any kind of 2 phases stepper motors.

Several chips uses 2, 3 or more pins to control the motor action. Phase
A (on/off), Phase B (on/off), sometimes Enable (1 or 2 pins), sometimes
also PWM control. One way to control nicely the motor using at least
this 2 control pins, is create a two bit counter at the software (0-3),
so going forward you just increase the counter and AND it with 00000011
(03h) so it would keep only the last two bits, going backward just
decrease the counter and apply the AND again. Then check the counter
value and run one of four different small subroutines to turn ON or OFF
the phases, or just control the phases based on this two bits counter
value, bit 0 = phase A, bit 1 = phase B.  Bit0=0 => Phase A=Off, Bit0=1
=> Phase A=On, Bit1=0 => Phase B=Off, Bit1=1 => Phase B=On.

Using this 2 bits counter is nice since you don't need to save any other
motor status. At the time to update the motor physical motion, just
consult the counter and take the correspondent action.  Of course you
can use 4 FET transistors to drive a bipolar motor, gates tied directly
to the PIC port pins, still the same logic, for each of the 2 bits
counter value, would corresponde to a combination of those PIC port pins
on or off.  But then, you won't have any temperature protection, current
control or anyother thing you could find at those chips, and... by the
way... 4 x IRFxxx transistors would cost more than a L2998 chip... :)

1999\08\16@112801 by Thomas McGahee

flavicon
face
If you leave the diodes "open", they will have NO effect on the circuit
whatever. In this case any given diode "pair" will appear as a set of
cathode-to-cathode connected diodes, and there will *never* be any
conduction through them. To dissipate the flyback energy it is
imperative that the set of common cathodes be connected *somewhere*
so that the current can circulate. Otherwise the stepper motor coils
will create extemely high voltages when they are turned off.

By the way, you don't need a separate resistor for each coil. You can
use a single resistor connected between the common cathodes and the
Vcc line.

Fr. Tom McGahee

----------
{Quote hidden}

1999\08\16@141144 by Mark Willis

flavicon
face
Paul B. Webster VK2BZC wrote:
>
> You didn't reply to the *other* guy's comment on feeding the cats!

 Did, just in private;  I was even polite <G>  I can deal with verbal
humor, just don't physically harass cats or dogs (or people), in my
presence <G>  You should hear the humor that people on Search & Rescue
teams descend to, after 7 days of searching for someone who "Hadta get
there now", was begged not to fly into a bad storm, and flew anyways -
and never made it.  I've heard FAR worse, guys!

{Quote hidden}

 I was thinking Sqrt(2) gain in torque, roughly, if you energize 2
adjacent windings?

> >> I'm sure you have *plenty* of spare plugs on the end of RD-BK-BK-YL
> >> leads!
> >   "Never enough", despite the dozen spare power supplies in the garage
>
>   It appears you, like me, can't bear to scrap equipment even when
> busted!

 I use old connectors to make my own power Y-connectors, and STILL get
stuck for buying more Y-connectors from computergate.com etc., dangit!
Lots of machines here with lots of drives onboard <G>

> > Given the 5 wires (instead of 6), I remembered all that, summat
> > vaguely but well enough as I've been watching the discussions in here.
>
>   5 and 6-wire units are almost identical, except that a 6-wire can be
> used as either a 5-wire or a 4iwire :-).

 No comprendo how you get 4 wires out of a 6 wire unit?  Unless you
drive it with bipolar drivers & use the diodes to bypass half the coil,
is that the trick here?

> >> A diode should be connected across each coil winding. The Anodes
> >> all connect to the Common wire, and the Cathodes connect to A B C
> >> and D.
> > AKA inductive kicks, yep.  OK, makes sense.
>
>   If we're getting particular here, the diodes do *not* go to the
> common, but to common via a Zener or resistor.

 Whimper <G>  Seems people are always arguing this one, if via a
resistor or Zener, how do you do the 6-wires to 4-wires trick?  Why does
"Jones on Stepping Motors" etc. have diodes across the coils?  Or to Vcc
and Ground, depending on coil type.  Maybe it's a per winding type
thing, this all is a lot of good info to re-load on <G>

>  >I need a known speed motor control to spin a little cylinder or disk
> > at a very high, controlled speed, for playing with a Nipkow heads-up
> > display design for wearable computers.  Need something like a 30+ Hz
> > refresh rate for that, want some other motor then <G>
>
>   The complete assembly is available disposals from laser printer
> mechanisms.  Including electronics, though that may be a challenge.
>
>   The capstan assembly from a Hard Disk Drive is an alternative.

 Lasers, I wish I had a spare, could seriously use 48 or 64 LED's at
1/300th inch spacing (That, with a 10-aperture Nipkow disk, would give
me a nice HUD I could afford easily...)

 Aah, old HDD motor, now that's a good thought.  Take an old 2.5"
40-megger or something & make it far more useful <G>  Going to have to
balance torque out, or just assume that things get weird when you move
while computing...

>   And yes, if you have to go *buy* a stepper driver, the L293D is the
> way to go as it is created for the job.  I'm miffed, they were available
> once disposals but snapped up before I could get my order in.

 Happens, darnit.  With me, I usually see a sale, then after they're
gone, find I should've bought 'em all <G>  We'll all cope.  I've seen
them for $3ish, recently.

>   Cheers,
>         Paul B.

 Mark

1999\08\16@142349 by Mark Willis

flavicon
face
Russell McMahon wrote:
{Quote hidden}

 Autotransformer effect here, OK, makes sense.  Long weekend, no spare
brainpower this AM <G>  Saw it in the reading I've been doing, I keep
thinking in terms of 4 separate windings, need to remember that those
6-wire jobs are NOT so, at all, but have 2 center taps.  OK, good.

> In one design I drive a small unipolar stepper similar to this one with a
> ULN2803 darlington driver with built in diodes and I leave the common diode
> point open. In this case the driver is happy. YMMV :-).
>
> regards
>
>             Russell McMahon

 Good to know those gotchas that I forgot, I remembered all the easy
stuff like how to step things <G>

 Mark

1999\08\17@074149 by paulb
flavicon
face
Russell McMahon wrote:

> What I am saying is that if you can tolerate the ringing voltage it
> has least effect on operation if you leave the diodes open (or with a
> very light load).

 Sure.  But just to be safe, if you use a Zener rated for slightly more
than Vcc, returned to Vcc, paralleled by a small snubber cap of maybe
10 nF, then the autotransformer action we both described will not cause
this to conduct, though true "ringing" or circuit shutoff *will* be
limited.

Mark Willis wrote:

>   I was thinking Sqrt(2) gain in torque, roughly, if you energize 2
> adjacent windings?

 I suspect this will be defeated because the equilibrium position
involves only partial alignment of pole pieces.  Could be wrong I
suppose.

>   No comprendo how you get 4 wires out of a 6 wire unit?  Unless you
> drive it with bipolar drivers & use the diodes to bypass half the
> coil, is that the trick here?

 A five wire unit has a wire connected to the centre tap of both "axis"
windings.  A six-wire has the centre tap of *each* winding brought out
separately.  On odd occasion you may get an 8-wire unit with four
separate windings.  Now...

 If you connect both CTs of a 6-wire together, and to Vcc, you have
used it as a 5-wire units haven't you?  You have the option however of
using *only* the "ends" and using it as a 4-wire (2-coil) unit.  I'm not
at all sure which should be called "bipolar" and which "unipolar", so I
won't use the terms.

 *Next* trick.  If you have a suitably-behaved H-bridge, you can
*still* use a 5-wire as a 4-wire!  As long as the H-bridge drives either
one direction, the other, or tri-states to produce no net drive, then
the centre tap of each coil will sit at ¸Vcc and it does not matter that
they are connected.  Mmmm!

>   Whimper <G>  Seems people are always arguing this one, if via a
> resistor or Zener, how do you do the 6-wires to 4-wires trick?

 Whatever you drive with an H-bridge, the reverse diodes across each
driver perform this task automatically.  Just takes a think to sort it
out!

 In fact, the reverse diodes across the drivers *do* limit flyback as
long as the two coils are 100% coupled.

>  Why does "Jones on Stepping Motors" etc. have diodes across the
> coils?  Or to Vcc and Ground, depending on coil type.

 I don't wish to be too PICky, but I suspect Jones only *ever* uses
bridges for which his diodes are perfectly correct.  His comment about
using slow switching diodes reveals another common mis-perception.  Slow
diodes switch *on* quite fast, which is what is required in this
application.  Their problem is not switching *off* when reverse-biassed,
but here the current has generally decayed to zero by the time they are
subjected to reverse bias.

>   Lasers, I wish I had a spare, could seriously use 48 or 64 LED's at
> 1/300th inch spacing (That, with a 10-aperture Nipkow disk, would give
> me a nice HUD I could afford easily...)

 Out of an *Un-*Laser printer you mean?  I've never seen their
internals, but AFAIK the scanners are of course only in *real* laser
printers (thus the difference in cost), and all facets of the octagon
mirror are aligned, but I have a few in the shed here so they are
apparently available.  Not as small as you want though...  (You
presumably mean helmet display?)

> Going to have to balance torque out, or just assume that things get
> weird when you move while computing...

 I'm not 100% sure you *can* balance the torque fully...

 Anyway, I'm all ears for any absurd claims in the above to be refuted.
--
 Cheers,
       Paul B.

1999\08\17@115133 by Wagner Lipnharski

picon face
Sorry, my previous post tells about a stepper motor controller from
Allegro as L2998, it is a wrong number, the correct is UDN2998, cost
$3.28 each at NetBuy in 8 pieces minimum.

The main differences between motors with 5 and 6 wires, is that the
center tap of both coils will be tied together or apart.  The 6 wires
allows you to pulsate VCC to the center tap (for each coil group), as a
way to control current or even motor torque better than a 5 wire motor.

Bipolar / Unipolar:
-------------------
The Bipolar motors has a directional current into their coils, it means,
some wires will always be connected toward Vcc and others to Ground
level. So, or current flows and generate a magnetic field, or the
current stops and the field is removed. In a 5 or 6 wires motor, the
magnetic field can be reversed if the second coil of the same group is
energized while the first one is stopped. It means that (normal usage)
the motor will has only one coil of each group energized at time.

The Unipolar motors *requires* a floating connection, in a "H" bridge
style, so a coil current switch flow direction for different magnetic
field polarity. It means that except if the current is removed and the
motor gets lose, coils always has current on it, one direction or
another, what increases torque (almost double it).  *Any* bipolar motor
can be used as Unipolar (center tap goes floating, no connected), what
increases its torque, but requires bipolar coil voltage doubled at VCC
(two coils in series now). So, a bipolar motor for 6Vdc, when connected
in a H bridge and used as unipolar requires 12Vdc at the top of the
bridge.  The only problem is that the motor generates double heat, and
sometimes needs a better cooling air flow.

Some analogy: Power Transformers.
---------------------------------
There are those with primary coil with center tap to select 110 or
220Vac.
There are those with two isolated coils, both for 110Vac, so if you want
to plug it at 220, just connect both in series. Ok, it is exactly the
same as the center tap one, but the advantage here is when you connect
it to 110Vac, you can connect both coils in parallel and split current
and heat. So, the wire size could be smaller, less weight, less cost. Is
it better? I think so yes.

1999\08\17@175538 by steveb

flavicon
face
> Bipolar / Unipolar:
> -------------------
> The Bipolar motors has a directional current into their coils, it means,

> The Unipolar motors *requires* a floating connection, in a "H" bridge

Sorry, Wagner. You've got your wires (all 6 of them) crossed here.

The 5 & 6 wire motors are Unipolar and the 4 wire ones, Bipolar.

If we go back to steppers 101, we can see why. If we take a
simplified stepper motor, it has 4 electromagnets placed 90 degrees
apart around the outside of the case. The rotor has two disks with
teeth on them and a magnet between them. This makes one disk all
north pole and the other all south pole. The teeth on each of the
disk are rotated 1/2 a tooth relative to each other so that the peak
of one corresponds to the valley of the other.

To make the motor move, we want one of the electromagnets to be first
a North pole and attract the peak of the rotor north pole and then to
have no magnetisim for the next step. The next time the same magnet
is used, we want it to be a South pole to attract the peak of the
other disk.

There are two ways we can make an electromagnet change its sex.
1) Have a single winding and change the direction that the current
flows. This is the "Bipolar" method because you make the current flow
in two ("Bi") directions.

2) Have the current flow in one ("Uni") direction all the time, but
change the direction of the windings. Remember that wierd contortion
they made you do at school to determine the lines of force. It all
pays off. :-)

So in the Unipolar motor, wire is wrapped around a piece of iron
until it is half full and a tap taken out. The rest of the space is
then filled by winding the wire in the other direction. Now if the
centre tap is always positive, putting current through one half of
the winding will make a north pole and through the other half, a
south pole.

You can see that in a bipolar motor, all of the available space is
taken by wire that is used to generate magnetism each time it is
used. In the Unipolar motor, half of that space is taken up by the
other winding that serves no purpose at any given time. In other
words, for the same physical motor size you can get more magnet
and therefore, torque out of the bipolar motor.
The disadvantage is the drive circuit is more complex and twice as
much motor is generating heat with half as much dissipating it.

Diodes and stuff
===========

There's been quite a bit of discussion about what's "right" and
"wrong" when it comes to diodes and stuff. There isn't a right/wrong
solution but some are more predictable than others.
When it comes to turning off a coil, the requirements are the same as
for any other inductor in that you want to keep the smoke inside your
components. In this respect, you can use whatever you prefer (diodes,
RC snubbers, etc).
However, while there is still current flowing in the coil, there is
still a magnetic field and since you have turned it off, that
magnetism is working against you so you want it gone as soon as
possible. If you are using a diode across the coil, the voltage is
limited to the forward voltage of the diode and is limited by the
resistance of the coil. This gives a slow result but is predictable
because it isn't reliant on the PSU quality, length of wire, etc and
can also use relatively low power diodes.
If you put a zener in series with that diode, the voltage is higher
and therefore the discharge speed is much faster. The catch is that
the zener must be quite large.

6 wire used as 4 wire
==============
If you really wanted to, you could use a 6 wire motor with a four
wire driver but I can't see why you'd want to.
If you parallel the two windings that share a common, you are making
two opposing magnetic fields which cancel each other. In practice
there will be a small difference so some magnetism is being
generated.
If you just use one winding from each pair, you'll get a real bipolar
effect but half of your motor is doing nothing but taking up space.
So you are using a more complicated drive scheme to use a motor that
is twice the size it needs to be.

======================================================
Steve Baldwin                Electronic Product Design
TLA Microsystems Ltd         Microcontroller Specialists
PO Box 15-680, New Lynn      http://www.tla.co.nz
Auckland, New Zealand        ph  +64 9 820-2221
email: EraseMEstevebspam_OUTspamTakeThisOuTtla.co.nz      fax +64 9 820-1929
======================================================

1999\08\17@175748 by paulb

flavicon
face
Wagner Lipnharski wrote:

> Bipolar / Unipolar:
> -------------------
> The Unipolar motors *requires* a floating connection, in a "H" bridge
> style, so a coil current switch flow direction for different magnetic
> field polarity.

> *Any* bipolar motor can be used as Unipolar (center tap goes floating,
> no connected), what increases its torque, but requires bipolar coil
> voltage doubled at VCC (two coils in series now). So, a bipolar motor
> for 6Vdc, when connected in a H bridge and used as unipolar requires
> 12Vdc at the top of the bridge.

 The *problem* is, Wagner, that your definition of bipolar/ unipolar is
the *opposite* of Jones' article:
 www.cs.uiowa.edu/~jones/step/circuits.html
--
 Cheers,
       Paul B.

1999\08\19@004653 by Wagner Lipnharski

picon face
Unipolar, Bipolar, arggggg, after so many people doing sex change, it is
starting to make people confuse when you make a fast question "What
would you think if you find that your best friend is heterosexual?"...
some people just keep thinking... :)  You are 100% right, I crossed
names.
Wagner.

1999\08\19@104146 by Thomas McGahee

flavicon
face
An easy way to remember the distinction between unipolar and bipolar
is that in a UNIpolar coil the APPLIED current is always in ONE
direction. UNI-POLAR.  In a bipolar coil the APPLIED current may be
in either of TWO directions. BI-POLAR.

Bipolar coils are almost always driven with H Bridges.

Fr. Tom McGahee

----------
{Quote hidden}

1999\08\21@082709 by steveb

flavicon
face
A few days back I made the assertion that the windings in a unipolar
motor were made in one direction to the centre-tap and then in the
opposite direction for the rest of the winding and therefore, using
the whole winding in a bipolar fashion would result in flux
cancellation.
This is incorrect. The winding continues in the same direction making
one appear reversed when viewed from the centre-tap (as it is used in
a unipolar drive).
Sorry if I added any further confusion with my brain fart.

Steve.

======================================================
Steve Baldwin                Electronic Product Design
TLA Microsystems Ltd         Microcontroller Specialists
PO Box 15-680, New Lynn      http://www.tla.co.nz
Auckland, New Zealand        ph  +64 9 820-2221
email: KILLspamstevebKILLspamspamtla.co.nz      fax +64 9 820-1929
======================================================

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