CAD CAM EDM DRO - Yahoo Group Archive

Re: Microstepping - a genuine PRIMER

Posted by beer@s...
on 2001-01-10 12:41:41 UTC
On 10 Jan, CAD_CAM_EDM_DRO@egroups.com wrote:
> Message: 12
> Date: Tue, 09 Jan 2001 17:11:31 -0800
> From: Steve Greenfield <polymorph@...>
> Subject: Microstepping
>
> -Warning! Danger, danger, newbie question ahead!-
>
> I just want to get a clarification about the microstepping Lawrence and
> others are talking about, using PIC or other microcontrollers:

A lot of good answers so far, but just in case your question hasn't
been answered to your satisfaction, I'll add another one and I'll try
to begin at the beginning.

Steppers:

The SIMPLEST possible stepper motor would have one winding and would
rotate 180 degrees per step. That is, when DC current was supplied in
one direction, the motor would rotate to one position, when current flow
was reversed, the motor would rotate to the another position roughly
180 degrees away.

This is the basis of all stepper motors, current in one direction, then
current in the other.

The problem with this one winding motor is that it is not possible to
determine which direction, clockwise or counter clockwise, it would
rotate. At least two windings are required for this.

The SIMPLEST two winding motor would rotate 90 degrees per step.

( This particular motor is known as a bipolar motor. It is the most
common type of motor in use today, and is the motor the rest of the
examples will refer to. )

Current injected into one of the windings would cause the motor to move
to a position, current injected into the other and removed from the
first would cause it to move 90 degrees, reinjected into the first IN
THE OTHER DIRECTION and removed from the second would cause another 90
degree move IN THE SAME DIRECTION and so on.

To diagram this, let's say that -> represents current flow in one
direction and <- represents current flow in the other.

The possibilities then, are

Winding direction Winding direction position

1 -> 2 OFF N
1 OFF 2 -> E
1 <- 2 OFF S
1 OFF 2 <- W
1 -> 2 OFF back to N again

This scheme is called full-step mode, and IS used occasionally.
However, since only one winding is energized at any one time, only half
the motor power is available. It is much more common to energize both
windings at the same time and thereby double the power of the motor.

So, to redraw the above diagram taking into account power applied to
both windings

Winding direction Winding direction position

1 -> 2 -> NE
1 -> 2 <- SE
1 <- 2 <- SW
1 <- 2 -> NW
1 -> 2 -> back to NE again


This is another form of "full-step" mode. Note that the motor still
moves 90 degrees per step, but the steps are 45 degrees offset from the
single winding energized positions.

Now the sneaky part. If we combine the two strategies, like so

1 -> 2 OFF N
1 -> 2 -> NE
1 OFF 2 -> E
1 -> 2 <- SE
1 <- 2 OFF S
1 <- 2 <- SW
1 OFF 2 <- W
1 <- 2 -> NW
1 -> 2 OFF back to N again

we get 8 steps per rotation. This is half-step mode, and can be
considered as the first form of "microstepping".

Let us assume that our controller has up to now, magically through the
miracle of electronics, been providing the motors with the maximum
current they are capable of. That is, if the manufacturer has rated
them as 1 amp motors, they have been getting 1 amp.

Now let's add another concept, that of current shaping or current
compensation. Note that in N E S W positions, only one winding is
energized at a time, while in the other positions, two windings are
energized. That means that in some of the positions, there is more
torque than in others.

To fix this, we can supply more current to that single winding and
thereby even out the torque. It turns out, through mathematical
wizardry, that that increase is not a doubling, as one would expect,
but in fact approximately a 140% increase. ( It's a vector thing )

Note that this increase in current does not change the position the
rotor ends up at, only the torque available to get to and maintain that
final position.

Now the really tricky bit. We can carry that current shaping even
further. Take these two positions as an example

1 -> 2 OFF N
1 -> 2 -> NE

Now, add in current MAGNITUDE as well as direction. And rather than
talking about 100% and 140%,

1 -> 140% 2 OFF 0% N
1 -> 100% 2 -> 100% NE

lets just scale it to 100% and less than that.

1 -> 100% 2 OFF 0% N
1 -> 70% 2 -> 70% NE

This is half stepping with current compensation.


Here's where it gets cool. Add another possibility

1 -> 90% 2 -> 38% NNE

and still another

1 -> 38% 2 -> 90% ENE

I won't draw the whole thing, but a moment's thought shows that
that we've just doubled the number of steps again ! This scheme is
known as quarter stepping.

Here's the math involved. If the current in the windings are
activated in the ratio of

winding 1 current = SIN(desired angle)
winding 2 current = COS(desired angle)

the rotor will move to a position very near that desired angle. By
increasing the number of desired angles ( and adjusting the current
accordingly ), we can increase the number of positions the rotor will
assume.

Out primitive stepper has only 4 "normal" positions. A more common
stepper has 200 positions. Used "normally", or in full step mode, this
motor moves 1.8 degrees per step. In half step mode, it moves .9
degrees per step, or 400 hundred steps per rotation. Quarter step, 800
steps per rotation.

While 1/2 step and 1/4 step are technically a form of microstepping,
most engineers think of 1/8 step or 1/16 step as "REAL" microstepping.
Note that in 1/32 step mode ( the practical limit ), it now takes 6400
steps to move the motor one rotation.


So, the real question, how does microstepping affect the CNC controller
software ? The answer, not too much.

The software really doesn't care about any of the details, only the
result. The software wants to know how many steps it needs to issue to
move a given distance.

Whether that means a 1/32 step microstep controller "geared" 1 to 1 or a
full step controller with a 32 to 1 pulley arrangement or something in
between, the software doesn't care.

I've left out a lot, but I'm also out of time, so I hope this helps.

Alan


--

Alan Rothenbush | The Spartans do not ask the number of the
Academic Computing Services | enemy, only where they are.
Simon Fraser University |
Burnaby, B.C., Canada | Agix of Sparta

Discussion Thread

beer@s... 2001-01-10 12:41:41 UTC Re: Microstepping - a genuine PRIMER thomasm923@a... 2001-01-10 19:44:16 UTC Re: Microstepping - a genuine PRIMER Mariss Freimanis 2001-01-10 22:02:57 UTC Re: Microstepping - a genuine PRIMER Tim Goldstein 2001-01-10 22:21:38 UTC RE: [CAD_CAM_EDM_DRO] Re: Microstepping - a genuine PRIMER Mariss Freimanis 2001-01-11 07:50:59 UTC Re: Microstepping - a genuine PRIMER Alan Marconett KM6VV 2001-01-11 11:18:35 UTC Re: Microstepping - a genuine PRIMER Roman Black 2001-01-11 11:22:03 UTC Re: Microstepping - a genuine PRIMER Carlos Guillermo 2001-01-12 06:25:07 UTC RE: [CAD_CAM_EDM_DRO] Re: Microstepping - a genuine PRIMER