Tuesday, 2 October 2012

Replacing pololu stepper drivers with TB6560s

Edit - Update - Use DRV8825s instead.

I've noticed that this blog post is still getting referenced, so I feel an update is in order. I no longer recommend the TB6560s - they are a bit of work to install and very noisy. At higher currents this noise manifests as artefacts on the print. These days I've replaced my TB6560s with DRV8825s that fit in the sockets on my ramps board - They are less of a hassle than the TB6560s, take up much less room, make nicer prints and I can actually be in the same room as the printer as it isn't nearly as loud.

If I were building a new printer I would also consider the new SilentStepStick based on the TMC2100 as it also looks really nice. It should also be able to drive a lot of current, the spec is for 1.2 amp continuous which is pretty good.



During the end of July and early August this year we put together a reprap 3D printer.  I decided on the mendelmax as it looked rigid and I liked the use of  leadscrews rather than threaded rod.

The design uses the standard ramps board with pololu stepper drivers.  However, Dust (who kindly printed all my plastics) had noted that the y-axis on his machine was very heavy.  With that in mind, I sourced 2.5amp steppers and decided on replacing the pololus on the ramps board with boards based on the TB6560 which I got from ebay.


The only pololu I left was the extruder driver as it didn't need as high a current.  I soldered header pins onto the TB6560 which plug into the sockets on the ramps board.  It never knows that there aren't pololus in the sockets, so no firmware changes are necessary.   

The new drivers are pretty great, they are much easier to set the current on, you just toggle some switches rather than dial a surface mount pot on the pololus and hope you have set a reasonable current (to be fair, you can measure it, it is just annoying to do so).  They also allow me to run at 3amps continuous on all three axis, though it makes a lot of noise and is probably unnecessary except on the y-axis.  At three amps the 2.5amp steppers get very hot, and I started to become concerned about the PLA plastic the machine is built out of melting, so I cable tied a pair of old CPU heatsinks to the X and Y axis steppers (Z duty cycle is too low for it to get hot).  It looks pretty dubious but works really well the steppers barely feel warm.

All this allows the machine to run at some fairly silly speeds.  As I recall, the video below was taken at 300 $^{mm}/s$, 9000 $^{mm}/s^2$ acceleration and 20 $^{mm}/s^3$ Jerk



The machine does sometimes skip in the y-axis at these speeds, particularly when using Cura's default line fill; I've since dialed the acceleration and jerk down to 5000 $^{mm}/s^2$ and 15 $^{mm}/s^3$ and it doesn't seem to miss any steps.  Running that fast also produces heaps of artifacts in the prints, particularly on smaller radius arcs, the machine makes a kind of trilling sound and a wave pattern gets printed into the part.  So I generally run the machine much slower than this for part quality issues.

There were some problems with the stepper drivers I'm using, the 5v regulator on two of the boards was just DOA.  I "fixed" this by soldering a wire from the 5v out of the working regulator to the 5v out pad of the two dead regulators (after cutting the leg).  It works but the remaining regulator gets really hot but has so far been fine.

EDIT -- added some wiring information
The wiring from the pololu socket to the TB6560 board is as follows
Pololu TB6560
STEP $\to$ CLK+
DIR $\to$ CW+
EN $\to$ EN+

