# Filament Variation Detection

I'm trying to find out how "normal" filament (not super expensive filament) varies in diameter (or more accurately cross sectional area) over the length of the filament. I've looked around and the only thing I can find, that many filaments are sold with the tolerances, not how "fast" they vary along the filament. A +- 0.1 mm over 1 meter is after all qite different from the same alteration over 0.1 meter.

I am mainly interested in this, as I want to build a printer with very small Z-height steps, thus a small variation in the filament diameter will lead to a rather large variation in the extrusion width. While I thought over the project, I came to the idea of using some kind of capacitance measuring device to detect the cross-sectional area, however it is only possible (or rather feasible) to measure the average cross-section over a rather long section (10cm+). Hence main part of the question: How "fast" does the filament change diameter?

The other part is obviously: Are there other (cheap) ways to measure the cross-section? I could use light, but then I would only get the diameter at one point (pretty sure the filaments aren't perfectly round) and using multiple sensors would quickly become expensive. And then there's the issue of transparent filaments. Most mechanical solutions have the same issue, only measuring one point and might have issues with certain types of filaments such as very flexible filaments.

• Marlin is capable to adjust the extrusion multiplier based on diameter measurements, sensors exist for this feature. I believe you need to input the length of filament path of the sensor to the nozzle. I have to look it up, is this something you are after? – 0scar Dec 10 '19 at 17:28
• Yes, this is basically exactly whay I am after! – Beacon of Wierd Dec 10 '19 at 17:49
• @0scar looks like all the commercial sensors (at least the ones I can find) are optical sensors (either actuall cameras or ”strip cameras”) which look rather expensive :( I’m looking for very cheap sensors (hence the idea to use capacitance, which can be measured cheaply) – Beacon of Wierd Dec 10 '19 at 19:51
• a loop around the filament could expand and contract as width changes in any direction. if that loop has tension, it can be measured. i think sampling 4 diameters (90 deg each) would give a pretty good estimate. – dandavis Dec 10 '19 at 21:54
• another precise measure can be make with a lever; the end closer to the fulcrum pinches/hugs the filament, which causes large moments on the other end of the lever when that distance changes. those large movements can be measured with a hall-effect sensor from a magnet on the lever; a clothespin for example. – dandavis Dec 10 '19 at 21:57

• @BeaconofWierd 2 LED/Photodetectors will give you a good estimate, assuming an ovaloid. If you know the exact distance between, you can use A=a b pi. If you match the data pickup with stepping (like, trigger a pickup every mm of movement) and write the data into a CSV, then take the distance between the sensors into consideration (if you don't measure in the same spot), you could use a spreadsheet to measure the whole filament... knowing the lead distance, you could arguably write that data to another CSV as percentages... which could be fed into the printer via M221 accordingly. – Trish Dec 11 '19 at 13:12
• @BeaconofWierd, \$2 dollars!? No, there is nothing that you can use to measure the filament thickness at that price point. Even the \$2 dollar multi touch needed an expensive web cam and computer. – user77232 Dec 12 '19 at 0:13