3D Printer w. Laser Head - How to use heater pin as power source?

Basic Information:

Printer Model: Fabtotum Personal Fabricator
MCU / Printerboard:Totumduino (ramps like ATMega1280 based)
Host / SBC: Raspberry Pi
klippy.log

Describe your issue:

My printer is able to use different tool heads for laser engraving, milling or 3D printing.
I have set up a suitable printer.cfg for the printing purpose and have gathered quite some hours of successful printing.

Now I want to integrate the laser head as well. The head is enabled / powered by the same pin as the extruder heater. when trying to enable it (PB4 = 1) I receive an error that it is not possible for this pin.

Now I have a few things to get to work:

  • Remember the currently installed tool over reboot → use non volatile memory
  • Find a graphical solution in fluidd to switch tool heads and configure them automatically. (Don’t want to remember gcode-macro-names for rare occasions where I need the laser; 4-5 times a year) → ?
  • Override the heater pin functionality → ?

Regarding the last point: I read somewhere to disable config-sections by running a macro. Is this appropriate for my use or is there a cleaner/better solution?
Regarding the graphical solution: I’d love to have a dropdown with tool names in my fluidd web interface. A selection triggers a tool-configuration macro on the backend. I just don’t want to remember commands and hack them into the console. Is this even possible?

EDIT:
Added klippy.log
klippy.log (636.2 KB)

Hi @groomit ,

I can answer some of your questions.

Firstly, Klipper can’t dynamically switch configs at runtime. I’d recommend creating two configs, one for your extruder, and another for your laser. Then, use [include] lines in your printer.cfg

For the heater pin, that’s likely because your heater pin is still configured as part of your extruder. I can’t tell for sure, since you didn’t upload a klippy.log

[extruder]
...
heater_pin: PB4

You can set up the laser as a PWM tool.

[pwm_tool laser]
pin: PB4

See Configuration reference - Klipper documentation


So your basic tool switching routine (from extruder to laser) would be something along these lines:

  1. Power off printer
  2. Remove extruder toolhead
  3. Install laser toolhead
  4. Update your config
#[include extruder.cfg]
[include laser.cfg]
  1. Power on printer
1 Like

Now that I have access to the printer I added klippy.log.

Thank you for your suggestion. This is a really smart approach. I already have defined a tools.cfg for the PWM tool. But this was just meant to keep the printer.cfg “clean”.

This could be something to start with and I wouldn’t have to remember macros and stuff. Indeed this solution would be perfect, if there was a way to change the printer.cfg with fluidd gui elements. Also there should be a way to see the currently active toolhead on the control panel. If anyone can give a hint on that, the problem will already be solved entirely :slight_smile:

1 Like