Post install and config section - Phil1988/FreeDi GitHub Wiki
If you reached this page, I suppose you installed everything successfully.
Now you need to do some checks before using the printer.
In this section I will provide printer configs for the basic functions.
These are clean and optimized configs and will work with stock X3 series printers.
If you find any mistakes/errors or if you want to add/improve something:
Please share it with us (open a ticket here on github or reach out to me via discord).
I am very willing to add and improve it further so everyone can benefit from it
Improvements over the stock config:
- It's clean. No more garbage sections.
- Components are clearly named.
- Dangerous parts have been rewritten (homing one axis will not enable you to run into the print head or against the bottom)
- Many optimizations like, faster bed meshing, better print start/end/cancel macros, etc
- Shrinked down config without multiple includes for a clear structure
I will also provide a collection for addons like:
- A camera
- Telegram bot
- Adding Klippain Shake&Tune
- Different probes (euclid, BDsensor, cartographer)
- And more
You will find "generic" config files availible at the config sectio.
These beeing included in the full image releases already.
The following sections are meant to help you adjusting the config for your printer.
Show the slicer section
As FreeDi is using the default port 80 (not the custom Qidi port 10088), you may have to adjust your slicer connection.
For Orca Slicer:
- Open the "Connection"
- Enter your IP, click Test and confim with OK.
For QIDI Slicer:
- Go to Printer Settings.
- Change the Host Type to "Klipper (via Moonraker)
- Enter your IP, click Test and confim with OK.
Show the thumbnail section
This is not a must, but if you change it, you will experience better thumbnail quality because no resize has to be done.
For X-Plus 3 and X-Max 3 users:
Use 300x300px and 96x96px thumbnails:
300x300/PNG, 96x96/PNG
For Orca Slicer:
For Qidi Slicer:
For X-Smart 3 users:
Use 150x150px and 48x48px thumbnails:
150x150/PNG, 48x48/PNG
For Orca Slicer:
For Qidi Slicer:
Open the fan section
The X-3 series was shipped with different mainboards.
Please check if the fan on the back of your printer (the one cooling the mainboard) is running.
If not, please add this to the fan section of your printer.cfg (thanks to jhook-metand jellypowered):
[temperature_fan MCU_fan]
sensor_type: temperature_host #This is what the MKS's Temperature sensor is known as.
pin: PC4 #Set this to your fan pin
max_temp: 80.0 #Set below 85C, MCU can be damaged at 85C
target_temp: 45.0 #Set this to your preferred running temperature
min_temp: 0
shutdown_speed: 0.0
kick_start_time: 0.5
off_below: 0.19
max_speed: 1.0
min_speed: 0.0
control: pid
pid_Kp: 2.0
pid_Ki: 5.0
pid_Kd: 0.5
pid_deriv_time: 2.0
Your board might have that on another pin and need to have other settings.
To be on the safe side, compare it with the section [heater_fan borad_fan]
from your backup cfg (If existent. If not, then your printer doesnt have it).
Another missing entry might be the [heater_fan hotend_fan2]
section, which is the 2nd controllable cold end fan for your toolhead.
Which can be included with something like this:
# Toolhead cooling fan
#tool head board fan
[heater_fan hotend_fan2]
pin:MKS_THR:gpio20
max_power: 1.0
kick_start_time: 0.5
heater: extruder
heater_temp: 50.0
fan_speed: 1.0
off_below: 0
Open the stepper section
The X-3 series was shipped with different mainboards and steppers/drivers.
Please check if therun_current
in the printer.cfg is matching for your machine.
Do it by comparing the value with the one from the backup that you did previously.
Open the probe section
The standard configuration for the inductive probe is
#####################################################################
# Probe
#####################################################################
[probe]
pin: ^!MKS_THR:gpio21
x_offset: 28
y_offset: 4.4
z_offset: 1.549
speed: 5
samples: 2
samples_result: average
sample_retract_dist: 0.7
samples_tolerance: 0.08
samples_tolerance_retries:3
Deopending on your (different) hardware you can use these pre configures:
BLtouch
If you have bltouch
#####################################################################
# Probe
#####################################################################
[bltouch]
sensor_pin:^MKS_THR:gpio21
control_pin:MKS_THR:gpio11
stow_on_each_sample: False
x_offset: 28
y_offset: 4.4
speed: 5
Cartographer
If you have changed the stock probe to a cartographer
#####################################################################
# Probe
#####################################################################
[scanner]
serial: /dev/serial/by-id/usb-Cartographer_614e_06800F001943565039363120-if00
speed: 2.0
lift_speed: 5.0
backlash_comp: 0.02
x_offset: 0.
y_offset: 21.1
trigger_distance: 2.0
trigger_dive_threshold: 1.5
trigger_hysteresis: 0.006
cal_nozzle_z: 0.1
cal_floor: 0.1
cal_ceil:5.
cal_speed: 1.0
cal_move_speed: 10.
default_model_name: default
mesh_main_direction: x
mesh_cluster_size: 1
mesh_runs: 2
detect_threshold_z: 2000 # This needs tuning
calibration_method: tap
z_offset = -0.300
sensor: cartographer
probe_speed: 2.0
tap_location: 162.5,162.5 # set to center of bed
BDsensor
If you have changed the stock probe to a Bed_Distance_sensor.
The BDsensor requires unfiltered sensor inputs to work, but the tool head THR-42 has all filtered inputs.
To be done.
If you have a working config, please share it with us :)
#####################################################################
# Probe
#####################################################################
Euclid probe
If you have changed the stock probe to an Euclid probe.
To be done.
If you have a working config, please share it with us :)
#####################################################################
# Probe
#####################################################################
Open the webcam section
First you need to install crowsnest.
SSH into your printer via putty or similar.
Then use kiauh (installed on my images already):
./kiauh/kiauh.sh
I use the stable instead the v6 alpha -> 2 (No)
Choose Install -> 1
Install crowsnest -> 14
After the installation is finished, reboot the system and head to your config section to find the new created crowsnest.cfg.
The config section is different for each webcam and unique for the camera you use (see).
A good guide can be found at obico.io.
You may also ask for help on the mainsail discord channel for your unique camera and ID.
Its nothing that can be covered on a generic guide :)
Here some references that might work for you:
Qidi camera
#Sunplus Webcam
[cam QIDICAM]
mode: ustreamer # ustreamer - Provides mjpg and snapshots. (All devices)
# camera-streamer - Provides webrtc, mjpg and snapshots. (rpi + Raspi OS based only)
enable_rtsp: false # If camera-streamer is used, this enables also usage of an rtsp server
rtsp_port: 8554 # Set different ports for each device!
port: 8080 # HTTP/MJPG Stream/Snapshot Port
device: /dev/video3 # See Log for available devices
resolution: 1920x1080 # widthxheight format
max_fps: 8 # If Hardware Supports this it will be forced, otherwise ignored/coerced.
Sunplus camera see
#Sunplus Webcam
[cam Sunplus]
mode: ustreamer # ustreamer - Provides mjpg and snapshots. (All devices)
# camera-streamer - Provides webrtc, mjpg and snapshots. (rpi + Raspi OS based only)
enable_rtsp: false # If camera-streamer is used, this enables also usage of an rtsp server
rtsp_port: 8554 # Set different ports for each device!
port: 8080 # HTTP/MJPG Stream/Snapshot Port
device: /dev/video3 # See Log for available devices
resolution: 800x600
max_fps: 8 # If Hardware Supports this it will be forced, otherwise ignored/coerced.
Logitech C270 webcam
#Logitech C270
[cam Logitech ]
mode: ustreamer # ustreamer - Provides mjpg and snapshots. (All devices)
# camera-streamer - Provides webrtc, mjpg and snapshots. (rpi + Raspi OS based only)
enable_rtsp: false # If camera-streamer is used, this enables also usage of an rtsp server
rtsp_port: 8554 # Set different ports for each device!
port: 8080 # HTTP/MJPG Stream/Snapshot Port
device: /dev/video3 # See Log for available devices
resolution: 800x600
max_fps: 8 # If Hardware Supports this it will be forced, otherwise ignored/coerced.
Show the BTT filament sensor V2 section
Thanks @dixie265 for this instruction (modified slightly by me):
Open your printer.cfg and comment out the following under Filament runout sensor
########################################
# Filament runout sensor
########################################
# [filament_switch_sensor filament]
# pause_on_runout: True
# runout_gcode:
# PAUSE
# SET_FILAMENT_SENSOR SENSOR=filament ENABLE=1
# event_delay: 3.0
# pause_delay: 0.5
# switch_pin: !PC1
Then add the following below:
#######################################################
#BTT SFS 2.0 Smart Filament Sensor Settings
#######################################################
[filament_switch_sensor filament]
# Material Break Detection Sensor
switch_pin: ^PC1
# Blue line, when there is no consumables in the material outage detection,
# it is low level, and the IO pin is already a pull-up input.
pause_on_runout: False
runout_gcode:
PAUSE # [pause_resume] is required in printer.cfg
M117 Filament switch runout
insert_gcode:
M117 Filament switch inserted
[filament_motion_sensor btt_encoder_sensor]
# Blockage Detection Sensor
switch_pin: ^PC3
# Green line, the level jumps once every 2.88mm movement of the clogging detection consumable,
#and the IO pin is already a pull-up input.
detection_length: 15
extruder: extruder
pause_on_runout: False
runout_gcode:
PAUSE # [pause_resume] is required in printer.cfg
M117 Filament encoder runout
insert_gcode:
M117 Filament encoder inserted
[gcode_macro SFS_on] # Add "SFS_on" to PRINT_START and RESUME
description: Enable Smart Filament Sensor
gcode:
M117 ENABLING the Smart Filament Sensor
G92 E0
SET_FILAMENT_SENSOR SENSOR=btt_encoder_sensor ENABLE=1
# Put your motion encoder sensor's name after SENSOR=
SET_FILAMENT_SENSOR SENSOR=filament ENABLE=1
# Put your filament sensor's name after SENSOR=
[gcode_macro SFS_off] # Add "SFS_off" to PRINT_END, PAUSE and CANCEL_PRINT
description: Disable Smart Filament Sensor
gcode:
M117 DISABLING the Smart Filament Sensor
G92 E0
SET_FILAMENT_SENSOR SENSOR=btt_encoder_sensor ENABLE=0
# Put your motion encoder sensor's name after SENSOR=
SET_FILAMENT_SENSOR SENSOR=filament ENABLE=0
# Put your filament sensor's name after SENSOR=
That's it for printer.cfg. Save and reboot.
Open the macros.cfg and add this under the basic macros:
In the [gcode_macro PRINT_START] add
SFS_on
In the [gcode_macro PRINT_END] add
SFS_off
In the [gcode_macro PAUSE] add
SFS_off
In the [gcode_macro RESUME] add
SFS_on
In the [gcode_macro CANCEL_PRINT] add
SFS_off
In OrcaSlicer, go to Prepair-> Printer settings ->Machine G-code:
Add this to your machine start G-code:
SFS_on
Add this to your machine end G-code:
SFS_off
Show the auto-generated section
In your backup printer.cfg you will fing this section at the end:
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
This is an auto-generated section that klipper insert when you eg. do a probe calibration, mesh the bed, do input shaping, etc..
The #*#
is a marker for the parser to notice.
Please dont transfer this section (at all) to your new printer config.
It will be auto-generated with the right values when you do the mentioned calibrations.