TB6600 stepper driver design works erratically and gets super hot!

Thread Starter

electrophile

Joined Aug 30, 2013
126
I designed my own TB6600 stepper driver and the schematic is shown here. Its powered by a 24V, 15A supply and I'm testing the design with a NEMA 23 2.8A stepper motor. The current sense value is 200mR (5 x 1R 1W resistors). The current limit is set at 2.5A, making the Vref = 1.5V. I'm testing this out with an Arduino and the code is also attached here. Essentially the code rotates it once through its 200 steps and then reversing the direction and then repeats again.

Q1 in the schematic is driven by the ALERT pin which as per the datasheet goes LOW when a thermal shutdown or over-current situation occurs. This essentially drives the EN pin low disabling the driver and the motor. Q2 and Q3 are for torque control. When the TQ pin is high, torque is set at 100% and when the pin is low its at 30%. Essentially when there is a stream of STEP pulses, the TQ pin is held high enabling higher torque. When the step pulses are less frequent the motor is driven at 30% torque.

Now here is the issue: The driver gets really really hot and I think its eventually going into thermal shutdown. I checked the ALERT pin voltage when the driver won't work and its LOW.

What am I missing here? Why is this tripping? Any help would be really appreciated.



Code:
// defines pins numbers
const byte dirPinX = 5;
const byte stepPinX = 2;
const byte enablePin = 8;

void setup() {
  // Sets the two pins as Outputs
  pinMode(dirPinX, OUTPUT);
  pinMode(stepPinX, OUTPUT);
  pinMode(enablePin, OUTPUT);

  digitalWrite(enablePin, LOW);
}

void loop() {
 
  digitalWrite(enablePin, HIGH);
 
  digitalWrite(dirPinX, HIGH); // Enables the motor to move in clockwise direction
 
  for(int x = 0; x < 200; x++) {
    digitalWrite(stepPinX, HIGH);
    delayMicroseconds(500);
    digitalWrite(stepPinX, LOW);
    delayMicroseconds(500);
  }
  delay(1000); // One second delay
 
  digitalWrite(dirPinX, LOW); // Enables the motor to move in anti-clockwise direction
 
  for(int x = 0; x < 200; x++) {
    digitalWrite(stepPinX, HIGH);
    delayMicroseconds(500);
    digitalWrite(stepPinX, LOW);
    delayMicroseconds(500);
  }
  delay(1000); // One second delay
 
}
 

Marley

Joined Apr 4, 2016
353
How is the motor current controlled? Is it by the resistors on NF-A and NF-B? Look up the data sheet and check that you have these correct. Might be best to change them so that the motor current is a fraction of the maximum allowed. Also have a close look at your PCB layout.

One thing for sure: nothing to do with your code!
 

bertus

Joined Apr 5, 2008
20,571
Hello,

It looks like Vref is way to high:

TB6600_current setting.png

You currently have an adjustable range of 0.7 - 4.3 Volts.
Adviced is 0.3 - 1.95 Volts.
It could now well be that the current limiting is to high.
Change R1 to 10K to get a range of 0.31 - 1.89 Volts.
This text can be found on page 7 of the TB6600HG datasheet.

Bertus
 

Attachments

Thread Starter

electrophile

Joined Aug 30, 2013
126
How is the motor current controlled? Is it by the resistors on NF-A and NF-B? Look up the data sheet and check that you have these correct. Might be best to change them so that the motor current is a fraction of the maximum allowed. Also have a close look at your PCB layout.

One thing for sure: nothing to do with your code!
Yes NF-a and NF-b are what form the current limiting equation. I've followed the datasheet and set them at 0.2R. What in particular should I look at in the PCB layout?
Hello,

It looks like Vref is way to high:

View attachment 123642

You currently have an adjustable range of 0.7 - 4.3 Volts.
Adviced is 0.3 - 1.95 Volts.
It could now well be that the current limiting is to high.
Change R1 to 10K to get a range of 0.31 - 1.89 Volts.
This text can be found on page 7 of the TB6600HG datasheet.

Bertus
True. I've set the Vref at 1.5V in the current setup to limit the current at 2.5A. I'll make the tweak you've suggested to keep it within 1.95V.
 

Thread Starter

electrophile

Joined Aug 30, 2013
126
The current waveforms (essentially voltage across the sense resistor) are as shown below:

For Full step resolution:


For 1/4 step resolution:


For 1/16 step resolution:
 
Top