Reprap Mendel : Marlin Firmware (PID settings)

RUMPS1.4に無理やり17Vを供給している。理由は17Vだと、Heated Bedの加熱速度が早いので。ただし、以前メモしたようにRAMPS1.4のD1ダイオードを取り外さないと、ボードは壊れるので注意が必要。さらに、安全信頼性も下がるので、取り扱いにより注意が必要だろう。

17Vに上げたので、Hot endの温度がオーバーシュートする。そこで、Hot endの温度調整がうまくいくように、MarlinのPID settingを変えて調整(したつもり)。それにしても、Marlin FireWareすごい!

Summary

  • #define PIDTEMP // <-----コメントを外す. UNCOMMENTING IT.
  • #define BANG_MAX 255/3 // limits current to nozzle while in bang-bang mode; 255=full current // <-----255では出力が大きいので1/3倍する。REDUCING 1/3 of 255 YOU CAN ADJUST IT.
  • 以下の設定は?なのでとりあえずUltimakerのまま。NOT SURE SO LEFT THEM AS IS
  • // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
  • // Ultimaker
  • #define DEFAULT_Kp 22.2 // <-----
  • #define DEFAULT_Ki 1.08 // <-----
  • #define DEFAULT_Kd 114 // <-----


//===========================================================================
//=============================Thermal Settings  ============================
//===========================================================================
// PID settings:
// Comment the following line to disable PID and enable bang-bang.
#define PIDTEMP // <-----
#define BANG_MAX 255/3 // limits current to nozzle while in bang-bang mode; 255=full current // <-----
#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#ifdef PIDTEMP 
  //#define PID_DEBUG // Sends debug data to the serial port.
  //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
  //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
  #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
                                  // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
  #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
  #define K1 0.95 //smoothing factor within the PID
  #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine

// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
// Ultimaker
    #define  DEFAULT_Kp 22.2 // <-----
    #define  DEFAULT_Ki 1.08 // <-----
    #define  DEFAULT_Kd 114 // <-----

// MakerGear
//    #define  DEFAULT_Kp 7.0
//    #define  DEFAULT_Ki 0.1
//    #define  DEFAULT_Kd 12

// Mendel Parts V9 on 12V
//    #define  DEFAULT_Kp 63.0 // <-----
//    #define  DEFAULT_Ki 2.25 // <-----
//    #define  DEFAULT_Kd 440 // <-----
#endif // PIDTEMP

My Mendel is working with 17V instead of 12V. That makes the heated bed hot quicker. It's not very safe but OK for now. To apply 17V to RAMPS 1.4, you need to remove D1 on the RUMPS board (see here for the location of the D1 diode).

I got quick heated bed. But other hands, the temperature of my hot end overshoots and looks like out of control. It's because I increased the supply voltage. So I used the PID mode of Marlin Firmware and changed some a bit, uncommenting #define PIDTEMP, and reducing the BANG_MAX setting to 255/3 from 255. I am not sure what the other parameters are optimal, so left them as is.