High pitch noise when motors are stalling

Hi, has anyone idea how to get rid off (or at least move out of hearing range) high pitch noise when X/Y motors are stalling under current? It doesn't happens everytime, seems it depends on where (microsteps) motor stopped. But the noise is moreles always (mostly only pitch is changed) Change stealthchop_threshold from 0 to 1 make it from "normal" high pitch noise to "ultra" high pitch (and very very unpleasant) noise, so not really a solution 😦 . (picture is current at motor stalling with stealthchop_threshold: 0) Setup: Vcore3 300 Board: BTT Octopus v1.1 X/Y drivers: TMC5160@24V (EZ5160) motors: standard X/Y on Vcore3, LDO-42STH48-2504AC steppers settings is taken from config/steppers/ldo/42sth48-2504ac/5160/24v-1.6a-(x|y).cfg
No description
37 Replies
miklschmidt
miklschmidt•2y ago
Yes you can lower the holdcurrent at the cost of accuracy or you can try and tune the driver* parameters with your scope, not sure if you can get rid of it completely that way. looks like those 24V 5160 settings were never tuned. These are the klipper defaults:
[tmc5160 stepper_x]
driver_TBL: 2
driver_TOFF: 3
driver_HEND: 2
driver_HSTRT: 5
[tmc5160 stepper_y]
driver_TBL: 2
driver_TOFF: 3
driver_HEND: 2
driver_HSTRT: 5
[tmc5160 stepper_x]
driver_TBL: 2
driver_TOFF: 3
driver_HEND: 2
driver_HSTRT: 5
[tmc5160 stepper_y]
driver_TBL: 2
driver_TOFF: 3
driver_HEND: 2
driver_HSTRT: 5
Try those and see if it makes it better (then i'll fix the configs). Even better if you end up tuning them yourselves for 1.6A, please share your settings!
Kmarty
KmartyOP•2y ago
That’d be nice but I’m afraid it is complete out of my ability (and understanding TMC datasheet). Everything I tried so far was even worse.
miklschmidt
miklschmidt•2y ago
Fair enough, did you try 2209's to see if there's any difference?
Kmarty
KmartyOP•2y ago
I have 2226, which I replaced by 5160 on axis X and Y, because 2226 makes a lot noisier movements in range about 60-120mm/s
miklschmidt
miklschmidt•2y ago
Interesting. In general it's advisable to print >100 mm/s with spreadcycle
Kmarty
KmartyOP•2y ago
yeah, but sometimes, even in middle of the print, the speed is lowered (minimal layer time, overhangs, anything) and with 2226 it was so resonant (which was also transfered to print surface) and sometimes force it to print at higher speed wasn't an option. 5160 solved this problem, at least partially (the noise when printing in this speed isn't so harsh), but now I have noise when motors stall.
miklschmidt
miklschmidt•2y ago
it's a balance. High current is more accurate but makes more noise (especially during idle).
Kmarty
KmartyOP•2y ago
no noticeable difference with this settings 😦
miklschmidt
miklschmidt•2y ago
At the cost of some accuracy, try:
[tmc5160 stepper_x]
hold_current: 0.8
[tmc5160 stepper_y]
hold_current: 0.8
[tmc5160 stepper_x]
hold_current: 0.8
[tmc5160 stepper_y]
hold_current: 0.8
Kmarty
KmartyOP•2y ago
definitely quieter. (and it has funny sound right after movement :-). Seems the hold_current is set over several steps down from run_current)
Kmarty
KmartyOP•2y ago
miklschmidt
miklschmidt•2y ago
yep this is the 5160's auto chopper tuning if you combine that with stealthchop_threshold: 1 you should have removed all of the noise This is discouraged by klipper for accuracy reasons, but it works
Kmarty
KmartyOP•2y ago
It really works! 🙂 Thank you very much I'd prefer this rather than some possible (theoretical?) higher precision Seems even this works:
[tmc5160 stepper_x]
stealthchop_threshold: 1
driver_TBL: 2
driver_TOFF: 3
driver_HEND: 2
driver_HSTRT: 5
hold_current: 1.4

[tmc5160 stepper_y]
stealthchop_threshold: 1
driver_TBL: 2
driver_TOFF: 3
driver_HEND: 2
driver_HSTRT: 5
hold_current: 1.4
[tmc5160 stepper_x]
stealthchop_threshold: 1
driver_TBL: 2
driver_TOFF: 3
driver_HEND: 2
driver_HSTRT: 5
hold_current: 1.4

