- BI-Metallic 3D printer frames (aluminum + steel rail) will deform with temperature changes
- This Klipper plugin will compensate for deformation in real time while printing
- Measure and generate the non-linear compensation profile
- Dynamically adjust z height
- Dynamically switches bed meshes
- Dynamically tram your bed (z_tilit, quad support in the future)
- Quad tramming printers are supported!
- only the dynamic tramming feature is not
- Because of the different nature of the two, most quad printers won't need dynamic tramming
- So, FDC will solve the problem for printers like the Voron 2.4
- Just change the parameter to TRAM_EVERYTIME = False
- This will be the equivalent of an improved VGB, with the addition of automated z_thermal_adjust
- If you suffer from X bowing (you can see a bowed bed mesh)
- While hot, try loosening the screws that hold the linear rail, just a bit, to allow for some movement when expending
- Do a before and after bed mesh and see if there is any difference
- Same goes for Y
- You gonna need to run the measure script again if you change anything
- X gantry on the opposite side of the X endstop at the end, touching the aluminum
- Python 3.7+ required (3.7+ has ordered dicts by default)
- Enable z_thermal_adjust in your config with temp_coeff=0
- Remove VBG if you have it
- Adjust your bed mesh settings so that your mesh middle point is the center of the bed
- Example: for 400 bed and 9,9 mesh point number 41 should be the middle of the bed (200x200)
- Make sure that when you home Z, the PROBE (not nozzle) is at the center of the bed
- If you are using RatOS, it's currently a known issue, here is the fix
- Disable fade
- Increase your bed mesh speed by reducing samples and increasing travel speed
[probe]
...
speed: 10.0
lift_speed: 15.0
samples: 1
samples_result: median
sample_retract_dist: 1.5
samples_tolerance: 0.02
samples_tolerance_retries: 1
[bed_mesh]
#######fast settings
speed: 500
horizontal_move_z: 5 # Should be more than your z_offset otherwise you will crash your nozzle!
fade_end: 0
mesh_min: 40,40
mesh_max:260,260
probe_count: 7,7
- Edit measure_thermal_behavior.py and change the required parameters.
- TRAM_EVERYTIME = True - Only z_tilt printers are supported at the moment
- Make sure the frame is at the lowest temperature possible (like after it was idle for a night)
- If you have any fans / nevermore, start them after the first mesh is done
- Run it on your PI
- Pro tip: dry run the script beforehand, put 0 in both temperatures, reduce the HOT_DURATION to 0.1 and run the script attached to the terminal
git clone https://github.com/JiMcNulty/FDC
cd FDC
vim measure_thermal_behavior.py
nohup python3 measure_thermal_behavior.py 0.1 > out.txt &
tail -F out.txt
- Run it on your local PC
python3 -m pip install -r requirements.txt
python3 generate_FDC_meshes_z_heights.py json_file 0.1 --filter_noise
- Edit the FDC.cfg macro file - copy the output results from the cmd console
- While running, you will be shown some generated graphs and the smooth version of them
- It is shown to you so you can examine it, if the smoothing is to harsh use --no-filter
- Close the graph window to move to the next one
- Copy the generated mesh from the new cfg file and paste it at the bottom of your printer.cfg
- Paste if after the string ...-- SAVE_CONFIG --...
- And after the default bed mesh
- If you don't have one just copy your first bed mesh and change the name
- This two things are mandatory for klipper
- Copy the macro FDC.cfg to the same folder as printer.cfg
- Add [include FDC.cfg] to your printer.cfg
- Only if applicable (if you set TRAM_EVERYTIME to True) you will need to override the bed_mesh.py file
1. /home/pi/klipper/klippy/extras/
2. replace bed_mesh.py
3. delete bed_mesh.pyc
4. add this to your config
[bed_mesh]
...
# For TRAM_EVERYTIME = True add this:
# values should match your machine, this is just an example
z_positions:
0,0
150,300
300,0
- Save config (Klipper)
- Shutdown and start (to ensure the bed_mesh.py will load)
- Reset and redo your z_offset!!!
- Fail to do so will risk crashing the nozzle!!
- ref_temp is part of the z_thermal Klipper module
- It is set every time you home Z (like before you start a print when you home all axis)
- The error "out of range" is a FDC error
- The print has started before the gantry temp is in the captured range (variable_temp_min) so FDC won't start working
- To fix it, just heat the printer a little before you start, 1-2 min
- If you didn't start the measure test when the printer was cold then you might want to re-do the measurement.
* If you aren't convinced you need it or plan on using it, read the Extended Readme
You can dm me on discord if you have any issues, i'm on the Voron and Ratrig servers I don't want to put the user name here to avoid bot spamming, but search for the github link, and you'll find me (t.c)
- I'm really interested in what your deformation looks like ;)
- Really, i'm curious to see the graphs and all other data you've collected about the printer
- There might be other things that I will see that can improve the script!
- This project lies upon the hard work and dedication of Deutherius, alchemyEngine and tanaes
- Although not involved in this specific project, most of the heavy lifting was done by them and most of the code in this project was writen by them.
- If there is someone I didn't credit it is only by mistake, please let me know!