#BTT Smart Filament Sensor & Klipper Speed Factor

7 messages · Page 1 of 1 (latest)

lyric oriole
#

Hello,

While I'm aware this issue really belongs to a conversation with BTT's support, I don't have high expectations for actual assistance from that side and thought it'd be a lot more pragmatic to ask here for help on a possible solution/workaround regarding the following issue.

I have BTT's smart filament sensor installed and under regular operation it works as expected. However, I sometimes adjust klipper's speed factor down to 60%-70% on particular prints (or sometimes during parts of prints) to get better results (e.g. improved surface finish etc.). In such cases, the sensor will immediately trigger a 'false positive' making it necessary to manually deactivate it for that print.

I suspect the reason behind this is that when the speed factor is reduced, the sensor isn't getting the pulses it's expecting fast enough and falsely triggers (seems logical to me, but it could be something else entirely, not sure).

A possible solution is to manually adjust the 'detection length' value for the sensor to a higher number in printer.cfg before each of these slowed down prints but that's not really practical, especially for speed changes mid-print.

So I thought perhaps there's a way to automate this 'speed factor-detection length' adjustment within klipper? maybe override M220 with a supplemental macro that automatically adjusts the filament sensor's 'detection length' value on the fly based on the relevant ratio for a newly set 'speed factor'? for example, if the original detection length is set to 14 and mid-print an M220 S60 is issued thereby reducing the speed factor to 60%, the macro will automatically adjust the detection length to 24 (=14 * 100 / 60) so as to compensate for this speed reduction?

Thanks!

twin fiber
#

@lyric oriole that sounds like a Klipper bug. Klipper normally compare the amount of filament calculated by the extruder by the amount the sensor detects. If the difference is bigger than the per detection length specified value. a event is triggered.

#

It may be that in case of a M220 the amount told to the filament switch is not corrected so that it believes that more plastic was pushed.

#

Sorry your idea about a custom M220 can not be done today, you can not modify the detection length on the fly

#

I would in thy case open a issue on the Klipper discord that describes your finding. Do not forget to attach a klippy.log

#

This assumption I suspect the reason behind this is that when the speed factor is reduced, the sensor isn't getting the pulses it's expecting fast enough and falsely triggers (seems logical to me, but it could be something else entirely, not sure). is wrong, and you can easily test it. Slice a gcode and reduce speeds to 60% in the slicer settings. You will find out that this print will print fine.

lyric oriole