I want to show here how to use TMC2209 Driver with the Geeetech A10 in UART Mode (mainly for Marlin but Klipper below!).
First of all have a look at the board and the schematic (GT2560 v3!). Under the X-Axis Driver is a not populated header called "UART". This can be used to software control all TMC 2209 Driver via UART.
The jumper you can set underneath the driver are not only for the Step-Configuration, but you can also use them to give them an address on the UART-"Bus". More information on it here and here The pins MS1 and MS2 have an internal pull-down resistor, so if you set both jumpers MS1 and MS2 the driver has the address 3.
I am not responsible for your hardware or software. You do this at your own risk.
- First you need to solder a new header to the unpopulated UART-Header on the board. I was lazy and did this from above - not very clean but doable.
- You need to cut the driver TX and RX Pins, because the GT2560 Board is for A4988 Driver and have other functions (MS3 and RST)
- Next you have to put in the jumper for each driver and give each one a drifferent adddress. Write down which driver you give which address! (the picture only shows it for one driver with address 2!)
-
You need to cut and solder some wires so you can connect one pin from the header to all 4 drivers. You need one two wires like this - one for TX and one for RX.
-
You put in the driver (make sure they are in the correct direction) - for me the color blue and black did not match with the board!
-
You connect the wires to the header and the drivers (RX to RX and TX to TX and not crossed like you know it from UART )
The hardware is done!
Now it is time for the firmware. You need Marlin 2 for this as far as I know. I use Arduino to edit and flash the firmware. In Configuration.h:
- Change the driver type to TMC2209 (not TMC2209_STANDALONE!)
In Configuration_adv.h:
- Define the pins to use for UART and set the baudrate - on this board Serial3 and 115200
- Define the addresses for each driver (X is really address 0 for me)
- (Optional) Now you can do additional configurations for the driver. For example if they should use stealthchop by default or set a hybrid threshold.
I highly recommend turning on TMC_DEBUG for a first test!
You can find a lot more information on the Marlin documentation.
I don't use sensorless homing so I can not tell you how to use it. You can find my configuration with BLTouch here.
- Now it is time to flash the firmware.
After uploading and turning on the printer you can send G-Code "M122" to test your configuration. I used the Terminal on my OctoPrint:
You can also change settings for the driver with the LCD and rotatry encoder under "Configuration" -> "Advanced Settings" -> "TMC Drivers"
I am currently switching from Marlin to Klipper so I added my config for it here too:
Same as above, but you only need the RX-Wire (yellow).
The other wires are for my other upgrades like exhaust fan and chamber temperature.
For each stepper you need to add a section like this:
[tmc2209 stepper_x]
uart_pin: PJ0
uart_address: 0
interpolate: True
run_current: 0.55
hold_current: 0.5
sense_resistor: 0.110
stealthchop_threshold: 9999
The pin PJ0
is RX3 on the PCB. Change the uart_address
according to the address you set with the jumpers.
The new Geeetech A10 GT2560 v4 board does not have jumpers and no schematic is available so far. So there are no jumpers to set the address of the driver.
A workaround is to insert connectors between the driver and the board. The pins can be cut to set a different address for each driver.
- Cut the connectors to the correct length
- Cut the pins for PDN-UART (TX/RX)
- Cut the pins MS1 and/or MS2 for each driver differently (Pin = 1 and no Pin = 0) to set the address
- Insert the connectors to the driver and the board
I tried this on my GT2560 v3 board and it worked.
The drivers fit very tigth in the case, because of the TX/RX wiring - maybe bend them over?!
Another difference to the v3 board is the UART connector. It has a different pin layout and is populated.
Viewed from above:
1 | 2 | 3 | 4 |
---|---|---|---|
GND | Tx | Rx | Vcc |
BIGTREETECH v1.2 TMC2209 drivers do not have directly TX/RX pins instead two PDN-UART pins. Please read here in chapter 8 how to use them.