Motor Current adjustment in firmware.
Could anyone please point me to the correct location in the MK3s firmware where to change the current to the motors.
Thank you!
Don't know Prusa but have you tried M906/907?
Again don't know Prusa but there is a section in vanilla Marlin in Configuration_alt.ini called "stepper motor current" which might get you started.
Motor Current adjustment in firmware
I did saw the M907 gcode however I wanted to hard code this settings.
Thank you very much for the reply, I will look in Configuration_alt.ini.
Once more thank you!
Configuration_alt.ini
I looked for "Configuration_alt.ini" is not present in the Bondtech firmware for the MK3s 🙁
I am still holding hope someone will know, being able to change the current to the motors is an important part of calibration, not everyone is happy running the calibrations from a menu and are more hands on in tweaking their machines. Locking people out of this settings by obfuscating where this settings are is not cool.
I do understand that the Marlin code is changed to do all the nice features that the MK3s has however in the spirit of "open source" there should be documentation where to find all entries for configuring the printer in firmware, I would really like to hardcode my personal settings and not having to run auto configurations from the printer.
Configuration_alt.ini is one of 2 configuration files for Marlin - a forked version of this runs on your Prusa. I assume and am therefore probably wrong, that Bondtech have created a fork of Prusa's fork.
As stated in the ini file this will only work on certain boards and I have no idea is that applies to the board in your printer. For completeness the relevant section
** * @section * * Some boards have a means of setting the stepper motor current via firmware. * * The power on motor currents are set by: * PWM_MOTOR_CURRENT - used by MINIRAMBO & ULTIMAIN_2 * known compatible chips: A4982 * DIGIPOT_MOTOR_CURRENT - used by BQ_ZUM_MEGA_3D, RAMBO & SCOOVO_X9H * known compatible chips: AD5206 * DAC_MOTOR_CURRENT_DEFAULT - used by PRINTRBOARD_REVF & RIGIDBOARD_V2 * known compatible chips: MCP4728 * DIGIPOT_I2C_MOTOR_CURRENTS - used by 5DPRINT, AZTEEG_X3_PRO, AZTEEG_X5_MINI_WIFI, MIGHTYBOARD_REVE * known compatible chips: MCP4451, MCP4018 * * Motor currents can also be set by M907 - M910 and by the LCD. * M907 - applies to all. * M908 - BQ_ZUM_MEGA_3D, RAMBO, PRINTRBOARD_REVF, RIGIDBOARD_V2 & SCOOVO_X9H * M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2 */ //#define PWM_MOTOR_CURRENT { 1300, 1300, 1250 } // Values in milliamps //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 } // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis /** * I2C-based DIGIPOTs (e.g., Azteeg X3 Pro) */ //#define DIGIPOT_MCP4018 // Requires https://github.com/felias-fogg/SlowSoftI2CMaster //#define DIGIPOT_MCP4451 #if EITHER(DIGIPOT_MCP4018, DIGIPOT_MCP4451) #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT:4 AZTEEG_X3_PRO:8 MKS_SBASE:5 MIGHTYBOARD_REVE:5 // Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. // These correspond to the physical drivers, so be mindful if the order is changed. #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO //#define DIGIPOT_USE_RAW_VALUES // Use DIGIPOT_MOTOR_CURRENT raw wiper values (instead of A4988 motor currents) /** * Common slave addresses: * * A (A shifted) B (B shifted) IC * Smoothie 0x2C (0x58) 0x2D (0x5A) MCP4451 * AZTEEG_X3_PRO 0x2C (0x58) 0x2E (0x5C) MCP4451 * AZTEEG_X5_MINI 0x2C (0x58) 0x2E (0x5C) MCP4451 * AZTEEG_X5_MINI_WIFI 0x58 0x5C MCP4451 * MIGHTYBOARD_REVE 0x2F (0x5E) MCP4018 */ //#define DIGIPOT_I2C_ADDRESS_A 0x2C // Unshifted slave address for first DIGIPOT //#define DIGIPOT_I2C_ADDRESS_B 0x2D // Unshifted slave address for second DIGIPOT #endif
I do understand that the Marlin code is changed to do all the nice features that the MK3s has however in the spirit of "open source" there should be documentation where to find all entries for configuring the printer in firmware,
Prusa publish their fork of Marlin (on github). Given the complexity of Marlin your wish to document all entries is unlikely to happen.
Thank you
Thank you for all the help Towlerg I appreciate you.
I think I found the settings, they are in the "configuration_prusa.h" file ...
//new settings is possible for vsense = 1, running current value > 31 set vsense to zero and shift both currents by 1 bit right (Z axis only)
#define TMC2130_CURRENTS_H {16, 20, 35, 30} // default holding currents for all axes
#define TMC2130_CURRENTS_FARM 36 // E 805 mA peak for ECool/farm mode
#define TMC2130_CURRENTS_R {16, 20, 35, 30} // default running currents for all axes
#define TMC2130_CURRENTS_R_HOME {8, 10, 20, 18} // homing running currents for all axes
I have to test it but it does look promising.