loading

Hi,

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 */

#include

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:
myStepper.setSpeed(60);
// initialize the serial port:
Serial.begin(9600); }

void loop() {

// step one revolution in one direction:
Serial.println("clockwise");
myStepper.step(stepsPerRevolution);
delay(500);
// step one revolution in the other direction:
Serial.println("counterclockwise");
myStepper.step(-stepsPerRevolution);
delay(500); }

Step 3: Final Testing

The testing video.

I tried this but my stepper motor is running without Motor supply votage
<p>Woah very neat! Thanks for sharing!</p>
<p>Thanks MsSweetSatisfaction. This inspires me to share my creations.</p>
<p>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 </p>
thanks with your help i figured it out! here is a vid
thanks for your help! i was able to get it going here is a vid
<p>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.</p>
<p>I checked the datasheet and the only difference I see in the specifications is that L239DNE has 4 output and L239D has 2 output. For more info you can check the data sheet.</p><p><a href="http://www.mouser.in/ProductDetail/STMicroelectronics/L293D/?qs=sGAEpiMZZMvHdo5hUx%252bJYnEKXhctv3cN" rel="nofollow">http://www.mouser.in/ProductDetail/STMicroelectron...</a></p><p><a href="http://www.mouser.in/ProductDetail/Texas-Instruments/L293DNE/?qs=ZA235jQDfbp%2Fp7f5ThcsUA%3D%3D" rel="nofollow">http://www.mouser.in/ProductDetail/Texas-Instrumen...</a></p><p>Regards,</p>
How much current require for l293d to operate the 1A rating stepper motor?<br>
<p>hi.. im making a automatic roof extension for rain. im using the same <br>components as listed above and a rain sensor can you help me make a <br>codes :( i have a hard time making the codes.. Please help Thank you</p>
<p>I tried using pins 2,3,4,5 instead of 8,9,10,11 and its not working....plz help</p><p>thanksin advance</p>
<p>What current does your motor use? For example, I want to control a stepper that takes 1.7 A, only that I don't know if the L293D can handle that...</p>
<p>use L298 in that case</p>
<p>Thanks. You forgot to include the stepper library in your sketch. Here is the corrected code:</p><p>/*<br>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 */<br><br>#include &lt;Stepper.h&gt;<br><br>const int stepsPerRevolution = 200; // change this to fit the number of steps per revolution // for your motor<br><br>// initialize the stepper library on pins 8 through 11:<br><br>Stepper myStepper(stepsPerRevolution, 8,9,10,11);<br><br>void setup() {<br>// set the speed at 60 rpm:<br>myStepper.setSpeed(60);<br>// initialize the serial port:<br>Serial.begin(9600); }<br><br>void loop() {<br><br>// step one revolution in one direction:<br>Serial.println(&quot;clockwise&quot;);<br>myStepper.step(stepsPerRevolution);<br>delay(500);<br>// step one revolution in the other direction:<br>Serial.println(&quot;counterclockwise&quot;);<br>myStepper.step(-stepsPerRevolution);<br>delay(500); }</p><p>I have all these components and will try to build this thing.</p>
<p>Hello this helps a lot, thank you. I have a project that requires me to make an elevator with three floors, and an emergency stop. Was wondering if you'd be able to help. Thank you</p>
<p>from that code .. you can create a code for mini elevator using that IC ?? <br>we have project please help us :'( .. can you teach me .. tnx </p>
yes sure, you can build an elevator. share your exact requirement. i'' try to help as much as possible.
Nice ! I always wanted DIY drivers to reduce costs and space .

About This Instructable

49,716views

38favorites

License:

Bio: I am a Project Management Analyst at a reputed brand. Electronics and Photography are my hobby which I pursue on my weekends.
More by sureshmali:Home Automation using Raspberry Pi, Arduino, Domoticz, MySensors. Easy water overflow control switch(No IC no MCU) Bi Polar Stepper Motor with L293D and Arduino 
Add instructable to: