Hello, pololu board. I’m used to electronics and robotics, but new to stepper motors and arduino (but I have some programming experience). Currently, I’m trying to get the A4983 Stepper Motor Driver Carrier (without regulators) to work with a surplus-bought stepper driver, a PC power supply, and an Arduino mega.
On the stepper driver board, I have VMOT and VDD attached to 12V and 5v (respectively) from the power supply. 1A, 1B, 2A, and 2B are attached to the wires from the motor. EN goes to pin 22 on the arduino, MS1 to pin 23, MS2 to pin 24, MS3 to pin 25, RST to pin 26, SLP to 27, STEP to 28, and DIR to 29.
Here is my arduino code:
int enable = 22;
int MS2 = 23;
int MS2 = 24;
int MS3 = 25;
int reset = 26;
int sleep = 27;
int stp = 28;
int direct = 29;
void setup() {
pinMode(enable, OUTPUT);
pinMode(MS2, OUTPUT);
pinMode(MS3, OUTPUT);
pinMode(reset, OUTPUT);
pinMode(sleep, OUTPUT);
pinMode(stp, OUTPUT);
pinMode(direct, OUTPUT);
pinMode(ledPin, OUTPUT);
digitalWrite(enable, LOW);
digitalWrite(sleep, HIGH);
digitalWrite(reset, HIGH);
digitalWrite(MS1, LOW);
digitalWrite(MS1, LOW);
digitalWrite(MS1, LOW);
}
void loop()
{
delay(10);
digitalWrite(direct, HIGH);
digitalWrite(stp, HIGH);
delay(100);
digitalWrite(stp, LOW);
delay(1000);
digitalWrite(direct, LOW);
digitalWrite(stp, HIGH);
delay(100);
digitalWrite(stp, LOW);
delay(900);
}
From my understanding, this should make it go one step one way, and one step the other way, repeating indefinitely.The catch is that I’m what I’m getting is a wonderful lack of movement.
The stepper driver I’m using is this one. It’s cheap, but, unfortunately a little low on specifications. I realize there are a lot of variables here, but mostly I want to know if this should be working, or whether I have the code or connections wrong.
Thanks!
-tim