I am building a wheeled robot platform using a custom PCB, 4x A4988 and 4x NEMA 17 stepper motors. I am using steppers purely for precise speed and position control.
I recently had a PCB made, I was doing some testing today. I was able to successfully run one stepper motor from it. The power supply is a 16v lion battery pack. When I tried to run two, it ran briefly before I see a puff of smoke and notice that a PCB trace appears to have burnt up and come loose from the board. You can see the brown trace on the photo of my PCB I posted. It was the GND trace which is connected to each A4988, the power supply and an Arduino Nano.
I attempted to repair this fried trace by soldering an external jumper cable, when I ran circuit again, I was struggling to get the stepper to run consistently from the driver. I began troubleshooting with a voltmeter and another poof of smoke!
I have fried all four of my drivers as well as two Arduino Nanos. Feeling rather frustrated as I can seem to figure out exactly what's going wrong.
I have a feeling that I need to put a resistor between the GND of the main power supply and the Arduino GND, that's the best I could come up with for the fried Arduino.
As for the PCB traces exploding...I think the maybe there is too much current going through a PCB trace of that width?
I'm attaching a photo of my PCB. All help is appreciated. I'm a bit lost at this point.
If any more info is required let me know (diagrams etc).
Here is a link to my steppers (17HS4401)
Here is the code I was using. Bear in mind I have two A4988 drivers connected to same GPIO pins for each side of the robot
// defines pins numbers
const int stepPin = 6;
const int dirPin = 7;
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(50);
digitalWrite(stepPin,LOW);
delayMicroseconds(50);
}
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(50);
digitalWrite(stepPin,LOW);
delayMicroseconds(50);
}
delay(1000);
}

