Skip to content

lemopsone/A4988Lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A4988

A4988 motor driver library

  • Constant speed movement
  • Movement by degrees and millimetres
  • Movement in local and absolute coordinate systems
  • Microstepping

Microstepping

The library can handle all microstepping modes supported by A4988 driver (up to 1/16)
Warning: high RPM + high microstep might not work properly as there is a speed limit for every motor.

Motor

Motor should be a 4-wire stepper motor or a 6-wire stepper motor in 4-wire configuration (leaving central wires out)

Connection

Configuration

Wiring

This pin-out works for the example (located in ./examples). All of these can be changed.

  • Driver to Arduino:
    • DIR - D9
    • STEP - D10
    • MS1 - 3
    • MS2 - 5
    • MS3 - 6
    • GND - Arduino GND
    • GND - Motor power supply GND
    • VMOT - Motor power supply
    • VDD - Arduino 5V
  • Driver to stepper motor (1A,1B,2A,2B, these vary on every motor, check coil specifications of your motor)
  • 100 uF capacitor between VMOT - GND
  • Make sure the motor power supply voltage is within the range supported by the driver board

Code

The sample code and its explanation are located in ./examples folder. To open it:

  • Launch your Arduino IDE
  • Go to File > Examples
  • Find the A4988 library on the list and open the desired example file.

Hardware

All you need is:

  • Arduino board
  • A4988 stepper motor driver
  • Stepper Motor
  • 100 uF capacitor

To-do

  • Add linear (accelerated) movement mode

About

Arduino library for A4988 stepper motor driver

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages