Controll a Stepper Motor With the DRV8825

9,753

40

3

Published

Introduction: Controll a Stepper Motor With the DRV8825

In this simple tutorial, I'll show you how to use the DRV8825 to control a bipolar stepper motor and how to use the micro stepping feature.

Step 1: Component List

Parts you'll need:

  • A bipolar stepper motor ( capable of +9V input )
  • The DRV8825
  • An Arduino
  • 100µF electrolytic Capacitator

Tools you'll need:

  • A breadboard
  • Some Jumpwires
  • A Power supply
  • A multimeter

Step 2: The DRV 8825

The DRV8825 is a simple but very powerful board that can control one bipolar stepper motor at the time and allows micro stepping up to 1/32 of a step.

PIN Description:

  • VMOT: Power supply for the motor ( from 8.2- 40V)
  • GND: Ground for the motor
  • B1 & B2: Pins for the first coil of the stepper motor.
  • A1 & A2: Pins for the second coil of the stepper motor
  • FAULT(inverted):
  • GND: Ground of the board
  • DIR: Direction of the motor has to be high for clockwise and low for a counterclockwise spin.
  • STEP: when this pin is high the motor spins one step further.
  • SLEEP (inverted): Puts the motor in a sleeping state when HIGH
  • RESET (inverted): Restarts the board when HIGH
  • M2, M1, M0: Pins for the micro stepping
  • Enable (inverted): Disables the Board when HIGH

Step 3: Connenting the Parts Togehter

In this step, I'll describe to modes for this stepper motor. The first one is very simple and the second one is when you want to do more complicated stuff ( micro stepping).

MODE 1:

Connect the parts as shown in the picture. please ignore the SLEEP and the RESET pin. You can use any Digital pins on the Arduino. be sure to change them in your code too.

MODE 2:

  • DIR - D8
  • STEP - D9
  • SLEEP - HIGH (Vdd)
  • GND - Arduino GND
  • GND - Motor power GND
  • VMOT - Motor power (check driver-specific voltage range)
  • A4988/DRV8825 micro step control
    • MS1/MODE0 - D10
    • MS2/MODE1 - D11
    • MS3/MODE2 - D12

Please ignore the RESET and the SLEEP PIN.

Step 4: Code

Code for Mode 1: please use the blink.ino

For step 2 please use the example code from this Library:

https://github.com/laurb9/StepperDriver

Good Luck and Have Fun!

Project by Alex Ghiriti and Marcel Büche

Share

    Recommendations

    • Casting Contest

      Casting Contest
    • Make it Move Contest

      Make it Move Contest
    • Woodworking Contest

      Woodworking Contest
    user

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

    Tips

    Questions

    3 Comments

    Not working!!

    I have no voltage at Vref.

    This is with two panucatt Devices 8825 and a Ramps 8825.

    Really getting depressed.

    Two years ago I had the panucat devices workng.

    Ralph

    It operates from 8.2 V to 45 V and can deliver up to approximately 1.5 A per phase without a heat sink or forced air flow (rated for up to 2.2 A per coil with sufficient additional cooling).