Sunday 1 April 2007

Straight up

I forgot to describe the z-axis. Not quite such a bargain as the XY table as it does not include a stepper motor, limit switches or electronics but I am pleased with it all the same. It is very solid so I should be able to mount any type of head I want on it.



It has a mount for a Nema frame motor. I have a few of these lying around but unfortunately the shaft exits from the wrong end so I will have to mount one on pillars.



These are 1.8 degree step motors so with half stepping I will get 400 steps per rev. Each rev of the leadscrew moves the carriage 20 mm so I will get a resolution of 0.05 mm. It doesn't need to move very fast so I will try to get away with a simple constant voltage unipolar drive circuit.

Worth the wait

The XY stage turned out to be a really nice piece of kit. It is an XYR-8080 from NEAT, details here. It also came complete with a pair of MDM7 stepper motor drivers. These are bipolar, constant current, micro-stepping with anti-resonant circuitry and opto isolated inputs, i.e. top of the range. Perhaps I should explain each of these terms :-

Bipolar versus Unipolar drive

Stepper motors usually contain two electromagnets which need to be energised in one of two magnetic polarities, giving four combinations or phases. If this is done with a single coil per electromagnet then the electronics must be able to drive a positive or negative current into each coil. This is bipolar drive and requires four transistors per coil, i.e. eight per motor. Alternatively the coils can be centre tapped which effectively creates two coils per electromagnet wound in opposite directions. One of these can be energised at a time to produce opposite magnetic fields. This only requires one transistor per half coil, i.e. four per motor. The advantage of unipolar is that the electronics are cheaper but as only half of the windings are energised at one time the amount of torque available from a given size of motor is less.

The field produced by an electromagnet and hence the torque of the motor is proportional to the number of turns times the current. The maximum current that can be applied is limited by the maximum allowable temperature rise. The heat generated in the windings is proportional to current squared times resistance. This means that if a unipolar motor is operated in bipolar mode then the maximum current is root two times less because the resistance of the full winding is double that of the half windings. However, the number of turns is doubled so the torque is root two greater.

Constant current versus constant voltage

The simplest way to drive a stepper is to apply a constant voltage to the coils. The problem with this is that when a voltage is applied to a coil the current builds up gradually at a rate proportional to the voltage divided by the inductance until it reaches the steady state defined by the voltage divided by the resistance. This causes torque to fall off with speed because at higher step rates the current does not get time to reach its full value before the next step.

A better driver system is to apply a much higher voltage to the coil to get the current to rise quickly and then turn it off when it reaches the correct value. The current then starts to fall at which point the voltage is applied again. This on / off switching occurs at a high enough frequency to avoid producing audible noise.

Micro-stepping

This is a technique to increase the number of steps per revolution by varying the current in the two windings in a sinusoidal fashion. In this case it increases the number of steps from 200 to 2000 per rev. As the screw threads have half an inch travel per rev this gives me a step size of a 4000th of an inch or just over 6 micrometers. The target for RepRap V1.0 aka Darwin is 0.1mm resolution so I am well within that that! The only downside is that the maximum travel is only 150mm in each direction compared to Darwin's 300mm.

Another advantage of micro-stepping is that it produces smoother running at low speeds.

Anti-resonance

Because the force applied by the motor increases as it is displaced from its resting position it behaves like a spring. This together with the mass of the rotor and the load forms a resonant system. If the step rate gets close to the resonant frequency oscillations build up and the motor gets out of step and / or stalls. This is a major problem with high speed operation of stepper motors. An anti-resonant drive monitors the drive waveforms to detect when resonance starts to occur and adjusts the drive current to dampen it down. This allows the motor to be stepped through its resonant band to achieve higher speeds. Clever stuff!

Opto isolated inputs

The step and direction inputs are electrically isolated from the drive electronics by opto couplers. This avoids heavy motor currents sharing the same ground path as the logic signals, which can cause signal corruption.
The XY stage also includes hall effect limit switches and 2000 step shaft encoders. A great find, the challenge now is to build a machine that does it justice.

Here it is being put through its paces with a signal generator on one axis.

It can easily handle step rates up 6kHz which is about 40mm per second. With a bit of ramp up and ramp down I think it would go well above 10kHz. Also I have the full windings connected for maximum torque. The motors are centre tapped so I have the option of using half the winding. This gives root two less torque but one quarter of the inductance, so should be better for higher speeds if needed.

Across the pond

The problem with building things in the UK is that all the interesting surplus equipment seems to be in the US. Because the axes are heavy they were expensive to ship. The shipping and duty cost me about as much as the items themselves. Worse than that the XY table took about three weeks via USPS when it was supposed to be 3 to 5 days.
23-01-2007 18:48     HOUSTON TX                     Enroute
24-01-2007 22:37 CAPE ISC CHICAGO IL (USPS) Left origin country
04-02-2007 16:50 International Hub Arrived in destination country
04-02-2007 17:23 International Hub AWAITING CUSTOMS CHARGES
04-02-2007 17:23 International Hub AWAITING CUSTOMS CHARGING
05-02-2007 21:57 International Hub RELEASED WITH CHARGES
05-02-2007 23:33 International Hub En route to delivery depot
06-02-2007 02:31 National Hub Sorted in hub
06-02-2007 14:42 Manchester Piccadilly Depot Awaiting payment of charges
07-02-2007 07:33 Manchester Piccadilly Depot Delivery rescheduled
08-02-2007 18:23 Manchester Piccadilly Depot Delivery rescheduled
12-02-2007 16:09 Manchester Piccadilly Depot Delivery rescheduled
13-02-2007 01:25 Manchester Piccadilly Depot Out for delivery
13-02-2007 09:40 Manchester Piccadilly Depot Parcel delivered
Mysteriously it spent 10 days in no man's land between the two countries. I didn't know planes could fly that slowly! To add insult to injury the UK Parcel Force failed to deliver it three times because "it was on the wrong shelf". In contrast the Z axis only took 6 days and although I ordered it much later they arrived together.