본문 바로가기
Hardware/3D Printing

Marlin 1.1.X 세팅의 모든것 - Anycubic Delta Kossel, Configuration 수정하기 (2/2) - Configuration_adv.h

by lovey25 2019. 11. 7.
반응형

Marlin 펌웨어의 설정에 대한 두번째 포스팅입니다. Configuration.h 파일의 내용을 살펴본 이전 포스팅(https://kwonkyo.tistory.com/170)의 6달만의 후속으로 Configuration_adv.h파일에 대한 내용을 마져 알아보겠습니다.

이전 포스팅에서 살펴본  설정을 기준으로 비활성화 된 부분은 생략합니다. 그리고 보통의 경우 사용하지 않을 설정에 대해서도 생략하였습니다. (듀얼 스텝퍼, 듀얼 노즐, 실험적 기능 등)

Thermal Settings

Thermal protection for hotends

#if ENABLED(THERMAL_PROTECTION_HOTENDS)
  #define THERMAL_PROTECTION_PERIOD 40        // Seconds
  #define THERMAL_PROTECTION_HYSTERESIS 4     // Degrees Celsius

  #define WATCH_TEMP_PERIOD 20                // Seconds
  #define WATCH_TEMP_INCREASE 2               // Degrees Celsius
#endif

프린터의 화재로 인한 손상방지 차원에서 마련된 소프트웨어적 안정장치이고 그 세부 세팅을 조정하는 부분입니다.

온도센서의 단선이나 고장등으로부터 보호하기위해서 최저와 최고의 온도 범위가 설정되어 있습니다. 만약 센서가 고장이나거나 하여, 온도가 THERMAL_PROTECTION_PERIOD 시간동안 목표한 온도에서 THERMAL_PROTECTION_HYSTERESIS 이상의 온도차를 보이는 경우 프린터를 멈추게 합니다.

그리고 익스트루더 온도를 조정(M104, M109)하거나, PID 튜닝(M303)을 할 때, WATCH_TEMP_PERIOD 동안 히팅을 하는데 그 시간안에 WATCH_TEMP_INCREASE 만큼 온도가 오르지 않으면 프린터를 중지시킵니다. 그리고 WATCH_TEMP_INCREASE는 항상 2이상이어야 한다고 합니다.

Thermal protection for bed

#if ENABLED(THERMAL_PROTECTION_BED)
  #define THERMAL_PROTECTION_BED_PERIOD 20    // Seconds
  #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius

  #define WATCH_BED_TEMP_PERIOD 60                // Seconds
  #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
#endif

베드 보호용 TERMAL PROTECTION 파라미터도 위의 핫엔드와 유사합니다. 그리고 베드온도 설정은 M140, M190코드가 사용됩니다.

PIDTEMP

#if ENABLED(PIDTEMP)
  // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
  // if Kc is chosen well, the additional required power due to increased melting should be compensated.
  //#define PID_EXTRUSION_SCALING
  #if ENABLED(PID_EXTRUSION_SCALING)
    #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
    #define LPQ_MAX_LEN 50
  #endif
#endif

PIT_EXTRUSION_SCALING 옵션을 설정하는 부분입니다. 실험적인 기능인것 같은데 기본 비활성화 되어있고 DEAULT_Kc 값으로 비례적으로 히팅파워를 조절하는 것 같습니다.

Automatic Temperature

#define AUTOTEMP
#if ENABLED(AUTOTEMP)
  #define AUTOTEMP_OLDWEIGHT 0.98
#endif

gcode에 따른 익스투루더 움직임에 따라 hotend온도를 자동으로 조절해 주는 기능입니다. M109 코드로 온도를 설정하게 되는데 예를들어 "M109 F1 S200 B250" 이라고 하면 아이들 상태에서 200도를 유지하다가 익스투루더가 동작을 하면 온도를 올려주는데 최대로 250도까지 자동으로 조절해 줍니다. "F"는 펙터값인것 같아요.

AD595센서 켈리브레이션

// @section temperature

//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
#define TEMP_SENSOR_AD595_OFFSET 0.0
#define TEMP_SENSOR_AD595_GAIN   1.0

AD595센서를 사용하는 경우 켈리브레이션을 위한 상수입니다.

Constroller Fan

#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
#define CONTROLLERFAN_SPEED 255  // == full speed

보드용 쿨링팬을 사용할 경우 팬을 설정하기 위한 옵션입니다. Heating bed를 설치하면서 보드의 온도가 좀 걱정이라서 나중에 사용할 수도 있을 것 같네요.

#define E0_AUTO_FAN_PIN -1
#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed

Extruder용 쿨링팬 옵션입니다. 핀에 -1로 정의를 하면 비활성화 됩니다.

Mechanical Settings

Homing

#define X_HOME_BUMP_MM 5
#define Y_HOME_BUMP_MM 5
#define Z_HOME_BUMP_MM 5
#define HOMING_BUMP_DIVISOR {6, 6, 6}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)

Marlin 1.1 버전부터인가요? homing을 했을 때 endstop을 한번 치고 끝나는게 아니라 endstop을 한번 치고나면 뒤로 살짝 물러났다가 천천히 다시한번 endstop을 치는 동작으로 변경되었습니다.

그래서 여기 1~3행은 얼마만큼 뒷걸음질 할껀지 거리를 설정하고, 4행은 두번째 범핑시에 접근 속도입니다. 초기 세팅시에 좀더 정교한 측정이 가능하겠네요.

Machine

#define AXIS_RELATIVE_MODES {false, false, false, false}

슬라이서의 세팅값에 따라서 절대값 모드를 사용할건지 상대값 모드를 사용할건지 결정이되는것 같습니다. 저는 문제가 없어서 손대지 않았어요.

Stepper

#define INVERT_X_STEP_PIN false
#define INVERT_Y_STEP_PIN false
#define INVERT_Z_STEP_PIN false
#define INVERT_E_STEP_PIN false

#define DEFAULT_STEPPER_DEACTIVE_TIME 120
#define DISABLE_INACTIVE_X true
#define DISABLE_INACTIVE_Y true
#define DISABLE_INACTIVE_Z true  // set to false if the nozzle will fall down on your printed part when print has finished.
#define DISABLE_INACTIVE_E true

#define DEFAULT_MINIMUMFEEDRATE       0.0     // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE     0.0

1~4행: Stepper의 기본 극성을 설정하는 옵션, 보통은 active - high인데 그 반대인 경우 수정하면 됩니다.

6~10행: Stepper의 idle때 전원을 차단하는 기능입니다. 6행이 idle 대기시간인데 0으로 하면 기능을 사용하지 않는게 됩니다. 이 시간은 M18, M84 명령으로도 설정할 수 있습니다.

11,12행: stepper의 최소 feedrate를 설정합니다.

Ultipane Rotery encoder

#if ENABLED(ULTIPANEL)
  #define MANUAL_FEEDRATE {50*60, 50*60, 5*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
  #define ULTIPANEL_FEEDMULTIPLY  // Comment to disable setting feedrate multiplier via encoder
#endif

ULTIPANEL으로 정의된 LCD를 사용할 경우 해당되는 옵션인데요. LCD 옆에있는 Rotery encoder로 프린터를 수동으로 움직일 때 feedrate를 설정합니다.

SLOWDOWN

#define DEFAULT_MINSEGMENTTIME        20000
#define SLOWDOWN

출력을 할때 프린터 헤드가 움직이는 동작은 planner라는 모듈이 gcode의 경로를 잘게 쪼개어서 각 stepper들의 최적화된 동작을 하도록하는 하는 명령어로 변환이 됩니다. 그리고 이렇게 변환된 명령어들은 버퍼 메모리에 저장이되고 저장된 순서대로 차례차례 동작을 하면서 버퍼데이터가 소모가 됩니다.

이때, 버퍼에 데이터가 쌓이는 속도보다 소진되는 속도가 빠르다면 프린터가 움직였다가 멈췄다가를 반복하는 동작을 할텐데요. 그 때 최소한 DEFAULT_MINSEGMENTTIME 시간 동안 기다리도록 하는 옵션이라고 합니다. 그런데 멈췄다가 움직였다가를 반복하면 출력품질이 떨어지기 때문에 만약 버퍼의 누적 데이터가 50%이하로 내려가기 되면 의도적으로 속도를 늦춰주도록 하는 옵션이 SLOWDOWN이라고 합니다.

Minimum planner junction speed

#define MINIMUM_PLANNER_SPEED 0.05// (mm/sec)

junction speed의 기본 최소값을 설정하는거라고 하는데요. 아주 느린속도에서 움직일때 이상동작을 하는 경우가 아니라면 손대지 않아도 되는것 같습니다.

Stepper

// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
#define MICROSTEP_MODES {16,16,16,16,16} // [1,2,4,8,16]
// Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
// Motor Current controlled via PWM (Overridable on supported boards with PWM-driven motor driver current)
//#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps

사용하는 Stepper의 특성에 따라 조절해줘야 하는 옵션입니다. 아직 정확한 용도를 파악하지 못해서 주석채로 남겨둡니다.

Encoder

#define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
#define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
#define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value

//#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again

//@section extruder

// extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says:    force = k * distance
// Bernoulli's principle says:  v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE

#if ENABLED(ADVANCE)
  #define EXTRUDER_ADVANCE_K .0
  #define D_FILAMENT 2.85
#endif

/**
 * Implementation of linear pressure control
 *
 * Assumption: advance = k * (delta velocity)
 * K=0 means advance disabled.
 * To get a rough start value for calibration, measure your "free filament length"
 * between the hobbed bolt and the nozzle (in cm). Use the formula below that fits
 * your setup, where L is the "free filament length":
 *
 * Filament diameter           |   1.75mm  |    3.0mm   |
 * ----------------------------|-----------|------------|
 * Stiff filament (PLA)        | K=47*L/10 | K=139*L/10 |
 * Softer filament (ABS, nGen) | K=88*L/10 | K=260*L/10 |
 */
//#define LIN_ADVANCE

#if ENABLED(LIN_ADVANCE)
  #define LIN_ADVANCE_K 75
#endif

Extruder에서 필라멘트 압출을 좀더 정교하게 하기 위한 옵션인것 같은데 제 설정에서는 사용하지 않지만 나중에 기회가 되면 공부하고싶어서 지우지 않고 남겨둡니다.

Gcode

// Arc interpretation settings:
#define ARC_SUPPORT  // Disabling this saves ~2738 bytes
#define MM_PER_ARC_SEGMENT 1
#define N_ARC_CORRECTION 25

// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
//#define BEZIER_CURVE_SUPPORT

// G38.2 and G38.3 Probe Target
//#define G38_PROBE_TARGET
#if ENABLED(G38_PROBE_TARGET)
  #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
#endif

특정 Gcode의 사용성을 설정하는 옵션입니다. 역시 기회가 된다면 좀더 공부해야 할 부분인것 같습니다.

Minimum steps / segment

// Moves (or segments) with fewer steps than this will be joined with the next move
#define MIN_STEPS_PER_SEGMENT 6

Stepper가 정상적으로 동작하기위해서 사전에 준비운동하는 step의 최소숫자라고 해야 하나요? calibration 방법은 최소 1의 값부터 1씩 늘려서 적절한 값을 찾으면 된다고 하는데 아직 정확한 용도를 이해하지는 못했습니다. 

Parallel heater

//#define HEATERS_PARALLEL

히팅 파트는 온도를 올릴때 순서대로 진행이되는데요 이 옵션을 켜주면 히터가 동시에 가열됩니다.

Buffer

#if ENABLED(SDSUPPORT)
  #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
#else
  #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
#endif

#define MAX_CMD_SIZE 96
#define BUFSIZE 4

BLOCK_BUFFER_SIZE는 plan의 단위인 block의 크기를 설정하는 옵션입니다. 2행은 SD카드 출력을 할때 적용되는 설정이고 4행은 SD카드가 아닌 USB로 연결해서 출력하는 등의 상황에서 적용되는 값입니다. (2의 거듭제곱으로 설정)

MAX_CMD_SIZE, BUFSIZE는 시리얼 연결로 입력하는 ASCII buffer용 설정값 입니다.

 

끝!

반응형

댓글