0% found this document useful (0 votes)
5 views

Arduino and TB6600 setup

The document provides instructions for setting up a TB6600 stepper motor driver with an Arduino, detailing the necessary connections and pin assignments. It includes an Arduino sketch that controls the motor's direction and stepping, along with guidelines for configuring dip switches and adjusting current. Proper setup ensures the motor operates effectively without stalling.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Arduino and TB6600 setup

The document provides instructions for setting up a TB6600 stepper motor driver with an Arduino, detailing the necessary connections and pin assignments. It includes an Arduino sketch that controls the motor's direction and stepping, along with guidelines for configuring dip switches and adjusting current. Proper setup ensures the motor operates effectively without stalling.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

TB6600 with Arduino Setup

Connect to the stepper motor Connect to the power


Connect to the Arduino: supply. (Watch polarity)
1. CLK-, DIR-, EN- connect together AND connect to GND on
Arduino
2. CLK+ Connect to PIN 9 on Arduino
3. DIR+ Connect to PIN 8
4. EN+ Connect to GND on Arduino

//Arduino Sketch based on easy driver

int dirpin = 8;
int steppin = 9;
int enable = 7;

void setup()
{
pinMode(dirpin, OUTPUT);
pinMode(steppin, OUTPUT);
digitalWrite(enable, HIGH);
}
void loop()
{
int i;
digitalWrite(dirpin, HIGH); // Set the direction.
delay(100);
for (i = 0; i<4000; i++) // Iterate for 4000 microsteps.
{
digitalWrite(steppin, LOW); // This LOW to HIGH change is what creates the
delayMicroseconds(400); Ensure that dip switches are set correctly.
Adjust current as outlined on the M1,M2,M3 NOT ALL in ON or OFF position (see
digitalWrite(steppin, HIGH);
board. Use multi-meter to table below
delayMicroseconds(400); // This delay time is close to top speed for this
measure the current.
} // particular motor. Any faster the motor stalls. M1 M2 M3 Mode(Excitation)
digitalWrite(dirpin, LOW); // Change direction. Standby mode (Operation of the
delay(100); OFF OFF OFF
internal circuit is almost turned off.)
for (i = 0; i<4000; i++) // Iterate for 4000 microsteps
OFF OFF ON 1/1 (2-phase excitation, full-step)
{
1/2A type (1-2 phase excitation A type) (
digitalWrite(steppin, LOW); // This LOW to HIGH change is what creates the OFF ON OFF
0% - 71% - 100% )
delayMicroseconds(400);
digitalWrite(steppin, HIGH); 1/2B type (1-2 phase excitation B type) (
OFF ON ON
delayMicroseconds(400); // This delay time is close to top speed for this 0% - 100% )
} // particular motor. Any faster the motor stalls. ON OFF OFF 1/4 (W1-2 phase excitation)
ON OFF ON 1/8 (2W1-2 phase excitation)
} ON ON OFF 1/16 (4W1-2 phase excitation)
Standby mode (Operation of the
ON ON ON
internal circuit is almost turned off.)

You might also like