Hello I was running the following code but my driver started burning. It would be great if someone can tell me why so that I don't end up burning another one.
I am using Nema 17 bipolar motor and Arduino UNO board along with A4988 driver . I have attached the motor data sheet.
Thank You in advance.
const int stepPin = 5;
const int dirPin = 4;
void setup() {
pinMode(stepPin,OUTPUT);
pinMode(dirPin,OUTPUT);
digitalWrite(dirPin,LOW);
digitalWrite(stepPin,LOW);
} //change
void loop() { //change
digitalWrite(dirPin,HIGH); // Enables the motor to move in a particular direction
for(int x = 0; x < 40; x++) {
digitalWrite(stepPin,HIGH);
delay(3000);
digitalWrite(stepPin,LOW);
delay(3000);
}
delay(1000); // One second delay
digitalWrite(dirPin,LOW); //Changes the rotations direction
for(int x = 0; x < 40; x++) {
digitalWrite(stepPin,HIGH);
delay(2000);
digitalWrite(stepPin,LOW);
delay(2000);
}
delay(1000);
digitalWrite(dirPin,HIGH); // Enables the motor to move in a 1st direction
for(int x = 0; x < 80; x++) {
digitalWrite(stepPin,HIGH);
delay(3000);
digitalWrite(stepPin,LOW);
delay(3000);
}
delay(1000); // One second delay
digitalWrite(dirPin,LOW); //Changes the rotations direction to 2nd direction
for(int x = 0; x < 40; x++) {
digitalWrite(stepPin,HIGH);
delay(2000);
digitalWrite(stepPin,LOW);
delay(2000);
}
delay(1000);
digitalWrite(dirPin,HIGH); // Enables the motor to move in a 1st direction
for(int x = 0; x < 120; x++) {
digitalWrite(stepPin,HIGH);
delay(3000);
digitalWrite(stepPin,LOW);
delay(3000);
if (x==119){
while(true)/*Do nothing*/;
}
}
}
You must have some of your connections wrong. I don't think a program error could cause damage to the driver. And as that is a 400mA motor it should be well within the capability of the A4988.
The Pololu A4988 web page has a good wiring diagram.
NOTE that disconnecting a wire between the driver and the motor while the driver is powered can instantly destroy the driver. And that includes a brief disconnection due to a loose connection.
"Started burning" meaning what exactly? They chip will get far too hot to touch in normal
operation, and usually needs cooling. The DRV8825 is slightly better for dissipation, but both
need good airflow to avoid thermal cutout as they have to dissipate a watt or more in a tiny
package.
Thank you Robin2, MarkT and TomGeorge for the reply.
Robin2,
I might have some mistake in my wiring . But I have never disconnected my motor from driver while the the driver is powered. However, my motor and driver was really hot. Please refer the wiring diagram and let me know if there is any problem.
TomGeorge,
I have attached the wiring diagram for your reference. Please let me know if you think there is a problem.
MarkT,
Started burning means at the "VMOT" and "GND" location on the right top corner of the driver board I saw smoke coming out and then I saw flame out there.
I used a DC Regulated power supply to supply 19 V to the board .
I didn't get this " Check your solder connections with a magnifying glass and/or multimeter." which solder are you taking here. I got a new driver board I will check it before connecting to power supply.
Just to make sure. You are taking about the solder on the pins of the driver board right. If yes then I will make sure that the solder on pins don't make cross connection of pins on the new driver board.
But, To make connection with the power source, I used wires out of the bread board connected to the power supply with a help alligator clips.
jremington:
Did you set the current limit on the A4988 board correctly?
A too-high limit might damage the motor but the A4988 has thermal protection so it should just shut down without suffering damage. That's why I suspect a wiring problem. Maybe the power supply was connected the wrong way round?