How to drive a stepper motor easily using A4988 and Arduino

preview_player
Показать описание
Driving a stepper motor used to be complicated enough when we have to build a driver by ourselves. But since there are many kinds of driver modules out there, driving a stepper motor is not that hard anymore.
In this video, we will learn how to use the A4988 stepper driver.

You can support us and unlock premium projects code by joining our membership by clicking the link below:

You can find the full code and tutorial here:

Music :
"LAKEY INSPIRED - Chill Day" is licensed under a Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
Рекомендации по теме
Комментарии
Автор

nice buddy..but show us to use multimeter to measure the required current how slowly..

napkin
Автор

Hello, Iam really so gratful for this project because its worked well for my prototype. May God bless you abundantly

bonfaceosuka
Автор

Hi, how do you configure the pins of the motor means which pin of motor is pin no.1(connected to 2B). I am not able to do as I am using BJ42D22- 23V01 NEMA17 motor.

For me it is not working properly.

ShrutiSrivastava-nh
Автор

In your calculation the "2.5" value is a bit of a mystery. I assume it represents the "sense Resistor" value times the motors stepper setup percentage use (in my case this should be i00%). In another video the formula was "Imot x 8 x Sense Resistance (according to this guy the value "for most A4988"(?) for this resistance is 0.068 Ohms). With his calculation I get a VRef = 0.816 Volts and with your calculation I get a VRef = 0.600 Volts. Which is correct? How do I know (without burning up my stepper or driver)? The only Spec Sheet I found doesn't list a "Sense Resistor Resistance", where can I find this value reliably?

ZafodB
Автор

how is the code if we using switch sensor as a output of step = high (500 rotation) and dir =high
and then button switch to delay then change the dir=low step=high (500 rotation)

techdonk
Автор

i need to know what kind of stepper motor, please

imNobody
Автор

hello, please help, my motor is just vibrating. Also im usin 24v, is that the issue?

ritesha
Автор

It's really nice and helping vedio.How I can change the program as per my application. can you help me to change the program as per my requirement, for which I shall be very thankful to you.
S.N.MALIK
India.

eastindiacompany
Автор

How much amps and do you need for moving the motor? Does it get a good torque? Thanks!

ramirezkine
Автор

What’s the name of the part that you screw with the screwdriver?

KACZMARCZYK
Автор

Hi my friend, I have a question, and maybe you can help me, so, how can I control 2 motor to move at same time, can I take same signal for to drivers? Tks

ericksaucedo
Автор

Untuk barang2 nya apakah bisa di beli di online market place indonesia? Boleh tau untuk nama/jenis motor stepper nya?

pradanaputrak
Автор

i am facing the same problem had tried all the solutions changing wire combination, code, pins drivers but the motor is still sometime gives a beep only or rattles with beep and the strange thing is that motor is showing continuity in all four pairs, led blew up no matter what the wire combination is it show continuity on pairing 1, 2 -1, 3 -1, 4 and so on for all. I had tried running motor directly with arduino without motor driver and it is running, but facing issue while it is connected to CNC shield with A4988 driver.
I am using Arduino uno and motors are 4 pinned. Could you please tell me what I am doing wrong?

hppavilion
Автор

// A4988 Stepper Motor Driver Pins
const int dirPin = 7;
const int stepPin = 6;
const int enablePin = 5;

// Stepper motor steps per revolution
const int stepsPerRevolution = 200;

void setup() {
// Set the enablePin, dirPin, and stepPin as OUTPUT
pinMode(enablePin, OUTPUT);
pinMode(dirPin, OUTPUT);
pinMode(stepPin, OUTPUT);

// Enable the motor by setting enablePin LOW
digitalWrite(enablePin, LOW);
}

void loop() {
// Set the motor direction to clockwise
digitalWrite(dirPin, HIGH);

// Step the motor for one revolution
for (int i = 0; i < stepsPerRevolution; i++) {
digitalWrite(stepPin, HIGH);
delayMicroseconds(500); // Adjust this delay to control motor speed
digitalWrite(stepPin, LOW);
delayMicroseconds(500); // Adjust this delay to control motor speed
}

delay(1000); // Delay between rotations

// Set the motor direction to counterclockwise
digitalWrite(dirPin, LOW);

// Step the motor for one revolution
for (int i = 0; i < stepsPerRevolution; i++) {
digitalWrite(stepPin, HIGH);
delayMicroseconds(500); // Adjust this delay to control motor speed
digitalWrite(stepPin, LOW);
delayMicroseconds(500); // Adjust this delay to control motor speed
}

delay(1000); // Delay between rotations
}

pattisimus
Автор

What is the silver thing you stick on the top of the chip?

sampuraktalukdar
Автор

I would like to adjust the engine revs using various buttons, does anyone know if this is feasible?

bo
Автор

Eu estou com um projeto para uma maquina na area da serigrafia . Com motor nema 17 e um eixo T8 na vertical e uma chave fim de curso em cima e outra em baixo . E dois botoes um para ativa o moto para decer e para quando ativa a chave fim de curso e outro botao para subeir o motor e para quando ativa a chave fim de curso . Mais nao sei como vou fazer isso nao sei mexe com arduino e nem programa .esse meu projeto e bem simples espero um dia consegui .

INICIANTESDAARTE
Автор

How to drive two stepper motor using two Is it

harshadgunjikar
Автор

6:13 I can't get this voltage on my driver with little potentiometer. I get maximum 0, 03V. Where is the problem?

zvonimirculjak
Автор

Mau tanya bang, kalau motor nya tidak bisa berputar ccw itu kenapa ya? Padahal sudah sama seperti di video juga

vincentiusdhimasr.p.