Mar 30, 2017

[2.70] Linear Axis v2

Finally hooked everything up and ran the tests! 

TL;DR: This linear axis system has position error of 0.44mm, with only 3.5μm error resulting from backlash. It falls within the desired error budget of 0.5mm, at least in the no-load condition.

So this is what the setup looks like - I have my linear stage on a desk, and the laser shines on a piece of paper far (4.5m) away. I took three tests:

  1. Command the stepper motor to move 5000 counts forwards and backwards, and find out what distance this is (turning off the power supply between each jump)
    • testing ability to reliably move a set distance
    • measure open-loop error when turning on the system
  2. Command the stepper to jump (each 5000 counts) forwards 4 times, then to jump backwards 4 times (leaving power supply on)
    • testing ability to return to a position
  3. Command the stepper to bounce between two positions (bouncing 
    • measure cumulative backlash error

  • Distance from "zero" point of rail to wall "L"= 449cm
  • Travel distance of the linear axis "x" is defined differently every test
  • "Radius" of the most sensitive part of the carriage "r" = 20mm
  • α  and δ are resulting angular and distance errors projected onto the wall, from which we can measure machine error "err" of this linear axis
$\alpha = \frac{\delta}{L} $
$err = \frac{\delta x}{L+ x} $

Where for the purposes of my experiments, I assume all projected error comes from distance errors, even though some constant portion of it comes from angular error instead. (My analyses farther down ignore angular errors)

((For the results of these experiments, skip to the end))

Linear Axis v2 accomplishes two things. First, it has an actuator (nema17 stepper motor + 1/4-20 threaded rod), which allows me to send distance commands. Second, it has an anti-backlash device so switching directions accumulates less error.

Me planning out components for this actuator (ended up buying a flexible coupling instead of making one)
Some machining notes
This version2 reuses most of the parts from v1, with some modifications. I replaced one of the steel rails with a 1/4"-20 threaded rod, and added some bushings to the bearing blocks to accommodate the new diameter. I also made a plywood stand to put all the things on so I could use the linear axis without needing an empty optical table.

The big new thing here is the carriage for this threaded rod. Its anti-backlash system uses two adjustable-offset nuts for its preload. The threads of one of the nuts will always* be contacting the threads of the rod when traveling in either direction.

(* not actually always; since these are hand-tightened there will be some amount of user error here) 

Carriage and modified bearing block
The fixed part of the carriage consists of a milled aluminum block with a tapped hole on one side and an oversized-slot on the other. The HDPE wedge and its brass threaded-insert floats within the slot and gets pushed outwards by one of the adjustment screws (the other one keeps the wedge centered)


I chose to replace one of the rails with this actuator, which has some advantages and disadvantages compared to having two rails with the actuator in the center.

Two Rails, with Actuator acting as Rail

  • Much easier to build with the preexisting parts
  • Don't have to worry about overconstraint from the two other rails
  • Sensitive to threaded-rod imperfections, especially in roll
  • Actuator will always apply a moment, which magnifies error

Two Rails + Actuator in Center

  • Have to take care to add compliance to avoid binding from overconstraint
  • Not as easy to modify v1 rail to accomplish vs. the other method
Now for experiments! I used a standard nema17 stepper and an Arduino microcontroller, so nothing fancy. 

(A stepper motor is a brushless DC motor that divides a full rotation into an equal number of steps, so they will precisely rotate a fixed rotor angle without needing feedback. They usually do this by having tooth-shaped electromagnets and a gear-shaped rotor.)
Did I bring my 2.70 work and my calipers on a plane to Sweden? Yes, yes I did.
Experiment 1 - Turn on power to the system, command a set distance, turn power off
The carriage started at position 2.2cm. I programmed it to move 5000 stepper counts, then turned the power on and let the program run. Once the carriage stopped (5.3cm), I turned the power off. 
I flipped the direction and did this again, for a total of three trials (2 forwards, 1 backwards)

Looking at a ruler next to the moving carriage, it seems like the machine consistently moves 3.1cm per 5000-count jump. Looking at the laser deviations, we can get a better error resolution. The standard deviation for the three jumps was 1.54mm and the magnification for this experiment was 120.7. So, for this experiment the machine moves 3.1cm with an error of 12.8μm - pretty consistent commutation by the motor.

The Arduino is a generalist microcontroller, and when first powered on it briefly supplies 5V to all its logic pins. This slightly energizes the stepper motor on startup and causes additional error between what should be identical (or within 1.5mm on paper) landing points. This error was an average of 15.7μm, of which approx. 3μm should be start-up error.

Experiment 2 - Motor moves forwards, with pauses to measure distance traveled. Turn off power and restart. Then motor moves back to the starting point, again with pauses.

The carriage started at position 13.5cm. It moved four times, each time 5000-counts (nom. 3.1cm) and ended at position 2.2cm. This distance seemed a bit short, being an average 2.825cm instead of the expected distance. The system was turned off and reprogrammed to move backwards four times, again 5000-counts but ended at position 14.7cm - giving an average jump-distance of 3.125cm.

This is exciting. From Experiment1, we determined that turning the system on gives ~3μm error, and movement will have an average error of 13μm per jump. This machine error projected on the wall should give us an expected average jump error of 1.65mm. Experiment2's average jump-distance is off from our expected 3.1cm by 0.25mm and falls within the expected amount of error.

Experiment2 also allows me to measure average error of returning to a position. This ended up being 0.44mm error for my travel range of ~12cm, which is within my original desired error budget (500μm) for this machine. Woo!

While the carriage was moving, the laser dot moved back and forth on the page. This is partially due to vibrations transmitted by the motor, partially from contact vibrations between the carriage nut and the threaded rod, and partially from the laser pointer only being taped onto the carriage bed. The tip of the laser pointer displaces 0.115mm from these vibrations. 

Experiment 3 - Motor travels back and forth between two points, with pauses for recording position

The carriage started at position 6.6cm. Moving forwards and backwards 5000-counts, it consistently landed at positions 6.6cm and 3.4cm (5 trials) so traveled 3.2cm distances, not 3.1cm. So that's odd given the results of the other two experiments, but at least it's repeatable here.

Position error for this experiment was an average of 3.4μm, which means my machine is pretty good at rejecting backlash. While the carriage was moving, the tip of the laser wobbles 38μm (I did a better job clamping down the base platform for this experiment)

Bonus Analysis - Angle of linear axis machine relative to the wall
From Experiment3, we see that the the entire linear axis system is not quite square* with the laser paper (if it were square, there would be no systematic difference between the front measurements and the rear measurements). If we assume this discrepancy is entirely due to angular** error relative to the wall, we can get an estimate of what that angle is.

$\theta = tan^{-1}(\frac{\Delta }{x}) = 0.28^\circ$

$\Delta$ is the distance between the average front and back points (3.4cm and 6.6cm, resp.) multiplied by Experiment3's magnification factor. This angular error seems around right for lining things up using the floor tiles.

*I know that the laser pointer itself is not colinear with the axis-direction-of-travel... but I'm just combining this angular error with the main one and calling the whole thing "machine error"
**I'm also assuming my system didn't move between/during experiments, which probably isn't true.