[tmc5160 stepper_y]
stealthchop_threshold: 1
driver_TBL: 2
driver_TOFF: 3
driver_HEND: 2
driver_HSTRT: 5
hold_current: 1.4
But I have to wait now (at least an hour) to confirm it because the high pitch noise from stealthchop_threshold: 1, when there's noise, it always caused me start of tinnitus at higher level of noise (and I can't hear the real noise for a while since I hear it persistently, sometimes even several hours).
Kmarty
KmartyOP•2y ago
Found the way how to show some results that do not depend on my hearing (although results changing every homing - depends on at which microstep motors stall, I guess. So I tried several attempts and picked the worst ones. BTW. tinnitus still ringing 🙂 ). This is Klipper defaults driver_* with stealthchop_threshold: 1 and unchanged hold_current (and also the reason why I wrote in first post as this is not a solution):
No description
Kmarty
KmartyOP•2y ago
This is the same, but added hold_current: 1.4:
No description
Kmarty
KmartyOP•2y ago
(Results with stealthchop_threshold: 0 is not easy to pick, the video shows it better).
miklschmidt
miklschmidt•2y ago
that seems like a substantial improvement 18db should be barely audible at least my office room is at 36db ambient or something like that Can you live with it? I wonder if it would be better to drop hold_current and just run the steppers at 1.4a
Kmarty
KmartyOP•2y ago
I can live with it 🙂 Tomorrow I’ll try if 1.4A is enough without limitations of my setup. With pure SpreadCycle there’s always more or less annoying sound (change current changes only pitch), and with hold_current: 0.8 there’s shaking of stepper_y (slight fast micromovement I can feel at hotend carriage) and I don’t feel comfortable to keep it as is. So the stealthchop_threshold: 1 seems to be only way for me.
miklschmidt
miklschmidt•2y ago
SpreadCycle definitely isn't quiet. If you can live with slight inaccuracy and <120 mm/s printing, there's always stealthchop
Kmarty
KmartyOP•2y ago
Oh, I was planning to use it as in old (one of the first?) RatOS - StealthChop only for stall motor 🙂 As it moves, then it is ok (as ok as SpreadCycle can be). The faster, the better.
miklschmidt
miklschmidt•2y ago
best of both worlds 🙂
Kmarty
KmartyOP•2y ago
I tried to make videos how behaves 2226 vs 5160 (all started with attempt to write macro for test of every microstep position in step)
Kmarty
KmartyOP•2y ago
This is 2226 (2209, moreless) with default RatOS settings:
Kmarty
KmartyOP•2y ago
This is 5160 (with Klipper’s default settings):
Kmarty
KmartyOP•2y ago
Already during homing, the 2226s have more harsh/agressive sound. Which leds me to create another two videos, movement around the bed at 100mm/s:
Kmarty
KmartyOP•2y ago
2226:
Kmarty
KmartyOP•2y ago
5160:
Kmarty
KmartyOP•2y ago
Videos are just for ... I don't know, curiosity 🙂 2226 has hard/harsh sound, which resonates so much that speed in range around 75-105mm/s isn't really usable (the main reason why I tried the 5160). 5160 provides "softer" sound at SpreadCycle, but sounds louder at high pitch tones (and really high tones :-)) when motor stalls. When fully in SpreadCycle (stealthchop_threshold: 0), both have at least one microstep position which shakes with the carriage(hotend) when motors stalling (although it should be still). 2226 is less pronounced, 5160 more.
miklschmidt
miklschmidt•2y ago
One thing you should try (and this is gonna sound crazy, but too many have had success with it to ignore). Reverse the pins for X and Y. Like if you would turn the connector 180.
When fully in SpreadCycle (stealthchop_threshold: 0), both have at least one microstep position which shakes with the carriage(hotend) when motors stalling (although it should be still). 2226 is less pronounced, 5160 more.
Then sounds really strange. I've never heard or observed that before 🤔 Besides the pin swapperoo, you can try enabling interpolation (at the cost of accuracy, but minor), or just increase the microsteps (256 being the max, also a lot more taxing on the MCU).
Kmarty
KmartyOP•2y ago
I did some time ago. And although it might not be clear on these videos, these ones are much quieter than it was before 🙂 (Yep, it was even worse)
miklschmidt
miklschmidt•2y ago
Ah gotcha dang
Kmarty
KmartyOP•2y ago
microsteps I tried from 16 to 256, whole range (just for curiosity), no change with this. The only change was characteristic sound of <32microstepping, but no change with my issue
miklschmidt
miklschmidt•2y ago
then i'm guessing interpolation won't do much either Probably not gonna get much better without going full stealthchop or reducing current. Or ... different steppers 😄 2504AC are definitely not made for silence 🙂
Kmarty
KmartyOP•2y ago
it seems so today I returned back to full spreadcycle, since with stealthchop_threshold: 1 there is always at least one microstep at which 12kHz tone is at full loudness. And even the noise is annoying, it is still less than 6kHz (which doesn't affect my ear issue) (I totally forgot to try at lower run current, sorry)
miklschmidt
miklschmidt•2y ago
Thankfully that one is quick to test 😄
Kmarty
KmartyOP•2y ago
yeah, but not now ok. I'd close it since it doesn't seem it has solution. So I set it back to noisy stall, which is the least problematic. Thank you very much for your time and patience. Maybe if someone use it, I made a macro which tries to move each microstep within one full step of selected stepper:
[gcode_macro STEPPER_TEST]
gcode:
{% set stepper = params.STEPPER|lower|default("")|string %}

{% if stepper == "" %}
{action_raise_error("STEPPER parameter not defined!")}
{% endif %}

{% if stepper not in printer.motion_report.steppers %}
{action_raise_error("Stepper '" + stepper + "' doesn't exists!")}
{% endif %}

{% set fullsteps = printer.configfile.settings[stepper].full_steps_per_rotation %}
{% set rotation_distance = printer.configfile.settings[stepper].rotation_distance %}
{% set microsteps = printer.configfile.settings[stepper].microsteps %}

{% set one_microstep_distance = rotation_distance / fullsteps / microsteps %}

{% set delay = (15 * 1000) / microsteps %} # Make the test 15 seconds long (actually it takes longer)

{action_respond_info("Stepper = " + stepper)}
{action_respond_info("fullsteps = " + fullsteps|string)}
{action_respond_info("rotation_distance = " + rotation_distance|string)}
{action_respond_info("microsteps = " + microsteps|string)}
{action_respond_info("one_microstep_distance = " + one_microstep_distance|string)}
{action_respond_info("Delay between microsteps = " + delay|string)}

G28

# Go to the center of the bed
G90
{% set half_x = printer.toolhead.axis_maximum.x / 2 %}
{% set half_y = printer.toolhead.axis_maximum.y / 2 %}
G1 X{half_x} Y{half_y} F10000
M400 # Not sure if it really does what I think it should

# TODO: How to make stepper align to full step?
M18
SET_STEPPER_ENABLE STEPPER={stepper} ENABLE=1

{% for mstep in range(microsteps) %}
FORCE_MOVE STEPPER={stepper} DISTANCE={one_microstep_distance} VELOCITY=100
M400
G4 P{delay}
{% endfor %}

M18
[gcode_macro STEPPER_TEST]
gcode:
{% set stepper = params.STEPPER|lower|default("")|string %}

{% if stepper == "" %}
{action_raise_error("STEPPER parameter not defined!")}
{% endif %}

{% if stepper not in printer.motion_report.steppers %}
{action_raise_error("Stepper '" + stepper + "' doesn't exists!")}
{% endif %}

{% set fullsteps = printer.configfile.settings[stepper].full_steps_per_rotation %}
{% set rotation_distance = printer.configfile.settings[stepper].rotation_distance %}
{% set microsteps = printer.configfile.settings[stepper].microsteps %}

{% set one_microstep_distance = rotation_distance / fullsteps / microsteps %}

{% set delay = (15 * 1000) / microsteps %} # Make the test 15 seconds long (actually it takes longer)

{action_respond_info("Stepper = " + stepper)}
{action_respond_info("fullsteps = " + fullsteps|string)}
{action_respond_info("rotation_distance = " + rotation_distance|string)}
{action_respond_info("microsteps = " + microsteps|string)}
{action_respond_info("one_microstep_distance = " + one_microstep_distance|string)}
{action_respond_info("Delay between microsteps = " + delay|string)}

G28

# Go to the center of the bed
G90
{% set half_x = printer.toolhead.axis_maximum.x / 2 %}
{% set half_y = printer.toolhead.axis_maximum.y / 2 %}
G1 X{half_x} Y{half_y} F10000
M400 # Not sure if it really does what I think it should

# TODO: How to make stepper align to full step?
M18
SET_STEPPER_ENABLE STEPPER={stepper} ENABLE=1

{% for mstep in range(microsteps) %}
FORCE_MOVE STEPPER={stepper} DISTANCE={one_microstep_distance} VELOCITY=100
M400
G4 P{delay}
{% endfor %}

M18
miklschmidt
miklschmidt•2y ago
You're very welcome. That macro might come in handy in the future!

Did you find this page helpful?