Using a Single-Axis TB6560 Stepper Driver With GRBL/RAMPS

47,655

63

40

About: I like woodworking, as well as just about anything that has to do with computers or electronic software/hardware. I also like bitcoins, a respected computer cryptocurrency. If you are like me and like my Ins...

I developed an obsession with laser engravers and CNC routers and 3d printers. I first bought a Printrbot that worked perfectly out of the box. For two years I played with it, adding minor upgrades like a heatbed. I decided to print myself a laser engraver that used NEMA17 stepper motors. After a few tries, it came out nearly perfectly. I used an Arduino Uno with the super cheap GRBL shield and A4988 drivers available on eBay (<$10 worth of electronics to control this project). I never had an issue.

Following this success, I decided to get a CNC though. With 3A 24v NEMA23 steppers, the intention was to use the exact same electronics and just turn up the little power controls on the stepper drivers. This caused nothing but problems, and after hours of frustration at these little, underpowered devices, I decided there must be a better way. But I still wanted to use the Uno and the GRBL shield from eBay because they had worked flawlessly on the laser engraver.

After hours of research, I discovered cheap $5 single-axis stepper drivers on eBay called the TB6560 Stepper Driver. I ordered up 5 of them and fell in love a couple hours after setting them up as they fixed all my problems. After setting them up, I decided to try one out on my second 3D printer (a cheap delta on which the extruder stepper motor skipped during fast printing). Of course, it worked great. As there was almost no documentation anywhere online, I set out to make this instructable.

The Important Part (TL;DR): The A4988 stepper driver sucks for many reason. The TB6560 single-motor driver board (not one with a parallel port that is designed as an all-inclusive controller board) is cheap and great! The RAMPS/GRBL driver/breakout boards, when connected with an Arduino and have the GRBL/RAMPS firmware, work great and have widespread support. This instructable goes through the wiring procedure for using all of the same electronics as if you used an Arduino/RAMPS/GRBL/A4988 (obviously not both RAMPS and GRBL), but replaces the tiny A4988 with a large, useful driver called the TB6560. It is rather simply, and makes everything less self-contained, but overall it will significantly increase torque and ease of configuration of larger motors.

Step 1: Required Parts

1. All of the parts required to build a CNC or 3D Printer (way beyond the scope of this tutorial). The important part for this tutorial is the stepper motors.

2. Either a RAMPS Shield for an Arduino Mega (designed for 3D printer control) or a GRBL shield for an Arduino Uno (designed for CNC control)

3. Either an Arduino Mega or an Arduino Uno (depending on the decision made in step 2)

4. As many TB6560 controllers as you have stepper motors (plus maybe an extra in case you accidentally break one)

5. Male to Male header pin cables (pack of 40 is sufficient)

6. ~18 to 24 Gauge wire

