1

I have been trying to run stepper motor via Arduino Uno and A4988 motor driver via this tutorial: https://howtomechatronics.com/tutorials/arduino/how-to-control-stepper-motor-with-a4988-driver-and-arduino/ The schematic for my wiring:schematic

So far I have checked the connections multiple times, tried different Arduino boards and A4988 drivers, even tried using a DRV8825 driver, manually declaring HIGH for SLEEP and RESET pins and LOW for ENABLE via arduino. Checked with several batteries which show no problem, even had a friend check the motors via other different driver(YS-DIV268n) he had and the motors worked fine. I even tried increasing the current from driver via the potentiometer on it but none of these worked.

All this time I observed that the driver got hot quite a lot and that's it. The arduino code is as follows:

 *      
 *  by Dejan Nedelkovski, www.HowToMechatronics.com
 *  
 */

// defines pins numbers 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); }```

user89175
  • 11
  • 1

0 Answers0