3D printer G-code · Marlin

M906: Stepper motor current (TMC) (Marlin)

Stepper motor current (TMC) — Sets the RMS current of TMC stepper drivers in milliamps. Too little current loses steps (layer shifts), too much makes motors hot. M569 S1 switches stealthChop on for…

By cnccode · Updated
On this page
  1. What does M906 do?
  2. Parameters
  3. Example
  4. Tips from practice
  5. Related commands
  6. More settings commands
  7. Frequently asked questions
PropertyValue
CommandM906
FunctionStepper motor current (TMC)
FirmwareMarlin
GroupSettings
SyntaxM906 [X] [Y] [Z] [E] <mA>

What does M906 do?

Sets the RMS current of TMC stepper drivers in milliamps. Too little current loses steps (layer shifts), too much makes motors hot. M569 S1 switches stealthChop on for an axis.

Parameters

ParameterMeaning
X Y Z ECurrent in mA (RMS)

Example

G-code
M906 X800 Y800 E650
M500

Tips from practice

  • Start near 70 % of the rated current of the motor.
  • Klipper sets run_current in the [tmc2209 stepper_x] sections.

Marlin. Many Marlin commands only exist when the feature is enabled in the firmware build. If the printer answers "Unknown command", the feature is missing. Klipper does not understand most of these settings codes; it uses printer.cfg instead.

More settings commands

CommandFunctionFirmware
M500Save settings to EEPROMMarlin
M501Load settings from EEPROMMarlin
M502Factory reset (firmware defaults)Marlin
M503Report settingsMarlin
M201Max acceleration per axisMarlin
M203Max feed rate per axisMarlin
M204Set accelerationMarlin and Klipper
M205Jerk and junction deviationMarlin
SAVE_CONFIGSave calibration to printer.cfgKlipper
SET_VELOCITY_LIMITSpeed, acceleration and corner limitsKlipper
FIRMWARE_RESTARTRestart (RESTART / FIRMWARE_RESTART)Klipper

Test it before you print

Paste your start code or a whole file into the 3D printer simulator. It plans every move, shows the time and finds missing waits, cold extrusion and moves outside the bed.

Open the simulator

Frequently asked questions

What does M906 do on a 3D printer?
M906 is stepper motor current (TMC). Sets the RMS current of TMC stepper drivers in milliamps. Too little current loses steps (layer shifts), too much makes motors hot. M569 S1 switches stealthChop on for an axis.
Does M906 work in Klipper and Marlin?
M906 is a Marlin command. Klipper uses its own commands and printer.cfg settings for this task.
Was this page helpful?