Change Nozzles Without a Restart

These things have convinced me to actually swap nozzles on my printer. Currently klipper requires a config change and a restart for every nozzle change. But I figured it shouldn’t have to be that way. I couldn’t really make this work with a macro because I cant update the internal variables in extruder so for now its an extra. Hopefully it can be in klipper at some point in the future.

Now I have this in fluidd and I change nozzles with just a tap:

Screenshot 2023-01-15 at 5.30.23 PM

Some things you can do with this:

  • Change nozzles without restarting the printer. Nozzle size is save in [save_variables] per-extruder and reset on startup.
  • Set the PRESSURE_ADVANCE value from your slicer based on the size of the nozzle in the extruder at print time. (example in README)
  • Check that the nozzle diameter required for a print is actually installed and stop the print if it isn’t (especially useful if you often re-run old gcode!)
  • Write macros that customize the extrusion width based on the nozzle
  • Keep your printer safe from large extrusion moves. My previous solution to all this was to configure the printer for the largest nozzle, which could lead to problems if a smaller nozzle gets swapped in. This makes doing the right thing easy.
1 Like

Thanks to @pedrolamas, Fluidd already has one feature that integrates with this! It has an extruder stats panel that uses the nozzle_diameter, but since that doesn’t exist it on the extruder object it always defaults to 0.4mm. I was shocked when it just started doing live updates when I changed nozzles.

The estimation of the maximum volumetric flow rate is based on some math in Fluidd and not the actual setting in the guts of the extruder instance. I also exposed the max_extrude_cross_section which is used to limit the extrusion volume that klipper will enforce on extrusion moves. Its also settable when you call CHANGE_NOZZLE. We could update the math to use that value and put in a similar default for now.

Hi @garethky, Fluidd should take into account the information from the currently selected extruder in Klipper, specifically the filament_diameter (defaults to 1.75) and nozzle_diameter (defaults to 0.4). if You have a configuration that is failing this, please do share it and I can see what we can do about it.

That information together with the selected extrusion speed (and assuming a layer height of 0.2), is enough for Fluidd to calculate an estimated max volumetric flow using the “stadium area” formula, the same that Prusa Slicer (and derivatives) use.

Bondtech and E3D also use the same formula!

1 Like

Yes, that math is sound, I didn’t mean to make it sound like it wasn’t.

Kudos again on grabbing the value out of the printer. I’m hoping since you did that you might be interested in this extension or merging this functionality into klipper itself. I welcome your feedback.

I was trying to explain about the max_extruder_cross_section value. I’m adding that to the printer object as well and I think that has value in understanding how much your printer can extrude before it throws the “Move exceeds maximum extrusion” error. This is a solid explanation that has the math right

I was hoping that showing this calculation in Fluidd might help people understand what the enforced limits of the printer actually are. Maybe we could say something like one of these:

  • The maximum line width of a 0.3mm layer is 2.1mm (0.64mm²)
  • For a 10mm extrusion move the maximum extrusion length is 8.8mm (0.64mm²)
  • To extrude at the estimated extrusion rate of 12mm³/s the toolhead must move faster than 18.75mm/s (0.64mm²)

They are all a bit alien vs how the slicer explains things but they are the real limits of the printer.

1 Like

That does sound like a interesting idea!! :slightly_smiling_face:

I will have to check, but we might indeed be able to put this as part of that report!

1 Like

How would people feel about making this work like the Filaments extra? Meaning:

  • Each nozzle is a preset with a name
  • You can store additional data values with the nozzle preset
  • A “Nozzles” object on the printer will expose the set of available nozzles for front ends to display

I was thinking about my Rapido with the optional high flow setup. I could have one set of nozzles for normal flow and one set for high flow. The additional data could be used to store the purge volume for filament change macros which varies with the length of the melt zone.

Upside is I can share my nozzle config between Fluidd, Mainsail and Klipper Screen. Downside is it would be more complex than just assigning a nozzle diameter.