Skip to Content

Stepper Motor Driver A3967 Easy Drive v4.3

EasyDriver is a Stepper Motor Driver that can drive up to about 750mA per phase of a bipolar stepper motor. It defaults to 8 step microstepping mode. (So if your motor is 200 full steps per revolution, you would get 1600 steps/rev using EasyDriver.) This setting can be easily overridden by tying the MS1 and/or MS2 pin to ground to set the driver to use 1/8, 1/4, or 1/2 micro-step mode. It is a chopper microstepping driver based on the Allegro A3967 driver chip. It has a variable max current from about 150mA/phase to 750mA/phase and can take a maximum motor drive voltage of around 30V. It includes onboard 5V regulation, so only one supply is necessary. The best part - low cost.
24.15 AED 24.15 AED Tax Included
24.15 AED Tax Included

Not Available For Sale

This combination does not exist.

Stepper Driver Only

Terms and Conditions
30-day money-back guarantee
Shipping: 2-3 Business Days

 

 

Stepper Motor Driver A3967 EasyDriver Pinout Description:

  • GND: Three ground pins connected internally.
  • M+: Power input (6V to 30V, 2A+ clean supply).
  • A and B: Four motor connection pins for two coils.
  • STEP: Digital signal (0–5V or 0–3.3V) for stepping.
  • DIR: Direction signal; determines step direction.
  • MS1/MS2: Microstepping mode control:
    • 0,0 = Full step
    • 1,0 = Half step
    • 0,1 = Quarter step
    • 1,1 = 1/8 step (default)
  • RST: Reset pin (active low).
  • SLP: Sleep pin (active low).
  • ENABLE: Output disable when pulled high.
  • +5V: Regulated 5V output (not input), limited to ~50mA.
  • 3/5V JUMPER: Selects 3.3V or 5V logic level for control signals.APWR: Disconnects internal logic supply to use external 5V/3.3V Vcc.
  • EasyDriver Board

Stepper Motor Driver A3967 EasyDriver Step Resolution Table:

MS1 MS2 Resolution
low low Full Step (2 phase)
high low Half Step
low high Quarter Step
high high Eight Step

Code for Stepper Motor Driver A3967 EasyDriver with Arduino:

First, you need to download and add the AccelStepper library to the Arduino IDE.

#include <AccelStepper.h>

// Define the stepper and the pins it will use
AccelStepper stepper1(AccelStepper::DRIVER, 9, 8);

// Define our three input button pins
#define LEFT_PIN 4
#define STOP_PIN 3
#define RIGHT_PIN 2

// Define our analog pot input pin
#define SPEED_PIN 0

// Define our maximum and minimum speed in steps per second (scale pot to these)
#define MAX_SPEED 500
#define MIN_SPEED 0.1

void setup() {
  stepper1.setMaxSpeed(10000.0); // Set max speed higher than needed
  pinMode(LEFT_PIN, INPUT_PULLUP);
  pinMode(STOP_PIN, INPUT_PULLUP);
  pinMode(RIGHT_PIN, INPUT_PULLUP);
}

void loop() {
  static float current_speed = 0.0;
  static int analog_read_counter = 1000;
  static char sign = 0;
  static int analog_value = 0;

  if (digitalRead(LEFT_PIN) == 0) {
    sign = 1;
  } else if (digitalRead(RIGHT_PIN) == 0) {
    sign = -1;
  } else if (digitalRead(STOP_PIN) == 0) {
    sign = 0;
  }

  if (analog_read_counter > 0) {
    analog_read_counter--;
  } else {
    analog_read_counter = 3000;
    analog_value = analogRead(SPEED_PIN);
    stepper1.runSpeed();
    current_speed = sign * (((analog_value / 1023.0) * (MAX_SPEED - MIN_SPEED)) + MIN_SPEED);
    stepper1.setSpeed(current_speed);
  }

  stepper1.runSpeed();
}

Code Explanation:

The code uses `runSpeed()` instead of `run()` because it runs the stepper motor at a constant speed. Analog value reading and mathematical operations are spaced out to reduce delays. You can adjust `MIN_SPEED` and `MAX_SPEED` as needed.