Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Table of Contents
Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
http://www.instructables.com/id/ARDUINO-UNO-TB6560-Stepper-motor-driver/
Intro: ARDUINO UNO + TB6560 Stepper motor driver
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).
1 Arduino Uno
1 TB6560 Driver
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).
http://www.instructables.com/id/ARDUINO-UNO-TB6560-Stepper-motor-driver/
Step 2: THE CODE
/*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 (digitalRead(8) == LOW) {
digitalWrite(8, HIGH); }
else {
digitalWrite(8, LOW);
} // Reset our distance back to zero since we're // starting a new move
http://www.instructables.com/id/ARDUINO-UNO-TB6560-Stepper-motor-driver/
}
Any question, do not mind asking. In this video, i actually modified the code given so i can change the delay using a potentiometer.
Related Instructables
Advertisements
Comments
1 comments Add Comment
http://www.instructables.com/id/ARDUINO-UNO-TB6560-Stepper-motor-driver/