XaiJu
The100
The100

patreon


What makes my TMC Driver so special?

Today, I embarked on fine-tuning my extruder motor to achieve peak performance while maintaining minimal heat generation.

Once the tuning was complete, I asked my self what whould Klipper Stock provide me instead:

As illustrated, there's a noticeable drop at the peak of the sine wave. This dip is a result of the default behavior of Klipper's global scaler. By default, Klipper sets the current scaler to its maximum value of 31, which causes the sine wave to extend beyond the optimal range for the driver's RSense. To protect the driver from potential damage, Klipper employs the global scaler to detect when the current exceeds safe levels. It temporarily reduces the current by disabling the flow for a few cycles, leading to the observed drop in the sine wave.

So with Klipper Stock, when you begin tuning your drivers, the primary objective isn't solely to find the best settings for performance. Instead, it's about identifying configurations that limit the current to a level that keeps the global scaler happy

To enhance this process, I've modified my TMC drivers to bypass the need for the global scaler as a safety mechanism. Instead, I utilize the TMC's inherent current scaler to set a maximum current threshold that avoids overshooting. This approach ensures that the global scaler remains inactive, resulting in a smoother sine wave. Here's an example of the sine wave generated by my TMC driver with its auto-tuning algorithm:

While the results are promising, there's still a slight jitter present. Achieving complete optimization would require further fine-tuning with an oscilloscope. Fortunately, the experts at Analog provide an excellent guide that details strategies to maximize driver performance:

πŸ”— Analog's Comprehensive Driver Optimization Guide

What makes my TMC Driver so special? What makes my TMC Driver so special?

Comments

Thanks! It's an area I haven't looked deeply into!

Alex B

For almost all regular speed prints, take a look at the graphs. Right now, my extruder is running at 0.7β€―A RMS, which you can see by checking the peak current. That's about the recommended current for the Moon's Pancake extruders used by the Voron or RatRig community. You will have the same shitty sine wave on all of them if you don't tune your TMC drivers manually.

Matt the Printing Nerd

What is the situation in which your motor current would hit peak current? Is that normal top-speed operation in your build, whereas most other printers don't operate at top-speed of their steppers and wouldn't experience this?

Alex B


More Creators