Yes, Marlin has it - https://www.tindie.com/products/JasonKits/3d-printer-filament-width-sensor-pcb-kit/