Update StepperModes.md
This commit is contained in:
parent
6cc63a3e56
commit
d729aaa5dc
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
A typical stepper motor has two sets of coils, *A* and *B*. Applying a current to one or both coils creates a magnetic field that fixes the motor's position. Any changes to the direction and/or magnitude of the current flowing through the coils causes the motor to "step" to a new fixed position. By repeatedly changing the current flow according to a specific pattern the motor can be made to continuously step clockwise or counterclockwise. The specific pattern chosen, known as the *step mode* in the **StepperControl** class, determines the size of the step and overall performance of the motor. The speed at which changes to the current flow are made determines the speed at which the motor rotates. The modes supported by **StepperControl** are described below.
|
A typical stepper motor has two sets of coils, *A* and *B*. Applying a current to one or both coils creates a magnetic field that fixes the motor's position. Any changes to the direction and/or magnitude of the current flowing through the coils causes the motor to "step" to a new fixed position. By repeatedly changing the current flow according to a specific pattern the motor can be made to continuously step clockwise or counterclockwise. The specific pattern chosen, known as the *step mode* in the **StepperControl** class, determines the size of the step and overall performance of the motor. The speed at which changes to the current flow are made determines the speed at which the motor rotates. The modes supported by **StepperControl** are described below.
|
||||||
|
|
||||||
## FULL STEP TWO PHASE Mode(without PWM)
|
## FULL STEP TWO PHASE MODE (without PWM)
|
||||||
|
|
||||||
In this mode, a constant current is applied to both coils *A* and *B*. The motor is stepped by alternatively flipping the direction of the current flow in each coil as follows:
|
In this mode, a constant current is applied to both coils *A* and *B*. The motor is stepped by alternatively flipping the direction of the current flow in each coil as follows:
|
||||||
|
|
||||||
|
|
@ -12,7 +12,7 @@ Note that though the pattern repeats after four steps, it is not symmetrical -
|
||||||
|
|
||||||
Since in this mode each coil has only two possible states (i.e. the direction of the current flow), only one digital signal per coil is required to implement the stepping pattern. However, fully flipping the direction of the current flow in a coil changes the magnetic fields very rapidly, which creates a rather clunky motion when stepping the motor.
|
Since in this mode each coil has only two possible states (i.e. the direction of the current flow), only one digital signal per coil is required to implement the stepping pattern. However, fully flipping the direction of the current flow in a coil changes the magnetic fields very rapidly, which creates a rather clunky motion when stepping the motor.
|
||||||
|
|
||||||
## FULL STEP ONE PHASE Mode (without PWM)
|
## FULL STEP ONE PHASE MODE (without PWM)
|
||||||
|
|
||||||
In this mode, a constant current is alternatively applied to either *A* **or** *B*, while also flipping its direction as follows:
|
In this mode, a constant current is alternatively applied to either *A* **or** *B*, while also flipping its direction as follows:
|
||||||
|
|
||||||
|
|
@ -20,7 +20,7 @@ In this mode, a constant current is alternatively applied to either *A* **or** *
|
||||||
|
|
||||||
This mode uses only half the power as the FULL STEP TWO PHASE mode since current only flows through one coil at a time. Also, though the step size is the same, the transtition from one step to another is not as harsh since the current to each coil transtions from one direction to zero before flipping to the other direction. However, since in this mode each coil has three possible states for current flow (positive, negative, and off), two digital signals per coil are required to implement the stepping pattern.
|
This mode uses only half the power as the FULL STEP TWO PHASE mode since current only flows through one coil at a time. Also, though the step size is the same, the transtition from one step to another is not as harsh since the current to each coil transtions from one direction to zero before flipping to the other direction. However, since in this mode each coil has three possible states for current flow (positive, negative, and off), two digital signals per coil are required to implement the stepping pattern.
|
||||||
|
|
||||||
## HALF STEP Mode (without PWM)
|
## HALF STEP MODE (without PWM)
|
||||||
|
|
||||||
Though the the step sizes for the two modes above are the same, the set of positions they represent as the motor rotates are out of sync by 1/2 step. This means that by interleaving the four steps of the two modes together, we can create the following 8-step pattern where the step size is *half* that of a full step:
|
Though the the step sizes for the two modes above are the same, the set of positions they represent as the motor rotates are out of sync by 1/2 step. This means that by interleaving the four steps of the two modes together, we can create the following 8-step pattern where the step size is *half* that of a full step:
|
||||||
|
|
||||||
|
|
@ -30,7 +30,7 @@ The advantage of this mode is that the motor moves much more smoothly, and can b
|
||||||
|
|
||||||
One other disadvantage of this mode is that in four of the steps both coils are powered, whereas in the other four only one coil is powered. This results in uneven motor torque as the motor rotates, as well as different holding torques depending on which step the motor lies when stopped. Depending on your specific application (raising a shade, closing a door, etc.) this may or may not be of concern.
|
One other disadvantage of this mode is that in four of the steps both coils are powered, whereas in the other four only one coil is powered. This results in uneven motor torque as the motor rotates, as well as different holding torques depending on which step the motor lies when stopped. Depending on your specific application (raising a shade, closing a door, etc.) this may or may not be of concern.
|
||||||
|
|
||||||
## QUARTER STEP and EIGHTH STEP Modes (including PWM versions of the above modes)
|
## QUARTER STEP and EIGHTH STEP MODES (including PWM versions of the above modes)
|
||||||
|
|
||||||
In the above modes, current to each coil is either "fully on" in one direction, fully on in the other direction, or completely off. As a result, there is a trade-off between step granularity and smoothness of rotation versus power and torque consistency. The solution to this problem is to drive the current in each coil with a PWM signal (or an equivalent limiting mechanism) that allows the *magnitude* of the current flow to be controlled in addition to its direction.
|
In the above modes, current to each coil is either "fully on" in one direction, fully on in the other direction, or completely off. As a result, there is a trade-off between step granularity and smoothness of rotation versus power and torque consistency. The solution to this problem is to drive the current in each coil with a PWM signal (or an equivalent limiting mechanism) that allows the *magnitude* of the current flow to be controlled in addition to its direction.
|
||||||
|
|
||||||
|
|
@ -44,7 +44,9 @@ It is generally preferable to use the PWM method when running a motor in any of
|
||||||
|
|
||||||
In addition to providing better motor performance, the PWM method also provides for even more granular stepping modes by adding "microsteps" to the step pattern. For example, adding 8 additional steps between the half-steps, as indicated on the curves by the 8 black diamonds placed between the blue and red dots, yields a QUARTER STEP mode. This mode is twice as "smooth" as the HALF STEP mode, but requires twice as many steps for the motor to complete a full rotation. Halving the steps even further (not shown on the diagram) yields the EIGHTH STEP mode where each cycle contains 32 individual stepping points. **StepperControl** supports both the QUARTER STEP and EIGHTH STEP modes, though you can easily extend this further by adding modes with 64 or 128 steps per cycle. For motors designed to operate a window shade, such granularity is generally not needed, and too fine a granularity can cause misteps depending on the specific characteristics of the motor.
|
In addition to providing better motor performance, the PWM method also provides for even more granular stepping modes by adding "microsteps" to the step pattern. For example, adding 8 additional steps between the half-steps, as indicated on the curves by the 8 black diamonds placed between the blue and red dots, yields a QUARTER STEP mode. This mode is twice as "smooth" as the HALF STEP mode, but requires twice as many steps for the motor to complete a full rotation. Halving the steps even further (not shown on the diagram) yields the EIGHTH STEP mode where each cycle contains 32 individual stepping points. **StepperControl** supports both the QUARTER STEP and EIGHTH STEP modes, though you can easily extend this further by adding modes with 64 or 128 steps per cycle. For motors designed to operate a window shade, such granularity is generally not needed, and too fine a granularity can cause misteps depending on the specific characteristics of the motor.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
[↩️](../Stepper.md) Back to the Stepper Control page
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue