Welcome! Log In Create A New Profile

Advanced

Filament measuring thingy

Posted by leadinglights 
Filament measuring thingy
April 24, 2016 01:42PM
I have been trying to reduce the number of projects I am working on as they seem to be getting a bit out of hand. One of them seems to be too good to just forget so I am trying to offload it on anybody who wants to pick it up.

The device is intended to measure the the filament as it is being passed to the extruder, measuring not the thickness but the cross-sectional area - a slightly flattened or elliptical filament could give a variety of apparent thicknesses if only one diameter measurement were taken.

A useful measure of the cross sectional area of a filament can be found by having the filament partially block an orifice through which gas is being passed. The pressure dropped fill be a function of the proportion of the orifice that is blocked. Since the restriction applies both ways it is easier to use an alternating flow through the orifice than trying to get a controlled flow of gas (air). The general idea is shown below.

To move the air I used a 20mm moving coil speaker with a second speaker as a sensor. The first diagram shows much of the sound pressure (green) escaping through the gap between the filament (red) and the orifice wall. In the second much less of the sound pressure is able to escape so more is available to drive the sensor speaker.

The proof of concept model that I made does work although it does seem to have a much greater frequency sensitivity than I expected. Much work remains to be done. In the model the two speakers are mounted at 90 degrees to minimise mechanical vibration being picked up - one speaker shown uncovered.


As normal, released with the full weight of the wtfpl [www.wtfpl.net] Enjoy.

Mike

p.s., This is not complete enough to put onto Thingiverse and the model was made around bits that I have got but if anybody wants STL or STEP files please ask
Re: Filament measuring thingy
April 24, 2016 07:20PM
Brilliant idea Mike! Is the frequency sensitivity an issue? I'd imagine that you just pick one and drive a sine wave. Calibration looks challenging, as does picking the bore size which will have to cope with the biggest filament long-oval dimension you expect to see.
Re: Filament measuring thingy
April 25, 2016 12:50AM
That's a very interesting idea!

I bet if the speakers aren't enough, you could use a squirrel-cage fan and a barometer.
Re: Filament measuring thingy
April 25, 2016 05:19AM
Very interesting. It reminds me of a device called a "leakdown tester" for checking leakage past the piston rings in engines. The leakdown tester has a volume of constant pressure air, then an orifice of small size, so that there is a predictable flow rate into the engine cylinder. The pressure across the orifice is proportional to the leakage past the rings.

Maybe this idea could be incorporated in your filament diameter gauge... in that case, the pressure difference would be proportional to the leakage past the filament, and therefore to the cross-sectional area of the filament.
Re: Filament measuring thingy
April 25, 2016 07:19AM
@JamesK, I tested this with a signal generator and a multimeter and found that there was the greatest response at 160Hz but this fell to about 25% both at 100Hz and 200Hz and to about nothing by 400Hz. The output plotted on a usably straight line from a 0.78mm² filament (a 1mm drill bit) to 4.16mm² filament (a 2.3mm drill bit). It is possible that the peak is caused by a resonance effect, the resonance of the speakers is 430Hz so it is credible that the system may have a resonance at 160Hz. If that is the case then it may become quite non-linear either side of the peak.

@epicepee, I am trying to keep the design simple and makeable by people with access only to junk-boxes.
One further way of simplifying it would be to leave off one of the speakers: The speaker puts out a pulse of pressure that leaks away through the orifice, the speaker is then pushed back by the pressure in the chamber and generates a signal that depends on how much had leaked away

@frankvdh, that is a good analogy. The operation of the device here depends not on the static pressure difference but the sound pressure difference, the proportionality of the signal should be the same though.

Mike
Re: Filament measuring thingy
April 25, 2016 08:21AM
Wow, that's a huge range of diameters - I had no idea it would be able to cover that much! I imagined that the output would be very non-linear and fall-off rapidly as the outlet area increased. Just goes to show I shouldn't trust my instincts smiling smiley I wonder what effect changing the volume of the chamber has. Presumably it shifts the resonant frequency of the chamber, but it's not clear to me if it's better to run at resonance or away from the resonant frequency. How audible is the sensor when running?
Re: Filament measuring thingy
April 25, 2016 08:29AM
Generally if the Q of the resonant circuit is too high then it is not good for a sensor: Temperature, humidity, dust getting in the chamber and just about anything else will all send it off resonance.
As far as audibility goes, I did not have it very loud as I used my signal generator directly and it has an impedance of 50 Ohms, but the sound was a nice melodious note.
Re: Filament measuring thingy
April 25, 2016 08:51AM
Quote
leadinglights
As far as audibility goes, I did not have it very loud as I used my signal generator directly and it has an impedance of 50 Ohms, but the sound was a nice melodious note.

Oh dear, now you've got me going. It occurred to me that your point about environmental factors sending the sensor off-resonance could probably be mitigated by sampling at multiple frequencies and applying some sort of compensation in software. Now couple that with an audible "melodious note" and musical tendencies and it's obvious that the frequencies would have to be chosen to make an enjoyable riff. Which would have to be synchronized to the rhythmic noises of the printer mechanics and harmonised with the stepper motor frequencies.... It's a one-man printer band smiling smiley
Re: Filament measuring thingy
August 25, 2020 05:11AM
On another thread, there has been a little discussion of this idea with an emphasis on the generation of low frequencies. Although it has been several years, I think there is no particular advantage to lower frequencies but that the linearity became very poor much above a few hundred hertz. There is obviously a 'sweet spot' where acceptable linearity is obtained - my guess from earlier work is that this will be in the region of 100 to 400Hz

A second problem is that there are many variables that may influence the accuracy: Air and device temperature and density, the variability of the driver and sensor components etc.. My thought here is that having a chamber at the back of the speaker with a second pressure sensor and a fixed calibrated orifice may eliminate most of the problems - and possibly eliminate any need to calibrate the device. I will see if I can add a drawing to explain this in the next day or two.

Mike
Re: Filament measuring thingy
August 25, 2020 09:54PM
An idea I have for a post-retirement project is to use capacitance to measure the cross-sectional area of filament. People may be aware of capacitance fuel gauges, which are common in cars nowadays. The principle on which they work is that the capacitance between two plates varies depending on the dielectric of what's between and around the plates (theremins are similar). In the article I read, the capacitor was part of an RC circuit, whose output was a frequency which varied with the capacitance, and by some electronic wizardry involving IIRC sawtooth waveforms then became a voltage that could be fed into a voltmeter (or an A/D converter). I'm pretty sure that the amplitude control of a theremin must do this too. In fuel tanks, the two plates are actually concentric tubes with a gap between so that fuel can go between them.

Now, I'm thinking that if you have two concentric tubes and filament going through the middle, then the capacitance between the tubes would vary depending on the cross-sectional area of the filament, even though the material between the tubes would still just be air. As a bonus, it would also function as a filament run-out sensor. I don't know how long the tubes would need to be, nor what diameters, nor how badly this would be affected by a person nearby moving around. Maybe another similar pair of concentric tubes filled with air nearby, to act as a reference? If anyone is interested in working on this, I'll go dig up the original fuel meter article which had a circuit diagram.
Re: Filament measuring thingy
August 26, 2020 06:01AM
I like the idea of the capacitive sensor although I would try it as a stack of electrode rings with the filament going through them - I may try this out as I have a bridge that goes down to the sub-picofarad region.

As promised, a drawing of the filament thingy with a reference chamber and port. The measurement is made on the measurement sensor - thinner filament lets more air out and hence a weaker signal from the measurement sensor. The signal is compared with the output from the reference sensor to correct for variables such as temperature.



BTW, I first came across capacitive fuel gauges on the English Electric Canberra (also known as the Martin B57) They were accurate even when flying in turbulence but the controller was a big box with a bunch of very ancient looking triode valves.

