On the pictures you can see designed versions of sensor. All are printed in draft mode. From left V1.0, V2.0, V2.1
General good information how to calibrate this sensor is here https://duet3d.dozuki.com/Wiki/Duet3dFilamentMonitor_RotatingMagnetVersion#Section_Calibration
RepRap firmware - https://duet3d.dozuki.com/Wiki/Duet3dFilamentMonitor_RotatingMagnetVersion
smoothieware - http://smoothieware.org/filament-detector
Marlin - find in configuration.h FILAMENT_MOTION_SENSOR
Klipper https://www.klipper3d.org/Config_Reference.html?h=filament#filament_motion_sensor - note that klipper required filament change between two high states so calculation is value = 21mm / (tooth_no) * 3 (mm per status change) - multiple by 3 to increase accuracy and lower mean error
To calculate use formula
value = 21mm / (tooth_no *2) (mm per status change)
[filament_motion_sensor filament_sensor]
detection_length: 1.43181818182
extruder: extruder
switch_pin: ^PD10
pause_on_runout: True
For my configuration with 44T wheel I used this command:M591 D0 P7 C"e0stop" S1 R50:800 L0.239 E2.64 A1
Example output of checks:
M98 P"0:/macros/Extruder/Check filament sensor"
Pulse-type filament monitor on pin e0stop, enabled, sensitivity 0.528mm/pulse,
allowed movement 50% to 800%, check every 6.3mm, measured sensitivity 0.566mm/pulse,
measured minimum 89%, maximum 101% over 1259.5mm
Those values have some offset due to fast printing with a lot of retraction and enabled PA. 50% is a margin when hot end get clogging. Also could be increased to get it faster.
The author hasn't provided the model origin yet.