Introduction: Using a Single-Axis TB6560 Stepper Driver With GRBL/RAMPS
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.
- Enable on GRBL/RAMPS to EN+
- STEP on GRBL/RAMPS to CLK+
- DIR on GRBL/RAMPS to CW+
- CLK- to GND (has to be a GND from the GRBL/RAMPS board)
- CW- to GND (has to be a GND from the GRBL/RAMPS board)
- 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.
- Connect positive power to the +V on TB6560
- 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!
We have a be nice policy.
Please be positive and constructive.
How to switch xyz limits