A4988 Driver with Nema17 Stepper Motor

preview_player
Показать описание
In this video we will learn how to use A4988 stepper motor driver with Arduino to control Nema17 Stepper Motor.
Рекомендации по теме
Комментарии
Автор

If I don't want any delays (no stops), should I just remove the delay(1000); line?? I want it to switch directions without stopping.

SyedRizvi-iv
Автор

const int stepPin = 3;
const int dirPin = 4;

void setup() {
// Sets the two pins as Outputs
pinMode(stepPin, OUTPUT);
pinMode(dirPin, OUTPUT);
}
void loop() {
digitalWrite(dirPin, HIGH); // Enables the motor to move in a particular direction
// Makes 200 pulses for making one full cycle rotation
for(int x = 0; x < 200; x++) {
digitalWrite(stepPin, HIGH);
delayMicroseconds(500);
digitalWrite(stepPin, LOW);
delayMicroseconds(500);
}
delay(1000); // One second delay

digitalWrite(dirPin, LOW); //Changes the rotations direction
// Makes 400 pulses for making two full cycle rotation
for(int x = 0; x < 400; x++) {
digitalWrite(stepPin, HIGH);
delayMicroseconds(500);
digitalWrite(stepPin, LOW);
delayMicroseconds(500);
}
delay(1000);
}

xhptunz
Автор

Just burned the wires when putting 12 v in my bench power supply, what did I do wrong?

VishnuSomisetty-dwxp
Автор

Step pin and the direction pin. Right?

Zeddify
Автор

Can you send link to power supply you used please?

JacobRamos-kg
Автор

My motor is not rotating fully
And rotating only in one direction
Plz hepl....

mankiratsingh
Автор

do u have any arduino code for rotation base on degree?

vert