This is a work in progress. It is a re-mix using Peter Solomon's sensor, of course modified for this application. The screw holes are still there, but you will not need them as I have crudely made the two halves snap together. This thing mounts directly to your filament spool at the holder (CR-10(s) and other Creality printers and is specifically made for those spool holders. It could be modified however to work with virtually any printer which can incorporate a filament out sensor.
Parts needed. You will need to print two Spool Control Arms, and one each of the mount and Cap. You will also need two small screws and 90mm of bowden tube. 10mm of the bowden tube is to be used in the sensor inlet guide hole and the other 80mm is used to attach the sensor case to the control arms. *0mm is needed for separation to allow the sensor case to "free float" while being held to the spool. The filament is free to flow out of the spool and into the printer without drag, and there is no concern that it will detach.
Hope you find this useful. Also, please forgive the video as it is a video of one of the earliest renditions of this. In fact it was made using v1 and I made many prints and improvements including the snap together case eliminating the bolts and nuts seen in the video. Only two small screws are needed now if you use the bowden tube method of attaching it to the arms. Any method will work as long as there is a solid link between the arms and it is long enough to keep the case from touching the spool, even during a retraction.
I used Cura and printed these parts both ways, with and without support. Without support works best as there are little nooks and crannies that get filled if you chose support and you will need to be careful digging that materiel out lest you break the part. No support sometimes will make crude parts with rough lines in them, that's okay as this is a part that isn't seen much and just needs to be functional, not pretty in my humble opinion. YMMV.
This can be printed in any filament you happen to have. There is no strain on any of the parts after assembly and during use so strength is minimal.