Coder Social home page Coder Social logo

a4988lib's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.