TMC2208 UART on BigTreeTech/BIQU SKR V1.1 and V1.3 Controllers

So.. You got yourself a BigTreeTech/BIQU SKR board, and you wanna use TMC2208 driver modules on it, in UART mode, with Marlin? Pretty simple really.

Prerequisites, SKR v1.1 only:

  • some female Dupont connectors (two per driver module). These connectors are easily found in many kinds of electronics - I salvaged the ones I use from old PC cases. You likely already have some in your junk box. Er, you DO have a junk box, right? :-)
  • some appropriately-sized wire (these are just signal lines we're dealing with, so just about any size will do as long as it works and is easy to handle)
  • some 1/8 inch or 3 mm heat shrink tubing (I use 3:1 shrink ratio).
  • you'll need to know how to do a little basic soldering.

Prerequisites, SKR v1.3 only:

  • Several shunt jumpers.

For both: You must have Marlin from the "bugfix-2.0.x" git branch, from roughly March 1, 2019 (or later). As of this writing, mine is at commit 2513f6b5 of that branch; I don't think you can just use any random download/snapshot, so best if you get it from git. The following will put you where I am:

git clone https://github.com/MarlinFirmware/Marlin.git
cd Marlin
git checkout bugfix-2.0.x
git reset --hard 2513f6b5

Your PlatformIO software serial library must be at v0.1.0 or later. Atom users: if you click on the "PlatformIO" menu, and select "Update platforms, packages and libraries", that'll do the trick (other IDEs with PlatformIO support should have a menu somewhere that's not entirely unlike this).

Once you're sure your Marlin and PlatformIO are ready, go ahead and load your Marlin configs into Atom or whatever IDE you use.

You'll want to have good lighting, and a magnifying glass (or a decent magnifier lamp).

Step 1: Modify Your Driver Modules (v1.0 Modules, Bottom Side)

I use Eryone driver modules, which are basically the same as FYCETC modules, PCB color aside. On those brands, and on many others, there are two sets of jumper pads on the underside: one close the STEP pin (right next to a resistor), and one close to the middle two pins, of the EN/STEP/DIR header.

On some brands of driver modules, there may be three sets of jumper pads.

In all cases, we're interested only in the set of pads near the middle of the header. Use your soldering iron to bridge this middle pair of pads together. This will connect the driver chip's PDN/UART line to the PDN pin on the module's header.

On some TMC2208 modules, the chip and various other parts are on the top of the PCB, instead of the bottom like usual. If you have this kind, then if you hold the module with the chip and such facing you, and the potentiometer and test holes to your left, there'll be one set of jumper pads on the right, next to a resistor, and one set near the middle. There may also be one set on the left. Again, the middle jumper is the one you want to bridge.

There are at least two brands that put the chip and such on top (Watterott and BigTreeTech).

Note: some brands of modules may say "v2.0", and still have a two-pad jumper. Treat these like the v1.0 modules, for the purposes of this Instructable.

Step 2: Modify Your Driver Modules (v1.2 Modules)

In some newer TMC2208 driver modules, this middle jumper has a set of three pads. If you hold the module with the bottom facing you, and the potentiometer and test holes to your right, the middle and right pads of this jumper are the ones you're interested in.

Bridging those pads together connects the driver chip's PDN/UART line to the otherwise-unused pin on the module's EN/STEP/DIR header. You should remove any connection there may be between the middle and left pads. It won't hurt anything, we just want to avoid confusion.

If you have one of the parts-on-top driver modules mentioned earlier, but with a three pad jumper, then holding the driver with the top facing you, and the test holes and potentiometer to the left, it'll most likely be the middle and left pads that you need to bridge. I have yet to find an example of this type of everything-on-top, three-pad jumper driver module. I'm sure they exist, or will soon enough (since the two-pad jumper is the older version).

On the SKR v1.3, your board already has all the internal wiring needed, and Marlin already has appropriate pins defined for it. You just need to plug in the necessary shunts, as directed in the SKR v1.3 user manual.

