23 August 2002

Principles of Motion Control

by Paul Dito

At some point most amateur scientists will want to implement precise motion control over their equipment or experiments. Applications include anything that can be motorized. Robots are an obvious example, X-Y tables for positioning, plotters, strip charts, etc. In particular I will use the example of a computer controlled motorized telescope. Mel Bartels has developed an extremely popular and well designed system that is relatively easy to build. See sidebar for a link to his web site.

(http://www.bbastrodesigns.com/cot/cot.html)

The most accurate motion control systems are computer controlled. These systems are generally based on ‘stepper’ motors. Stepper motors are ideally suited for computer control due to their inherent design (as I will explain below). Other types of motors can be computer controlled, but they rely on various forms of feedback (in order to determine the position of the motor at any given time), which complicates the design of the system. For this discussion I will focus on stepper motors.

Most experimenters are familiar with DC motors. A constant current is applied to the motor, which energizes coils that are contained within a magnetic field. These coils are attached to the shaft and are connected via metal brushes, which allow the shaft to turn while supplying current. The current through the coils creates an electromagnetic field and the force of permanent magnets, mounted inside the motor, cause the coils to move. AC motors operate in a similar fashion. These types of motors have only two connections, reversing the current will also reverse the direction the motor turns.

Stepper motors are different in that have many coils that are energized in succession. This is evident by the bundle of wires coming from the body of the motor see (figure 1). Each coil that is energized moves the shaft a small distance (usually 1.8 degrees). The next coil is energized and the shaft moves another small distance. After a 1.8 degree stepper has been energized 200 times the shaft will have made one complete revolution. If the shaft is geared with a high ratio transmission a high degree of accuracy can be attained. Computers are ideally suited to control steppers because their outputs are typically ‘on’ or ‘off’, perfect for energizing coils.

There are two basic types of stepper motors, ‘unipolar’ and ‘bipolar’. These designations refer to the internal configuration of the coils. Unipolar steppers generally have 6 leads (some versions have more), while bipolar have 4. Bipolar steppers, while cheaper, are more difficult to drive as they require reversing the voltage across the coils to advance the shaft. Mel’s computer operated telescope design uses unipolar steppers.

figure 1: Various stepper motors

An animated representation of a stepper in action can be viewed here.

The outputs of most computers are meant to communicate with other computers or peripheral equipment, which don’t require much power, so they cannot control steppers directly. Steppers that will be of use to most amateur scientists require more voltage and current than a computer can provide, so there needs to be extra circuitry that can provide the power needed to drive the motors. This has the added advantage of isolating the computer from the drive system, thus protecting the relatively fragile computer outputs from short circuits or overvoltages.

Since modern computer operating systems control most of the computer hardware, it may be difficult to precisely control a stepper system. For experimentation you may want to obtain (or rescue from storage) an older computer that runs a DOS operating system. Processor speed and memory are generally irrelevant for experimentation, but the computer will need a working parallel port.

A typical computer controlled system will require, in addition to the computer itself, a separate power supply, the interface circuitry, the motors, and some sort of controlling software. Each of these subsystems is straightforward, with the exception of the software. In many ways the software is the most difficult part, as the many operating system platforms and programming languages can be difficult to master. That is the main reason I’ll base my example circuitry on Mel’s popular system: the software is well documented and has widespread support on the web.

So, next column we will discuss construction of an interface board for Mel’s control software. The circuit is basic enough that it can be built on a prototype board with point to point wiring techniques, but the overall system, when coupled with a PC and Mel’s software, can be very powerful. Until next time, check out Mel’s site, that should keep you out of trouble, and if that doesn’t have enough information for you, simply do a web search for ‘stepper motor’ using your favorite engine and you’ll get plenty of hits to keep you occupied….