What's new
VORON Design

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members!

Klipper TMC Autotune

Looks like an interesting extension!

At face value, it sounds awesome. However, the official Klipper documentation warns against changing currents or modes on-the-fly as it can introduce positioning errors, reduce torque, or even lead to increased motor heating. So those are things you would want to be aware of.

Klipper docs for reference:
 
Has anyone used this? https://github.com/andrewmcgr/klipper_tmc_autotune
Looks very interesting but for me it lacks examples, instructions and just how to use it.

If someone is using it can they explain this to me and extrapolate on the script?
Just add into your config ( for example )

[autotune_tmc stepper_x] //section for what stepper you will use it
motor: ldo-42sth48-2004mah // type of stepper what you have

you can also add additional parametrs from listed ones on github
like

[autotune_tmc stepper_x] //section for what stepper you will use it
motor: ldo-42sth48-2004mah // type of stepper what you have
sg4_thrs: 80 //for TMC2209 sensorless homing - read note on GitHub - > homing_speed should be numerically greater than rotation_distance for those axes using sensorless homing

And that's all you need to do.

So far no issues at all, steppers are quiter than before. Just saves you from calculating parametrs by you ( and excel ) , you can manually do that and add it in your printer config, After that you wont need this scipt at all.
 
Just add into your config ( for example )



you can also add additional parametrs from listed ones on github
like



And that's all you need to do.

So far no issues at all, steppers are quiter than before. Just saves you from calculating parametrs by you ( and excel ) , you can manually do that and add it in your printer config, After that you wont need this scipt at all.
Can you show me a real example of the config? Not pulled from the github?
Where do you see the outcome from the tune so you can add the parameters to your config?
 
I have this for AB steppers
[autotune_tmc stepper_x]
motor: tmc-qsh4218-51-10-049
sgt: 2
voltage: 48

[autotune_tmc stepper_y]
motor: tmc-qsh4218-51-10-049
sgt: 2
voltage: 48

Where you can see it? Well, on SPI / UART bus or on oscilloscope ( if you know how ). Otherwise you can't.
That plugin is just simplified whole TMC tuning . It will ( simply said ) fill all TMC parameters for you. Like if you take TMC tuning xls sheet, fill all values and add them in your printer config.

Like ( just random code from internet with real values, not related to my config ! )

[tmc2209 stepper_x]
uart_pin: PE7
interpolate: False
stealthchop_threshold: 0
sense_resistor: 0.110
run_current: 0.976
driver_TBL: 1
driver_TOFF: 3
driver_HSTRT: 0
driver_HEND: 3

I hear it ( less noise from steppers - same as if i use that xls and fill values manually). At least from what i recognized intermediately.
 
Ohhhhhh, I get it now. It's not Auto Tuning, it's just auto setting the parameters that are default.
Well, that is a little disappointing. I thought it was going to go through all settings testing them. It can still be useful, just not what I was hopping for.
 
Well there won't be too many options for static parameters . Like for one specific stepper with one specific current you end up with just one set of specific numbers. They would change slightly with current but not that much ( atleast from my experience ).
But it is autotuning in some way because it will do all that math for you, default parametrs are different from what this will use. It wil automaticly tune parameters for given stepper and current, so that's why autotune.

Full automatic testing all parametrs ( include current ) will require some additional measuremets ( and sensors ) i'm affraid. As far as i think with my very limited knowledge.
 
I had a little time to mess with it this afternoon, and it seems to work fine on Z and extruder for me, I cannot get it to work with my XY motors. I use sensorless homing with 2209's and ldo-42sth48-2804ah motors and its not playing nice all together. I cannot get the motors to trigger when homing. I get the error, no trigger after full movement and I tried going with a high and low trigger value from my default of 60.
 
I had a little time to mess with it this afternoon, and it seems to work fine on Z and extruder for me, I cannot get it to work with my XY motors. I use sensorless homing with 2209's and ldo-42sth48-2804ah motors and its not playing nice all together. I cannot get the motors to trigger when homing. I get the error, no trigger after full movement and I tried going with a high and low trigger value from my default of 60.
I have same issue. My X with sgt: 1 works. But on Y just crashes into Y. When I remove autotune but work on sgt: 1
 
It also doesn't work (does nothing) with my LDO motors:
Code:
[autotune_tmc stepper_x]
motor: ldo-35sth52-1504ah

[autotune_tmc stepper_y]
motor: ldo-35sth52-1504ah

[autotune_tmc stepper_z]
motor: ldo-42sth25-1004cl200et

[autotune_tmc extruder]
motor: ldo-36sth20-1004ahg
interpolate: true or false with no difference. All of these are present in the database. Do I miss something?
 
Top