StepRocker Motor Control (TMCM-1110)

Stepper Motor Control
           In this theory section, we'll get a quick reminder about how stepper motor works, and then look at what limit switches do. Stepper motors work in very specific way, a standard stepper motor will have two or more coils that charge and discharge when electricity is allowed to flow through them. The animation below illustrates that.


           When the coils are charged and discharged in a specific pattern (usually sequentially), it creates an electromagnetic attraction between the coil and the motor. When this occurs fast enough it makes the stepper motor turn, and we get the movement you see above.

Limit Switches
           A very common and very necessary component of commercial and industrial mechanics is the limit switch. This is often a mechanical switch that gets triggered when a stage or some other element of the mechanics reaches as far as it is allowed to travel.


           When the switch is triggered, it should tell your controller to stop moving in that direction, or else the mechanics might get damaged. In this article we'll use the limit switch to trigger what's called an interrupt, which means that all software will stop the moment the switch is pressed, and the motor will be told to stop.