Connect the CLK-, CW- and EN- together (as you don't really need anything too fancy) and then run that to any ground pin on the pololo sockets.

EDIT 2
To help clear up the necessary wiring, I have bashed together an example wiring diagram for replacing the y-axis pololu driver with one of these TB6560 boards.  Please excuse the shoddy diagram, its 1.30am in the morning :P

38 comments:

  1. Very very nice ! I am considering having a similar setup since I need dual motors for each axis. I think an additional advantage is that you can run the motors at a different voltage (possibly 24v or more) than the rest of the circuit (normally 12V) with no further modifications. However, a second power supply will be needed.

    ReplyDelete
    Replies
    1. Hi glx51mm

      Yeah I run these guys at 24 volt. They do run at 12 volt but according to some comments on the youtube video, it looks like they may need a longer step pulse at 12 volt. Marlin uses 1.4us ish pulses and at lower voltages these drivers may need something more like 10us. Just something to keep in mind if you are planning on running at 12 volt.

      Delete
  2. Thank you for this howto. That is for me a much better solution than Pololu. Plus, this board is even cheapper. No more fragile and capricious trimpot. I have the same tb6560 driver on a CNC machine and it works great.

    ReplyDelete
    Replies
    1. Thanks :) Yeah I agree they are beter than pololus, the only downside being how big they are :P

      Delete
  3. Hi there i have had the same problem built a big reprap and dont have the power to move the heavy gantry tryed that new megatronic board but no luck
    are you still running this setup and have you had any troubles also what stepper motors are you using?

    ReplyDelete
    Replies
    1. Hi Ross. Yeah I am still using this setup. In fact I don't use any pololus anymore, even my extruder is driven by TB6560s.

      I'm using 2.5 amp nema17 steppers, not sure what brand. I'm currently running them at 3amps with big CPU heatsinks to keep them cool. If you are driving a really heavy setup you could always try nema 23 steppers, some of which the TB6560s will be able to drive.

      Delete
  4. hi andre thanks for the reply ive got mine all up and running also using nema17 but i have a problem every layer i print seems to move over so the dont line up any ideas ???is there nay chance you could put up a pic of your tb6560s driver configuration on the dip switches

    ReplyDelete
    Replies
    1. Hi Ross

      That sounds like your steppers are skipping steps. You can fix this by lowering your acceleration in your firmware and also reducing your printing speed. You could also try upping the current on the stepper drivers by toggling the switches. The drivers can supply up to 3amps which is a lot for a nema17 steppers and they can get very hot, potentially melting the 3d printed brackets they are in.

      Delete
    2. again thanks for your reply ive tried lowering the speeds have even going down to 8mm/s and still no luck what i don't get is the every thing in the layer is perfect only when it moves to the next layer dose it skip a step per say i think my problem is on the driver is self dont really understand it get the power setting but the rest i dont please could you sent me your switch settings EG:
      sw1: off
      sw2: on and so on thanks ross jacobs

      Delete
    3. Yeah my switches are:
      sw1: on
      sw2: on
      sw3: on

      Then on the dip swiches
      s1: off
      s2: off
      s3: off
      s4: On
      s5: Off
      s6: Off

      The first 4 switches (sw1,sw2,sw3 and dip1) determine current, so I am running at 3amps on my xaxis. This will make your stepper really hot without a heatsink.

      s2 determines how much current the stepper uses when it is holding (no step commands but still enabled) I have jsut felt this at 50% because I worry 20% might cause skipping due to vibration or something.

      s3-s4 determine the microstepping. I've set my to 16x microstepping. You lose some stepper strength doing that but the steppers are much quieter. (Though they are always a bit loud at 3amps)

      switch s5-s6 determine the decay setting. I've set mine to 0%, this seems to work best for me.



      Delete
  5. I have just receive the same driver I have bought on eBay.
    Happy to get away from A4988 Pololu.
    Lets go back to integrate those new things...

    ReplyDelete
  6. Is it possible to post a picture ?

    ReplyDelete
  7. For testing.
    Is it necessary to connect all the end stop and thermistor with a ramps just for testing the TB6560 with the motors?
    Because, in pronterface the card connect but with error "Error:0
    : Extruder switched off. MINTEMP triggered !
    Error:Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)"
    My machine is not finished yet.

    ReplyDelete
    Replies
    1. Hi Beausoleil

      Sounds like you are running Marlin or Sprinter on your board. Connecting the thermistor is the easiest way. It should be possible to disable the thermistor safety check but I'm not sure where that would be. Probably in the configuration.h file

      Delete
  8. Ha ha just noticed where your from :)
    i was pietermartizburg now Auckland :)

    ReplyDelete
    Replies
    1. Hah it is a small world :P How long have you been in NZ for?

      Delete
  9. almost 3 yrs now:) thanks for your help one more question
    have you removed the jumpers under the stepper drivers on your ramps board?

    ReplyDelete
    Replies
    1. Cool :) I have been here 15 years now :P The jumpers under the stepper drivers don't connect to the TB6560s at all so it doesn't matter, you can leave them on or take them off. I just left them on.

      Delete
  10. Hi André,

    I will try with the thermistor connected next time I test.
    Right now, I am into printing stepper driver mount and support for y axis rail.
    Thanks again for your help.

    ReplyDelete
  11. Hi.
    I see that you have extensive experience with this TB6560 drivers.
    I have a problem with them on a GEN7 board running Teacup firmware.
    I have the board from maket-city, it is based on ATMEGA644P and it is basically a GEN7.
    I inverted the EN line for the drivers and recompiled, but when I send commands to move x+ x- from pronterface, the drivers get enabled, but the steppers are not moving in any way.
    It really seems that either the pulses on STEP are too short, or is is possible that there is some check in software that doesnt send STEP to the drivers when there is nothing else connected?
    I connected only 1 driver, other else is disconnected: endstops, thermistor, hotend etc ...
    Could you help me modifying the firmware in order for these drivers to work?
    I need a lot of support.
    Thanks!

    ReplyDelete
    Replies
    1. Yeah if you are running 12 volts the steps might be too short. On 24v they are long enough though. You can build a pulse stretching circuit if you really need to. Running at 24v might be easier though

      Delete
  12. hey Andre
    dont know what im doing wrong have your setting on the drivers running them at 3amps and my ramps 1.4 is now running at 24v aswell and im still skipping steps on my x asis have calibrated it and its is spot on change my board baud rat to 250000 and this still did dent help any last ideas getting desperate here
    both my x and 7 have 2 steppers per a drive could this affect it ???????

    ReplyDelete
    Replies
    1. Hi Ross

      I'm not sure why you are still skipping steps. If your x-axis moves easily then it should be working. I read somewhere on the net about some of the cheap TB6560 boards having a capacitor of too low a value somewhere, which sometimes caused the board to skip steps. It is not a problem I have ever had though.

      If x is the only axis that skips, you could try swapping the x and y stepper drivers and see if the skipping changes to the y-axis. It is kinda of a long shot, but if you have one defective driver, it might point that out to you.

      Delete
  13. Hi Andre,

    The driver are working correctly with a Ramps 1.4.
    But the motors are kind of noisy.
    Is there something to do ?

    ReplyDelete
    Replies
    1. Yeah it is a problem with high current drivers. Keep adjusting the current down until you start skipping steps and then go back up one setting. Less current will give you less noise but that's about the best you can do.

      Delete
    2. Good to hear you have it going though :)

      Delete
  14. Do you mean the amps switch, because the other one have no really noticable effect.

    After burning one tb6560 (forgot to shut the psu... ;)

    ReplyDelete
    Replies
    1. Hi Beausoleil

      Sorry, I missed this message. The are 4 switches which control the amount of current the tb6560 will deliver. Sorry to hear about you burning one out

      Andre

      Delete
  15. Hi Andre,
    Do I need a resistor when wiring from the pololu socket to the TB6560 board ?

    ReplyDelete
    Replies
    1. Hi 政孝

      I didn't bother. So far so good :P

      Delete
    2. Thanks!
      It works!
      I will buy NEMA 23 stepper motors for my second reprap.

      Delete
  16. This comment has been removed by the author.

    ReplyDelete
  17. hi i replace all stepper drivers for ramps 1.4 with tb6560 im suffering from step skipping problem can you please provide the configuration settings for the printer i mean speeds and accelleration

    ReplyDelete
    Replies
    1. Hi Lasal

      This blog post was written a long time ago, I don't use the tb6560's anymore as they are too noisy. I'm using DRV8825 now.

      So I'm afraid I don't know what my speeds and accelerations were anymore - I'd try starting with low acceleration and speeds and working up to faster speeds.

      Delete
  18. Can someone help me?
    I am making this connection: (1X) RAMPS + (3X) TB6560 + (3X) NEMA 23. I checked in another link, where it says that the connection of the next image is wrong:

    http://3dtoday.ru/upload/main/b03/%D0%9C%D0%9E%D0%AF%20%D0%A1%D0%A5%D0%95%D0%9C%D0%90%20 % D0% 9F% D0% 9E% D0% 94% D0% 9A% D0% 9B% D0% AE% D0% A7% D0% 95% D0% 9D% D0% 98% D0% AF% 20% D0% B2 % D0% B0% D1% 802.jpg

    But I did not understand the comment that says it is wrong, because at first the RAMPS has the 5v pin. According to the following link.

    https://www.zonemaker.com/product/43/ramps-1-4-3d-printer-shield

    However, in this same link shows a totally different connection. Which is also more detailed in the following link:

    https://www.zonemaker.com/product/44/tb6560-3a-stepper-motor-driver-board

    And now, what is correct? It seems to me that there was a change of position between the + and - pins.

    In the image:
    http://3dtoday.ru/upload/main/b03/%D0%9C%D0%9E%D0%AF%20%D0%A1%D0%A5%D0%95%D0%9C%D0% 90% 20% D0% 9F% D0% 9E% D0% 94% D0% 9A% D0% 9B% D0% AE% D0% A7% D0% 95% D0% 9D% D0% 98% D0% D0% B2% D0% B0% D1% 802.jpg

    Cited above, the positive pins (EN + / CW + / CLK +) would be connected to the 5v of the RAMPS board, while the other negative pins (EN- / CW- / CLK-) are connected to the respective pins of each RAMPS driver.

    On the link the connection is the opposite, the negative pins (EN- / CW- / CLK-) are connected to the GND of the respective RAMPS driver, while the positive pins (EN + / CW + / CLK +) are connected to the other pins of the respective ramps driver.

    If the connection of the link I sent is correct, I had the following question: how do you get the other TB6560 drivers in the RAMPS? Should the negative pins of each TB6560 driver (EN- / CW- / CLK-) be connected to each GND of the respective RAMPS driver or should all GND drivers be connected to a single GND of the RAMPS? As the example of this current page:

    http://andre.team9.99.org.nz/2012/10/replacing-pololu-stepper-drivers-with.html

    It seems to me that in this example all the negative pins of all the drivers (EN- / CW- / CLK-) were connected in a single GND pin of one of the drivers in the RAMPS.

    Can someone help me with this connection?

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. Wow, this is an old post to come back to. Yeah you can connect the signal grounds together (they are connected together on the ramps board anyway) If you run into this again, you can easily check that they are connected together yourself, by using a multimeter or looking at the ramps board schematics. Also if you do any electronics you'll just know that the ramps board would have just one signal ground.

      I sort of recommend against TB drivers though - see comments above. The are very loud and this leads to bad prints, modern drivers are way better.

      If you're driving a small mill it might have the rigidity to mitigate some of this problem?

      Delete