Skip to content

Instantly share code, notes, and snippets.

@banolka
Last active December 15, 2023 16:32
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save banolka/870b5a3504e4f0b1de0c8220f6d89f30 to your computer and use it in GitHub Desktop.
Save banolka/870b5a3504e4f0b1de0c8220f6d89f30 to your computer and use it in GitHub Desktop.
# This file contains common pin mappings for the 2018 Creality
# Ender 3. To use this config, the firmware should be compiled for the
# AVR atmega1284p.
# Note, a number of Melzi boards are shipped with a bootloader that
# requires the following command to flash the board:
# avrdude -p atmega1284p -c arduino -b 57600 -P /dev/ttyUSB0 -U out/klipper.elf.hex
# If the above command does not work and "make flash" does not work
# then one may need to flash a bootloader to the board - see the
# Klipper docs/Bootloaders.md file for more information.
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: PD7
dir_pin: !PC5
enable_pin: !PD6
step_distance: .0125
endstop_pin: ^PC2
position_endstop: 0
position_max: 220
homing_speed: 50
[stepper_y]
step_pin: PC6
dir_pin: !PC7
enable_pin: !PD6
step_distance: .0125
endstop_pin: ^PC3
position_endstop: 0
position_max: 220
homing_speed: 50
[stepper_z]
step_pin: PB3
dir_pin: PB2
enable_pin: !PA5
step_distance: .0025
endstop_pin: probe:z_virtual_endstop
position_min: -5
position_max: 240
homing_speed: 5
[bltouch]
sensor_pin: ^PC4
control_pin: PA4
x_offset: -41
y_offset: -5
z_offset: 0.3
speed: 5.0
[bed_mesh]
speed: 50
horizontal_move_z: 5
samples: 1
sample_retract_dist: 2.0
min_point: 50,30
max_point: 220,220
probe_count: 3,3
[extruder]
step_pin: PB1
dir_pin: !PB0
enable_pin: !PD6
step_distance: 0.010526
nozzle_diameter: 0.500
filament_diameter: 1.750
heater_pin: PD5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PA7
control: pid
max_extrude_only_distance: 150.0
# tuned for stock hardware with 200 degree Celsius target
pid_Kp: 21.527
pid_Ki: 1.063
pid_Kd: 108.982
min_temp: 0
max_temp: 250
[heater_bed]
heater_pin: PD4
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PA6
control: pid
# tuned for stock hardware with 50 degree Celsius target
pid_Kp: 54.027
pid_Ki: 0.770
pid_Kd: 948.182
min_temp: 0
max_temp: 130
[fan]
pin: PB4
[mcu]
serial: /dev/ttyUSB0
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
[display]
lcd_type: st7920
cs_pin: PA3
sclk_pin: PA1
sid_pin: PC1
encoder_pins: ^PD2, ^PD3
click_pin: ^!PC0
# BED LEVELING MACRO CODE [G29]
[gcode_macro G29]
gcode:
G1 Z10 F600
; SET_SERVO SERVO=bltouch ANGLE=120
G4 P200
G1 Z10 F600
BED_MESH_CALIBRATE
; SET_SERVO SERVO=bltouch ANGLE=10
G4 P100
# The homing_override section modifies the default G28 behavior
[homing_override]
set_position_z: 5
axes: z
gcode:
G90 ; Uncomment these 2 lines to blindly lift the Z 2mm at start
G1 Z7 F600
G28 X0 Y0
G1 X150 Y150 F3600
G28 Z0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment