Hardware Reference
In-Depth Information
Half-Step Drive (Mode 2)
Figure 6-8 illustrates the drive waveforms for half-step drive mode. As in full-step mode,
an overlapped drive is applied to the field coils. Unlike full-step mode, the overlap occurs
on the first third and the last third of a given coil's drive. For two-thirds of the waveform,
there is overlapped drive. In the middle third, only one winding is active.
Figure 6-8. Half-step drive
This mode provides increased angular resolution but suffers from having less torque
(about 70% of full-rated torque). 59
Software
To demonstrate stepper-motor driving without getting into a complex assignment, the
program unipolar.c simply positions the shaft of the motor to various hour positions of
the clock, based on single-key commands.
With a pointer attached to the shaft of your motor, press 6, and the motor will point
at 6 o'clock. Press 3, and the motor figures out that it is quickest to step counterclockwise
back to the 3 o'clock position. Press 7, and the motor steps forward to 7 o'clock. All of
this, of course, requires that you point the shaft at 12 o'clock before you begin (the motor
provides no information to the program about where it is currently pointing).
The program presented uses the GPIO pin assignments in Table 6-2 for driving the
stepper motor (your wire colors may differ):
Table 6-2. GPIO Assignments Used by the Program unipolar.c
GPIO
GENX
P1
Mode
Stepper Wire
ULN2003A
Description
17
GEN0
P1-11
Output
Red
1B
Field A
24
GEN5
P1-18
White
2B
Field B
22
GEN3
P1-15
Brown
3B
Field C
23
GEN4
P1-16
Green
4B
Field D
 
 
Search WWH ::




Custom Search