7. A board to mount everything on, as well as screws to mount everything (I'd suggest getting this from a hardware store after you have the rest of the parts to view spacing, etc.)

Where to buy: Everything listed above (with the possible exception of the mounting board) can be purchased on eBay (it's where I got all my parts).

Step 2: Begin Connecting the TB6560 to the GRBL/RAMPS Shield

This first step is quite easy. The picture on this step shows all the necessary connections.

On the RAMPS/GRBL shield, there are 2, eight-pin connectors for where the A4988 motor drivers are meant to connect. Recall that instead of the A4988, we are using the TB6560. Obviously they don't have the same form factor, so we have to improvise. On this step, 6 connections are required.

In the picture, you have to imagine that the A4988 driver fits into the GRBL board such that the Enable pins line up (on the RAMPS/GRBL shield there is always one marked "EN" so you can line up the orientation correctly). Insert the male-male header pins into the pins on the GRBL/RAMPS board, and then into the screw terminals of the TB6560.

The following connections should be made.

  1. Enable on GRBL/RAMPS to EN+
  2. STEP on GRBL/RAMPS to CLK+
  3. DIR on GRBL/RAMPS to CW+
  4. CLK- to GND (has to be a GND from the GRBL/RAMPS board)
  5. CW- to GND (has to be a GND from the GRBL/RAMPS board)
  6. EN- to GND (has to be a GND from the GRBL/RAMPS board)

Instead of taking three individual wires from the GRBL/RAMPS board to the TB6560 for the three ground connections (CLK-, CW-, EN-), consider just joining one ground wire from the board to all three GND's on the board using some spare wire. Each of these goes to an optoisolator to prevent against connection issues. Do not connect these grounds to the power input ground (explained in the next step) or you may cause interference and run in to issues in the future.

Step 3: Begin Connecting Power to TB6560

In this step, two connections are made to the TB6560 from the PSU.

  1. Connect positive power to the +V on TB6560
  2. Connect negative power (GND) to the GND on TB6560

Additionally, connect positive and negative power to the input power pins on the GRBL/RAMPS shield. This step may not be necessary, but is still advised to prevent uncertainty in troubleshooting later (including ground loop issues, as well as powering hotends, etc. on a RAMPS board).

Step 4: Connect Motors to the TB6560

This step is the easiest. Cut and strip the connectors off of the stepper motors (if they came with them), and screw them into the four stepper connection terminals of the TB6560 (which should be the only four terminals without wires in them already). As many steppers are different (especially the cheap ones from eBay), refer to the datasheet for your stepper, or just experiment until it actually spins instead of making awkward noises during testing.

Step 5: Adjust Power and Other Settings on the TB6560

This is the moment where you really start to see the advantage of the TB6560 over the A4988. Instead of trying to spin a tiny potentiometer with a screwdriver, praying you won't break it, you get to use slide switches to set the driver.

Silk screened right onto the driver are the instructions for its configuration, including the motor current (which should be taken from the datasheet of your stepper motor), decay % (which has to do with the amount of breaking vs coasting when the motor isn't powered anymore...play with this as there is no right/wrong answer and depends on your application), stop current (which has to do with the amount of current applied to achieve the decay %), and the excitation mode (which is the microstepping setting, which will also be configured in the firmware in the steps/mm options). Most of these settings can be adjusted at will, and even during operation to determine the optimal choices for your machine (all machines and motors may be different). The picture on this step shows all the final wiring configuration.

Step 6: Test It Out

Flash GRBL or some other firmware to the Arduino (not covered in this tutorial), put the shield on the Arduino, connect to it with the computer, and see how your stepper drivers work. Hopefully I explained everything sufficiently. As with any instructable, if there's anything that needs to be better explained or documented, feel free to comment and I'll do my best to explain. Enjoy!

Share

    Recommendations

    • Frozen Treats Challenge

      Frozen Treats Challenge
    • Colors of the Rainbow Contest

      Colors of the Rainbow Contest
    • Pets Challenge

      Pets Challenge

    40 Discussions

    0
    None
    Mazs shaikh

    Question 4 months ago

    can I use 12V 2A adapter for TB6560 driver with Nema 17

    1 answer
    0
    None
    RafaelM166

    6 months ago

    I'm using l298 to control a dc motor, so gnd from power needs to be connected to gnd Arduino/ramps and l298 gnd, and I want to use tb6560 to control another motor (stepper). if I connect en-, clk-, cw- to gnd ramps, it already connected to power gnd, and it is not recommended. what should i do?

    0
    None
    Gaurav_Baindur

    7 months ago

    Would this be capable of driving more than one motor, or is there a way to do it, maybe using certain configurations or switching circuits !

    1
    None
    dapiguyGaurav_Baindur

    Reply 7 months ago

    It is considerably lower power/current than the TB6560, and is therefore useless in driving motors larger than NEMA17 (and even then, it can struggle). It has poor heat disipation as well.

    0
    None
    Gaurav_Baindurdapiguy

    Reply 7 months ago

    Ah okay, I used it while making my friend's final year project but didn't seem to have any issues but yes the motor was Nema 11 I think !

    0
    None
    BrentR1

    3 years ago

    Looks like we've had similar journeys with stepper drivers. I'm really, really tired of worrying about them. Now, I'm not great at this stuff, so maybe I missed a couple of steps. BUT, at the point where you're piggybacking on the CNC shield, why don't you just toss the shield and interface with the arduino directly? https://github.com/grbl/grbl/wiki/Interfacing-with...

    Adds a bit more complication in other ways, but I'm going to give it a shot when my "test unit" comes in.

    3 replies
    0
    None
    dapiguyBrentR1

    Reply 3 years ago

    So there are two reasons I'm piggybacking on the shield: one is because with my RAMPS setup with the 3D printer, there is no other option. All the bells and whistles that are on the board (extruder heaters, normal motors, etc.) make it so that wiring everything up without the board is nearly impossible. Seeing how I only needed to swap out a single A4988 for a TB6560, it made the most sense to do it with the method described here. It is therefore compatible with anything that uses an A4988.

    The other part that comes into play here is that all the endstops are easily connectable through the shield. All the spindle enables and the coolant controls are easily accessible. The reset switches and feed holds, etc. are easy to hook up to. Even each axis is broken out quite nicely (so when I want to do a minor tweak 5 months from now, I won't have to pull up all the documentation to figure out which pin is X/Y/Z STEP/DIR. In reality, I lied a little bit about plugging the STEP/DIR wires right into the A4988 breakout pieces...on the left side of the GRBL shield, there is a breakout of all the STEP/DIR pins...that's where I plugged everything into. The enables are broken out nicely within the motor driver breakouts too though, which is another reason it's easier than going right off of the Arduino's output directly. In the end, after all is said and done, you'd get the exact same result (with maybe a little more confusion, maybe a little less depending on how things go) either way you decide.

    0
    None
    Englishbydesign99dapiguy

    Reply 1 year ago

    Hi I'm so glad you did this I've spent so loing trying to get my GRBL shield connected to my TB6600 and you are the closest I could find.

    However the names of the pins are different on both my GRBL v.3 and on the TB6600. This is what I have:

    If anyone could give me some help I would be very happy indeed.

    TB6600_to_GRBL-V.3.jpg
    0
    None
    BrentR1dapiguy

    Reply 3 years ago

    Thanks for taking the time to respond! You're right--I went that way. Finally able to use Protoneer's pi hat! Theoretically! Real curious how well it will work.

    0
    None
    dkwatson

    2 years ago

    Very useful ...able. I too, have had great success with the Toshiba chip, both the unit you're showing, and its big brother the TB6600. The latter simply beefs up the spec from 3 to 5 A and up to 45 V. In reality this means less heat. I run a 3 axis, chain driven plywood cutter on an open-ended 1.5m bed with PrimoPal 57s, 24 V, 2 A, in the tropics, average daily temp 30C. Some minor issues with the 6560, no problems with the 6600. A nice unit comes from China, the HY-DIV268N-5A. Maybe 12 bucks a pop but have their own Alum housing with a heat sink about 4 times the size. My breakout board with the A4988s sits on the shelf waiting for me to replace the chips which have all burned out, past about 350 mA.

    3 replies
    0
    None
    ZenM4dkwatson

    Reply 1 year ago

    Sir this wiring diagram aplicable to tb6600?

    0
    None
    dkwatsonZenM4

    Reply 1 year ago

    The 6560 and 6600 are NOT pin compatible and I suspect this was done intentionally to avoid mixing the two. In fact Vcc and SGnd are swapped at pin 6 so that pretty much kills the idea. In practical application however, the signals, regardless of the pin of origin, still perform the same function. The A and B outputs to the motor (bipolar hybrids) can be hooked up any way you wish as long as the pairs stay together (i.e. black/green, red/blue). Flipping them will just change the response to the DIR (CW) signal. From the MCU you have the three connections, CLK, CW and GND. Both ENABLE connections and the CLK- and CW- can be grounded to signal ground.

    While both Toshiba chips have the ability to be software controlled as far as microstepping is concerned, I have yet to see a product that does other than run the pins out to a DIP switch. Personally I like the software control, I use it like a transmission say at x8 for slow speed and then drop to x1 (full step) at high speed. Anyhow, back to the 6560/6600. Aside from the higher capacity with the 6600, the biggest difference is in the required duration of the CLK pulse. 6560 documentation says 30us. If you're at x8 microstep running 1000rpm, you're sending a pulse every 37.5 us, no room for a 50% duty cycle there. If you could programmatically change the microstep , no problem, but you're stuck with the DIP switch setting. Never mind, with the 6600 the CLK pulse spec in now 1us - just like everybody else. This may have been conservative on behalf of Toshiba rather than stating results may be unpredictable. I have run NEMA23 motors at over 2000rpm using both controllers, although I never did count steps to see if any were missing.

    Bottom line, plan for the 6600 as I believe the 6560 will go out of production before too long. In concept, the wiring is fine. You can wire the 6560, 6600. 4988 and 8825 all the same except for the MS connections.

    Have fun.

    0
    None
    ZenM4dkwatson

    Reply 1 year ago

    ok sir i need to research more and asking experts like you, thanks a lot sir for helping noobies like me. thumbs up

    0
    None
    primos23

    1 year ago

    Muy buen aporte inclusive funciona sin el driver pololu A4988. muchas gracias

    0
    None
    m.mohanlalJ

    1 year ago

    I hv arduino uno - cnc Shield v3-Dev 8825

    Can in this combination tb 6600 or tb 6560 works instead of dry 8825

    0
    None
    BurkayKirnik

    1 year ago

    Is it any problem with using drv8825 instead of tb6560 in any project? I am making a cnc machine and I want to use drv8825, not tb6560 because its cheaper. I am not using Arduino btw. I am gonna use this:

    http://urun.gittigidiyor.com/bilgisayar-tablet/cnc...

    1 reply
    0
    None
    dapiguyBurkayKirnik

    Reply 1 year ago

    The DRV8825 can't output as many amps, doesn't have as easy of mechanism for controlling the amp limit, and doesn't have as good of heat dissipation. For these reasons, it can't really be used to run powerful NEMA23 or similar motors, hence the desire for the TB6560.