The SparkFun AutoDriver is a sophisticated stepper motor driver that offers a versatile solution for driving bipolar stepper motors in various applications. It is based on the STMicroelectronics L6470 chip, which provides advanced features such as adjustable current control, microstepping, and built-in overcurrent protection. This driver is suitable for projects requiring precise motor control, such as 3D printers, CNC machines, and robotics.
Pin Number | Name | Description |
---|---|---|
1 | VMOT | Motor power supply (8V to 45V) |
2 | GND | Ground connection |
3 | B1 | Motor coil B connection 1 |
4 | B2 | Motor coil B connection 2 |
5 | A1 | Motor coil A connection 1 |
6 | A2 | Motor coil A connection 2 |
7 | VDD | Logic power supply (3.3V or 5V) |
8 | STBY | Standby pin (active low) |
9 | FLAG | Fault flag output |
10 | BUSY | Busy pin (active low) |
11 | SCK | SPI clock input |
12 | SDI | SPI data input |
13 | SDO | SPI data output |
14 | CSN | SPI chip select (active low) |
15 | STCK | External clock input (optional) |
16 | STEP | Step input |
17 | DIR | Direction input |
18 | RESET | Reset pin (active low) |
Power Connections:
Motor Connections:
Control Connections:
Configuration:
Operation:
Q: Can I drive two motors simultaneously with one AutoDriver?
Q: What is the maximum step frequency?
Q: How do I set the current limit?
#include <SPI.h>
#include <SparkFunAutoDriver.h>
// Define the chip select pin for the AutoDriver
#define CSPin 10
// Create an instance of the AutoDriver
AutoDriver motor(CSPin);
void setup() {
// Start the SPI bus
SPI.begin();
// Reset the AutoDriver
motor.resetSettings();
// Set the motor current limit (value depends on the motor)
motor.setCurrent(100); // 1A current limit
// Set the step mode (microstepping)
motor.setStepMode(STEP_FS_128); // Full step with 1/128 microstepping
// Enable the motor
motor.enable();
}
void loop() {
// Move the motor one step forward
motor.move(FWD, 1);
delay(100);
// Move the motor one step backward
motor.move(REV, 1);
delay(100);
}
Note: The above code is a simple example to demonstrate basic motor movement. For more advanced features and configurations, refer to the SparkFun AutoDriver library documentation and the L6470 datasheet.