Content area
Full Text
In last month's column, I introduced the parallel-port experimenter's interface, a simple buffering device for use between an ordinary PC parallel port and a robot. That column described the interface and its construction. This time around, however, we'll talk about how to use the interface to control robotic functions, such as drive motors.
INTERFACING THE PORT
The parallel-port experimenter's interface is ideally suited to controlling your robot. But since the 74367 hex buffer/driver used in the interface circuit (see last month's column) is incapable of sinking or sourcing very much current, the circuit is unable to drive a motor directly. However, last month's circuit can drive a low-power relay or a power transistor.
Figure 1 shows a simple circuit in which a 2N2222 general-purpose transistor is used to drive a single-pole, double-throw (SPDT) relay. When a positive voltage (logical 1 ) is applied to the input of the circuit, Q1 turns on. Turning Q1 on provides a ground path through Q1 for the relay's coil, causing RY1 to turn on, feeding power to MOT1 (a small DC motor), which in turn causes it to rotate.
That circuit can easily be modified, allowing it to control the motor's direction of rotation in addition to the circuit's on/off operation by adding a second relay, as shown in Fig. 2. In the Fig. 2 circuit, RY1 is used to turn the motor on and off, while RY2 is used to change the motor's direction of rotation by reversing the polarity of the power applied to its terminals. (Obviously, that application requires a reversible DC motor. Most, but not all, DC motors are reversible. Make sure the one you select is fully reversible.)
Two such relay circuits connected to four data lines on the experimenter's interface can control two motors on your robot, providing full motion. By activating the four lines in special sequence, you can control the motors and their direction. A robot with two drive wheels mounted on each side of the unit can efficiently provide full stop, full forward, full reverse, and turning actions (see Fig. 3).
Note: There are a number of ways to connect motors to robot-control circuitry, and relays are but one method. Other methods include using discrete transistors, power MOSFETs, and...