Reading another thread here, I remembered a project I worked on back in the 1980s, where the thickness of cotton yarn was continuously measured on spinning machines. IIRC, this was done by measuring capacitance. Now I'm wondering whether the same technique could be applied to measuring filament cross-sectional area.
I'm not an electronics expert, but I'm thinking that the dielectric constant for PLA/ABS/whatever should be quite different from air? So the capacitance between a couple of small plates either side of the filament being fed into the extruder should be proportional to the volume of the filament in that space (i.e. to the cross-sectional area of the filament)?
From yet another project, I recall seeing a circuit that converts capacitance to frequency and thence to voltage, which could then be fed to an A2D input for continuous measurement of filament thickness, which could then be used for automatic correction of the extruder stepper rate.
I'm putting this out as a suggestion for some suitably skilled electronics person... I don't know enough about this to make it work.
Frank