If you're using three-pad-jumper driver modules, or if you are using an SKR v1.3, skip ahead to "Step 6: Give your board some intelligence".

Step 3: Modify Your Driver Modules (v1.0 Modules, Top Side)

If your driver module is of the type with two pads on the middle jumper, then you will need to make a solder bridge on the top side to connect PDN to the unused pin next to it on the EN/STEP/DIR row. This unused pin is most likely unmarked, or may be labeled "NC". On my Eryone modules, the manufacturer put the OpenHardware logo next to it.

Step 4: Patch Things Up

You'll need to prepare some simple patch wires, with a female Dupont connector on each end.

Affix the the plastic connector housing to only one end -- leave the other connector bare. Carefully bend that bare one in half backwards, to create a simple right-angle connection (by "backwards", I mean that once bent, you could put a really long pin through the connector part, without hitting the crimped end). Add a drop of solder to the inside of the bend to reinforce it, and shrink a bit of heat-shrink tubing over it for insulation.

For whichever axis you're working on, remove any shunts from the board's MS1-MS3 config jumper block. Connect the "right-angle" end of one of these patch wires to pin 5 of the block (it should be clearly marked on the board next to the pin). This would normally be the MS3 signal line on drivers like the A4988, but TMC2208 driver modules don't use this connection at all, so the soldering we did on the module rerouted the UART signal so that we could pick it up from this pin. Connect the other end of this wire to an appropriate GPIO pin on the SKR's AUX1 or AUX3 header. But just where are these signals? That's explained in the next step! :-)

Step 5: Help Marlin Make the Connection

You will need to define some pins to match where you connected the patch wires on AUX1/AUX3. But, there are a few more pins available on the board than you'll need for this project, so you have some leeway here.

This "leeway" can be confusing, though (it didn't do me any favors, to be sure), so to make it simple, I went with gloomyandy's pins definitions, and put the following into src/pins/pins_BIQU_SKR_V1.1.h just before the temperature sensor pins:

#if HAS_DRIVER(TMC2208)
  #define X_SERIAL_TX_PIN    P2_06 // on AUX2, "2.6" on the board and pinouts image
  #define X_SERIAL_RX_PIN    P2_06
  #define Y_SERIAL_TX_PIN    P1_31 // on AUX2
  #define Y_SERIAL_RX_PIN    P1_31
  #define Z_SERIAL_TX_PIN    P1_23 // on AUX2
  #define Z_SERIAL_RX_PIN    P1_23
  #define E0_SERIAL_TX_PIN   P0_03 // AUX1 "RX"
  #define E0_SERIAL_RX_PIN   P0_03
#endif

Step 6: Give Your Board Some Intelligence

You will of course need to configure Marlin to build for and run on the SKR if you have not done so already. For brevity, I've omitted most settings that are commented-out or are either specific to my bot alone, or which don't apply to my bot at all. That is, I've tried to include only the stuff that everyone will need. Here are the basic settings for Configuration.h:

#define SERIAL_PORT -1
//#define SERIAL_PORT_2 -1

#define BAUDRATE 250000

#define MOTHERBOARD BOARD_BIQU_SKR_V1_1    // or BOARD_BIGTREE_SKR_V1_3

Plus whatever other configuration you need for your printer, i.e. thermistor type, temperature limits, motor steps/mm, speed and acceleration limits, build volume, end stops, and so on.

Step 7: Configure Marlin for Your Driver Modules

Set Marlin up for TMC2208 regular mode (not "STANDALONE") for whichever axes use them (I have all four), with appropriate settings for current, microstepping, stealthChop, spreadCycle, or Hybrid mode, and so on.

For example, in Configuration.h, I have these settings:

#define X_DRIVER_TYPE  TMC2208
#define Y_DRIVER_TYPE  TMC2208
#define Z_DRIVER_TYPE  TMC2208
#define E0_DRIVER_TYPE TMC2208

...and in Configuration_adv.h, I have these, in various places as appropriate for that config file:

#define MINIMUM_STEPPER_PULSE 1   // 0 is not recommended for TMC2208 anymore.
  #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
  #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256

  #if AXIS_IS_TMC(X)
    #define X_CURRENT     600  // (mA) RMS current. Multiply by 1.414 for peak current.
    #define X_MICROSTEPS   16  // 0..256
    #define X_RSENSE     0.11
  #endif

  #if AXIS_IS_TMC(Y)
    #define Y_CURRENT     600
    #define Y_MICROSTEPS   16
    #define Y_RSENSE     0.11
  #endif

  #if AXIS_IS_TMC(Z)
    #define Z_CURRENT     800
    #define Z_MICROSTEPS   16
    #define Z_RSENSE     0.11
  #endif

  #if AXIS_IS_TMC(E0)
    #define E0_CURRENT    500
    #define E0_MICROSTEPS  16
    #define E0_RSENSE    0.11
  #endif
  #define STEALTHCHOP_XY
  #define STEALTHCHOP_Z
  //#define STEALTHCHOP_E
#define HYBRID_THRESHOLD
  #define X_HYBRID_THRESHOLD     150  // [mm/s]
  #define Y_HYBRID_THRESHOLD     150
  #define Z_HYBRID_THRESHOLD       3
  #define E0_HYBRID_THRESHOLD     10
#define TMC_DEBUG

Step 8: Finishing-up

Install the driver modules onto their headers.

Set the SKR's power jumper to USB mode, hook up your USB cable, and compile and upload the firmware.

You should now be done with the basic configuration.

Time to power-down, wire-up your printer's main 12/24v power supply, motors, end stops, heaters, sensors, etc., move the SKR's power jumper to "INT", and power back up. Check that your motors work, and run in the right directions.

At this point, you should also adjust the driver modules' potentiometers to set fallback currents in case the UART feature craps out.

You may now begin routine calibrating and printing.

Enjoy your 32-bit goodness! :-)

