Go Down

Topic: Fried 2 Motor Drivers, not sure why (Read 286 times) previous topic - next topic

neongreen

Feb 12, 2018, 11:57 pm Last Edit: Feb 13, 2018, 12:41 am by neongreen
I am trying to set up an Arduino Uno (sparkfun red board) to control a stepper motor at a variable speed (which needs to be very accurate) based on a voltage input. The stepper is powered by a Rhino 24V/5A power supply.


I have fried two Big Easy Drivers (http://www.schmalzhaus.com/BigEasyDriver/index.html). Both times it was working for a few minutes.

The first time it was working fine, though I didn't have any of the micro-stepping code in it. Then I added the micro-stepping code, set to do half-step. It started spinning faster than it had on the previous code but when I turned the potentiometer (for voltage input to arduino) a little too far, it popped. The IC itself started on fire, not any of the caps or resistors.

The second time I used the exact code shown below, (no micro-stepping) and it ran for a bit and than burned the IC.

Code: [Select]
#define stp 2  // step controller
#define dir 3  // direction controller
#define MS1 4  // microstepping control 1
#define MS2 5  // microstepping control 2
#define MS3 6  // microstepping control 3
#define ENABLE 7  // enable motor control



// Declare Global Variables

int t=1000;

void setup() {

  // set digital pin modes
  pinMode(stp, OUTPUT);
  pinMode(dir, OUTPUT);
  pinMode(MS1, OUTPUT);
  pinMode(MS2, OUTPUT);
  pinMode(MS3, OUTPUT);
  pinMode(ENABLE, OUTPUT);

  // set microstep mode
  digitalWrite(MS1,LOW);
  digitalWrite(MS2,LOW);
  digitalWrite(MS2,LOW);
 
  digitalWrite(dir,LOW);
  digitalWrite(ENABLE, LOW);
 
}

 


void loop() {
 
  t = analogRead(A0);
  digitalWrite(2,HIGH);
  delayMicroseconds(t);
  digitalWrite(2,LOW);
  delayMicroseconds(t);
}



Any thoughts? Is my code killing motor drivers? Or should I look elsewhere?

jremington

#1
Feb 13, 2018, 12:06 am Last Edit: Feb 13, 2018, 12:07 am by jremington
Please post a link to the datasheet or product page for the step motors, or the motor ratings (winding resistance, maximum winding current), and post a complete wiring diagram (hand drawn, not Fritzing).

To what value did you set the winding current limit on the motor drivers?

Robin2

I would not expect code to cause the driver to fail.

A guaranteed way to ensure failure is to disconnect a wire between the motor and the driver while the driver is powered. A loose connection could allow that to happen.

I would not recommend fiddling with the current control while the motor is running. Set it to match the current required by your motor and leave it alone.

...R
Stepper Motor Basics
Simple Stepper Code
Two or three hours spent thinking and reading documentation solves most programming problems.

neongreen

Please post a link to the datasheet or product page for the step motors, or the motor ratings (winding resistance, maximum winding current), and post a complete wiring diagram (hand drawn, not Fritzing).

To what value did you set the winding current limit on the motor drivers?
https://cdn.sparkfun.com/datasheets/Robotics/57BYGH420-2.pdf

For the first driver, I'm not sure the setting of the current. Either max (2A) or min I think (the documentation says it's printed backwards on the board but I'm not 100% sure that's right. For the second driver, it was set right in the middle.

jremington

#4
Feb 13, 2018, 01:18 am Last Edit: Feb 13, 2018, 01:20 am by jremington
Those motors are rated for 2A/phase, which the Big Easy Driver cannot deliver on a steady state basis (despite the claims of 2A). 1.5 A is barely possible.

There is a procedure for setting the current limit, which you MUST FOLLOW. Set the current limit for less than 1.5 A/phase. Pololu has a good video showing how to do that with their A4988 boards.

However, Robin2 is right -- setting the wrong current limit should not lead to failure of the motor driver chip, it will just overheat and shut down.

A loose motor connection, or long power leads without using an extra 100 uF capacitor at the driver board, do lead to catastrophic failure. You must solder all motor and motor power connections directly to the board. Do not use a breadboard for those connections!

neongreen

However, Robin2 is right -- setting the wrong current limit should not lead to failure of the motor driver chip, it will just overheat and shut down.

A loose motor connection, or long power leads without using an extra 100 uF capacitor at the driver board, do lead to catastrophic failure. You must solder all motor and motor power connections directly to the board. Do not use a breadboard for those connections!
Ok so it sounds like I should be able to rule out current limit as the reason for my catastrophic failure, but I do need to review the process and do it properly.

The motor was attached to the driver via screw terminals. The connection was pretty secure, I'd be very surprised if they were losing contact. The wires are pretty long though, at about 24" or 600 mm.

neongreen

I would not expect code to cause the driver to fail.

A guaranteed way to ensure failure is to disconnect a wire between the motor and the driver while the driver is powered. A loose connection could allow that to happen.

I would not recommend fiddling with the current control while the motor is running. Set it to match the current required by your motor and leave it alone.

...R
Stepper Motor Basics
Simple Stepper Code

Thanks for the write-up! Definitely needed, most of the time basics are too basic, and advanced stuff goes waaaay too far into detail.

neongreen

Here is a diagram of my hardware setup.



jremington

#8
Feb 13, 2018, 04:40 pm Last Edit: Feb 13, 2018, 04:41 pm by jremington
Quote
The wires are pretty long though, at about 24" or 600 mm.
Long motor leads aren't a problem. However, long leads from the motor power supply are a problem.

See this note from Pololu. They recommend connecting a 100 uF or larger capacitor directly to the power input terminals on the motor driver.

neongreen

Long motor leads aren't a problem. However, long leads from the motor power supply are a problem.

See this note from Pololu. They recommend connecting a 100 uF or larger capacitor directly to the power input terminals on the motor driver.
Ahh ok. Sorry for my confusion. My motor power leads are about 8", and are actually just barely too large to fit in the 3.5mm screw terminals properly (I think about 18awg).

The Pololu note is interesting, I had no idea. Do you really think this phenomenon is affecting my devices? The failures didn't appear to have anything to do with powering up, they both happened after the motor was happily spinning...

Robin2

Does the BigEasydriver board includes the power-input-side capacitors?

If you don't need to control the micro-stepping selection with code you can just jumper the connections to 5v or GND without "wasting" Arduino pins on them.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

jremington

Quote
The failures didn't appear to have anything to do with powering up, they both happened after the motor was happily spinning
Have you set the current limit correctly?

neongreen

Does the BigEasydriver board includes the power-input-side capacitors?


...R
I think so. If I understand your question right, it looks like there is a 47 uF cap on the input.

http://www.schmalzhaus.com/BigEasyDriver/v1_2/BigEasyDriver_v12_sch.pdf



Quote from: jremington
Have you set the current limit correctly?
I did not. I am out of drivers, having burned up 2 of them, so I've orderd 5 Pololu A4988 drivers. I will attempt to do it correctly with my new drivers.

Robin2

so I've orderd 5 Pololu A4988 drivers.
I have some of them. They do not have capacitors.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Go Up