Skip to content

Instantly share code, notes, and snippets.

@clee
Last active September 8, 2021 09:41
Show Gist options
  • Save clee/dfe7b32852979ff5b3ea9c8feb612daf to your computer and use it in GitHub Desktop.
Save clee/dfe7b32852979ff5b3ea9c8feb612daf to your computer and use it in GitHub Desktop.
Voron V0.1 config for fysetc cheetah v1.2b
# This file contains common pin mappings for the Fysetc Cheetah v1.2b
# board. To use this config, the firmware should be compiled for the
# STM32F103 with "No bootloader" and with "Use USB for communication"
# disabled.
# The "make flash" command does not work on the Cheetah. Instead,
# after running "make", run the following command to flash the board:
# stm32flash -w out/klipper.bin -v -i rts,-dtr,dtr /dev/ttyUSB0
# See docs/Config_Reference.md for a description of parameters.
[mcu]
## Obtain mcu value by "ls -l /dev/serial/by-id/"
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
restart_method: cheetah
[stepper_x]
step_pin: PB8
dir_pin: PB9 # check https://docs.vorondesign.com/build/startup/#v0 if moving in the wrong direction
enable_pin: !PA8
rotation_distance: 40
microsteps: 16
endstop_pin: ^PA1
position_endstop: 120
position_max: 120
homing_speed: 20 # Increase after initial setup, Max 100
homing_retract_dist: 5
homing_positive_dir: true
[tmc2208 stepper_x]
uart_pin: PA12
tx_pin: PA11
interpolate: True
run_current: 0.85 # For V0.1 spec NEMA14 40Ncm
hold_current: 0.5
sense_resistor: 0.110
stealthchop_threshold: 250
[stepper_y]
step_pin: PB2
dir_pin: PB3 # check https://docs.vorondesign.com/build/startup/#v0 if moving in the wrong direction
enable_pin: !PB1
rotation_distance: 40
microsteps: 16
endstop_pin: ^PB4
position_endstop: 120
position_max: 120
homing_speed: 20 # Increase after initial setup, Max 100
homing_retract_dist: 5
homing_positive_dir: true
[tmc2208 stepper_y]
uart_pin: PB7
tx_pin: PB6
interpolate: True
run_current: 0.85 # For V0.1 spec NEMA14 40Ncm
hold_current: 0.5
sense_resistor: 0.110
stealthchop_threshold: 250
[stepper_z]
step_pin: PC0
dir_pin: !PC1 # Remove ! if moving opposite direction
enable_pin: !PC2
rotation_distance: 8 #for T8x8 lead screw
#rotation_distance: 2 #for T8x2 lead screw
microsteps: 16
endstop_pin: ^PA15
#position_endstop: -.10
position_max: 120
position_min: -1.5
homing_speed: 10 #Max 100
second_homing_speed: 3.0
homing_retract_dist: 3.0
[tmc2208 stepper_z]
uart_pin: PB11
tx_pin: PB10
interpolate: True
run_current: 0.37 # For V0.1 spec NEMA17 w/ integrated lead screw
hold_current: 0.35
sense_resistor: 0.110
stealthchop_threshold: 500
[extruder]
step_pin: PC15
dir_pin: PC14 # Add ! if moving opposite direction
enable_pin: !PC13
full_steps_per_rotation: 200 # 1.8 degree motor
rotation_distance: 22.23 # See calibrating rotation_distance on extruders doc
gear_ratio: 50:10 # For Mini Afterburner
microsteps: 16
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PC6
sensor_type: EPCOS 100K B57560G104F # Adjust for your hotend thermistor (see options below)
sensor_pin: PC4
control: pid # Do PID calibration
pid_Kp: 28.182
pid_Ki: 1.978
pid_Kd: 100.397
min_temp: 0
max_temp: 270
min_extrude_temp: 170
max_extrude_only_distance: 780.0
max_extrude_cross_section: 0.8
pressure_advance: 0.0 # See tuning pressure advance doc
pressure_advance_smooth_time: 0.040
[tmc2208 extruder]
uart_pin: PA3
tx_pin: PA2
interpolate: True
run_current: 0.35
hold_current: 0.2
sense_resistor: 0.110
stealthchop_threshold: 500
[heater_bed]
heater_pin: PC7
sensor_type: NTC 100K beta 3950 # For Keenovo, verify yours
#sensor_type: NTC 100K MGB18-104F39050L32
sensor_pin: PC5
smooth_time: 3.0
#max_power: 0.6 # Only need this for 100w pads
min_temp: 0
max_temp: 120
control: pid # Do PID calibration
pid_kp: 68.453
pid_ki: 2.749
pid_kd: 426.122
[printer]
kinematics: corexy
max_velocity: 300
max_accel: 4000
max_z_velocity: 15
max_z_accel: 45
square_corner_velocity: 6.0
[heater_fan hotend_fan]
# FAN2
pin: PB0
max_power: 1.0
kick_start_time: 0.5
heater: extruder
heater_temp: 50.0
#fan_speed: 1.0 # You can't PWM the delta fan unless using blue wire
[fan]
# Print Cooling Fan: FAN1
pin: PC8
max_power: 1.0
kick_start_time: 0.5
#depending on your fan, you may need to increase or reduce this value
#if your fan will not start
#off_below: 0.13
cycle_time: 0.010
[idle_timeout]
timeout: 1800
[board_pins]
aliases:
# EXP1 header
EXP1_1=PC9, EXP1_3=PC11, EXP1_5=PC10, EXP1_7=PB12, EXP1_9=<GND>,
EXP1_2=PC12, EXP1_4=PB14, EXP1_6=PB13, EXP1_8=PB15, EXP1_10=<5V>
# Pins EXP1_4, EXP1_8, EXP1_6 are also MISO, MOSI, SCK of bus "spi2"
[safe_z_home]
home_xy_position: 120,120
speed: 50.0
z_hop: 5
# Tool to help adjust bed leveling screws. One may define a
# [bed_screws] config section to enable a BED_SCREWS_ADJUST g-code
# command.
[bed_screws]
screw1: 65,5
screw1_name: front screw
screw2: 10,110
screw2_name: back left
screw3: 120,110
screw3_name: back right
[gcode_macro PRINT_START]
# Use PRINT_START for the slicer starting script - please customize for your slicer of choice
gcode:
G28 ; home all axes
G1 Z20 F3000 ; move nozzle away from bed
[gcode_macro PRINT_END]
# Use PRINT_END for the slicer ending script - please customize for your slicer of choice
gcode:
M400 ; wait for buffer to clear
G92 E0 ; zero the extruder
G1 E-4.0 F3600 ; retract filament
G91 ; relative positioning
# Get Boundaries
{% set max_x = printer.configfile.config["stepper_x"]["position_max"]|float %}
{% set max_y = printer.configfile.config["stepper_y"]["position_max"]|float %}
{% set max_z = printer.configfile.config["stepper_z"]["position_max"]|float %}
# Check end position to determine safe direction to move
{% if printer.toolhead.position.x < (max_x - 20) %}
{% set x_safe = 20.0 %}
{% else %}
{% set x_safe = -20.0 %}
{% endif %}
{% if printer.toolhead.position.y < (max_y - 20) %}
{% set y_safe = 20.0 %}
{% else %}
{% set y_safe = -20.0 %}
{% endif %}
{% if printer.toolhead.position.z < (max_z - 2) %}
{% set z_safe = 2.0 %}
{% else %}
{% set z_safe = max_z - printer.toolhead.position.z %}
{% endif %}
G0 Z{z_safe} F3600 ; move nozzle up
G0 X{x_safe} Y{y_safe} F20000 ; move nozzle to remove stringing
TURN_OFF_HEATERS
M107 ; turn off fan
G90 ; absolute positioning
G0 X60 Y{max_y} F3600 ; park nozzle at rear
[gcode_macro LOAD_FILAMENT]
gcode:
M83 ; set extruder to relative
G1 E30 F300 ; load
G1 E15 F150 ; prime nozzle with filament
M82 ; set extruder to absolute
[gcode_macro UNLOAD_FILAMENT]
gcode:
M83 ; set extruder to relative
G1 E10 F300 ; extrude a little to soften tip
G1 E-40 F1800 ; retract some, but not too much or it will jam
M82 ; set extruder to absolute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment