bigtreetech / BIGTREETECH-SKR-V1.3

32bit board with LPC1768, support marlin2.0 and smoothieware, support lcd2004/12864, On-board TMC2130 SPI interface and TMC2208 UART interface no additional wiring is required
1.01k stars 1.15k forks source link

TMC2209 support #59

Open Dilbert0815 opened 5 years ago

Dilbert0815 commented 5 years ago

I had problems getting TMC2209 step sticks working with UART configuratio in Marlin 2.x.. Some Bigtree TMC2208 before were working correctly, so I was debugging the case.

Problem is on these TMC2209 sticks the port RST1 is wired directly to PDN_UART from TMC2209 while M3 port is having an addtional 1k ohm resistor to PDN_UART of TMC chip.. So using the normal UART jumper on SKR1.3 we get a total of 2k (1k + 1k) in the TMC TX line, causing it to fail.

Hardware Fix: Fix is possible in hardware by using a adtional jumper in SPI jumper block between pins 1/3. This shortens RSTI and M3 ports of step stick, effectively disabling the stick internal 1k ohm resistor. UART jumper is of cause also set. Communication is now working and TMC_DEBUG with M122 returns correct register values and reports TMC2209 communication as online.

May be you can add this to board FAQ for troubleshooting TCM2209 stick problems of other users.

Dilbert0815 commented 5 years ago

Jumper illustration on X-stepper port:

20190726_232537_cut

NaterNore commented 5 years ago

Hey, I was wondering if I could get these to work on the skr 1.3 non pro version. That mod you made is that little jumper I'm assuming? And this would work on any standard tcm2209? Thanks I'm a bit new to this.

ArchSnatcher commented 5 years ago

Thanks for this advice Dilbert. I've been getting an "all Low" for Y on my 2208s and a "TMC connection error" on the LCD for the last week. I've been through countless pages of issues that are similar to mine, but we're not able to fix the problem. I'm going to try this after work to see if it is an extra resistor. I'm using a total of 4, Eryone 2208 v1.2 drivers.

Dilbert0815 commented 5 years ago

Hey, I was wondering if I could get these to work on the skr 1.3 non pro version. That mod you made is that little jumper I'm assuming? And this would work on any standard tcm2209? Thanks I'm a bit new to this.

Actually this IS a SKR1.3 non-pro. The Pro is actually revision v1.1.

But there ist no standard for TMC220x. Basically any vendor can route secondary signals to any unused port. This is exactly what happens here with Rx/Tx. Bigtreetech has routed their board for THEIR TMC steppsticks, and thats obviously not the idea that FySET had in mind when designing their 2209 sticks. The TMC2209 is a chip standard, but the step stick is a vendor desgin and there are simply a few versions out there how to rout non-essetial ports to stick pins. This are ussually the stick pins that carry the setting pins on older chip designs.

You should have an ohmmeter ready and check how your sticks are routed to the TMC chip pins.

ArchSnatcher commented 5 years ago

And it wasn't a resistor. The XYZ and E all work perfectly well when I turn on 'movement' mode on the LCD. I'm still getting the tmc connection error, but it is interesting. I have 4 total 2208s on xyze. When I run a check through terminal xy and z will be fine, but e will be 'All Low'. I'll move x to y (for example) and xze will be fine with a 'All Low' on y. I'm starting to think this is a tx/rx issue.

NaterNore commented 5 years ago

So you're telling me that if I get the stepstick drivers I'd have to do this but if I get the bigtree or some other brand I might not?

jimmyeao commented 5 years ago

Curious, do the 2209s still need the pads bridging like the 2208s did?

thisiskeithb commented 5 years ago

To add to this, if you're using genuine Watterott 2209 V2s un UART mode and would like to use sensorless homing without "flying wires", some hardware modification is required: skr-1 3-watterott-tmc2209v2

The Watterott 2209 V2's DIAG pin is in a different spot than what the SKR 1.3 is setup for on other/earlier drivers.

No extra wires required, but you have to be careful if swapping drivers in the future to make sure only a single pin is used for diag/sensorless homing so you don't short anything out.

Disclaimer: This is just for general information and I'm not responsible for any damage to your driver/board/printer.

MarkV3082 commented 5 years ago

Dilbert0815 Thank you very much. This jumper config has solved my problem. Endless variations with these chips as you say.

asdmin commented 4 years ago

@Dilbert0815: you left the MS1 and MS2 pins floating. In UART more they are to set the slave address. Isn't it a problem?

asdmin commented 4 years ago

@Dilbert0815: also, it seems that this mod with the cross-jumper drives the SPREAD at times when UART communication takes place. As I see, during communication on the UART interface the driver is 'required' to rapidly switch between spreadCycle and stealthChop many times. Isn't it a problem?

And this is not the only problem: based on 'TMC2209 DATASHEET (Rev. 1.03 / 2019-JUN-26)', chapter '5.1 General Registers', a high level on SPREAD (see our case) inverts whatever value was configured for GCONF.en_SpreadCycle. As I see, the printer will always work in the opposite mode as it was configured by GCONF.en_SpreadCycle

Did you cut the pin on the silentstepstick?

Dilbert0815 commented 4 years ago

@asdmin : I don't have the board mounted acutally. But there may be a misunderstanding. SPREAD ist not connected with this pin, at least not on the sticks I have here. If yous sticks have SPREAD connected to any of these pins do NOT use the mod. Here on the FTYSET sticks I have no other connection is these pins, they are both just UART (RX/TX). They just put the RX/TX seperating resistor onto the stick and have the TX port on the wrong pin for the SKR board. As said: endless variants of these stickts, just make shure what pinout your vendor chose for these 'optional' pins on these sticks.

MS1/2 should have internal pull-down resistors according data sheet. It is normal to leave them open to my knowledge.

The-Monkey-King commented 4 years ago

@Dilbert0815 : Please update this as a hardware fix for the FTYSET sticks. I am receiving the same error messages for the BTT SKR V1.3 and the BTT TMC2209s. I tried your pin fix and the TMC2209s from Big tree Tech still issue null responses from the X, Y, Z, and E0 registers. (0x00:00:00:00)

klubglied commented 4 years ago

I had problems getting TMC2209 step sticks working with UART configuratio in Marlin 2.x.. Some Bigtree TMC2208 before were working correctly, so I was debugging the case.

Problem is on these TMC2209 sticks the port RST1 is wired directly to PDN_UART from TMC2209 while M3 port is having an addtional 1k ohm resistor to PDN_UART of TMC chip.. So using the normal UART jumper on SKR1.3 we get a total of 2k (1k + 1k) in the TMC TX line, causing it to fail.

Hardware Fix: Fix is possible in hardware by using a adtional jumper in SPI jumper block between pins 1/3. This shortens RSTI and M3 ports of step stick, effectively disabling the stick internal 1k ohm resistor. UART jumper is of cause also set. Communication is now working and TMC_DEBUG with M122 returns correct register values and reports TMC2209 communication as online.

May be you can add this to board FAQ for troubleshooting TCM2209 stick problems of other users.

hi there. i'm quite new to UART mode, linear advance and TMC's... therefore my BigTreeTech TMC2209's don't do what they should... with a M122 i get positive feedback from my printer (the connection is "OK" and all drivers send a sort of mac-address-number back) but when i try to print something (i tried a tube) the printer does not print the correct circle but an "interpolated" version of it (see in the picture below). i tried to guess what is the problem here and changed some settings in marlin 2.0 (i am using a skr v1.3 by the way) for example the "MINIMUM_STEPPER_PULSE" to 2 because otherwise the E stepper would not move at all (seems to be a common problem with TMC's and linear advance) and the given work-around with the jumpers (your solution). but still i don't fully grasp the problem... can anybody help me please!?!

klubglied commented 4 years ago

IMG_20191215_191441

generalPanic commented 4 years ago

I'm having issue w/BTT 2209s and my SKR 1.3 as well. Anybody have links to data sheets/shematics for BTT Stepper driver board?

klubglied commented 4 years ago

hi @generalPanic. what exactly is your problem? I think I solved mine since my printer is doing what it should (although I did not test linear advance again). what worked for me was to look up the specifications of the TMC's at AliExpress because in the instructional video by "teaching tech" he says to set the "RSense" value (in "configuration_adv.h") to 0.075 but BTT's TMC's have/need 0.11 Ohm. maybe this caused the stuttering in my print. after I changed it and commented out the linear advance feature (even though I don't know if that caused maybe some trouble aswell) my ender 3 works perfectly again (tomorrow I will try to implement the LA-feature again! would be a shame to miss out on this...). and by the way... i did pull the jumpers out again... ;)

klubglied commented 4 years ago

@generalPanic just in case my reply doesn't solve your problem...

https://github.com/bigtreetech/BIGTREETECH-TMC2209-V1.2

generalPanic commented 4 years ago

Thanks for the link. I have my 2209s inserted into my SKR 1.3 with the UART jumper set, the SPI jumpers removed and I get all zeros when i do gcode M122.

I changed the appropriate values in my Configuration.h (set drivers to TMC2209 etc.).

Thanks, Ben

On Wed, Dec 18, 2019 at 11:49 PM klubglied notifications@github.com wrote:

https://github.com/bigtreetech/BIGTREETECH-TMC2209-V1.2

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bigtreetech/BIGTREETECH-SKR-V1.3/issues/59?email_source=notifications&email_token=ABI3NEAVDY74AIENQ556R2LQZMDPTA5CNFSM4IHHIZM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHIP4VA#issuecomment-567344724, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABI3NEAGFHVIZITRAPMOGB3QZMDPTANCNFSM4IHHIZMQ .

