Thingiverse

Filament runout sensor for Ender3 by rdalen
by Thingiverse
Last crawled date: 4 years, 5 months ago
This is yet another filament runout sensor
It is my remix of this design for my Ender3 and keeps a clear view of the filament.
It is merged with this sensormount which provides a solid fixation.
Instead of an optical sensor I use a small magnet on the lever and a reed contact - e.g. this kind of door switch
Filament runout is simply detected when the lever with magnet falls down and activates the the reed switch.
Two small pieces of PTFE tube (6mm outside diameter) ensure smooth guiding of the filament.
Disabling the sensor - for e.g. filament change - can be done easely by flipping the lever backwards.
The hole in the middle of the lever allows 4mm retraction of the filament before turning off the power of the printer.
The reed contact is connected to a Raspberry Pi with OctoPrint.
I use the "Enclosure plugin" to issue the following commands to my printer with Th3d firmware;
;------------------------------------------------------
M117 Filament Run-out ;Display text
M410 ;Quick stop - Abort all planned moves.
G91 ;Relative positioning
G1 E-4 F2700 ;Retract a bit
G1 Z15 F300 ;raise Z 15mm
M400 ; Finish Move
G90 ;Absolute positioning
;------------------------------------------------------
; just for sure - in case PowerOff will fail:
M107 ; Turn off the part cooling fan
M106 S0 ;Turn-off fan
M104 S0 ;Turn-off hotend
M140 S0 ;Turn-off bed
M84 X Y Z E ;Disable all steppers
;------------------------------------------------------
M81 ;Send PowerOff -> MQTT message to NodeRed
M0 Filament_Run-out ; Stop and wait
;------------------------------------------------------
The MQTT message from the OctoPrint MQTT plugin triggers via NodeRed a Sonoff socket to switch off the power of the printer
See demo on youtube
It is my remix of this design for my Ender3 and keeps a clear view of the filament.
It is merged with this sensormount which provides a solid fixation.
Instead of an optical sensor I use a small magnet on the lever and a reed contact - e.g. this kind of door switch
Filament runout is simply detected when the lever with magnet falls down and activates the the reed switch.
Two small pieces of PTFE tube (6mm outside diameter) ensure smooth guiding of the filament.
Disabling the sensor - for e.g. filament change - can be done easely by flipping the lever backwards.
The hole in the middle of the lever allows 4mm retraction of the filament before turning off the power of the printer.
The reed contact is connected to a Raspberry Pi with OctoPrint.
I use the "Enclosure plugin" to issue the following commands to my printer with Th3d firmware;
;------------------------------------------------------
M117 Filament Run-out ;Display text
M410 ;Quick stop - Abort all planned moves.
G91 ;Relative positioning
G1 E-4 F2700 ;Retract a bit
G1 Z15 F300 ;raise Z 15mm
M400 ; Finish Move
G90 ;Absolute positioning
;------------------------------------------------------
; just for sure - in case PowerOff will fail:
M107 ; Turn off the part cooling fan
M106 S0 ;Turn-off fan
M104 S0 ;Turn-off hotend
M140 S0 ;Turn-off bed
M84 X Y Z E ;Disable all steppers
;------------------------------------------------------
M81 ;Send PowerOff -> MQTT message to NodeRed
M0 Filament_Run-out ; Stop and wait
;------------------------------------------------------
The MQTT message from the OctoPrint MQTT plugin triggers via NodeRed a Sonoff socket to switch off the power of the printer
See demo on youtube