Interface Stepper Motor With Arduino Uno

A stepper motor is an electromechanical device which converts electrical pulses into discrete mechanical movement or steps.

  • This motor divides a full rotation of 360 degrees into a number of equal steps.

Stepper Motor Types

  • Stepper Motor are classified into two, based on its winding arrangement.
    • Unipolar Motor.
    • Bipolar Motor.


  • A unipolar motor has centre tapped windings.
  • By centre connections of coil are tied together and used as the power connection.
  • By this arrangement a magnetic poles can be reversed without reversing the direction of current.


  • Bipolar motor have no center tap connections.
  • Current through a winding should be reversed to reverse the magnetic poles.
  • So the driving circuit should be more complicated.
  • We can solve this by using a H-bridge connection or by using ready made chips such as L293D.

Driving of Stepper Motor : Stepping Modes

  • There are three types of stepping modes.
    • Wave Drive: One at On a Time,
    • Full Drive: Two at On a Time,
    • Half Drive : One or Two On at a Time.

Wave Drive

  • Only one stator electromagnet is energized at a time.
  • The torque is significantly less.
  • It is rarely used.

Wave Drive Stepping Sequence

Half Drive

  • One and two phases are energized alternatively .
  • Increase the angular resolution of the motor but the torque is less approximately 70%.

Half Drive Stepping Sequence

Full Drive

  • Two stator electromagnets are energized at a time.
  • The motor will run at its full torque.

Full Drive Stepping Sequence

L293D Motor Driver

  • L293D is a H-BRIDGE dc motor controller,which can control dc motor upto 36V.
  • Driver allow dc motor to rotate in both direction,which can interface and control two motor at a time with microcontroller.
  • Driver allow voltage to flow in both direction hence motor can rotate in both clockwise and anti-clockwise direction.

Direction Table

Hardware Required

  • Stepper Motor.
  • L293D Motor Driver.
  • Arduino.

Circuit Unipolar

Circuit Bipolar


 #include <Stepper.h>
 const int stepsPerRevolution = 200;
 Stepper myStepper(stepsPerRevolution, 8,9,10,11);
 void setup()
 // set the speed at 60 rpm:
 // initialize the serial port:
 void loop()