Back to the Gcode Dictionary
M906: Set motor currents
- Xnnn X drive peak motor current1,3
- Ynnn Y drive peak motor current1,3
- Znnn Z drive peak motor current1,3
- Ennn E drive(s) peak motor current(s)1,3
- Innn Motor current idle factor (0..100)2
This command must be later in config.g than any M584 command.
- M906 X300 Y500 Z200 E350:350
Sets the peak currents to send to the stepper motors for each axis. The values are in milliamps.
1Current setting on the various Duet boards are as follows:
- Duet 2 WiF/Ethernet is done in steps of 100mA and is rounded down.
- Duet Maestro is in steps of 50mA and rounded down.
- Duet 3 MB6HC and EXP3HC it is 26.2mA.
- Duet 3 Mini5+ it is 74mA (provisionally), rounded down.
- Duet 3 1LC tool board is 50ma, rounded down.
2This is the percentage of normal that the motor currents should be reduced to when the printer becomes idle but the motors have not been switched off. The default value is 30% and will always be at least 100mA - starting from RRF 2.02 setting it to 0 will disable the steppers after timeout like M18|M84 do and if an axis is related to the motor, throw out the "homing" of it, since it is likely that the position cannot be precisely determined anymore. Note that the idle current is applied globally for all motors and cannot be set per axis.
RepRapFirmware does not support individual motor settings where an axis has multiple motors connected to different stepper drivers. The first parameter specified will be used for all motors on the axis. You should use identical motors on any axis that has more than one motor to avoid unexpected behaviour.
Example: If you have two motors on your Z axis, physically connected to Z and E0 stepper drivers, configured with M584 Z2:3, set M906 Z200, not M906 Z200:200
3Divide by 1.414 for RMS current as used in Marlin implementations for Trinamic drivers
NOTE: As a rule of thumb, the recommendation is to set M906 to use 60-85% of the rated maximum current for the motor. Though you can go above or below as needed, and will have to tune for a balance of motor temperature, motor torque, and noise level. You can also go at it from the EMF calculator route and play with different values to see how it changes behaviour. https://www.reprapfirmware.org/ And click on EMF calculator