I noticed in the recent GitHub Marlin release three new gcodes have been added to handle variation in the filament diameter. · M405 - Turn on Filament Sensor extrusion control. Optional D to set delay in centimeters between sensor and extruder · M406 - Turn off Filament Sensor extrusion control · M407 - Displays measured filament diameter Some time ago I developed a filament diameter measurement prototype based on a high resolution linear CCD. The Linear CCD is in a light tight box illuminated by a point led source. The filament shadow on the CCD is measured using a high resolution digital technique. The practical resolution is better than 0.001mm. The theoretical accuracy is also to +/- 0.001mm but it is difficult to find something to calibrate against to that level of accuracy. To put this into perspective, 0.001mm is about 1/70 the diameter of a human hair and about the size of soot particle! My micrometer also only measures to 2 decimal digits. The filament diameter measurement is output continuously to an LCD display, serial port (USB) and as a voltage on an analog port. Marlin actually would use only the voltage output. The prototype was developed with the idea of using it to control a filament extruder (eg like the FilaStruder) to keep the filament diameter within tolerance. Now that the filament measurement is built into Marlin there may be some use for it in this application. TBH I don’t think there is much use for something that measures filament diameter going into the extruder. If the quality of the filament is so poor that the diameter is varying enough to warrant changing the extruder feed/flow rate, then I would suggest buying good quality filament is a far better solution. But what do others think. Would it be worthwhile to measure filament diameter as it goes into the extruder?