This is copied from
http://www.mtclearsc.vic.edu.au/Robotics/Circuits.HTM
This code was originally devised to
optically encode shafts. The key to it is that only one data line ever changes
state at a time. This helped eliminate false pulses occurring when two leading
edges on an optical feedback system could not be synchronised perfectly.
It turns out that this is also an
ideal way to drive small stepping motors. The type of motor that is found in
the head transports of floppy disc drives are a cheap and practical source of
these motors for our experiments.
The motors are small and easy to
power for simple experiments. Even using a the simplest chip of all, a
TTL-Logic 7404 hex inverter is capable of turning a motor over. The power and
speed of the motor due to the low currents supplied by the 7404 chip limit the
motor considerably, but never the less do demonstrate the principle of 'Gray
Code' and the precision of a stepping motor over a free running motor.
The printer port on a computer has become a defacto general
input output port on many computers. Some have scanners, floppy disk drives,
SCSI drives, ZIP drives and even printers in some cases! This is all very well,
but it has meant that specialist I/O ports on the computers with any genuine
PIA style interface has been sadly lacking. However the printer port can also
be pressed into service by us as well. Quite a deal can be achieved even with
this limited resource.
In fact the limitations of the port
and the fantastic power of the computer to produce a dazzling array of software
commands to overcome these limitations is what these series of web-pages is all
about.

The above diagram demonstrates the
sequence of pulses that must be output on the printer port pins to produce a
rotation on the motor. The direction is chosen just for the example and the
opposing direction is given below.


People who understand these
diagrams will recognise that these motors are not energy misers. While they are
connected there is always current flowing in both coils. The direction of the
current thought the coils is simply alternated according to the Gray code and
the permanent magnet armature is forced to rotate in the center. There are no
brushes or commutator. This setup above will turn the average disk drive head
motor OK but has little power due to the output limitations of a hex-inverter.
Cheap though!

This chip is a line driver that was
used in the 'Econet Interface' of the BBC32k Computer made by Acorn. Anyone who
has run a network of any dimensions of these machines will probably still have
a few spare. They produce a compact and fairly powerful driver for the bipolar
motor. They will get quite hot at at times but don't seem to be damaged by it
all. Any other line driver that has similar characteristics could be pressed
into service. If you know of one please let me know!
All This page and connected pages
on this server are copyright Rob Ward 1998