After losing a long print more than halfway through to a broken filament, I decided to add a runout sensor to my printer. I'm sure I could have found one already made by someone else, but I decided to make my own anyhow.
The main design goals for this were:
- Adds little to no friction to the filament feed
- Adds little to no weight to the print head
- Works reliably
To fit these goals, I decided to re-purpose an optical endstop, and mount it on the body of the printer. It was a bit fiddly to get it to work right, but it's been quite reliable in testing.
Designed in Fusion 360, source here: https://a360.co/2FL5Dzk
- Put the "arm" part in the matching hole in the back of the "head" part. Some sanding and/or glue may be needed, depending on your printer; I printed mine in PETG and it worked fine as a press-fit. Which way is "up" depends on which way you want the wires, it doesn't matter otherwise.
- Fit an optical endstop into the "head" part, securing with M3 machine screws and bolts. Slightly smaller will probably work fine too.
- Insert a length of PTFE tube through the hole.
- Rotating the PTFE tube, cover most of the exposed section in the middle with black permanent marker. Depending on your optical endstop you may need to cover more or less, in my case I'm using an IR-light endstop, and I coated around the whole tube in black Sharpie and it works perfectly. You can always rub a bit off if you cover too much, it doesn't stick to PTFE very well.
- If the tube is at risk of slipping out (depends on the fit), if it's cut to length like mine, you can press a Philips head screwdriver into both sides fairly hard to flare out the end, making it too wide to easily fit through the hole.
- I found that in certain cases, enough light could leak in from the outside to trigger it. Putting a small piece of electrical tape over the opening solved this.
- Glue may be needed to secure the arm to the acrylic frame.
Connecting it to your board and setting up the firmware to support it will vary greatly depending on what you're using. Unfortunately I can't help a whole lot with this if your setup is much different from mine.
In my case (RAMPS and Marlin 2.0), the optical endstop connects to the rightmost "servo" plugs, and in the Configuration.h I uncommented "#define FILAMENT_RUNOUT_SENSOR" to enable it.
You can also try uncommenting "#define FILAMENT_RUNOUT_DISTANCE_MM 25" and possibly setting it longer, however the sensor-to-printhead distance will shrink as the Z axis moves up, so be careful not to set it too long.