MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.19k stars 19.22k forks source link

[BUG ?] TMC5160 not working since update to TMCStepper 0.3.4 #14083

Closed Patag closed 5 years ago

Patag commented 5 years ago

Hi all, Thanks in advance for your great (and probably hard) work. Here is my issue

Configuration

Printer still under assembling SKR v1.3 TMC5160 using SPI on X/Y/E (sensorless homing activated on X/Y) TMC2130 using SPI on Z1/Z2 (dual Z) Marlin bugfix 2.0 from May, 19

Description

Since TMCStepper lib upgrade to 0.3.4, X axis moves became weird (especially homing), impossible sometimes. LCD values related to TMC stepper not valid regarding default settings in conf*.h (Y and E nor wired, so not tested yet). M502/M500 doesn't change anything. Revert to TMCStepper lib 0.3.2 and all run fine.

Additional Information

Same configuration.h and configuration_adv.h, only TMCStepper lib changed between M122

M122 with 0.3.4 X Y Z Z2 E Enabled true false false false false Set current 800 800 800 800 800 RMS current 792 792 795 795 792 MAX current 1117 1117 1121 1121 1117 Run current 15/31 15/31 25/31 25/31 15/31 Hold current 7/31 7/31 12/31 12/31 7/31 Global scaler 133/256 133/256 133/256 CS actual 0/31 7/31 12/31 12/31 29/31 PWM scale 0 0 0 0 0 vsense 1=.18 1=.18 stealthChop false true true true false msteps 0 256 256 256 256 tstep 2097408 max max max 2097408 pwm threshold 0 39 658 658 0 [mm/s] - 101.36 3.00 3.00 - OT prewarn true false false false true OT prewarn has been triggered true false false false true off time 0 4 4 4 0 blank time 24 24 24 24 54 hysteresis -end 12 2 2 2 12 -start 5 1 1 1 1 Stallguard thrs 1 1 0 0 0 DRVSTATUS X Y Z Z2 E stallguard X X X sg_result 1022 0 0 0 896 fsactive X stst X X X olb ola s2gb s2ga otpw ot Driver registers: X 0x00:3F:F7:FF Y 0x80:07:40:00 Z 0x81:0C:00:00 Z2 0x81:0C:00:00 E 0x01:FF:7F:FC

M122 with 0.3.2 X Y Z Z2 E Enabled true false true true false Set current 800 800 800 800 800 RMS current 782 782 795 795 782 MAX current 1103 1103 1121 1121 1103 Run current 31/31 31/31 25/31 25/31 31/31 Hold current 15/31 15/31 12/31 12/31 15/31 Global scaler 66/256 66/256 66/256 CS actual 15/31 15/31 12/31 12/31 15/31 PWM scale 0 0 19 20 0 vsense 1=.18 1=.18 stealthChop false true true true false msteps 256 256 256 256 256 tstep max max max max max pwm threshold 39 39 658 658 4150 [mm/s] 101.36 101.36 3.00 3.00 1.00 OT prewarn false false false false false OT prewarn has been triggered false false false false false off time 4 4 4 4 4 blank time 24 24 24 24 24 hysteresis -end 2 2 2 2 2 -start 1 1 1 1 1 Stallguard thrs 1 1 0 0 0 DRVSTATUS X Y Z Z2 E stallguard X X X sg_result 34 0 0 0 0 fsactive stst X X X X X olb ola s2gb s2ga otpw ot Driver registers: X 0x81:0F:00:26 Y 0x80:0F:40:00 Z 0x81:0C:00:00 Z2 0x81:0C:00:00 E 0x80:0F:00:00 Testing X connection... OK Testing Y connection... OK Testing Z connection... OK Testing Z2 connection... OK Testing E connection... OK

teemuatlut commented 5 years ago

Unfortunately I have to admit that I don't have further ideas right at this time. The current calculation seems to be spot on and the configuration seems alright.

eightheads commented 5 years ago

@teemuatlut This is what it is doing in practice unless current settings are a lot higher than other drivers. Note: the same printer setup works great with other TMC drivers and was running TMC2208 via UART on the same control board before changing out for the TMC5160s. https://www.youtube.com/watch?v=mbs_DO4Mh4w

Black6spdZ commented 5 years ago

I don't know if its just my specific combination of hardware but stealthchop absolutely will not work correctly for my machine. just tried latest build out with same results as before. it is really bad with my two Z steppers in parallel

eightheads commented 5 years ago

I don't know if its just my specific combination of hardware but stealthchop absolutely will not work correctly for my machine. just tried latest build out with same results as before. it is really bad with my two Z steppers in parallel

Is it doing like in my video above when trying to run Stealthchop?

Black6spdZ commented 5 years ago

@eightheads: yep almost exactly and I just figured it out.. stealthchop is a no go @12v especially with paralleled Z motors. I connected my adjustable lab supply up and ran the bed up and down while increasing the voltage. at 24v it sill had a little drone but at 26v was practically silent, like a tmc driver should be. the single X and Y motors were silent at about 18v though. well damn, guess I'll be switching out hot-end and fans and pray my bed can be rewired for 24v :(

eightheads commented 5 years ago

@eightheads: yep almost exactly and I just figured it out.. stealthchop is a no go @12v especially with paralleled Z motors. I connected my adjustable lab supply up and ran the bed up and down while increasing the voltage. at 24v it sill had a little drone but at 26v was practically silent, like a tmc driver should be. the single X and Y motors were silent at about 18v though. well damn, guess I'll be switching out hot-end and fans and pray my bed can be rewired for 24v :(

I am testing these on a 12v printer currently... However, all other TMC drivers run great at 12v in stealthchop

Black6spdZ commented 5 years ago

I thought the same because i have some 2130s on another printer running 12v fine, smaller 1.8d motors though

Black6spdZ commented 5 years ago

got in my new nice fanless 24v 15a psu, bumped it up a little to 26v and it runs smooth and silent now

perikanttila commented 5 years ago

Even this issue is closed, I had the same kind of issue. I used TMC5160 V1.0 from BIQU. That version does have pin 6 floating, whereas it should be wired to the ground of the stepstick. Also the pin towards the SKR 1.3 board shall be cut. as pins 5 and 6 are shorted in mainboard. When I fixed that - i had no issue with marlin 2.0.x (I used experimetal SQUARE wave steppin optin, and the minimum step was default) now I have X and Y running TMC5160 and Z and E0 with TMC2130.

github-actions[bot] commented 4 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.