Kingroon KP3S

Aus Wiki
Zur Navigation springen Zur Suche springen

Hardware Mods

Change TMC drivers to UART Mode

ABL Sensor

  • LJ12A3-4-Z/BX (4mm, NPN, Normally Open)
    • Sensor output directly to Z-switch input and via 1.2K resistor to ground

Sherpa Mini + Phaetus Dragon



Software Mods

Install Klipper on Raspi

git clone https://github.com/Klipper3d/klipper
./klipper/scripts/install-octopi.sh
  • Octoprint Webinterface:
> Serial Connection > General > /tmp/printer
> Serial Connection > Behaviour > Error > Cancel (DO NOT DISCONNECT)
> Serial Connection > Behaviour > Cancelling > Uncheck Attempt > Behaviour > Cancelling > Uncheck Attempt

Build Klipper Firmware

git clone https://github.com/th33xitus/kiauh.git
cd kiauh
./kiauh.sh
-> 4) Advanced
-> 3) Build only

Enable extra low-level
STMicroelectronics STM32
STM32F103
28KiB bootloader
8 MHZ crystal
USART PB11/PB10
250000 Baud
!PC6,!PD13 GPIO pins at startup
cd ~/klipper/
./scripts/update_mks_robin.py ./out/klipper.bin ./out/Robin_nano.bin
cp /out/Robin_nano.bin ~
  • Copy Robin_nano.bin to SDcard and boot printer with SDcard

Klipper printer.cfg

# reference:
#   http://hitoriblog.com/kingroon_kp3s/docs/improving_speed_and_quality_by_using_klipper/
#   https://3dprintbeginner.com/how-to-install-klipper-on-kingroon-kp3s/
#   https://github.com/nehilo/klipper_KP3S

#####################################PRINTER##############################################

[printer]
kinematics: cartesian
#max_velocity: 300
max_velocity: 220

#max_accel: 7000 # klipper ringing test
# max_accel: 900
# max_accel: 1000
max_accel: 2500

#max_accel_to_decel: 7000 # klipper ringing test
# max_accel_to_decel: 900
# max_accel_to_decel: 1000
max_accel_to_decel: 2500

max_z_velocity: 25
max_z_accel: 100
square_corner_velocity: 5.0

[input_shaper]
shaper_freq_x: 44.3
shaper_freq_y: 28.5
shaper_type: mzv

[bed_screws]
screw1: 24,24
screw2: 156,24
screw3: 156,156
screw4: 24,156

[gcode_arcs]
resolution: 0.1

[mcu]
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
restart_method: command

[virtual_sdcard]
path: ~/gcode_files

[static_digital_output display_reset]
pins: !PC6, !PD13

#####################################STEPPER##############################################
[tmc2208 stepper_x]
uart_pin: PA3
uart_address: 0
run_current: 0.65
hold_current: 0.60
stealthchop_threshold: 999999
interpolate: true
sense_resistor: 0.110
driver_PWM_AUTOGRAD: True
driver_PWM_AUTOSCALE: True
driver_HEND: 3
driver_HSTRT: 0

[stepper_x]
step_pin: PE3
dir_pin: PE2
enable_pin: !PE4
microsteps: 32
rotation_distance: 39.93 # decrease number to make part bigger
endstop_pin: ^!PA15
position_endstop: 0
position_min: 0
position_max: 180
homing_speed: 50
homing_retract_dist: 0

[tmc2208 stepper_y]
uart_pin: PA6
uart_address: 0
run_current: 0.65
hold_current: 0.60
stealthchop_threshold: 999999
interpolate: true
sense_resistor: 0.110
driver_PWM_AUTOGRAD: True
driver_PWM_AUTOSCALE: True
driver_HEND: 3
driver_HSTRT: 0

[stepper_y]
step_pin: PE0
dir_pin: PB9
enable_pin: !PE1
microsteps: 32
rotation_distance: 39.89 # decrease number to make part bigger
endstop_pin: ^!PA12
full_steps_per_rotation: 200
position_endstop: 0
position_min: 0
position_max: 180
homing_speed: 50
homing_retract_dist: 0

[tmc2208 stepper_z]
uart_pin: PA1
uart_address: 0
run_current: 0.65
hold_current: 0.60
stealthchop_threshold: 999999
interpolate: true
sense_resistor: 0.110
driver_PWM_AUTOGRAD: True
driver_PWM_AUTOSCALE: True
driver_HEND: 3
driver_HSTRT: 0

[probe]
pin: ^!PA11
x_offset: 32 
y_offset: 0
z_offset: 0.5
#z_offset: decrease number to print further from print bed
#z_offset: increase number to print closer to print bed
speed: 50


[stepper_z]
step_pin: PB5
dir_pin: !PB4
enable_pin: !PB8
microsteps: 32
rotation_distance: 8.0  # decrease number to make part bigger
#endstop_pin: ^!PA11 
endstop_pin: probe:z_virtual_endstop 
# position_endstop: 0 # without probe
position_min: -2 # with probe
position_max: 180
homing_speed: 10
homing_retract_dist: 5.0
full_steps_per_rotation: 200

[safe_z_home]
home_xy_position: 90,90
speed: 50
z_hop: 15
z_hop_speed: 5

[bed_mesh]
mesh_min: 40,40
mesh_max: 140,140
probe_count: 3,3
horizontal_move_z: 4

