The [Duet Laser Filament Monitor](https://duet3d.dozuki.com/Wiki/Duet3dFilamentMonitor_LaserVersion) works great with most filaments, but not so good with some. It allows for connecting an [additional filament presence switch](https://duet3d.dozuki.com/Wiki/Duet3dFilamentMonitor_LaserVersion#Section_Optional_filament_presence_switch) that can detect out of filament even when the exact movement detection using the laser is not viable for the filament used and disabled.
I've added a placeholder for a microswitch to the housing design, so that it can be easily added. I've also increased the distance from the filament centre to the PCB to 9mm and that seems to help with the measurement accuracy.
To turn off the laser sensor and only rely on the switch use the S0 parameter with the [M591 command](https://duet3d.dozuki.com/Wiki/Duet3dFilamentMonitor_LaserVersion#Section_Configuring_Filament_Monitoring). Don't forget to set P6 to enable the switch (P5 is for the laser filament sensor without additional switch).
Note that this is for V1.7 of the PCB and there are minor changes to V2.0
Print with inner sides (filament path) down. You'll need supports to support the switch housing.