GithubHelp home page GithubHelp logo

pololu / high-power-stepper-driver-arduino Goto Github PK

View Code? Open in Web Editor NEW
19.0 8.0 4.0 26 KB

Arduino library for Pololu High-Power Stepper Motor Drivers

Home Page: https://www.pololu.com/product/3730

License: MIT License

C++ 100.00%

high-power-stepper-driver-arduino's Introduction

High-Power Stepper Motor Driver library for Arduino

Version: 1.0.0
Release date: 2019-06-04
www.pololu.com

Summary

This is a library for the Arduino IDE that helps interface with a Pololu High-Power Stepper Motor Driver 36v4. It uses the Arduino SPI library to communicate with the SPI interface (SCS, SCLK, SDATI, and SDATO) of the driver.

Supported platforms

This library is designed to work with the Arduino IDE versions 1.8.x or later; we have not tested it with earlier versions. This library should support any Arduino-compatible board, including the Pololu A-Star controllers.

Getting started

Hardware

The HighPowerStepperDriver library supports Pololu's High-Power Stepper Motor Driver 36v4. Before continuing, careful reading of its product page is recommended.

You will need to connect your motor, motor power, and IOREF as described on the product page. You should also make the following connections between the Arduino and the driver:

Arduino High-Power Stepper Motor Driver
Digital pin 2 DIR
Digital pin 3 STEP
Digital pin 4 SCS
SCK SCLK
MOSI SDATI
MISO SDATO
GND GND

The SDATO pin is only needed if you want to read information back from the stepper driver. Since the motor can be stepped and its direction changed using the SPI interface, it is possible to use the driver without connecting the STEP and DIR pins, and they are not used in every example.

The SPI pins (MOSI, MISO, and SCK) on Arduino-compatible boards are sometimes not labeled. You should refer to the documentation for your particular board to find the locations of these pins.

Software

You can use the Library Manager to install this library:

  1. In the Arduino IDE, open the "Sketch" menu, select "Include Library", then "Manage Libraries...".
  2. Search for "HighPowerStepperDriver".
  3. Click the HighPowerStepperDriver entry in the list.
  4. Click "Install".

If this does not work, you can manually install the library:

  1. Download the latest release archive from GitHub and decompress it.
  2. Rename the folder "high-power-stepper-driver-arduino-arduino-xxxx" to "HighPowerStepperDriver".
  3. Drag the "HighPowerStepperDriver" folder into the "libraries" directory inside your Arduino sketchbook directory. You can view your sketchbook location by opening the "File" menu and selecting "Preferences" in the Arduino IDE. If there is not already a "libraries" folder in that location, you should make the folder yourself.
  4. After installing the library, restart the Arduino IDE.

Examples

Several example sketches are available that show how to use the library. You can access them from the Arduino IDE by opening the "File" menu, selecting "Examples", and then selecting "HighPowerStepperDriver". If you cannot find the examples, the library was probably installed incorrectly and you should retry the installation instructions above.

Documentation

For complete documentation of this library, including many features that were not mentioned here, see the high-power-stepper-driver-arduino documentation. If you are already on that page, see the HighPowerStepperDriver class reference.

Version history

  • 1.0.0 (2019-06-04): Original release.

high-power-stepper-driver-arduino's People

Contributors

kevin-pololu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

high-power-stepper-driver-arduino's Issues

Writing to chip select pin before setting the pin mode to output

Two lines of code seem to be in the wrong order in the definition of class DRV8711SPI in file HighPowerStepperDriver.h (lines 46-51)

void setChipSelectPin(uint8_t pin)
  {
    csPin = pin;
    digitalWrite(csPin, LOW);
    pinMode(csPin, OUTPUT);
  }

The call to pinMode should happen before attempting to write to the pin.

Arduino Uno

I am currently using an Arduino Uno and an ample power supply with my motor driver and I am getting appropriate voltage on all input wires to the motor driver but I am getting no output what so ever. I have copy and pasted you example code from the SPI example only changing the lines listed below:

sd.setCurrentMilliamps36v4(4200);

sd.setStepMode(HPSDStepMode::MicroStep256);

Any idea why I wouldn't be getting any output voltages from the driver?

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.