Skip to content

sb53systems/G-Code-Flow-Temperature-Controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image

G-Code Flow and Temperature Controller

A Post Processing Script for Orca Slicer and Klipper 3D Printers.

This Script is free and open source, created to prove the effectiveness of automatic Speeds/Flow and Nozzle temperature change during 3D printing in order to get the best Quality/Speed Optimization and reduce 3D Printing complexity.

This 3D Printing Concept is Based on my personal approach and with a minimum of Delphi programming skills.
Its operation consists of varying the temperature according to the average flow rate that can be achieved during printing time, then limit the speed in the G-Code to reach the recommended flow rate for the temperature reached.

With this Concept, you could print any object with the same Slicer Settings and have the best Speed/Quality Optimization, even with an old Klipperized 3D printer and a nice inexpensive filament!

IMG20240927152206

This script is not intended to be a definitive solution as I think integrating this concept into the Slicers will be more effective.

I encourage you to test, share and develop it because I think this concept will be the future of 3D printing, and with some AI anyone could use a 3D Printer.

Be responsible and careful with this Script by using reasonable values ​​and monitoring the behavior of your printer.

I look forward to your feedback and remain available and open to new proposals.
Happy Smart 3D Printing :-)

If you find my work worthy, Bay me a image or give this project a ⭐. Thank you...

Video that speak about the project on Youtube

Variable Temperature 3D Printing – The FUTURE of 3D Printing? (By PRINTING PERSPECTIVE):
https://www.youtube.com/watch?v=P6Y8uUPd3yg

Latest Release

SB53 G-Code Flow/Temperature Controller V1.1 Beta (updated September 15 2024)

Next Features

  • Add an explainer video on youtube and instructions on how to use it.
  • Add support for G2 and G3 commands.
  • Add support for Marlin and RepRap Firmware.

Instructions and Prerequisites

  1. The script can be used as a normal program by running the SB53-Systems.exe file and opening a G-Code file manually, or by adding it to the Slicer as a post-processing script.
D:\SB53_G-Code_Flow_Temperature_Controller_V1.1Beta\SB53-Systems.exe;

image

  1. Included Klipper_Estimator.exe V 3.7.3 script, using Klipper Look-Ahead kinematics it estimate the time and the average flow rate for each move in the G-Code. (required and must be in the same Folder with this Script)

  2. Changing the initial layer temperature is important, the script automatically modifies the G-Code (M109 S) command or changes the specified print start macro. Example Below :
    image
    image

  3. The initial temperature estimated by the Script depends on the speed of the first moves of the G-Code, you can adjust it by fixing the speed of the purge line or the speed of the first layer perimeters.

  4. To have a best Speed/Quality Optemization, the Slicer Profil must be set for Max Moves and Max Volumetric Speed, the Nozzle temperature is not important because it will be reset in the script, and the speed will be reduced (not increased) to the Recommended Flow.

Example below with my max 200mm/s Printer speed : (Same profil for PLA, PETG and ABS)

image

The speed of overhangs and small internal/external bridges should be set to the maximum speed, this will ensure that the filament is extruded at the recommended flow rate and that it is not too hot and falls off, or too cold and shrinks, and will avoid sudden changes in flow rate and unnecessary temperature drop. image

For larger bridges, I use Thick Bridges in Orca Slicer and a single 5015 radial fan for part cooling, there is not much deference between a 60mm bridge at 30mm/s and another at 100mm/s, and since I don't print a lot of wide bridges, I prefer to keep an automatic speed.
Or you can use a modifier (or more than one) in the slicer that changes the speed of a few lower layers to the bridge, this Approach can only be optimized if it is included in the Slicer, the temperature and speed should gradually decrease to the desired bridge speed. Example bellow for 50mm/s External Bridge speed.
image
image

You have to set your filament settings:

  • The maximum recommended volumetric speed at the maximum temperature that your Hotend or Filament can handle.
  • The Fan Cooling perdiode and the Min print speed, according to the Filament and your cooling configuration.
  • ...

image
image

See my ORCA Slicer Settings.

See my Bridge test examples.

See my overhangs test examples.

Note that :

  • The script only reduces the speeds above the recommended flow rate (according to layer height and line width), lower speeds will be kept as in the G-Code.

  • Hotend PID cannot be changed during print in Klipper, I recommend using PID values for a temperature between 70-90% of the maximum temperature.

  • PA can be regulated in the script according to the temperature, or not and use the fixed PA from the Slicer or Klipper by unchecking the Adjust PA option befor generating the G-Code.

  • Changing the PA during printing causes a delay in execution and forms bubbles in the walls, the Script is programed to change PA only in Sparse infill, Internal solid infill, Support and Internal Bridge.
    351913375-991fe2b8-3935-46ff-816e-5b0aee981b4d

  • The current version does not accept G2 and G3 in G-Code (Arc Fitting, Spirale Z Hope Type,...)

  • This script does not support Multi-Tool and Multi-Material printing.

  • Ironing is not recommanded with this Script, it will affect the desired result and the printing time.

  • Adaptive pressure advance is not compatible with the concept of this script.

  • Delta printers kinematic limits are not supported with the current version of Klipper_Estimator.

  • Reading or generating large G-Code files with this Script can takes up to 2 minutes, depending in your CPU.

  • The generated G-Code is 20/50 % larger than the original one due to Temp and Speed adjustment.

  • This Script is currently only available for Windows OS. With delphi 12 and a few changes in the source code, it can be compiled for other operating system (I can help for this, or can do it later!).

Usage

The script will popup once you Print or Export the G-Code from the Slicer, ask the user whether the script will be applied or not.

image

If yes, the first execution:

  • You have to set the appropriate Extruder/Printer values.
  • Klipper_Estimator script requires a file containing the maximum limits of the printer (config .json), can be obtained by specifying the IP address of the printer or by choosing a file locally. You have to set this file for each preset.
    image
  • After saving the Extruder/Printer preset, you need to select the filament type, then set the filament values and save with a specific name (for each Extruder). image
  • The next uses, the script can recognize the Extruder/Printer and Filament used if they are written with the same name as in the slicer (Copy and Paste).
    imageimage
    imageimage
  • If you make any changes to the script, you need to refresh the Estimation, then Regenerate the G-Code.
    image

3DBenchy Example

image
image

Below the Generated G-Code

image
IMG20240927023059

Observations and Tips

  • A printer with higher accelerations and lower heat/cool time will have a better result with this approach because it allows for better flow stabilization.
  • With a resonable Edeal Flow/Temperature calibration, the same good quality is achieved with the majority of filament brands without any changes in the script.
  • You can reduce the speed of the cooling fan during the entire printing process (Except for Bridges and Ovehangs).
  • With some prints, changing the Max/Average Smoothing value may affect the result and print time, you have to experiment yourself (I recommend values between 10 and 30).
  • Aim for speed optimization as long as it doesn't affect the desired quality, usually the printing time will only vary by a few minutes.
  • The outer wall speed is greater than the inner wall speed due to a deferent line width. This script will adapt the speed to any line width and layer height, making it very effective for Variable_Layer_Height and Precise_Z_Height.
    imageimage
  • Fuzzy Skin, Variable_Layer_Height and Scarf_Joint_Seam can cause print delay due to frequent flow changes.

About the Developer

By Salim BELAYEL.
This project started in June 2024, developed with Delphi 12 Community Edition.
Email : sb53systems@gmail.com

image Support me

SB53-Systems~1