Step 9: Credits and Notes

  • This Instructable was inspired by "UART This!" by seansadler.
  • jammi clued me in to the UART-on-MS3 method via his RAMPS-oriented imgur guide, sure beats unsoldering and/or flipping pins around!
  • The drawing of the pinouts of the SKR v1.1 came from BigTreeTech's public Github repository, modified by me.
  • The photo of the TMC2208 module with three-pad PDN/UART jumper was cribbed from an Aliexpress listing, enhanced and modified by me.
  • The photo of the TMC2208 module with everything on the top side of the PCB was "borrowed" from a Github thread, enhanced and modified by me.

Try as I might, I could not find a single, clean, obviously-free-license image of those two kinds of driver modules, so I'm gonna have to claim "fair use" on both. :-)

About connector and wire colors:

Shortly after I got my SKR, I killed it by accident while probing around on it. But a while before that happened, I swapped the motor and endstop connectors around so that X is red, Y is green, and Z is blue, to match what you see in most 3d modeling programs, then color-coded my patch wires to match. Since I still have that board in my junk box, I just went ahead and used it for most photos, just so that I didn't have to pull my good, working board out of the printer. The white patch wire seen in some photos is just an extra I had lying around.

The working board is shown in the final image since since I needed a "complete, installed" photo at that point, and while it has "correct" wire colors, it has "incorrect" connector colors. My OCD isn't quite triggered enough to overcome my laziness. ;-)

Share

    Recommendations

    • Build a Tool Contest

      Build a Tool Contest
    • Tape Contest

      Tape Contest
    • Pie Contest

      Pie Contest

    2 Discussions

    1
    None
    seamster

    5 days ago

    Thank you for sharing your first instructable! : )

    1 reply
    0
    None
    Vanessa_Eseamster

    Reply 4 days ago

    You're quite welcome. I hope it helps a few people get up and running. :-)