Antic Stepper Motor Robot-Controller

Year
1986
Type
DIY project
Category
Motor control interface
Manufacturer
Homebrew design by Scott Kilbourne, Jon Holcomb and William Hall (Antic)
Stepper motor beside its small interface board with power transistors and a joystick-port cable

Overview

Stepper motors move printer heads and disk-drive heads in precise increments. In Antic, December 1986 (Vol. 5 No. 8), Scott Kilbourne, Jon Holcomb and William Hall showed how to make an Atari 8-bit their controller, "to roll a robot around, direct a photocell scanner from across a room, or move a manipulator arm". The authors' own use was raising and lowering a camera platform for micro-photography in precise steps. The program works on any 8-bit Atari with disk or cassette. The project needs enough electronics skill to read a schematic and solder a board. Antic tested the authors' interface and software but, unusually, didn't rebuild it from scratch before publishing.

How steppers work

A stepper has a permanent-magnet rotor and, usually, four stator coils. Energising the coils in sequence pulls the rotor round by a small, exact angle (typically 1.8° to 3.75°) and holds it there with strong torque. A controller has to sequence the coils and time the pulses, and it can count steps to know exactly where the motor is. That is a perfect job for a computer.

The interface

The joystick port provides four digital I/O lines, which is one per coil, plus +5 V and ground for the logic. The example motor is an Airpax 86402, a +12 V four-phase stepper with 1.8° steps. The authors found it surplus for $3.95, and the whole controller, motor and power supply came to under $25.

Each of the four channels has:

  • one section of a 7404 inverter, driven by a joystick-port line;
  • a diode from the 7404 to the transistor base, which keeps motor noise out of the computer;
  • a pull-down resistor that holds the transistor off until the computer drives it;
  • a 2N3055 power transistor switching the coil to ground;
  • a power resistor in the motor's current path to limit current and keep the motor cool.

Why inverted? A coil is powered when its port line goes low. After a system reset the Atari sets all four lines high, so with this arrangement nothing is energised until the program takes over. Otherwise all four phases would be powered at once and the motor would heat up.

Power: +12 V for the motor. An Atari 5200 power supply (11.5 V DC) is close enough, and the authors noted that surplus ones sold for $7–8.

Wiring the Airpax: the two red wires go to supply positive. The phase wires go yellow → Q1, orange → Q2, brown → Q3, black → Q4. The motor plugs into the board by a polarised connector, and the DB-9 goes into joystick port 1.

Build on perfboard (Figure 2) or an etched board (Figure 3). Socket the 7404, watch for solder bridges, and double-check the 2N3055 connections.

The software

STEPPER.BAS (type-in, checked with TYPO II) sets PORTA's low nibble to output through PACTL. It then steps through the coil-phase table for clockwise or counter-clockwise rotation (Figure 1 of the article gives the sequence for Airpax-type motors). It keeps track of position and offers fast moves in either direction, moves to a given point, point-to-point moves, speed adjustment and a "move complete" signal. Half-stepping is possible with a different coil table, but gives less torque.

Tips

  • Different motors have different coil arrangements. Get the phase sequence from the manufacturer.
  • If the motor stutters at full speed, the program is stepping too fast for it. Add a FOR/NEXT delay between steps.
  • 1980s parts suppliers listed in the article included John J. Meshna Jr. (steppers), Jerryco (11.5 V supplies) and H & M Engineering (a ready-made PC board). The authors' advice still holds: surplus steppers, of the kind found in printers and disk drives, are the cheapest way in.

Credits