Tmc2660 verry distorted output

Basic Information:

Printer Model: sparccube XL converted to jubilee toolchanger
MCU / Printerboard: clone duet WIFI with genuin DUEX5 and raspi3b
klippy.log

Describe your issue:

hi,
i am running a duet wifi clone ( as i burned-up my original one ).
when trying to get my steppers to run at an acceptable noise level i noticed something strange.
it looks like there is a high frequecy parasite on the output it kind of looks like an H-bridge switching output.
I am not an expert on using a scope so maybe i am wrong here and please correct me.
i am however pretty confident in my scope setup because when i rotate the motor by hand at these settings, i get a clean sine wave. when i run the motor via the duet, i only see a lot of distortion.
maybe this is be typical for the clone duet but the motors where running verry noisy/ agressive on my orriginal duet to.
does enyone know what i am doing wrong here?

accourding to the tuning instructions for the TMC2660 driver i should see a sinewave and be able to “clean it up” with correcting the settings.
but the way the sine wave looks,… wel, it is hardly a sign wave.

if there are any tips for tuning the TMC2660, please let me know because there is a lot of info arround but nothing seems complete.

apparently new users cant upload more the 2 items.
so here is the third one…

Motors, of any kind, are essentially impossible to put on an oscilloscope and get meaningful information from the voltage waveform. When you see something like this in a datasheet:

It’s generally an image of the driver providing current to a resistor. Motor voltages are all over the place with Back EMF and noise really making a mess/hash of things.

That actually goes back to your observation that the output looks like a traditional H-Bridge and it is with the current actually being varied and not the voltage (which is why I noted that for the waveform diagram, they’re measuring the current across a resistor and not across a motor’s terminals).

I had a product which I changed from DC motors to steppers and struggled to get them working acceptable but was lucky enough to get some coaching form a Trinamic FAE on the process of working with microstepping stepper motor drivers to understand what you’re looking for in order to get best performance (which equates to lowest noise). If you want to see what’s really going on, you’re going to need something like this between the driver and the stepper motors to provide meaningful waveforms on your oscilloscope:

https://www.trinamic.com/products/modules/details/tmcm-0013-xa/

What are the tuning instructions that you are working with? I’m really surprised they say that you should see a sine wave (as even when I started on the product, I knew you can’t get anything meaningful out of any kind of motor by just looking at the voltage).

Would a current probe be usefull? Maybe if I ask at the right moment, I can use a couple from work. That trinamic measuring board costs more tha a couple common 3D printer steppers which would run smoother on default settings. At the moment I am using motors I salvaged some ware. they were in good condition when I salvaged them.

Give a current probe a try.

If I remember correctly, the Trinamic FAE didn’t think they were as good as the TMCM-0013 boards (but he might be biased).

Ok, ik wil try to get mij hands on them. But it can take a few day’s
Thank you for the advice !!

I would be surprised if they give you any grief if you tell them that you are going to use them to debug the movement stepper motors on a 3D printer. Most people will ask if they can help.

You never did give me a link to the tuning document - I’d like to see what the process is.

I just read the spreadcycle tuning document again.
i must have missed it but they indeed talk about connecting the scope via a current probe or across the sense resistor.
i added a link to the spreadcycle tuning document.

I know AN001 very well. I’m guessing you’re looking at using SpreadCycle because of this documentation and statements saying the Duet 2 doesn’t support StealthChop:

But, this document is downlevel and, as I understand it, the SPI interface is wired, as per the current Duet 2 documentation:

From what I see in the Duet documentation, they’re focusing on the RepRap Firmware and do not mention Klipper at all. The reason why I suspect that StealthChop will work is because they say that StallGuard (sensorless homing) works on the board and that requires the SPI interface, exactly the same as accessing registers and specifying whether or not SpreadCycle or StealthChop is used all the time.

Have you tried to add stealthchop_threshold: 999999 to your [tmc2660 stepper_#] (where “#” is something like “x”) statement?

I suspect that StealthChop works in Klipper which should give you the noise reduction you’re looking for without trying to figure out the SpreadCycle operation and parameters (which is a chore, believe me). You should not see any kind of degradation in the printer’s performance.

SpreadCycle is really for high speed applications but does provide more constant torque at (what Trimamic considers) low and medium speeds so you get the most constant rotation speed possible. It’s going to be the noisier of the two options and there’s really nothing significant you can do about it. The noise from SpreadCycle is why Trinamic came up with StealthChop, to get quieter operations.

I suggest that you try enabling StealthChop in your printer and see how that works out for you. If it doesn’t work, then we’ll go to the next step.

i haven’t tried “stealthchop_threshold: 999999” because the stealthchop is not supported by the TMC2660 chip itself. or am i missing some data?

just as i was thinking, klipper says that the stealtchop feature is not valid fot TMC2660

Where does it say that StealthChop for the TMC2660 is not supported? I did a fairly deep dive last night and could find old documentation saying that it wasn’t supported for the Duet 2 but then the current documentation doesn’t have that disclaimer.

I’m really just suggesting that you give it a try and see what happens.

@sineos can you comment?

Looking at the TMC2660 spec, it only supports Spread Cycle

1 Like

Stealthchop is no a clipper related software based feature. It is a feature that is integrated in the Tmc driver itself. En when you look at the data sheet of the tmc2660, there is not mention op stealthchop. Stealthchop is integrated in other similar drivers but not the tmc2660.
That is also why klipper says it is no valid configuration for the tmc2660. And this is also why stealthchop is not supported by the original duet software for the duet WiFi/Ethernet. The duet2 maestro and the duet3 series have different driver ic’s that do support stealthchop.

And that is also the reason why I was looking into spread cycle and coolstep tuning

1 Like

Thanx for the explanation. I’ve never worked with the '2660 and a lot of the documentation is ambiguous with the part being lumped in with the '2209, '2130 and '5160 (all which have it). My very extensive experience is with the TMC2225. Anyway, that’s my excuse and I’m sticking with it.

So, you’ll have to get your current probes and take a look at the waveforms at the stepper but don’t count on being able to reduce the motor sound coming out of SpreadCycle.

Sorry.