Marlin: [FR] Set micro-stepping on TMC Drivers

Created on 24 Sep 2020  路  12Comments  路  Source: MarlinFirmware/Marlin

Description


It would be useful to be able to use M350 - Set micro-stepping with TMC drivers or to have a dedicated TMC command to set micro-stepping. (e.g. SKR Mini E3 v1.2, TMC 2209)

Feature Workflow

  1. Send M350 ... (or a TMC specific one) to the printer (e.g. M350 E1)
  2. Get OK response, instead of Unknown Command: M350 ...
  3. E stepper is now run with 1 micro stepping
Trinamic Feature Request

Most helpful comment

@thisiskeithb why close this? Seems perfectly valid as a feature request. We had already discussed it on Discord.

All 12 comments

No. M350 is for drivers that have digital microstepping pins which the SKR mini boards do not have. https://marlinfw.org/docs/gcode/M350.html


This Issue Queue is for Marlin bug reports and development-related issues, and we prefer not to handle user-support questions here. (As noted on this page.) For best results getting help with configuration and troubleshooting, please use the following resources:

After seeking help from the community, if the consensus points to a bug in Marlin, then you should post a bug report.

@thisiskeithb why close this? Seems perfectly valid as a feature request. We had already discussed it on Discord.

@thisiskeithb why close this? Seems perfectly valid as a feature request. We had already discussed it on Discord.

This seemed like a question about M350's use and not a feature request.

Since you're aware/handling it, I'll reopen it.

Changed the description to be more like a FR and not a question.

Following the Feature Request template really helps 馃檪

The M350 command on RepRap seems to be documented to allow up to 256 microsteps. It doesn't clarify whether it works with TMC drivers, but to support 256 microsteps that seems incredibly likely.
https://www.reprap.org/wiki/G-code#M350:_Set_microstepping_mode

Yep, looks like they are using M350 to set both microstepping and interpolation on TMC drivers:
https://github.com/Duet3D/RepRapFirmware/blob/bcb169fbf6fc8457afb272cd8ddf3d6b76d58795/src/Movement/StepperDrivers/TMC22xx.cpp#L568

I imagine to be useful it would also have to store settings to EEPROM.

@sjasonsmith So, that means it works for TMC drivers already, and can close this FR, or while it works, it still should be able to make it work on boards that has TMC drivers without digital micro-stepping pins?

I was just looking at what RepRap firmware does with the command. I wasn鈥檛 referring to Marlin code at all. There is some desire to use the same commands across different firmwares where possible. RepRap configuring this through M350 makes it easier to justify adding it to Marlin.

I think M350 would be the place to do it, the remaining question is whether making it runtime configurable is a good idea. Every constant which becomes configurable makes the math a little harder while printing, which may be noticeable on slower controllers.

I don't think it would be used during printing. But I question if this command is something that would be used more than just during initial setup and I think this is just not something that is "tuned". It's basically a set it and forget it type of configuration item.
Then if you want to have the command for setting this live, then you'll likely also want it to be saved in EEPROM and overall I just don't see the point.

One use case I can think of right now, is a "cold pull" gcode. If the extruder isn't strong enough on 16 micros-tepping to pull the filament out, then switching it to full stepping would result stronger extrusion, and thus would be able to pull the filament out. Assuming this is how the stepper motor torque changes relation to the micro-stepping.

Microstepping doesn't decrease torque.
While you're taking finer steps, you're also taking comparatively more steps and the end result is the same delta between rotor and stator, thus resulting in the same applied torque.

So you are saying that micro-stepping doesn't decreases the rotation torque, only the holding torque on a micro step? And so it would pull the filament with the exact same amount of force?
Edit:
Microstepping
Microstepping myths
Not sure if I read these two correctly...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

esenapaj picture esenapaj  路  3Comments

ceturan picture ceturan  路  4Comments

modem7 picture modem7  路  3Comments

heming3501 picture heming3501  路  4Comments

Glod76 picture Glod76  路  3Comments