Bi Polar Stepper Motor With L293D and Arduino





Introduction: Bi Polar Stepper Motor With L293D and Arduino


I had a Bi Polar stepper motor lying, which I'll be using to create a Dolly for my DSLR.

Components used:

  1. Arduino Uno
  2. Stepper Motor ML17A3 B (This is the model no printed on motor)
  3. Breadboard
  4. L293D
  5. 9v Battery Pack
  6. Some Jumper cables

To make the connections, follow the circuit diagram.

Step 1: Connections on Breadboard

The images show the step by step connections made on bread board. I started off with GND pins and then to the motor and then Arduino and finally the Battery Pack.

Step 2: Code

I used the code from Arduino IDE. I tried with stepper_OneRevolution and stepper_OneStepAtATime example and they worked fine. The code is listed below.

This program drives a unipolar or bipolar stepper motor. The motor is attached to digital pins 8 - 11 of the Arduino. The motor should revolve one revolution in one direction, then one revolution in the other direction. Created 11 Mar. 2007 Modified 30 Nov. 2009 by Tom Igoe */


const int stepsPerRevolution = 200; // change this to fit the number of steps per revolution // for your motor

// initialize the stepper library on pins 8 through 11:

Stepper myStepper(stepsPerRevolution, 8,9,10,11);

void setup() {
// set the speed at 60 rpm:
// initialize the serial port:
Serial.begin(9600); }

void loop() {

// step one revolution in one direction:
// step one revolution in the other direction:
delay(500); }

Step 3: Final Testing

The testing video.

2 People Made This Project!


  • Paper Contest 2018

    Paper Contest 2018
  • Pocket-Sized Contest

    Pocket-Sized Contest
  • Science of Cooking

    Science of Cooking

We have a be nice policy.
Please be positive and constructive.




what battery I have to use with nema17 and L293d...please I need this for my project...please

I tried this but my stepper motor is running without Motor supply votage

Thanks MsSweetSatisfaction. This inspires me to share my creations.

hi am trying to move the stepper motor in case sensitive. i need to run the motor in the first 90degree and 180, 270,380 this is for both counter and clock wise direction can u help me pls

can you tell me what is the difference between l293d(st) and l293dne(texas instruments).because motor driver board which use l293d able to rotate the motor while l293dne cannot.

How much current require for l293d to operate the 1A rating stepper motor?

hi.. im making a automatic roof extension for rain. im using the same
components as listed above and a rain sensor can you help me make a
codes :( i have a hard time making the codes.. Please help Thank you

I tried using pins 2,3,4,5 instead of 8,9,10,11 and its not working....plz help

thanksin advance