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 attached to the positive motor power supply. Six-wire motors internally connect a with b and c with d; five-wire motors internally connect a, b, c, and d.
Figure One-a Figure One-b
Figure Two. The interface circuit to control unipolar stepper motors from a four-bit I/O …show more content…
This sequence interleaves the normal and wave sequences. It doubles the angular resolution of the steps, so a 200-step-per-revolution motor now takes 400 steps to complete a revolution.
3.2 The bipolar sequence.
Although we will defer the discussion of bipolar stepper motors, for completeness we present the step sequence here in Table Six. These motors cannot be half-stepped.
Table Six. The bipolar sequence.
Step C11 C12 C21 C22
1 -V +V -V +V
2 -V +V +V -V
3 +V -V +V -V
4 +V -V -V +V
3.3 Timing issues for stepper motors.
Since steppers are mechanical devices, the timing of the step pulses is important.
The motor must reach the step before the next voltage sequence is applied. If the step rate is too fast, the motor can react in one of several ways:
* it might not move at all, or * it could vibrate in place, or * it could rotate erratically, …show more content…
The code loads fcontrol.seq, from Ken Merk's article, to find the port and define the words to control the bits on the port. Several other files from the Forth Scientific Library are loaded as well: fpc2ans.seq loads an ANS-like layer on top of F-PC (a true ANS Forth would not need this), fsl-util.seq defines several utility words that are used throughout the Scientific Library, structs.seq loads the data structure words. The data structure sequence is defined to easily manage the sequence of values as defined in the sequence tables given in section 3.1 above. The sequence structures keep track of where in the sequence we are, so that there is no jump in the sequencing if one were to type 7 NORMAL STEPS, stopped to (say) read a sensor, and then continued on with another 7 NORMAL STEPS. This could be done with global variables instead of a data structure. However, the use of a data structure to contain this information is much more natural to extend, if the application were to require several stepper motors, than is the global variable