# This file contains common pin mappings for a Fysetc F6 board with
# TMC2208 stepper motor drivers. To use this config, the firmware
# should be compiled for the AVR atmega2560.

# See the example.cfg file for a description of available parameters.

[stepper_x]
step_pin: PF0
dir_pin: PF1
enable_pin: !PD7
step_distance: .0125
endstop_pin: ^PK1
position_endstop: 0
position_max: 235
homing_speed: 50

[tmc2208 stepper_x]
uart_pin: PG3
tx_pin: PJ2
microsteps: 16
run_current: 0.7
hold_current: 0.7
stealthchop_threshold: 250

[stepper_y]
step_pin: PF6
dir_pin: PF7
enable_pin: !PF2
step_distance: .0125
endstop_pin: ^PJ1
position_endstop: 0
position_max: 238
homing_speed: 50

[tmc2208 stepper_y]
uart_pin: PJ3
tx_pin: PJ4
microsteps: 16
run_current: 0.7
hold_current: 0.7
stealthchop_threshold: 250

[stepper_z]
step_pin: PL6
dir_pin: !PL1
enable_pin: !PF4
step_distance: .0025
endstop_pin: ^PB6
position_endstop: 0
position_max: 250
position_min: -1

[tmc2208 stepper_z]
uart_pin: PE2
tx_pin: PE6
microsteps: 16
run_current: 0.7
hold_current: 0.7
stealthchop_threshold: 100

[extruder]
step_pin: PA4
dir_pin: !PA6
enable_pin: !PA2
step_distance: .0025
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PE3
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PK4
control: pid
pid_Kp: 29.662
pid_Ki: 2.326
pid_Kd: 94.549
min_temp: 0
max_temp: 320

[tmc2208 extruder]
uart_pin: PJ5
tx_pin: PJ6
microsteps: 16
run_current: 0.9
hold_current: 0.9
stealthchop_threshold: 250

[heater_bed]
heater_pin: PH5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PK7
control: pid
pid_kp: 74.536
pid_ki: 1.206
pid_kd: 1151.587
min_temp: 0
max_temp: 130

#fan for printed model FAN0
[fan]
pin: PL5

#fan for hotend FAN1
[heater_fan my_nozzle_fan]
pin: PL4
shutdown_speed: 0
fan_speed: 0.9

#fan for control board FAN2
[heater_fan my_control_fan]
pin: PL3
shutdown_speed: 0

[mcu]
serial: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0

[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100

# "RepRapDiscount 128x64 Full Graphic Smart Controller" type displays
#[display]
#lcd_type: st7920
#cs_pin: PH1
#sclk_pin: PA1
#sid_pin: PH0
#encoder_pins: ^PC6, ^PC4
#click_pin: ^!PC2
#
#[static_digital_output beeper]
#pins: !PC0
