MarlinFirmware/Marlin

[FR] Explicitly switch stealthChop / spreadCycle per move (i.e., anticipate need for "Hybrid" switching)

Open

#13,316 opened on Mar 5, 2019

View on GitHub
 (15 comments) (0 reactions) (0 assignees)C++ (16,011 stars) (19,123 forks)batch import
F: TrinamicT: Feature Requesthelp wanted

Description

Description

So... I have a BigTreeTech/BIQU SKR v1.1, and am able to use TMC2208's in single-wire UART mode, thanks to work associated with https://github.com/MarlinFirmware/Marlin/issues/13197 and others (I'm not sure just who to actually thank. @gloomyandy ? :smiley: )

There is one thing that I think should be addressed, but it's not specific to the 2208. Rather, it applies to all Trinamic drivers, I guess:

If a move will cross the stealthChop/spreadCycle Hybrid threshold while accelerating and/or decelerating, some way to avoid the Hybrid switching noise is kinda needed, when moving at speeds close to the threshold.

Why not just plan ahead: when doing a move (whether printing or travel), if the target speed is higher than the configured threshold -- ignoring acceleration entirely (i.e. just assume it's infinite for this particular case), just switch to spreadCycle mode before the fast move starts, and drop back to stealthChop when the move ends, assuming the next move isn't also above the threshold.

That way, any noise the switching causes gets drowned-out by the printer's usual movement noises. At the very least, doing it this way will ensure that the driver will not chatter between the two modes during lots of small moves.

Steps to Reproduce

  1. Set a fairly low Hybrid threshold, say 150 mm/s
  2. execute a long travel move at, say, 300 mm/s with around 1000 mm/s² acceleration.
  3. listen for a "thunk" or "chattering" sound during accel/decel.

The motor's not skipping/stalling, it's just noisy.

Contributor guide