I got corrected on twitter that 2048 steps per revolution of stepper motor is not correct.

So I read datasheet again, and it says on stride angle: 5.625°/64

The total number of steps per revolution is therefore 360°/(5.625°/64)=4096!

I did run this AccelStepper demo I created with half-stepping:

It starts at 0(0°), moves to 2048(180°), then to 1024(90°), followed by 3072(270°) and then repeating to 0(0°):

Code: Select all

```
#include <AccelStepper.h>
AccelStepper stepper(AccelStepper::HALF4WIRE, 2, 3, 4, 5);
int i=0;
int A[]={2048,1024,3072,0};
void setup()
{
stepper.setMaxSpeed(800);
stepper.setAcceleration(50);
Serial.begin(9600);
}
void loop()
{
if (stepper.distanceToGo() == 0)
{
Serial.print("moveto(");
Serial.print(A[i]); Serial.println(")");
stepper.moveTo(A[i++]);
i %= sizeof(A)/sizeof(A[0]);
}
stepper.run();
}
```

I verified with that sketch that stepper motor indeed has 4096 half-steps per revolution.

Now back to the math from previous posting -- what does change by that?

The linear step from <=0° to >0° is guaranteed to be <0.003µm=3nm !

Code: Select all

```
$ bc -ql
scale=6; pi=4*a(1)
deg=pi/180
hstep=360/64/2
r=2.5
r*(1-c(hstep*deg))
.003012
hstep=360/4096
scale=8
r*(1-c(hstep*deg))
.00000295
```

Using the generalized formula of linear distance with start angle a allowed me to determine the maximal angle that results in a linear distance change of less than 1µm.

That angle is a=15.05°, and allows for 171(!) consecutive steps from 0° degree position with each linear distance change less than 1µm.

I would never have thought that less than 2$ stepper motor would allow for many such sub 1µm steps ...

Code: Select all

```
a=0
r*(c(a*deg)-c((a+hstep)*deg))
.00000295
scale=6
a=15.05
r*(c(a*deg)-c((a+hstep)*deg))
.000997
a/360*4096
171.233280
r*(1-c((a+hstep)*deg))
.086747
```

The last calculation shows that the total linear distance change introduced by 171 steps from 0° position is slightly less than 87µm!

That allows to cover more than 8 (of the 100) 0.01mm micrometer divisions.

The 4096 steps per revolution of stepper motor (and the small radius 2.5mm of motor shaft) even keep the maximal linear distance change small.

First the maximal angle needs to be computed, when the capped part of motor shaft is vertical, it is 53.13°:

Code: Select all

```
x=1.5
y=sqrt(r^2-x^2)
y
2.000000
a=atan(y/x)/deg
a
53.130980
```

Last step linear distance change to that angle is 3.062µm only.

And the total operating range of this linear actuator is 0..1mm:

Code: Select all

```
r*(c((a-hstep)*deg)-c(a*deg))
.003062
r*(1-c(a*deg))
.999997
```

This allows for nearly arbitrary positioning the flat measuring pad over the whole 1mm range of 0.01mm micrometer, because at least 3 steps will be between any pair of successive scale divisions.

There are 604 steps in that range, and average linear distance change per step is 1.655µm:

Code: Select all

```
a/360*4096
604.512256
1/604
.001655
```

From 0° to 53.13° linear distance goes from 0 to 1.

If more steps are added, then from 53.13° to 106.26° distance goes back from 1 to 0.

Finally from 126.26° to 180° distance keeps constant at 0 because of radial part of motor shaft.

Summary for this high precision linear actuator:

Operating range: 0..1mm

Steps: 604

Linear distance change per step: min=3nm, max=3.062µm, avg=1.655µm

Feedback from 0.001mm electronic micrometer allows for automatic 0° calibration.