Home > ARDUINO, CNC, Hobby, Step Motor > Arduino Uno and Single Axis TB6560 Step Motor Control

Arduino Uno and Single Axis TB6560 Step Motor Control

The Step motor and arduino step driver setup

Single3 axis stepper driver bought on bay

A very cool stepper motor from Oriental Motor

Bipolar stepper motor from oriental motor.

Cable Annotation

A+ Black

A- Green

B+ Red

B- Blue

White and yellow are center tap cables discarded in this configuration

Stepper driver configuration

The stepper driver power:+12V

running current 3 A

microstep  1:1

const int STEP_PIN = 13;
const int Enable_PIN = 3;
const int DIR_PIN = 2;
void setup()
   pinMode(STEP_PIN, OUTPUT);
   pinMode(Enable_PIN, OUTPUT);
   pinMode(DIR_PIN, OUTPUT);
   digitalWrite(STEP_PIN, LOW);
   digitalWrite(Enable_PIN, HIGH); //When device turned on,
                                   //stepper is off
   digitalWrite(DIR_PIN, HIGH);


void loop()
         digitalWrite(Enable_PIN, LOW);
         digitalWrite(DIR_PIN, HIGH);
         int b=2500;
 int a=10000;
   for (int i=0; i < 60000; i++)
//        a=a-2;
        if (a<=b) a=b;
        else a=a-10;
        digitalWrite(STEP_PIN, HIGH);
         digitalWrite(STEP_PIN, LOW);


  1. sunghan chu
    17 August 2016 at 10:08

    Hello, i try to control stepping motor and i confused the relation between arduino and motor driver line(how to connect). Would you give me a tip ?

  2. stan
    11 February 2017 at 04:21

    stepper library required in sketch

  3. Aghil
    12 March 2017 at 17:42

    We are building a machine which need a small stepper motor controle. We need to controle stepper motor using joystick and potentiometer by interfacing with arduino.
    We plan to use 10 kg-cm torque motor(3A) 12v.
    TB6560 driver joystick and potentiometer.
    We need to rotate motor in two direction and adjust the speed via potentiometer. Can you please help us to do the connection and program the arduino.We dont have much time.

  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: