This is an easy 3D printer filament runout switch, almost for free!
Files her: https://www.thingiverse.com/thing:576...
It uses the stock Z limit switch and screws from an Ender 3. If you install a bed leveler, such as the BLTouch, this is a spare part. So it's easy to add to your machine.
The ball bearing is a 608ZZ (aka: skate) bearing. I removed the shields, and washed out the grease with alcohol. That isn't recommended if you needed it to be a bearing. It's almost entirely a decoration here. The tube extensions hold the filament in place now, but it's pretty.
This is a remix of the Thingiverse thing:4547442 "Filament Runout Sensor w/ Creality Limit Switch".
I had a few problems with the original, so this is my version. This is subject to change, if I encounter more problems in the future.