Stepper_Motor_Shield_For_Arduino_DRV8825__SKU_DRI0023-DFRobot

Introduction

Do you want to do some projects with stepper motors such as a drafting instrument, a 3D printer, an auto curtain, etc...? As we all know, regular stepper motors are hard to drive, but with this stepper motor shield, you can easily drive 2 stepper motors via just 6 digital I/O’s. This board is compatible with the Arduino UNO R3. Directly supports Xbee and Xbee form factor Wi-Fi, Bluetooth and RF modules. Easy connection of cables via screwless PC terminals. Each stepper motor has a code switch for adjusting driving modes, to obtain different rotational speeds. Interfaces of the board include extension 6 channel Analog I/O, 8 channel Digital I/O & I2C. Stepper motor is a brushless DC electric motor that divides a full rotation into a number of equal steps. The motor's position can then be commanded to move and hold at one of these steps without any feedback sensor (an open-loop controller), as long as the motor is carefully sized to the application in respect to torque and speed.

Specification

Pin Out& Diagram

Stepper Motor Shield For Arduino(DRV8825)

Motor wiring diagram

D8 D12 M1 M2
Low Low ENABLE ENABLE
High Low DISENABLE ENABLE
Low High ENABLE DISENABLE
High High DISENABLE DISENABLE

*Dip switch settings for Microstep resolution:

MS1 MS2 MS3 Microstep Resolution
Low Low Low Full step
High Low Low Half step
Low High Low 1/4 step
High High Low 1/8 step
Low Low High 1/16 step
High Low High 1/32 step
Low High High 1/32 step
High High High 1/32 step

*IO voltage select

DRI0023_connector1.png

Sample code


/*
This sample code is for testing the 2 stepper motors
The rotation velocity can be adjusted by the code switch
Microcontroller: Arduino UNO
*/
int M1dirpin = 7;  //Motor X direction pin
int M1steppin = 6; //Motor X step pin
int M1en=8;  //Motor X enable pin
int M2dirpin = 4;  //Motor Y direction pin
int M2steppin = 5; //Motor Y step pin
int M2en=12;  //Motor Y enable pin

void setup()
{
  pinMode(M1dirpin,OUTPUT);
  pinMode(M1steppin,OUTPUT);
  pinMode(M1en,OUTPUT);
  pinMode(M2dirpin,OUTPUT);
  pinMode(M2steppin,OUTPUT);
  pinMode(M2en,OUTPUT);

  digitalWrite(M1en,LOW);// Low Level Enable
  digitalWrite(M2en,LOW);// Low Level Enable

}
void loop()
{
    int j;
  delayMicroseconds(2);
  digitalWrite(M1dirpin,LOW);
  digitalWrite(M2dirpin,LOW);
  for(j=0;j<=5000;j++){
    digitalWrite(M1steppin,LOW);
    digitalWrite(M2steppin,LOW);
    delayMicroseconds(2);
    digitalWrite(M1steppin,HIGH); //Rising step
    digitalWrite(M2steppin,HIGH);
    delay(1);
  }
}
For any question/advice/cool idea to share, please visit DFRobot Forum.

More