Actions
Wiki » History » Revision 6
« Previous |
Revision 6/13
(diff)
| Next »
Frédéric Blanc, 2023-11-17 11:27
accelstepper¶
https://www.arduino.cc/reference/en/libraries/accelstepper/
#include <AccelStepper.h>
// for the Arduino Uno + CNC shield V3 + A4988 + FL42STH47-1684A
#define MOTOR_X_ENABLE_PIN 8
#define MOTOR_X_STEP_PIN 2
#define MOTOR_X_DIR_PIN 5
AccelStepper motor_X(1, MOTOR_X_STEP_PIN, MOTOR_X_DIR_PIN);
void setup()
{
motor_X.setEnablePin(MOTOR_X_ENABLE_PIN);
motor_X.setPinsInverted(false, false, true);
motor_X.setAcceleration(20);
motor_X.move(200);
motor_X.setMaxSpeed(100);
//motor_X.setSpeed(100);
motor_X.enableOutputs();
}
void loop()
{
motor_X.run();
}
Arduino CNC Shield V3¶
Arduino CNC Shield Scematics V3
Driver MOTOR¶
A4988¶
Courant MAX¶
Vref mesure tension entre GND et le potard
MaxCurrent=Vref x 2.5
1A => 0.4V
Microstepping¶
MS1 | MS2 | MS3 | Résolution Microstepping |
Low | Low | Low | Pas complet (full step) |
High | Low | Low | 1/2 pas |
Low | High | Low | 1/4 de pas |
High | High | Low | 1/8 ième de pas |
High | High | High | 1/16 ième de pas |
Updated by Frédéric Blanc about 1 year ago · 13 revisions