This is a high level conceptual question. I have a extrudinare extruder prototype. Really cool piece of tech you should check it out. The controller board does not function. I need to control the pellet delivery with klipper.
There are two hoppers. One big storage hopper that is heated with a powerful cpap fan that blows pellets to a small hopper on the print head.
The small hopper has an IR endstop to tell when the pellets are low.
When the endstop is triggered the fan must run a minimum of X seconds so that the hopper is filled to a predetermined level past the IR endstop.
If the endstop is still triggered after the fan run is completed the print must be stopped with a filament runout prompt.
Is this doable in klipper? If yes, please point me in the correct direction.
I looked at “kick_start_time” but I’d need a way of controlling the function in a macro.
As high-level feedback, it seems like it would be possible, but there is a good chance it would require host code changes. (See Code overview - Klipper documentation )
It might be possible to implement functionality with just macros if the timing is very lenient (like response times of a 1 second or more). In that case, one could look at [gcode_button], [pwm_tool], and [delayed_gcode] config sections. I suspect a macro system would be difficult to maintain though.
Fan run, delay, and stop have to be run concurrently with printing so the print head never freezes in one spot during operation. Theoretically I could put a capacitor inline with the enstop signal to delay when it gets triggered again and set up two macros. When for when signal goes high to low, and the next when it goes low to high to turn on and off the fan.