Trybotics Logo

ARDUINO UNO + TB6560 Stepper Motor Driver

DESCRIPTION

Hi. Good day

This is my first instructable. Hopefully anybody can comment if you want to ask question or correct me if i am wrong

Ok, this is tutorial to drive stepper motor using ARDUINO and TB6560 Stepper motor driver. You acctually can use EASYDRIVER but here i'm going to show you how to use it with TB6560. Advantage of using this driver are (a), Can change AMPs, (b) can stand high amp (More than 1Amp) and (c), can change the stepping easily. (full, half, 1/8 and 1/16 bridge).

OK, Let make it short. What you need to have

1 Arduino Uno

1 Stepper motor (Nema 17 @ Nema 23)

1 TB6560 Driver

1 Power supply ( 12V adapter works fine, support 10-35 V)

few Jumper wires and breadboard

Description:

Connection to arduino

pin 9 (Step pin) to CLK+,

pin 8 (Dir pin) to CW+,

CLK- and CW- connect to GND arduino.

Do not connect EN+ and EN- to any ARDUINO PIN.

Stepper motor connection, you need to know which color is A+, A-, B+ and B-, according to the stepper motor spec. sheet.

It only works for 1/8 step ( S3 and S4 on) and 1/16 step (S4 only on), half and full bridge does not work (for my case).

Amp setting can be change according to the table on the DRIVER.

Description:

/*Code from http://www.schmalzhaus.com/EasyDriver/Examples/Ea... */

int Distance = 0; // Record the number of steps we've taken void setup() {

pinMode(8, OUTPUT);

pinMode(9, OUTPUT);

digitalWrite(8, LOW);

digitalWrite(9, LOW);

}

void loop() {

digitalWrite(9, HIGH);

delayMicroseconds(100);

digitalWrite(9, LOW);

delayMicroseconds(100);

Distance = Distance + 1; // record this step // Check to see if we are at the end of our move

// two rotation for 1/8 bridge and 1 rotation for 1/6 bridge (for this code)

if (Distance == 3200) { // We are! Reverse direction (invert DIR signal)

if (digitalRead(8) == LOW) {

digitalWrite(8, HIGH); }

else {

digitalWrite(8, LOW);

} // Reset our distance back to zero since we're // starting a new move

Distance = 0; // Now pause for half a second delay(500);

}

}

Description:

Here is the result in youtube.

Any question, do not mind asking. In this video, i actually modified the code given so i can change the delay using a potentiometer.

(and this is for UNIPOLAR stepper motor - 4 wires), BIPOLAR - 6 wires also can use this driver as well but only 4 wire can be used and u need to check the spec. sheet which wire to connect to this driver. If You are using BIPOLAR stepper, please use BIPOLAR driver as you are not using your stepper motor to the highest potential (still can use UNIPOLAR driver) because UNIPOLAR Stepper motor give higher torque if you are using UNIPOLAR driver compare to BIPOLAR driver.

There are many others stepper driver for higher torque for example DQ860 and M542 (designated for HIGH torque stepper motor and i think it use the same concept. No harm trying. Use my method. If you are succesfully do that please leave a comment here. I will be very glad that i could help you !!!!

THANKS!!!!


YOU MIGHT ALSO LIKE