Controlling Bipolar Stepper Motors with Arduino [without library]

Written by: admin@makezilla

Picture of Controlling Bipolar Stepper Motors with Arduino [without library]

Tools:

- Arduino UNO

- Breadboard

- L293D

- Stepper motor

- 12v adapter [or any power source that is suitable for your motor according to the datasheet]

- Jumper wires

Step 1: Understand how bipolar stepper motor works.

Please watch the first 14 minutes of the following video to understand the three excitation modes of the bipolar stepper motor:

 

Step 2: Recognize the names of your stepper motor wires.

Step 3: Complete your wiring

wiringDiagram.jpgUntitled Sketch 2_bb.jpg

Most of stepper motors draws very large amount of current that the arduino can't handle, so I'm using L293D dc motor driver [controlled by the Arduino] to provide the motor with the sufficient current. If you choose another DC motor driver, you should refer to its datasheet to know its proper wiring and whether you should wire flyback diodes or not.

Note that the L293D has its internal flyback diodes, so there is no need to put them.

Step 4: Decide which mode you'll use

Picture of Decide which mode you'll use2.jpg3.jpg

The most common excitation modes are:

# Two phase mode

# One phase mode, which draws the least current, and provides less torque than the two phase mode.

# Half stepping mode, which gives you more steps per revolution, but provides less torque.

Note that there is also the microstepping mode which I'll demonstrate in another instructable soon.

Using those tables, you'll be able to write a simple Arduino code to run your stepper (or jump to the next step).

Step 5: The Arduino Code

http://www.instructables.com/files/orig/FE4/PICA/IDWXLZ95/FE4PICAIDWXLZ95.ino

http://www.instructables.com/files/orig/F9Y/M579/IDWXLZ9L/F9YM579IDWXLZ9L.ino

http://www.instructables.com/files/orig/FN4/Q4UU/IDWXLZAJ/FN4Q4UUIDWXLZAJ.ino

Leave a Reply