Stepper Motors

2575 Words11 Pages
1. Introduction

This is the first in a series of articles on using Forth to interact with the real world. We will explore how to control motors of various types (such as servomotors and stepper motors), switch power to devices, and sense the environment. Each article will present a project that can be used to demonstrate the ideas we are going to discuss.

In this first article, I want to lay the foundation for the future columns and discuss the use of the PC parallel port to control stepper motors. We will adopt the fantasy that we are working on some microprocessor-based control application and will be using the PC parallel port as a proxy for the digital I/O channels on our controller. To the extent possible, the code will be
…show more content…
The control is relative, meaning that there is no way to determine the shaft position directly. You can only command the motor to rotate a certain amount clockwise or counter-clockwise from its current position. These "commands" consist of energizing the various motor coils in a particular sequence of patterns. Each pattern causes the motor to move one step. Smooth motion results from presenting the patterns in the proper order.

Features that stepper motors provide include:

* Excellent rotational accuracy * Large torque * Small size * Work well over a range of speeds * Can be used for motion or position control

There are two types of stepper motors:

* Bipolar motors, with two coils. These have four wires on them (see Figure One-a). They are tricky to control because they require changing the direction of the current flow through the coils in the proper sequence. We will discuss these motors further when we get to the topic of DC motor control. * Unipolar motors, with two center-tapped coils which can be treated as four coils (see Figure One-b). These have six or eight (or sometimes five) wires, and can be controlled from a microprocessor with little more than four transistors (see Figure Two).

Figure One. (a) The internal arrangement of the coils for a bipolar stepper motor. (b) The internal arrangement of the coils for a unipolar stepper motor. Wires a through d are
Get Access