COMPLETE TMC2130 for RUMBA

Discussion in 'Guides, Mods, and Upgrades' started by MyMakibox, Apr 6, 2018.

  1. MyMakibox

    MyMakibox Well-Known Member

    Joined:
    Mar 19, 2014
    Messages:
    58
    Likes Received:
    18
    #1 MyMakibox, Apr 6, 2018
    Last edited: Apr 7, 2018
    moshen and Paul Begley like this.
  2. Paul Seccombe

    Paul Seccombe Well-Known Member

    Joined:
    Oct 22, 2015
    Messages:
    88
    Likes Received:
    29
    It would certainly be good to have a write up for the community. I've thought a few times about doing this mod myself but have to admit that at the moment I'm going to curb my BigBox updates until the new tool-changing beast is available as I have put my name on the waiting list.
     
  3. gearmesh

    gearmesh Well-Known Member

    Joined:
    Feb 21, 2016
    Messages:
    165
    Likes Received:
    13
    I think it would be great if you did a write-up.
    I want to do the upgrade but the information is so scattered it makes it difficult to attempt without putting my machine at risk of being out of commission.
     
  4. MyMakibox

    MyMakibox Well-Known Member

    Joined:
    Mar 19, 2014
    Messages:
    58
    Likes Received:
    18
    OK - I'll write a few posts and then compile it into one howto.

    --------------
    TMC 2130s

    Why?

    * Like all the recent TMC's, they provide quiet or silent operation.
    * Unlike the TMC2100s, they are smart in a way that benefits 3D printers. [edit to incorporate DC42's comments] They provide software control and monitoring. They can intelligently set and tune current, detect overheating before problems arise, detect movement problems from missed steps and so on. Together these mean fewer failed prints.
    * They provide "sensorless homing", meaning the printer can detect that the print head has encountered an obstacle, instead of requiring an end-stop to be activated. The main benefits are that you won't get the damage from the print head trying to force its way through obstacles, and printer wiring can be simplified.


    What you need to know

    * TMC2130s on different axes provide different benefits. The obvious ones are X and Y, where the quietness, control of heat, current and sensorless homing are big advantages. On the Z-axis, Marlin provides a mechanism to level the bed left-to-right. On the extruder, they may be useful in identifying extrusion problems that cause missed steps. I only have X and Y for now.
    * The key to an installation is preparation. The TMC2130s are not plug-in replacements for other steppers. You need to be enabled with firmware and wiring to be in place before they will move the axes at all. Most of the preparation is hardware and firmware that can be done away from the printer - it only takes a minute to replace the old steppers, connect wiring to RUMBA and flash the firmware.
    * Marlin support for the TMC2130s is recent and not complete. There will be additional functionality from future software upgrades.
    * Most of the online support is for RAMPS boards. My how-to will focus on the RUMBA which came with your BigBox.
    * Duet users will secretly be fuming with envy. The TMC2660s on are Duet are fantastic, but more general purpose, and lack a couple of the 3D-printer features of the 2130s. Be careful not to gloat too much - Duet users paid a lot for their kit.


    Where to get them.

    * The Marlin site says "We recommend getting the original Watterott drivers or the revised FYSETC v1.1 drivers to avoid additional headaches." So avoid the FYSETC v1.0s
    * I got mine here for about US$10 each.


    What else is required

    * For wiring, you need connectors or soldering. I used jumper wire like these to connect pins to pins. Because there are Y-connections required, I also used a breadboard like this
    * The TMC2130s come without the debug pin. A connection to this pin is required for sensorless homing. You'll either need to solder wires to their circuitboard, or solder in a pin for jumper wire. So you'll need a soldering iron etc. Or you can choose to use the TMC2130s without sensorless homing for now.
     
    #4 MyMakibox, Apr 7, 2018
    Last edited: Apr 9, 2018
    moshen likes this.
  5. dc42

    dc42 Well-Known Member

    Joined:
    Aug 16, 2016
    Messages:
    254
    Likes Received:
    88
    @MyMakibox, a couple of corrections to your post.

    First, the TMC2130 was not made specifically for 3D printers. It has no 3d printer specific features. The v1.08 data sheet lists applications as "Textile, Sewing Machines, Factory Automation, Lab Automation, Liquid Handling, Medical, Office Automation, CCTV, Security, ATM, Cash recycler, POS, Pumps and Valves". Not a mention of 3D printing at all. Perhaps you were thinking of the TMC2208?

    Second, the TMC2660 provides almost exactly the same feature set as the TMC2130 apart from stealthchop - in particular it provides over temperature warning, overheat protection, software settable motor current, configurable chopper parameters, spread cycle, stall detection/load monitoring, microstep interpolation, and coolstep.

    In fact when we designed the Duet WiFi we considered the TMC2130; but we rejected it because it can't carry as much current as the A4982 that we used on previous Duets without overheating. It can't even carry as much motor current as the widely-used A4988. Whereas the TMC2660 that we ended up choosing can carry a lot more - enough even for some types of Nema 23 motor.

    The TMC2130 is certainly a nice driver, but just like the TMC2100 before it, to get the best out of it you need to pair it with motors that don't need a lot of current. A rated current of 1.0 to 1.3A should be ideal, or 1.5A at a push. Prusa has his own motors wound (like E3D does) and I have no doubt that he specified the winding details to be a good match to the TMC2130.
     
    mhe likes this.
  6. MyMakibox

    MyMakibox Well-Known Member

    Joined:
    Mar 19, 2014
    Messages:
    58
    Likes Received:
    18
    @dc42 : my comment was meant to be a tongue in cheek. But thanks for the corrections!

    The BigBox group is filled with users who are ridiculously happy their Duets and the expansion boards, and have had them for a while, and sing their praises. It's a big accomplishment for you and your team. But for those of us who aren't up for taking the plunge, the TMC2130s now provide the stepper benefits at a fraction of the price and with a much simpler upgrade path.

    Stealthchop and the capability to dynamically switch modes are the major extra features of the 2130s -- but there are other minor differences like "passive braking" for example. I take your point about the sheet, but would say that's quite inconsistent with the marketing and online demonstrations which seem very 3DP focussed.
     
    #6 MyMakibox, Apr 9, 2018
    Last edited: Apr 9, 2018
  7. dc42

    dc42 Well-Known Member

    Joined:
    Aug 16, 2016
    Messages:
    254
    Likes Received:
    88
    Yes Trinamic seems to have discovered 3D printing about a year ago and shifted their marketing focus. The TMC2208/2224 seems to be aimed largely at 3D printing and is aggressively priced. It doesn't have stall detection, but I think that's an overrated feature anyway.
     
  8. MyMakibox

    MyMakibox Well-Known Member

    Joined:
    Mar 19, 2014
    Messages:
    58
    Likes Received:
    18
    Part 2: Configuring Marlin (Rough version of the text)

    Only very recent versions of Marlin support the TMC2130.

    I'm using this fork: https://github.com/mosh1/Marlin/tree/0e55babfb30f8740b6b19d0ea35333796f49efa8

    The PINS I've chosen (30,31,14,15) for (X,Y,Z,E) correspond to the ones shown here: https://user-images.githubusercontent.com/148454/35702822-711502e6-079a-11e8-9417-9a25ac3d8189.png


    That fork is combined with these DEFINEs via Octoprint's BigBoxFirmware plugin:

    HAVE_TMC2130
    X_IS_TMC2130
    Y_IS_TMC2130
    STEALTHCHOP
    MONITOR_DRIVER_STATUS
    HYBRID_THRESHOLD
    SENSORLESS_HOMING
    X_HOMING_SENSITIVITY 6
    Y_HOMING_SENSITIVITY 2
    TMC_DEBUG


    SENSORLESS_HOMING, X_HOMING_SENSITIVITY, Y_HOMING_SENSITIVITY only matter if you plan to connect the additional wiring from the stepper modules to the endstops (requiring soldering) and there's no significant benefit yet. They will be much more useful once the code supports remedial action after detecting missed steps.

    I'll write up a more detailed guide later.
     
    #8 MyMakibox, Apr 14, 2018
    Last edited: May 15, 2018
  9. kevin.roberts

    kevin.roberts Member

    Joined:
    May 11, 2018
    Messages:
    7
    Likes Received:
    0
    What pins would you use if you were doing all six TMC2130?
    Where did you connect Diag pins?
    Where did you connect SD0, SCK SD1 on Rumba?
    I looking to build a Rumba with TMC2130 (6), Screen and 3DTouch having problems working out the pins needed, They do not match up with code and the schematic IE:
    #define LCD_PINS_D6 41 to make pin 51 on schematic
    #define LCD_PINS_D4 18 to make pin 46 on schematic
    So having a hard time with it.
    Any help would be good.
    Thanks, Kevin
     
  10. kevin.roberts

    kevin.roberts Member

    Joined:
    May 11, 2018
    Messages:
    7
    Likes Received:
    0
    OK worked out the pin problem.
    now trying to find what to do with debug pins
     
  11. MyMakibox

    MyMakibox Well-Known Member

    Joined:
    Mar 19, 2014
    Messages:
    58
    Likes Received:
    18
    The diagram linked above has the RUMBA pins - essentially you connect all the stepper's MISI together, all SCK together and all MOSO together - and then connect those to the RUMBA ISP1 pins shown. Each chip select pin is connected to one of the pins on the EXP3 header, on the left of the RUMBA. 4 are shown (30,31,14,15), and it sounds like you want to find another two.

    The debug pins connect to the corresponding (X-min, Y-min, Z-min) end-stop "S" pins, on the upper left of the RUMBA.
     
  12. MyMakibox

    MyMakibox Well-Known Member

    Joined:
    Mar 19, 2014
    Messages:
    58
    Likes Received:
    18
    On my machine, sensorless homing works well with sensitivity set by

    Code:
    M914 X6 Y2
     
  13. kevin.roberts

    kevin.roberts Member

    Joined:
    May 11, 2018
    Messages:
    7
    Likes Received:
    0
    Where do you connect extruder debug pins?
    What would you do with 3D Touch? or debug pin wire?

    I have:
    #define X_STEP_PIN 17
    #define X_DIR_PIN 16
    #define X_ENABLE_PIN 48

    #define Y_STEP_PIN 54
    #define Y_DIR_PIN 47
    #define Y_ENABLE_PIN 55

    #define Z_STEP_PIN 57
    #define Z_DIR_PIN 56
    #define Z_ENABLE_PIN 62

    #define E0_STEP_PIN 23
    #define E0_DIR_PIN 22
    #define E0_ENABLE_PIN 24

    #define E1_STEP_PIN 26
    #define E1_DIR_PIN 25
    #define E1_ENABLE_PIN 27

    #define E2_STEP_PIN 29
    #define E2_DIR_PIN 28
    #define E2_ENABLE_PIN 39

    //
    // Trinamic 2130 ChipSelect pin definitions
    //
    #define X_CS_PIN 30 // Arduino pin 31 = Mega PC6/A14
    #define Y_CS_PIN 31 // Arduino pin 30 = Mega PC7/A15
    #define Z_CS_PIN 14 //
    #define E0_CS_PIN 15 //
    #define E1_CS_PIN 63
    #define E2_CS_PIN 64
     
    #13 kevin.roberts, May 15, 2018
    Last edited: May 15, 2018
  14. MyMakibox

    MyMakibox Well-Known Member

    Joined:
    Mar 19, 2014
    Messages:
    58
    Likes Received:
    18
    I'd connect the Z debug to Z-Max, since the only use I know for it is M915. Your BL-touch can stay connected to Z-Min.

    I wouldn't connect the extruder debug since there's no Marlin support for them yet, AFAIK.
     
  15. kevin.roberts

    kevin.roberts Member

    Joined:
    May 11, 2018
    Messages:
    7
    Likes Received:
    0
    I get this:
    < Error:STOP called because of BLTouch error - restart with M999
    < ErrorPrinter stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)
    < X driver error detected:
    < overtemperature
    < short to ground (coil A)
    < short to ground (coil B)
    < ErrorPrinter halted. kill() called!
     
  16. kevin.roberts

    kevin.roberts Member

    Joined:
    May 11, 2018
    Messages:
    7
    Likes Received:
    0
    I remove BLTouch and still get
    X driver error detected:
    overtemperature
    short to ground (coil A)
    short to ground (coil B)
    ErrorPrinter halted. kill() called!
     
  17. MyMakibox

    MyMakibox Well-Known Member

    Joined:
    Mar 19, 2014
    Messages:
    58
    Likes Received:
    18
  18. Patrick Nusbaum

    Patrick Nusbaum New Member

    Joined:
    May 27, 2018
    Messages:
    1
    Likes Received:
    0
  19. kevin.roberts

    kevin.roberts Member

    Joined:
    May 11, 2018
    Messages:
    7
    Likes Received:
    0
  20. kevin.roberts

    kevin.roberts Member

    Joined:
    May 11, 2018
    Messages:
    7
    Likes Received:
    0
    < Marlin 1.1.8
    < echo: Last Updated: 2017-12-25 12:00 | Author: (Kevin Roberts, Anet config)
    < echo:Compiled: May 26 2018
    < echo: Free Memory: 3430 PlannerBufferBytes: 1264
    < echo:V47 stored settings retrieved (638 bytes; crc 50298)
    < echo: G21 ; Units in mm
    < echo: M149 C ; Units in Celsius
    < echo:Filament settings: Disabled
    < echo: M200 D1.75
    < echo: M200 T1 D1.75
    < echo: M200 T2 D1.75
    < echo: M200 D0
    < echo:Steps per unit:
    < echo: M92 X100.00 Y100.00 Z400.00 E100.00
    < echo:Maximum feedrates (units/s):
    < echo: M203 X400.00 Y400.00 Z8.00 E50.00
    < echo:Maximum Acceleration (units/s2):
    < echo: M201 X2000 Y2000 Z100 E10000
    < echo:Acceleration (units/s2): P<print_accel> R<retract_accel> T<travel_accel>
    < echo: M204 P400.00 R1000.00 T1000.00
    < echo:Advanced: S<min_feedrate> T<min_travel_feedrate> B<min_segment_time_us> X<max_xy_jerk> Z<max_z_jerk> E<max_e_jerk>
    < echo: M205 S0.00 T0.00 B20000 X10.00 Y10.00 Z0.30 E5.00
    < echo:Home offset:
    < echo: M206 X0.00 Y0.00 Z0.00
    < echo:Hotend offsets:
    < echo: M218 T1 X0.00 Y0.00
    < M218 T2 X0.00 Y0.00
    < echo:Material heatup parameters:
    < echo: M145 S0 H190 B60 F0
    < echo: M145 S1 H240 B90 F0
    < echo:pID settings:
    < echo: M301 P21.00 I1.25 D86.00
    < echo:Z-Probe Offset (mm):
    < echo: M851 Z0.00
    < echo:Stepper driver current:
    < echo: M906 X 600 Y -1900 Z -2100 E0 -2100 E1 -2900 E2 -2900
    < echo:Sensorless homing threshold:
    < echo: M914 X8 Y8
    < 00:00: Z driver overtemperature warning! (63436mA)
    < 00:00: E driver overtemperature warning! (63436mA)
    < 00:00: E driver overtemperature warning! (62636mA)
    < 00:00: E driver overtemperature warning! (62636mA)
    > M914 X6 Y2
    < X driver homing sensitivity set to 6
    < Y driver homing sensitivity set to 2
    < Z current decreased to -2150
    < E current decreased to -2150
    < E current decreased to -2950
    < E current decreased to -2950
    < Z current decreased to -2200
    < E current decreased to -2200
    < E current decreased to -3000
    < E current decreased to -3000
    < Z current decreased to -2250
    < E current decreased to -2250
    < E current decreased to -3050
    < E current decreased to -3050
    < Z current decreased to -2300
    < E current decreased to -2300
    < E current decreased to -3100
    < E current decreased to -3100
    < Z current decreased to -2350
    < E current decreased to -2350
    < E current decreased to -3150
    < E current decreased to -3150
    < Z current decreased to -2400
    < E current decreased to -2400
    < E current decreased to -3200
    < E current decreased to -3200
    < Z current decreased to -2450
    < E current decreased to -2450
    < E current decreased to -3250
    < E current decreased to -3250
    < Z current decreased to -2500
    < E current decreased to -2500
    < E current decreased to -3300
    < E current decreased to -3300
    < Z current decreased to -2550
    < E current decreased to -2550
    < E current decreased to -3350
    < E current decreased to -3350
    < Z current decreased to -2600
    < E current decreased to -2600
    < E current decreased to -3400
    < E current decreased to -3400
    < Z current decreased to -2650
    < E current decreased to -2650
    < E current decreased to -3450
    < E current decreased to -3450
    < 00:00: Y driver overtemperature warning! (63636mA)
    < Z current decreased to -2700
    < E current decreased to -2700
    < E current decreased to -3500
    < E current decreased to -3500
    < Z current decreased to -2750
    < E current decreased to -2750
    < E current decreased to -3550
    < E current decreased to -3550
    < Y driver error detected:
    < overtemperature
    < X Y Z E0 E1 E2
    < Enabled false true false false false false
    < Set current 600 63636 62786 62786 61986 61986
    < RMS current 581 1712 489 489 61 61
    < MAX current 819 2414 689 689 86 86
    < Run current 18/31 30/31 15/31 15/31 1/31 1/31
    < Hold current 9/31 31/31 23/31 23/31 16/31 16/31
    < CS actual 9/31 30/31 31/31 31/31 31/31 31/31
    < PWM scale 0 255 255 255 255 255
    < vsense 1=.18 0=.325 1=.18 1=.18 1=.18 1=.18
    < stealthChop true true true true true true
    < msteps 16 16 0 0 0 0
    < tstep 1048575 1048575 4294967295 4294967295 4294967295 4294967295
    < pwm
    < threshold 0 0 0 0 0 0
    < [mm/s] - - - - - -
    < OT prewarn false true true true true true
    < OT prewarn has
    < been triggered false true true true true true
    < off time 5 5 15 15 15 15
    < blank time 24 24 54 54 54 54
    < hysterisis
    < -end 2 2 12 12 12 12
    < -start 3 3 8 8 8 8
    < Stallguard thrs 6 2 0 0 0 0
    < DRVSTATUS X Y Z E0 E1 E2
    < stallguard X X X X
    < sg_result 0 0 1023 1023 1023 1023
    < fsactive X X X X
    < stst X X X X X X
    < olb X X X X
    < ola X X X X
    < s2gb X X X X
    < s2ga X X X X
    < otpw X X X X X
    < ot X X X X X
    < Driver registers:
    < X = 0x80:09:00:00
    < Y = 0x86:1E:00:00
    < Z = 0xFF:FF:FF:FF
    < E0 = 0xFF:FF:FF:FF
    < E1 = 0xFF:FF:FF:FF
    < E2 = 0xFF:FF:FF:FF
    < Error:printer halted. kill() called!
     

Share This Page