Changing power modes through Octoprint
 
Notifications
Clear all

[Closed] Changing power modes through Octoprint  

  RSS
paul.m
(@paul-m)
Active Member
Changing power modes through Octoprint

Is it possible to change power modes on the MK2 through Octoprint? Meaning is there a gcode command that could be sent to the printer to change power modes or is it through the printers display only?

Thanks

Posted : 01/12/2016 9:10 pm
PJR
 PJR
(@pjr)
Antient Member Moderator
Re: Changing power modes through Octoprint

M907:

case 907: // M907 Set digital trimpot motor current using axis codes.
{
#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
for(int i=0;i<NUM_AXIS;i++) if(code_seen(axis_codes[i])) digipot_current(i,code_value());
if(code_seen('B')) digipot_current(4,code_value());
if(code_seen('S')) for(int i=0;i<=4;i++) digipot_current(i,code_value());
#endif
#ifdef MOTOR_CURRENT_PWM_XY_PIN
if(code_seen('X')) digipot_current(0, code_value());
#endif
#ifdef MOTOR_CURRENT_PWM_Z_PIN
if(code_seen('Z')) digipot_current(1, code_value());
#endif
#ifdef MOTOR_CURRENT_PWM_E_PIN
if(code_seen('E')) digipot_current(2, code_value());
#endif

You can sent the required power setting based onthis:

// Motor Current settings for RAMBo mini PWM value = MotorCurrentSetting * 255 / range
#if MOTHERBOARD == 102 || MOTHERBOARD == 302
#define MOTOR_CURRENT_PWM_RANGE 2000
#define DEFAULT_PWM_MOTOR_CURRENT {270, 830, 450} // {XY,Z,E}
#define DEFAULT_PWM_MOTOR_CURRENT_LOUD {540, 830, 500} // {XY,Z,E}
#endif

Peter

Please note: I do not have any affiliation with Prusa Research. Any advices given are offered in good faith. It is your responsibility to ensure that by following my advice you do not suffer or cause injury, damage…

Posted : 02/12/2016 5:54 pm
Carsten
(@carsten-2)
Estimable Member
Re: Changing power modes through Octoprint

@Peter: Thanks for digging it out of the source!

So the code would be

M907 X270 Z830 E450

to "silence" mode? Did I got that right?

Carsten

My Prints: https://www.prusaprinters.org/social/15695-carsten/prints
My Employer: https://make-magazin.de

Posted : 03/12/2016 1:11 pm
PJR
 PJR
(@pjr)
Antient Member Moderator
Re: Changing power modes through Octoprint

Yes, that is correct.

It will remain until the RAMBo is reset/power cycled.

Peter

Please note: I do not have any affiliation with Prusa Research. Any advices given are offered in good faith. It is your responsibility to ensure that by following my advice you do not suffer or cause injury, damage…

Posted : 03/12/2016 10:09 pm
Nigel
(@nigel)
Honorable Member
Re: Changing power modes through Octoprint

Listen to Peter (PJR) I admit he is king of the G codes. I am learning.

Nigel
Life is keeping interested and excited by knowledge and new things.

Posted : 05/12/2016 2:39 am
Carsten
(@carsten-2)
Estimable Member
Re: Changing power modes through Octoprint

Tested and installed as two custom Buttons in octoprint. Good thing.

Carsten

My Prints: https://www.prusaprinters.org/social/15695-carsten/prints
My Employer: https://make-magazin.de

Posted : 05/12/2016 10:02 am
jussi.p
(@jussi-p)
Active Member
Re: Changing power modes through Octoprint

How much current is too much for xy-steppers? High power setting is 540 but those steppers are rated 2x350mA? Can I put 700 without problems?

Posted : 14/02/2019 8:04 pm
Share: