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.
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
}