Mike
Re: Filament measuring thingy
August 26, 2020 08:29AM
A possible problem with capacitative sensors is that the dielectric constant of PLA, ABS and other plastics may vary widely. Ways could be found around this,such as having a cell with a sample of the feedstock of a known diameter; but there would remain a quality problem as it would not account for the dielectric constant varying along the length of the roll.

From Google search for "Dielectric properties of PLA" I found this "Study of electrical properties of 3D printed objects Petr Veselý, Eva Horynová, Tomáš Tichý, Ondřej Šef"
Quote

In the case of ABS, the value of dielectric constant was about 3 compared to PLA dielectric constant that reached 2,7 - 2,9 in the case of transparent PLA and 3,1 - 3,2 in the case of white PLA with TiO2. The additive in PLA had a significant influence on the dielectric constant of the sample

So it looks like some work needs to be done on this idea.

Mike
ECJ
Re: Filament measuring thingy
August 29, 2020 12:12PM
Quote
leadinglights
A possible problem with capacitative sensors is that the dielectric constant of PLA, ABS and other plastics may vary widely. Ways could be found around this,such as having a cell with a sample of the feedstock of a known diameter; but there would remain a quality problem as it would not account for the dielectric constant varying along the length of the roll.

From Google search for "Dielectric properties of PLA" I found this "Study of electrical properties of 3D printed objects Petr Veselý, Eva Horynová, Tomáš Tichý, Ondřej Šef"
Quote

In the case of ABS, the value of dielectric constant was about 3 compared to PLA dielectric constant that reached 2,7 - 2,9 in the case of transparent PLA and 3,1 - 3,2 in the case of white PLA with TiO2. The additive in PLA had a significant influence on the dielectric constant of the sample

So it looks like some work needs to be done on this idea.

Mike

Interesting ideas ...

I believe that moisture absorbed by the material will affect the dielectric constant more than the composition itself.

In addition, good job to all.
Re: Filament measuring thingy
August 30, 2020 01:12PM
Quote
ECJ
.............................................

I believe that moisture absorbed by the material will affect the dielectric constant more than the composition itself.

..............................................

Although there seem to be several strikes against a capacitive sensor for measuring how much plastic is being fed, there may be occasions where it does not matter: One of the original RepRap principles included reuse of plastics such as old prints, plastic bottles etc., In this case, and given reasonable mixing and handling, the dielectric constant and relative humidity should be constant. If the first bit of filament fed through the sensor is a known good diameter and roundness then the capacitive sensor may be a useful way of measuring the effective diameter or cross-sectional area of the filament.

I made a simple sensor to see if I could get some idea of what to expect and this is shown below, the plates of the capacitor are two helixes and the filament goes through the middle of them. This arrangement cancels out any off-center errors.



The results are not fantastic at the moment, the capacitance of the sensor is about 2.6pF and all 1.75mm filaments give an increase of about 0.15pF with 2mm nylon strimmer filament giving an increase fluctuating between 0.15pF and 0.2pF (my instrument resolves to 0.05pF)

The electronics for driving this can be very simple and inexpensive as for example in this application note from Microchip [ww1.microchip.com]. This circuit is able to measure changes in the 1fF (1/1000 of a picofarad) region and the MCU can be under £1.00 with very few other components needed.

Mike
ECJ
Re: Filament measuring thingy
September 01, 2020 10:39AM
Quote
leadinglights
Quote
ECJ
.............................................

I believe that moisture absorbed by the material will affect the dielectric constant more than the composition itself.

..............................................

Although there seem to be several strikes against a capacitive sensor for measuring how much plastic is being fed, there may be occasions where it does not matter: One of the original RepRap principles included reuse of plastics such as old prints, plastic bottles etc., In this case, and given reasonable mixing and handling, the dielectric constant and relative humidity should be constant. If the first bit of filament fed through the sensor is a known good diameter and roundness then the capacitive sensor may be a useful way of measuring the effective diameter or cross-sectional area of the filament.

