While looking at filament runout sensors today, It popped into my head “hey, you could use that old micro switch off the Ender 3 Z end stop!” and then I took to Google to start searching. Sure enough, someone had already created a case for this same exact idea. I decided to take this idea and run with it, and of course share it with the community!
Original Model by Sausage-Gravy @ https://www.thingiverse.com/thing:3352422
If you have installed a BL Touch or done another ABL modification to your Ender 3, you probably have a spare micro switch from the Z axis laying around or disconnected. Why not re-purpose that switch into a Filament Run-out Sensor? It’s a simple 30 minute print, several cuts to a bowden tube and your ready to run! I have direct-drive on my Ender 3 using the SpeedDrive BMG model, so I simply put the runout sensor near my spool exit, and zip-tied it onto the frame.
When printing the part, make sure you support the cylinder that holds the bowden tube on the right side to ensure proper fit. If there are tolerance issues after printing, use some epoxy or hot glue to attach your bowden tubing into the model. Use two small sections of bowden tubing and insert it on both sides of the switch, mount it using the two OEM screws that held the switch onto the frame previously. Then you simply run some filament through the tube and into your extruder.
The wiring needs to be connected to a pin of your choice, and configured in the Marlin firmware or by using Octoprint plugin such as Filament Sensor Reloaded. If you need help with wiring/firmware please sign-up and make a support request on our forums.