Printer Model: Anycubic Mega S
MCU / Printerboard: Trigrorilla 0.0.2
Host / SBC Raspberry PI4
klippy.log klippy.zip (854.0 KB)
Describe your issue:
I have the issue that my extruder stepper is loosing steps and I like to analyse the reason. From my point of view it could be a problem with the stepper/driver itself because I exchanged the printhead, PFTE tube and also the extruder to a BMG. Stepper and Motor are unchanged.
I tried to increase the run_current = 1.2 but DUMP_TMC seems that the current looks less than before. But perhaps I misinterpret it…
Specifying hold_current is not recommended. It gains virtually nothing but carries the risk of accuracy losses during switching.
TMC drivers regulate motor current using several registers, including IHOLD_IRUN, which contains the IHOLD and IRUN fields. Each of these fields is a value from 0 to 31 representing the standstill (IHOLD) and run (IRUN) currents, respectively. The value set in each field determines the current as a fraction of the configured maximum (full-scale = run_current) current, in steps of \frac{1}{32}. Thus, a value of 31 corresponds to the maximum current, and 16 would be half of the maximum, and so on.
The value is dynamic, and there is no “easy” way to monitor it across a print, except by actually measuring it.
Refer to Trinamic’s specifications for the full details.
It seems very unlikely that your issue is related to Klipper’s or the TMC’s current management. It is more likely a mechanical problem or potentially a defective stepper motor.
Shortly, it is a little complicated.
On the TMC2208/TMC2209/TMC2130.
It would show the value regards the absolute max current value available from the sense resistor.
So, if 31 == 2A, you will see ~1.1A for IRUN==17
There is a Vsense 1. Which should technically half the absolute value.
So, if with a sense resistor configured for 2A, and you try to set the run current to 1A, which is roughly equal to 16. We enable Vsense 0 → 1.
So, now, 31 == 1A.
For TMC5160/2240 there is globalscaler available, so most of the time run current is always 31, with some multiplier from the absolute maximum resistor value.
Hope that helps.
JFYI, IRUN and IHOLD is not dynamic. The CS actual is, CS is the actual/applied IRUN value. It could be changed by the standstill/powerdown logic to the IHOLD, or by the Coolstep if configured.
So, without IHOLD and CoolStep.
IRUN == CS == IHOLD while driver is enabled.
As indicated, there are several fields that are part of the run_current calculation. Easiest way to check the value is to run the SET_TMC_CURRENT STEPPER=stepper_x command (without setting CURRENT or HOLDCURRENT), as that command will display the latest values programmed into the driver.