I made a simple sensor to see if I could get some idea of what to expect and this is shown below, the plates of the capacitor are two helixes and the filament goes through the middle of them. This arrangement cancels out any off-center errors.

[attachment 116589 Notaninductor.jpg]

The results are not fantastic at the moment, the capacitance of the sensor is about 2.6pF and all 1.75mm filaments give an increase of about 0.15pF with 2mm nylon strimmer filament giving an increase fluctuating between 0.15pF and 0.2pF (my instrument resolves to 0.05pF)

The electronics for driving this can be very simple and inexpensive as for example in this application note from Microchip [ww1.microchip.com]. This circuit is able to measure changes in the 1fF (1/1000 of a picofarad) region and the MCU can be under £1.00 with very few other components needed.

Mike

Yes, measuring small capacitance variations is not a problem. I insist that the question of humidity variation is a problem. Especially for a noob user, having a sample of the filament with known 'volume' (or by trial and error) and then feeding the system with this offset information every time you change the spool, in my opinion, unviable the popularization of a capacitive sensor.

I think the first ideal using sound waves, much more promising. Even so, I think it is more feasible that filament manufacturers feel more and more pressured by their own competition to produce quality filaments. And that the need for a filament diameter / volume sensor, be seen only as an 'extravagance' ... winking smiley
Re: Filament measuring thingy
September 01, 2020 01:55PM
@ECJ
I think you are right on all counts although there is still a possible place where the capacitative sensor could be used.
  1. Humidity will vary between the outer layers of a roll and the inside. The layers most exposed to the most recent humidity will reflect that.
  2. Filament quality when I made my first printer in 2011 was pretty awful but I don't think I have seen a thickness problem in several years
  3. New users often try to get all of the "bells and whistles" but it is more likely to confuse them than be helpful

