Report as Inappropriate

You are reporting a comment on Filament Width Sensor Prototype Version 3 as a violation of the Thingiverse Terms of Service. Thank you for taking the time to bring this matter to our attention. To help our team best respond to this issue please take a few moments to describe what brought this matter to your attention.

Jul 25, 2015 - Modified Jul 25, 2015
flipper - in reply to a920496044

The latest version of the firmware available here does this already - look for Freescale_8_bit_code_032015.zip. With this firmware, the sensor can use either a 1/16 in drill rod OR a 3mm rod for calibration. The firmware can detect the difference at calibration time.
If you want to change to other rod sizes besides 1/16 or 3mm, look for the following #defines in the code:

//These defines set the two types of calibration rods that are possible to calibrate the sensor with

define CALIB_STANDARD_A 6329 //calibrate using a drill rod of .062 in diameter (1.57 mm) set to (1.57 mm)(15.748 pixels/mm)(256 fp)=6329

define CALIB_STANDARD_B 12094 //calibrate using a drill rod of 3mm set to (3.00 mm)(15.748 pixels/mm)(256 fp)=12094

define CALIB_STANDARD_THRESHOLD 9211 // Threshold for automatically determining the size of the calibration rod based on inherent sensor accuracy.

The comments give the formulas to convert the rod size into pixels into the fixed point number format used in the firmware (floats are for babies :^) ). Note that the rods need to be substantially different sizes so that the sensor can detect the difference based on a threshold.