Skip to content

Instantly share code, notes, and snippets.

@thinkJD
Created August 23, 2022 08:30
Show Gist options
  • Save thinkJD/6ea307a7714ec1e64084f833b43268d6 to your computer and use it in GitHub Desktop.
Save thinkJD/6ea307a7714ec1e64084f833b43268d6 to your computer and use it in GitHub Desktop.
klipper 3d config for i3Berlin
# This file contains common pin mappings for RUMBA boards. To use
# this config, the firmware should be compiled for the AVR atmega2560.
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: PH0
dir_pin: PH1
enable_pin: !PL1
microsteps: 16
rotation_distance: 40
endstop_pin: ^!PC0
#endstop_pin: ^PC1
homing_speed: 50
position_min: -31
position_endstop: -31
position_max: 215
[stepper_y]
step_pin: PF0
dir_pin: PL2
enable_pin: !PF1
microsteps: 16 # and 200 full steps
rotation_distance: 40 # full_steps + micro_steps / steps_per_mm to vonvert from marlin
endstop_pin: ^!PC2
position_max: 200
homing_speed: 50
position_endstop: 0
[stepper_z]
step_pin: PF3
dir_pin: !PF2
enable_pin: !PK0
microsteps: 16
rotation_distance: 2
endstop_pin: ^!PC4
position_endstop: 0
position_min: 0
position_max: 200
[extruder]
step_pin: PA1
dir_pin: PA0
enable_pin: !PA2
microsteps: 16
rotation_distance: 20.315
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PE4
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PK7
control: pid
pid_Kp: 13.18
pid_Ki: 0.73
pid_Kd: 65.37
min_temp: 10
max_temp: 315
[verify_heater extruder]
max_error: 200
#[extruder1]
#step_pin: PA4
#dir_pin: PA3
#enable_pin: !PA5
#heater_pin: PE5
#sensor_pin: PK6
#...
#[extruder2]
#step_pin: PA7
#dir_pin: PA6
#enable_pin: !PG2
#heater_pin: PH3
#sensor_pin: PK5
#...
[heater_bed]
heater_pin: PH6
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PK3
control: watermark
min_temp: 0
max_temp: 130
[bed_screws]
screw1: 0,100
screw2: 191,197
screw3: 191,0
[fan]
pin: PH4
#[heater_fan fan1]
#pin: PH5
[mcu]
serial:/dev/serial/by-id/usb-RRD__www.ru_RUMBA_-_ATmega_2560_co_95333303231351B0E0B1-if00
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 3
max_z_accel: 25
# "RepRapDiscount 128x64 Full Graphic Smart Controller" type displays
[display]
lcd_type: st7920
cs_pin: PD2
sclk_pin: PD3
sid_pin: PL7
encoder_pins: ^PB5, ^PB6
click_pin: ^!PL6
[firmware_retraction]
retract_length: 1.5
retract_speed: 30
[gcode_macro START_PRINT]
gcode:
{% set BED_TEMP = params.BED_TEMP|default(60)|float %}
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %}
# Start bed heating
M140 S{BED_TEMP}
# Use absolute coordinates
G90
# Reset the G-Code Z offset (adjust Z offset if needed)
SET_GCODE_OFFSET Z=0.0
# Home the printer
G28
# Move nozle above the bed
G1 X0 F300
# Move the nozzle near the bed
G1 Z5 F3000
# Move the nozzle very close to the bed
G1 Z0.15 F300
# Wait for bed to reach temperature
M190 S{BED_TEMP}
# Set and wait for nozzle to reach temperature
M109 S{EXTRUDER_TEMP}
[gcode_macro END_PRINT]
gcode:
# Turn off bed, extruder, and fan
M140 S0
M104 S0
M106 S0
# Move nozzle away from print while retracting
G91
G1 X-2 Y-2 E-3 F300
# Raise nozzle by 10mm
G1 Z10 F3000
G90
# Disable steppers
M84
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment