From 6e0a13e434d8f4cf1d60a497775e3c5a0ee67087 Mon Sep 17 00:00:00 2001 From: Patrick Moessler Date: Sat, 21 Dec 2019 23:50:58 +0100 Subject: [PATCH] Change to TMC2209 with UART --- Marlin/Configuration.h | 12 ++++++------ Marlin/Configuration_adv.h | 28 +++++++++++++++++++++++----- Marlin/Start_here.h | 8 ++++---- 3 files changed, 33 insertions(+), 15 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index e4a300f9f..19249755a 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -868,12 +868,12 @@ #define E1_DRIVER_TYPE TB6600 #define E2_DRIVER_TYPE TB6600 #elif ENABLED (CUSTOM) - #define X_DRIVER_TYPE - #define Y_DRIVER_TYPE - #define Z_DRIVER_TYPE - #define E0_DRIVER_TYPE - #define E1_DRIVER_TYPE - #define E2_DRIVER_TYPE + #define X_DRIVER_TYPE TMC2209 + #define Y_DRIVER_TYPE TMC2209 + #define Z_DRIVER_TYPE TMC2209 + #define E0_DRIVER_TYPE TMC2209 + #define E1_DRIVER_TYPE TMC2209 + #define E2_DRIVER_TYPE TMC2209 #else #error No drivers defined #endif diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 20c090140..330e45ea3 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -2019,19 +2019,37 @@ * on the same serial port, either here or in your board's pins file. */ #define X_SLAVE_ADDRESS 0 - #define Y_SLAVE_ADDRESS 0 - #define Z_SLAVE_ADDRESS 0 + #define Y_SLAVE_ADDRESS 1 + #define Z_SLAVE_ADDRESS 3 #define X2_SLAVE_ADDRESS 0 #define Y2_SLAVE_ADDRESS 0 #define Z2_SLAVE_ADDRESS 0 #define Z3_SLAVE_ADDRESS 0 #define E0_SLAVE_ADDRESS 0 - #define E1_SLAVE_ADDRESS 0 - #define E2_SLAVE_ADDRESS 0 + #define E1_SLAVE_ADDRESS 1 + #define E2_SLAVE_ADDRESS 2 #define E3_SLAVE_ADDRESS 0 #define E4_SLAVE_ADDRESS 0 #define E5_SLAVE_ADDRESS 0 + // + // Software serial + // + #define X_SERIAL_TX_PIN 59 + #define X_SERIAL_RX_PIN 58 + #define Y_SERIAL_TX_PIN 59 + #define Y_SERIAL_RX_PIN 58 + + #define Z_SERIAL_TX_PIN 61 + #define Z_SERIAL_RX_PIN 60 + #define E0_SERIAL_TX_PIN 61 + #define E0_SERIAL_RX_PIN 60 + #define E1_SERIAL_TX_PIN 61 + #define E1_SERIAL_RX_PIN 60 + + // Reduce baud rate to improve software serial reliability + #define TMC_BAUD_RATE 19200 + /** * Software enable * @@ -2063,7 +2081,7 @@ * Define you own with * { , , hysteresis_start[1..8] } */ - #define CHOPPER_TIMING CHOPPER_DEFAULT_12V + #define CHOPPER_TIMING CHOPPER_DEFAULT_24V /** * Monitor Trinamic drivers for error conditions, diff --git a/Marlin/Start_here.h b/Marlin/Start_here.h index 1daa18e9d..540071d67 100644 --- a/Marlin/Start_here.h +++ b/Marlin/Start_here.h @@ -22,7 +22,7 @@ //#define GTD200 // D200 - experimental, set jumpers base on board for flashing and use serial to upload. //-------------------------------------------------------------------------------------------------------------------------------------------------------- //Step 2) enable 1 driver timing set. -#define STOCK // Enable A4988 on all drivers (stock drivers) +// #define STOCK // Enable A4988 on all drivers (stock drivers) // #define T2208 // Enable TMC2208 Standalone on all drivers //#define T2209 // Enable TMC2209 Standalone on all drivers //#define T2130 // Enable TMC2130 Standalone on all drivers @@ -37,11 +37,11 @@ //#define L647 // Enable L6470 on all drivers //#define T6560 // Enable TB6560 on all drivers //#define T6600 // Enable TB6600 on all drivers -//#define CUSTOM // Fill in #elif ENABLED (CUSTOM) in configuration.h with a custom set & invert in step 3 as needed +#define CUSTOM // Fill in #elif ENABLED (CUSTOM) in configuration.h with a custom set & invert in step 3 as needed //-------------------------------------------------------------------------------------------------------------------------------------------------------- //Step 3) enable if needed to invert motors direction used on TMC drivers & Geared extruders. -#define INVERTE // Invert E direction disabe if wrong direction - M & T variants inverted (stock). -// #define INVERTXYZ // Invert XYZ direction disable if wrong direction. +// #define INVERTE // Invert E direction disabe if wrong direction - M & T variants inverted (stock). +#define INVERTXYZ // Invert XYZ direction disable if wrong direction. //-------------------------------------------------------------------------------------------------------------------------------------------------------- //Step 4) enable 1 if you have mixing or multi extruder. #define MIX // Enable Mixing 2 in 1 - Virtual Motor Control