Connecting and configuring filament-out sensors
If your printer knows when it has run out of filament, it can abort the job, or it can pause while you load new filament. To do this the printer needs to have a filament-out sensor attached. These come in two types: simple switches that detect the presence of filament, or sensors that detect the motion of the filament.
RepRapFirmware 3.2 and later
In RRF 3.2 and later, if you configure a filament monitor using M591, when it reports no filament RRF will try to run filament-error#.g where # is the extruder number, or failing that filament-error.g. If neither of those is found then it runs pause.g.
RepRapFirmware 1.19 and later
RepRapFirmware supports a variety of different filament presence and motion sensors using the M591 Gcode:
Pnn Type of sensor:
- 1=simple sensor (high signal when filament present)
- 2=simple sensor (low signal when filament present)
- 3=Duet3D rotating magnet sensor
- 4=Duet3D rotating magnet sensor with microswitch
- 5 = Duet3D laser sensor
- 6 = Duet3D laser sensor with microswitch
- 7 = pulse-generating sensor
See the M591 Gcode for full configuration information.
There are two Duet3D products for precise motion detection with direction:
RepRapFirmware 1.18 and earlier
You can arrange for a simple switch to trigger user-defined actions:
The first step is to connect the switch to an unused endstop connector on the Duet 2. Note that the Duet uses a separate connector for Z probes, and it has five endstop connectors (X, Y, Z, E0, and E1).
To make the firmware run a script when the filament runs out, use M581 to associate the endstop you chose with a "trigger". Trigger 0 is an emergency stop (probably not what you want), trigger 1 pauses the print (running pause.g), and otherwise trigger n runs the file triggern.g., which you can write yourself.
Finally, the trigger only happens when the endstop changes state. If you try to start a print with the filament out, the trigger won't happen. So add M582 to the start of your prints to check the filament state and run the trigger if there's no filament.