#####################################EXTRUDER#############################################
[tmc2208 extruder]
uart_pin: PE5
hold_current: 0.15 #0.35
run_current: 0.20 #0.4
stealthchop_threshold: 999999
interpolate: True
sense_resistor: 0.110
driver_PWM_AUTOGRAD: True
driver_PWM_AUTOSCALE: True
driver_HEND: 3
driver_HSTRT: 0

[extruder]
step_pin: PD6
dir_pin: !PD3
enable_pin: !PB3
microsteps: 32
full_steps_per_rotation: 200
gear_ratio: 50:10
rotation_distance: 23.0
nozzle_diameter: 0.400
filament_diameter: 1.750
max_extrude_only_distance: 150.0
max_extrude_only_velocity: 75
max_extrude_only_accel: 1500
instantaneous_corner_velocity: 1.50
heater_pin: PC3
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC1
control: pid
pid_Kp: 14.669
pid_Ki: 0.572
pid_Kd: 94.068
min_temp: 0
max_temp: 280
pressure_advance: 0.03
# 0.12 old stock prin thead
# 0.08

#####################################BED##################################################

[heater_bed]
heater_pin: PA0
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC0
control: pid
pid_Kp: 325.10
pid_Ki: 63.35
pid_Kd: 417.10
min_temp: 0
max_temp: 130

#####################################FAN##################################################

[fan]
pin: PB1

[heater_fan my_nozzle_fan]
pin: PB0
heater: extruder
heater_temp: 50.0
fan_speed: 1.0

#####################################MACROS###############################################

[display_status]

[pause_resume]
recover_velocity: 50

#[gcode_macro M900]
#default_parameter_K: 0.08
#gcode:
#    SET_PRESSURE_ADVANCE ADVANCE={K}

[gcode_macro PAUSE]
rename_existing: BASE_PAUSE
#default_parameter_X: 5   # edit to your park position
#default_parameter_Y: 5   # edit to your park position
#default_parameter_Z: 10  # edit to your park position
#default_parameter_E: 0.5 # edit to your retract length
gcode:
    SAVE_GCODE_STATE NAME=PAUSE_state
    BASE_PAUSE
    G91
    G1 E-0.5 F2100
    G1 Z10
    G90
    G1 X5 Y5 F6000

[gcode_macro RESUME]
rename_existing: BASE_RESUME
#default_parameter_e: 0.5
gcode:
    G91
    G1 E0.5 F2100
    G90
    RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
    BASE_RESUME

[gcode_macro CANCEL_PRINT]
rename_existing: BASE_CANCEL_PRINT
gcode:
    M107
    TURN_OFF_HEATERS
    CLEAR_PAUSE
    SDCARD_RESET_FILE
    BASE_CANCEL_PRINT
    G1 Z+0.5 E-5 F9000 ;move Z up and retract filament 
    G1 Z+25 F9000      ;move up 25mm
    M84                ;steppers off 
    M106 S0            ;disable fan

[gcode_macro G29]
gcode:
    BED_MESH_CLEAR
    BED_MESH_CALIBRATE

[gcode_macro MESH_CALIBRATE]
gcode:
    BED_MESH_CLEAR
    G28
    BED_MESH_CALIBRATE

[gcode_macro Z_STEP_UP]
gcode:
    SET_GCODE_OFFSET Z_ADJUST=0.02 MOVE=1

[gcode_macro Z_STEP_DOWN]
gcode:
    SET_GCODE_OFFSET Z_ADJUST=-0.02 MOVE=1

[output_pin BEEPER_pin]
pin: PC5
pwm: True
value: 0
shutdown_value: 0
cycle_time: 0.001
scale: 1

[gcode_macro M300]
gcode:
    # Use a default 1kHz tone if S is omitted.
    {% set S = params.S|default(1000)|int %}
    # Use a 10ms duration is P is omitted.
    {% set P = params.P|default(100)|int %}
    SET_PIN PIN=BEEPER_pin VALUE=0.5 CYCLE_TIME={ 1.0/S if S > 0 else 1 }
    G4 P{P}
    SET_PIN PIN=BEEPER_pin VALUE=0
    

Cure Settings

  • Start G-Code
G21 ;metric values
G90 ;absolute positioning
M82 ;set extruder to absolute mode
M106 S0 ;disable fan

M190 S{material_bed_temperature}  ; Heating bed and wait
M104 S190                         ; Heating hotend

M117 Home All
G28      			     ; Home All

M117 Auto Bed Level
G29                               ; Auto Bed Level

G1 X90 y90 Z90 F9000              ; Move to brushing position

M300 S2000 P300     		     ; play tone
M300 S2000 P300

M109 S{material_print_temperature}; Heating hotend and wait

M117 Prime nozzle
G1 X3.1 Y0 Z0.28 F5000.0 ;Move to start position
G92 E0 ;zero the extruded length
G1 F200 E3 ;extrude 3mm of feed stock
G92 E0 ;zero the extruded length again
G1 X150 Y0.0 Z0.28 F1500.0 E10 ;Draw the first line
G1 X150 Y0.3 Z0.28 F5000.0 ;Move to side a little
G1 X3.1 Y0.3 Z0.28 F1500.0 E20 ;Draw the second line
G92 E0 ;Reset Extruder
G1 F2700 E-2 ;Retract a bit
G92 E0 ;Reset Extruder


G1 Z2.0 F3000 ;Move Z Axis up

M117 Start printing...
G1 F9000

Marlin Config (not used)

Costs

Kingroon KP3S 170€
Sherpa Mini 56€
Phaetus Dragon 90€
Raspberry Pi
ABL Sensor 10€
Total 326€