TMC UART wiring and pin variations

EDIT

2023.11.17: This has been updated to reflect what was learned about the Two Trees TMC2209 driver modules

TMC2209 Module Modification Reference:

While the circuitry used for TMC2209 driver modules from different manufacturers are very similar, there are differences in the UART wiring that users need to be aware of.

The four modules that discussed are:

Based on the information available, it appears user modifications may be required for any of the TMC2209 modules to work with either the fourth or fifth pin down from the “EN” pin (the way that the pins are most typically refenced) as the UART. Three of the modules have different UART wiring that is discussed below while the last one requires modifications to implement sensorless homing.

XDG modules

These modules, by default, are designed to use the fourth pin for the UART and, to use the fifth pin, the following modification is required:

The module schematic is:

An alternative to cutting the pin and putting a solder blob over the fourth and fifth pins would be to simply remove R11.

BTT Modules

These modules, by default, are designed to use the fourth pin for the UART and, to use the fifth pin, the following modification is required:

The module schematic is:

It appears that the BTT instructions are appropriate to change the UART connection between the fourth and fifth pins.

Two Trees Modules

The Two Trees TMC2209 module appear to use the same circuitry as the BTT module - unfortunately, there is little official documentation on the module available.

The big difference between the Two Trees TMC2209 module and the others listed here is that they do not have the two “front” pins installed by Two Trees. The front of the BTT, MKS and XDG modules look like:

but, the Two Trees modules are missing the front two pins as can be seen in this image:

If a user wants to use sensorless homing with the Two Trees TMC2209 driver module, they will have to manually solder in pins to match the other manufacturers devices.

MKS Modules

MKS does not provide any instructions for modification if the fifth pin is to be used rather than the fourth. Unfortunately, the exact wiring is obscured in the schematics:

These modules, by default, are designed to use either the fourth or fifth pin from “EN” for the UART. There is a 0 Ohm resistor (R8) that connects the two pins. Unfortunately, the exact wiring is obscured in the schematic and cannot be easily seen when looking at the module.

Based on the information provided by the board manufacturers, it is recommended that the modules are left in their original configuration with the main controller board jumpers set so that the MCU UART pins are connected to the fourth pin of the TMC2209 modules and remove any jumpers leading to the fifth pin of the TMC2209 modules.

2 Likes

Thanks, @mykepredko, for collecting this information. I’m currently a bit unsure what and how would be the best way to present it.

A quick googling around revealed that there are a lot more strange combinations possible with a strong dependence on:

  • Used step stick (e.g. Watterot, BTT, Fysetc)
  • Step stick revision of the above-mentioned
  • Used printer board

See:

How to meaningful summarize these constellation to give a good guidance that allows to:

  • Identify the situation, i.e. combination of board and step stick
  • Choose the correct solution

without creating too much complexity WRT

  • Ambiguity
  • Risk of destroying things
  • Requiring the user to be able to read schematics correctly

Edit:
Equally, I’m not sure here, but it seems that these “incompatibilities” mainly affect quite old hardware both in terms of boards and step sticks

1 Like

Sorry for this but…before committing it to the knowledge-base, could you please proof read one more time. I think I found one error in your abbreviation of xindong…, you said XWG but lower down you refer to it as XDG. Maybe there are other typos that could lead to confusion.

I hope I understood that this is the case, if I am wrong, my sincere apologies.
Kind regards,
Kees

Think the key principle here is a few examples to be listed and then you would need to check the listing and data info from your respective supplier

I must admit though I read somewhere they were plug and play and that’s why I raised this topic

Corrected - thanx for the catch.

I think they should be Plug 'n Play and, to a large extent, they are. As @Sineos pointed out, the issues tend to be with older hardware.

Which is why I asked.

Going through your references there are quite a few errors in the interpretation of the circuitry as well as performing redundant operations (ie setting 0 Ohm resistor positions AND cutting pins).

It’s not a trivial topic, especially it should be PnP, as @softwaresupportster pointed out.

The problem is the need to have a reasonable amount of electrical/electronics and serial communications theory for somebody to be able to look at the situation and figure out what’s the best thing to do.

One thing that greatly simplifies things is Klipper’s use of a single pin with bit-banging bidirectional serial communications rather than having two separate pins. Looking back over what I wrote, I should have been more a lot more explicit saying that the information is Klipper specific.

What I wrote here would not be helpful for somebody working with Marlin.

I just went back through the references and I should point out that only one is Klipper specific (TMC2209 SilentStepStick in UART-mode on SKR 1.4 · Issue #3672 · Klipper3d/klipper · GitHub). But when I read through the GitHub issue, I’m not sure that it is that relevant to this situation as they are sharing the UART line across multiple TMC2209 modules (each one having a unique address on the UART line) and need to move the UART pin on the module from the fourth pin to the fifth pin. The simpler solution would be to have a single UART line for each module (which would use the default fourth pin).

That’s probably true, but I wouldn’t consider the case presented in the original post to be in this category. I’ve used the MKS Robin Nano V3.x quite a bit (which is why I replied) but I use MKS TMC2209 driver modules with them (I have two printers that have them right now) without any issues.

When I dug into the situation, I found that the TMC2209 modules between XDG and MKS to be identical except for the serial communications and then when I looked at BTT TMC2209 modules, I found a third variation on the circuitry.

So, I’m not sure what the message here should be. Looking back what I’ve written here and reviewing what you posted, I can make the following points regarding using TMC2209 modules:

  • Use Klipper
  • The user should use a separate UART line to each TMC2209 module. Using a single UART line on multiple TMC2209 modules (each with their own address) is not recommended
  • When setting jumpers on the main controller board, they should be set so that the fourth pin down from the “EN” pin on the TMC2209 module should be used for the UART pin (I should point out that this is normally presented by the main board manufacturers in their “User Guides” for using TMC2209 modules with the UART port)

That would go a long way in resolving user issues with the TMC2209 in UART mode.

So, what would you recommend @mykepredko?
I’d be more than open to add such information to the KB, we just need to find a way how to prepare the information in a way that is clear and straight to follow.

To be honest, currently I’m a bit lost with respect to “what to do when”.

After a few minutes thought:

Part 1:
Explain the UART mode of the TMC2209 and what it provides for the user

  • Setting the number of microsteps for the stepper motor without jumpers
  • Setting the stepper current limit
  • Specifying other operating settings
  • Return error information

Describe the single pin UART operation as well as the bus UART operation (with up to four TMC2209s with each device having its own address from 0 to 3)

Part 2:
List the recommended TMC2209 operating recommendations (as this should be good for well north of 80% of the people out there):

  • Use a separate UART main controller board MCU pin to each of the TMC2209 modules in the system
  • Connect the individual TMC2209’s UART signal from the MCU to the fourth pin down from the “EN” pin on the TMC2209 module.
  • Remove the jumper connecting the TIMC2209 module’s fifth pin (down from the “EN” pin)
  • Explain the [tmc2209 stepper_...] statement in printer.cfg

Part 3:
Troubleshooting with common problems and how they are corrected:

  1. Main controller board jumpers not set correctly
  2. Klipper parameters incorrectly specified
  3. The drivers are not TMC2209s
  4. The drivers are burned out/damaged

Part 4:
Special known cases

  • Anycubic Kobra Max and the R65/R66 issue
  • Any others come to mind?

Thoughts? I think a discussion on sensorless homing would be out of scope here.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.