I have pretty much abandoned the sound wave device on points (b) and (c but I think frankvdh's idea has legs in some areas. One is that homemade recycled filament may easily suffer from variation in diameter. Another is that a capacitive sensor would act as a presence/absence indicator to warn of filament breakage and may cost in the same region as an optical sensor - though more expensive than a microswitch sensor. The final one comes from what you have flagged up yourself: Some filaments, notably Nylon, absorb humidity very freely and the print quality of Nylon with absorbed water is very poor. If the change the dielectric constant of these filaments is large enough then the capacitive sensor could give a warning that the filament is damp.

So somewhere in the middle, there may be a reason to keep looking at this.

Mike
ECJ
Re: Filament measuring thingy
September 02, 2020 05:50PM
Quote
leadinglights
@ECJ
I think you are right on all counts although there is still a possible place where the capacitative sensor could be used.
  1. Humidity will vary between the outer layers of a roll and the inside. The layers most exposed to the most recent humidity will reflect that.
  2. Filament quality when I made my first printer in 2011 was pretty awful but I don't think I have seen a thickness problem in several years
  3. New users often try to get all of the "bells and whistles" but it is more likely to confuse them than be helpful

I have pretty much abandoned the sound wave device on points (b) and (c but I think frankvdh's idea has legs in some areas. One is that homemade recycled filament may easily suffer from variation in diameter. Another is that a capacitive sensor would act as a presence/absence indicator to warn of filament breakage and may cost in the same region as an optical sensor - though more expensive than a microswitch sensor. The final one comes from what you have flagged up yourself: Some filaments, notably Nylon, absorb humidity very freely and the print quality of Nylon with absorbed water is very poor. If the change the dielectric constant of these filaments is large enough then the capacitive sensor could give a warning that the filament is damp.

So somewhere in the middle, there may be a reason to keep looking at this.

Mike

Yes, capacitive sensors are very useful in many applications.

As for the filament presence sensors, I believe that the most useful are those that are also capable of detecting movement, because if something occurs that obstructs the movement, the simplest sensors become useless. I believe that the work of creating a new sensor using capacitance detection would only be justified if it could also detect movement, and not only the absence and presence of the filament.

For moisture detection, I also think that it is not viable for the same reasons that I pointed out for the diameter measurement.

Sorry if I look boring, but time is precious and I think we should be very objective in order to invest efforts only in what is promising. Investing time and money to bring more of the same doesn't seduce me anymore ...
Re: Filament measuring thingy
September 03, 2020 05:32AM
Quote
ECJ
.........................................................
As for the filament presence sensors, I believe that the most useful are those that are also capable of detecting movement, because if something occurs that obstructs the movement, the simplest sensors become useless. I believe that the work of creating a new sensor using capacitance detection would only be justified if it could also detect movement, and not only the absence and presence of the filament.

...............................

The most obvious way of measuring feed rate is the obvious one - use a rubber wheel with an optical interrupter to generate distance and direction signals. Using an optical mouse sensor should work except that the optics of the mouse is designed to view a flat surface while the filament is, from the point of view of the mouse, a moving cylinder of much smaller dimension than the mouse sensor looks at.

There was some discussion on using the indentations left by the extruder drive gear to drive a mechanical transducer in this thread [reprap.org]
A few trials with filaments of different hardnesses convinced me that while it worked, some filaments would not take a clear enough impression to give a one to one count from the gear teeth.

One possible thought is that you could combine the optical mouse idea with the indentation detector. The hope here being that the indentations should give an image with a lower requirement for focus. There would be no need to adapt parts from a mouseas a LED and two optical sensors should work although the signal processing would be more complex. The only strike I can see against this is that it needs work - always a fatal flaw.

BTW, the use of two sensors to derive speed from changing features in the return signal is not new, nor does it need much processing power. An early side-scan radar (Ferranti? Marconi?) used much the same technique to measure speed without resorting to Doppler. If memory serves it used valves, mag-amps, and acoustic delay lines.

Mike

Edited 1 time(s). Last edit at 09/03/2020 05:57AM by leadinglights.
ECJ
Re: Filament measuring thingy
September 03, 2020 04:12PM
Quote
leadinglights
Quote
ECJ
.........................................................
As for the filament presence sensors, I believe that the most useful are those that are also capable of detecting movement, because if something occurs that obstructs the movement, the simplest sensors become useless. I believe that the work of creating a new sensor using capacitance detection would only be justified if it could also detect movement, and not only the absence and presence of the filament.

...............................

The most obvious way of measuring feed rate is the obvious one - use a rubber wheel with an optical interrupter to generate distance and direction signals. Using an optical mouse sensor should work except that the optics of the mouse is designed to view a flat surface while the filament is, from the point of view of the mouse, a moving cylinder of much smaller dimension than the mouse sensor looks at.

There was some discussion on using the indentations left by the extruder drive gear to drive a mechanical transducer in this thread [reprap.org]
A few trials with filaments of different hardnesses convinced me that while it worked, some filaments would not take a clear enough impression to give a one to one count from the gear teeth.

One possible thought is that you could combine the optical mouse idea with the indentation detector. The hope here being that the indentations should give an image with a lower requirement for focus. There would be no need to adapt parts from a mouseas a LED and two optical sensors should work although the signal processing would be more complex. The only strike I can see against this is that it needs work - always a fatal flaw.

BTW, the use of two sensors to derive speed from changing features in the return signal is not new, nor does it need much processing power. An early side-scan radar (Ferranti? Marconi?) used much the same technique to measure speed without resorting to Doppler. If memory serves it used valves, mag-amps, and acoustic delay lines.

Mike

Yes, I already have a finished project that will be used and sold at the end of a filament dehumidifier. Uses infrared sensors of the same type as those used in optical endstops. Here is the internal image of a prototype:




And Bigtreetech recently launched with a sensor that is basically done in the same way: [aliexpress.com]

But these sensors suffer mechanical wear. Interesting are the laser ones that, even without physical contact, promise to detect not only the presence but also the movement of the filament: [aliexpress.com]

Edited 1 time(s). Last edit at 09/04/2020 12:52AM by ECJ.
Re: Filament measuring thingy
September 04, 2020 02:41AM
I agree that you need to measure movement to detect extrusion issues. However, it's important to measure direction as well as movement. Otherwise, the reverse movements caused by retraction and pressure advance will cause extra movement to be recorded.

Laser filament monitors work great with some types of filament but not at all with other types. We (Duet3D) used to make and sell laser filament monitors, but we switched to using a Hall sensor that monitors a magnet that is rotated by filament movement.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
ECJ
Re: Filament measuring thingy
September 04, 2020 09:33AM
Quote
dc42
I agree that you need to measure movement to detect extrusion issues. However, it's important to measure direction as well as movement. Otherwise, the reverse movements caused by retraction and pressure advance will cause extra movement to be recorded.

Laser filament monitors work great with some types of filament but not at all with other types. We (Duet3D) used to make and sell laser filament monitors, but we switched to using a Hall sensor that monitors a magnet that is rotated by filament movement.

Direction, movement and speed can be monitored using encoder disk and optical sensor in a system like what I posted in the image above.
Re: Filament measuring thingy
September 04, 2020 10:08AM
@ECJ
I am intrigued by the "Prusa" sensor that you linked to at [www.aliexpress.com] as I can't understand out how it detects movement in what must be a very short path length.
I am moderately sure that I can detect movement including direction and speed by monitoring the movement of a texture on the surface of the filament. My problem is that any practical way I can find to do that needs a decent optical path, not a simple right angle reflection.
In the end though, I agree that a wheel and encoder approach is the most practical and economic. Having said that, I have done enough background to think that the capacitative sensor for the presence or absence of filament (no movement or direction) could be a contender - even on cost grounds.

Mike
ECJ
Re: Filament measuring thingy
September 04, 2020 11:51AM
@leadinglights

This laser sensor must have a small array of receivers and then the variation in the angle of the received beam to be translated as movement. But I don't think can measure speed and direction.

I agree with the question of the capacitive sensor. Just to measure the presence and absence of filament, it is a good alternative since it will not suffer mechanical wear and therefore will be much less subject to failure than conventional sensors.

Edited 2 time(s). Last edit at 09/04/2020 11:53AM by ECJ.
Re: Filament measuring thingy
September 04, 2020 05:48PM
Quote
ECJ
@leadinglights

This laser sensor must have a small array of receivers and then the variation in the angle of the received beam to be translated as movement. But I don't think can measure speed and direction.

It has a square image sensor that measures amount and direction of movement in two dimensions. Speed can be inferred from the amount of movement over time.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
ECJ
Re: Filament measuring thingy
September 04, 2020 06:43PM
Quote
dc42
Quote
ECJ
@leadinglights

This laser sensor must have a small array of receivers and then the variation in the angle of the received beam to be translated as movement. But I don't think can measure speed and direction.

It has a square image sensor that measures amount and direction of movement in two dimensions. Speed can be inferred from the amount of movement over time.

Yes, a system similar to that used in optical mouse. But do you know if it really provides information about speed and direction? I didn't find anything about it.

Edited 1 time(s). Last edit at 09/04/2020 06:44PM by ECJ.
Re: Filament measuring thingy
September 05, 2020 02:48AM
Yes they do. We have used two different types of sensor in our laser filament monitors. Our distributors still have some of the newer sort, e.g. [www.filastruder.com]. Code is on github. Unfortunately you have to sign an NDA to get the datasheet for the sensor.

PS the datasheet for one of the sensors (PAT9125) is now on the web.

Edited 2 time(s). Last edit at 09/05/2020 02:52AM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Filament measuring thingy
September 05, 2020 10:31AM
When I looked for PAT9125 the first thing I came across was a PR (pull request) on Github from the Prusa team [github.com]. Some interesting stuff there.

Between the Prusa and Duet laser sensors and the simpler wheel sensors, I think this field is pretty well covered so I will use my efforts elsewhere.

Mike

Edited 1 time(s). Last edit at 09/05/2020 10:34AM by leadinglights.
Sorry, only registered users may post in this forum.

Click here to login