klubglied commented 4 years ago

hi Ben. Just to make sure... did you uncomment the "#define x_driver_type TMC2209" (etc.) in "configuration. h"? what else did you change for your TMC's in Marlin?

generalPanic commented 4 years ago

Yessir.

define X_DRIVER_TYPE TMC2209

define Y_DRIVER_TYPE TMC2209

define Z_DRIVER_TYPE TMC2209

//#define X2_DRIVER_TYPE A4988 //#define Y2_DRIVER_TYPE A4988 //#define Z2_DRIVER_TYPE A4988 //#define Z3_DRIVER_TYPE A4988

define E0_DRIVER_TYPE TMC2209

BTW, I do not have the motor power or any motors connected. I'm using the power from the USB port to power the stepper logic.

Cheers, Ben

On Thu, Dec 19, 2019 at 10:23 AM klubglied notifications@github.com wrote:

hi Ben. Just to make sure... did you uncomment the "#define x_driver_type TMC2209" (etc.) in "configuration. h"? what else did you change for your TMC's in Marlin?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bigtreetech/BIGTREETECH-SKR-V1.3/issues/59?email_source=notifications&email_token=ABI3NECX4SGKS6Y6GCLIP5TQZONXDA5CNFSM4IHHIZM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHKEMAQ#issuecomment-567559682, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABI3NEB2ZWS4GPE6JNEIJ2LQZONXDANCNFSM4IHHIZMQ .

klubglied commented 4 years ago

hi ben.

BTW, I do not have the motor power or any motors connected. I'm using the power from the USB port to power the stepper logic.

is there a reason you don't want to connect your DC input to the SKR? i am not a great electronics wizard but maybe you should connect the real DC input (12V/24V) as each of your stepper drivers is trying to power the virtual stepper motor with about 0.8A-1.0A which would be too much for a normal USB power supply. but really i am just guessing here...

I can imagine that the USB power solution is only suitable for flashing the FW but nothing else. again, just a guess!

I'm Sebastian, BTW...

generalPanic commented 4 years ago

I did connect 12v dc power, and this solved the problem. Thanks for your help.

Cheers, Ben

On Thu, Dec 19, 2019 at 12:48 PM klubglied notifications@github.com wrote:

hi ben.

BTW, I do not have the motor power or any motors connected. I'm using the power from the USB port to power the stepper logic.

is there a reason you don't want to connect your DC input to the SKR? i am not a great electronics wizard but maybe you should connect the real DC input (12V/24V) as each of your stepper drivers is trying to power the virtual stepper motor with about 0.8A-1.0A which would be too much for a normal USB power supply. but really i am just guessing here...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bigtreetech/BIGTREETECH-SKR-V1.3/issues/59?email_source=notifications&email_token=ABI3NECICF375XVMBDY4OYLQZO6WXA5CNFSM4IHHIZM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHKRXFI#issuecomment-567614357, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABI3NEANIPCPUBO7YIL5VQ3QZO6WXANCNFSM4IHHIZMQ .

klubglied commented 4 years ago

Hi Ben. so great to hear that it works now! if you use your TMC's for a 3D printer I can strongly recommend to use/uncomment the "linear advance" feature in the "configuration_adv.h". it's such a cool feature that made my printer/prints look so much better! if you do so you also have to change/uncomment the "#define MINIMUM_STEPPER_PULSE" and change it's value to 1 or 2 as the proposed "0" for TMC's let the E stepper motor quit working. (cf. https://github.com/MarlinFirmware/Marlin/issues/11024) best. Sebastian

hudy85 commented 4 years ago

Jumper illustration on X-stepper port:

20190726_232537_cut

Hi, this is solved "All Low" problem, but sensorless homing don't work. Do you know how to solve this problem?

hydra commented 2 months ago

I had problems getting TMC2209 step sticks working with UART configuration in Marlin 2.x.. Some Bigtree TMC2208 before were working correctly, so I was debugging the case.

Many thanks for posting this!

I have a BTT SKR V1.3 with 5x BTT TMC2209 V1.3 drivers.

My symptoms were:

After removing the two jumpers on MS0 and MS1 ~and bridging the RSTI and M3 as above~ (EDIT: no jumpers installed, see below), I can report:

I had two different motors:

I can't yet report if sensorless homing works, as there's nothing connected to the motor output spindles yet.

EDIT: Updated as it turned out I had the jumper in the wrong place, once I put it in the right place I found that things didn't work, and I had the same 'Error All LOW' again, removing ALL jumpers under all 5 of the TMC2209 drivers was the solution for me.