This filament sensor activates a switch if the diameter of the filament is large enough to clog somewhere in the hot end.
After having a print fail t...wice in one roll due to large spots in the filament, I decided to make a sensor that would detect large spots and pause the prints. It turns out that the ink tube from a BIC pen has the perfect ID for the 1.75mm filament. After printing out the two parts, press a small piece of the ink tube into the arm. This will be the 'calibrated' size. The filament should slide smoothly through the tube.
Assemble everything as shown in the picture. It may be possible to use this without the spring, but I wanted to make sure that the print was not paused accidentally, so I made the arm spring loaded. As the extruder pulls the filament, if there is a large spot that could cause a clog, it will get stuck in the ink tube that is inside the arm. That causes the arm to activate the switch and pause the print.
During assembly, you will need to drill out the holes that the filament goes through to make sure that they do not have any restriction for the filament. Even large spots in the filament should pass through the holes in the printed base, so make sure they are large enough for some variability.
If you don't have screws small enough to mount the switch, it should be okay to glue it in place with super glue. Ensure that the holes line up as if screws were installed.
I had some 2mm brass rod that I used to hold the spring in place. A nail or other wire should work just fine. I made the holes super small, so they will need to be drilled out to whatever size of wire you want to use. I had two small springs installed when I took the picture, but it is designed for a pen spring.
The printed arm does require some support material to be enabled during the print. After printing, I removed the dense support material with a small saw and it worked quite well.
3d model print parameters
-printed base and arm
-5mm of ink tube from BIC ink pen
-spring from a clickable ink pen
-3mm x 15mm screw
-2mm wire or... nail ~35mm long
-2x 2.5mm or small wood screws (or glue)