BACK
HOME
NEXT
Interfacing with
Stepper Motor
Basically a stepper motor consists of
coil windings. It is sequence of activation of these
windings that the rotation of the motor can be controlled.
Shown below is a schematic diagram of
a six-terminal stepper motor. We just named the terminals A, A1, and A2
for the first pair and B, B1, and B2 for the second pair.
To be able to control the stepper motor to rotate step
by step, each two windings of each pair should be activated alternately.
Below is an illustration of the steps needed for a stepper to be able to
rotate step by step forward and reverse rotation.
Where:
0 => No Current
1 => with Current
The interfacing circuit of a stepper motor is similar
to the interfacing circuit of a coil. We still need a current driver and a free
wheeling diode.
Stepper Motor Control
Program
A 12V stepper motor and two push
buttons are interfaced to D0 to D3 and S4 to S6 respectively of the
parallel printer port. Write a program that will control the motor to
rotate 24 steps clockwise if push button 1 is pressed and rotate 24 steps
reverse if push button 2 is pressed.
The program should end if push button 3
is pressed.
Interfaced circuit diagram
R5-R7 = 10k
Interfacing Circuit
Diagram
Here is the link of
the source code of the program:
Motor.CPP
BACK
HOME
NEXT
|