What is a Stepper Motor

As the name implies, the stepper motor or simply step motor is a brushless, synchronous DC motor, moves in discrete steps to complete its rotation. In general case, each step in a stepper motor moves 1.8 degree and hence it takes 200 steps for a rotor to finish a single rotation. The stepper motors are also available with step angles 30, 15. 5, 2.5 and 2. The stepper motor is operated based on the principle of electromagnetism and can be controlled with or without feedback. Since its possible to control the positioning and speed of the motor precisely with the help of sophisticated computer controlled systems, the stepper motors are preferred in many precision motion control applications such as robotics.

How Does a Stepper Motor Work?

As in the case of any other motors, a stepper motor has a rotating part which is aptly called a rotor and a static part termed stator. The stator and rotor have magnetic poles and by energizing the stator poles, the rotor moves in order to align with the stator. A rotor is a central gear-shaped piece of iron. A stator is a set of toothed electromagnets arranged around the central gear.


When the phase windings of the stepper motor are provided with a current, corresponding magnetic flux will be developed in the stator in the direction perpendicular to the direction of current flow. Electromagnets are energized one at a time. When one electromagnet is energized with the help of an external driver circuit or a microcontroller, the rotor shaft turns in such a way that it aligns itself with the stator in a position which minimizes the flux opposition. That means the electromagnet attracts the gear teeth by which the electromagnet is offset from the rest of the electromagnets. Because of this, when the next electromagnet is turned on, the first electromagnet gets turned off which results in the gear teeth getting attracted to the second electromagnet. Thus the rotor is made rotating in steps which are an integer determined by the angle of movement in each step.

Stepper motors are widely used for precise motion control systems like industrial automation and for wide variety of robotic applications like arm movement controllers and systems like 3d printers etc.


Stepper motors can be directly interfaced with the motor relay board. Motor relay board has a built-in driving circuitry to controlled high current devices like stepper motors and the revolution of the motor is controlled by the micro-controller. Each step of the motor can be precisely controlled by the microcontroller with the help of the motor relay board.

A standard stepper motor terminals can be directly inserted into the OpenLab. The first six pins of the terminal block can be used for interfacing stepper motors

1st pin – VCC
2nd pin- first pole
3rd pin – second pole
4th pin- third pole
5th pin – forth pole
6th pin- GND

Motor relay board can be activated by turning on the switch on the top left side of the motor board. Connect the stepper motor terminals like the above description and tight the screws. The 12v external power supply can be used for high power stepper motors.

Short the last 4-pins of the of the bit selection header using the jumper cap. Motor test pins are used to debug motor relay board voltage levels and port test pins are used to debug the port voltage levels.

Interfacing Stepper Motor with Openlab

  1. Activate the motor relay board by turning on the switch on the top left side.
  2. Connect the motor relay board to port C using the FRC cable.
  3. Short the 4-bit selection headers using the jumper cap.
  4. In the below example, we should control a stepper motor using motor relay board.
  5. Wire the circuit like the above diagram.
  6. Burn the program into the controller.


Also refer: https://openlabpro.com/guide/stepper-motor-basics/https://openlabpro.com/code-library/

Spread the love, share this