Welcome! Log In Create A New Profile

Advanced

Real-time filament caliper sensor

Posted by flipper 
Real-time filament caliper sensor
June 29, 2013 01:12PM
Hey, I've been working on an optical sensor that measures the filament caliper in real time. The idea is to control the rate of extrusion based on the sensor to compensate for varying filament widths. At this point I have it integrated with my printer firmware (Marlin), but have not done much testing yet. Part of the reason is that my current filament does not have a lot of variation.

Sensor uses an optical linear array with 400dpi interfaced to a microcontroller. The microcontroller controls the brightness of the illuminating LED. The filament casts a shadow on the sensor, and the microcontroller detects the edges of the shadow and determines the width. I found a simple sub-pixel edge detection approach online that seems to give roughly .01-.03 mm accuracy. The sensor itself puts out a voltage in relation to the width. For example, 2.84v means 2.84mm. This can easily be interfaced to the A-D of a 3D printer controller board.

A nice feature is that the gcode does not need to be updated for changes in filament width, since that now becomes a variable within the firmware. Gcode is created using the nominal width of 3mm for my filament, but the extruder rate factor is modified in real time based on estimated cross-sectional area of the filament.

Here are the details: [www.thingiverse.com]

One major to-do is to determine a way to have the sensor measure the cross sectional area, since it only measures the diameter along a single radius. Current thought is to scan it over 180 degrees of the filament and then combine the results. Scanning could be achieved by an RC servo. Seems like the simplest way so far...

Another is to try it with some filament that has a lot of variation and see if it makes a difference...
Re: Real-time filament caliper sensor
June 30, 2013 06:12AM
Optical sensing is probably too complicated. Capacitive methods (http://www.google.com/patents/US4706014) can give direct cross-section measurement. Modern CDC (http://www.analog.com/en/analog-to-digital-converters/capacitance-to-digital-converters/products/index.html) should make this kind of measurement quite easy.
Re: Real-time filament caliper sensor
July 02, 2013 02:04PM
Digital Dial Indicator with a wheel on the end would be a lot simpler.
If the wheel has a incremental encoder, you could also measure the amount going in too.

Honestly, I don't think the diameter on a filament changes enough to cause that much on an issue to necessitate the need for closed-loop feedback of the width.

If money were spent to get better quality,

Absolute Encoders on the Steppers,

or

Automatic bed leveling/measuring/compensation

would probably be more worth while.
Re: Real-time filament caliper sensor
November 08, 2013 06:57AM
Seriously,

What a great project!
Can't say any more...

Grtz,

Spek
Re: Real-time filament caliper sensor
November 08, 2013 12:48PM
Would be quite good having a sensor like this, coz extruder only controls height. But yes the filament could also be oval, and usually it is, so the volume calculation would be easily off. Maybe add another sensor on top of the first, perpendicular each other's direction, maybe it could be enough. One other opinion, this would be quite even more important for a feedback loop of a filament making machine, to better control the diameter of the extruded filament in a DIY - filament making machine.
Re: Real-time filament caliper sensor
November 27, 2013 08:34AM
Is there a way that filament could be passed through something like a donut hole but the donut would be filled with water and calculate the volume displace by the filament?

Whatever way this goes, the system would be quite far ahead of the extruder and would require either a purge at the start of the print before it can start real-time compensation or a memory of some kind that would be rely on you not moving the filament or changing it.
Re: Real-time filament caliper sensor
November 27, 2013 09:19AM
Let's back up a bit. We seem to be talking about 3 mm filament here. Cross section is pi*r^2, so the error (if it's round) would be about 2%. If it's not round, then you have to know just what sort of shape it is to guess the errors. I suspect that things like clear filament will be a bit harder than flat black. First issue would be contrast. Second issue would be optical bending at the edges of the filament. If it's a single line sensor, any skew / bend in the filament is going to contribute to the error. Minimizing that probably will add a bit of mechanical complexity. It's an issue that also comes in when manually measuring really stiff / tightly coiled filament. Net result - you may / may not be at the 2% (or better) level with this gizmo.

--------

The bigger question is more simple - Bad filament can be bad for a number of reasons (it has trash in it ...). From what I have seen, these guys get the diameter right before they get the other stuff right. Put another way, I do have an inventory of bad filament. It's all got very consistent diameters (to below 0.02 mm) ....
Re: Real-time filament caliper sensor
December 04, 2013 10:51AM
Instead of measuring the filament,

perhaps a load cell of some kind on the idler/extruder can give you an accurate real-time feedback of the diameter,

[www.robotshop.com]
Re: Real-time filament caliper sensor
December 04, 2013 12:49PM
Quote
ShadowRam
Instead of measuring the filament,

perhaps a load cell of some kind on the idler/extruder can give you an accurate real-time feedback of the diameter,

[www.robotshop.com]

That still wouldn't provide a full diameter, the idler/drive only engage on a very small area of the filament.
Re: Real-time filament caliper sensor
December 04, 2013 06:31PM
Diameter (to get volume of feed) is the input you would want to have. What you *do* with that data is a bit of a challenge for the firmware.
Re: Real-time filament caliper sensor
December 13, 2013 03:07PM
Quote
tjb1
Quote
ShadowRam
Instead of measuring the filament,

perhaps a load cell of some kind on the idler/extruder can give you an accurate real-time feedback of the diameter,

[www.robotshop.com]

That still wouldn't provide a full diameter, the idler/drive only engage on a very small area of the filament.

It's good enough.

The percentage that a filament would be out-of-round would be negligible in the overall volume calculation.
Re: Real-time filament caliper sensor
December 13, 2013 04:14PM
If:

1) you are trying to get the volume to under 1% (which is a good idea)
2) you are dealing with 3 mm filament (for example)
3) You need the diameter to 0.015 mm if it's perfectly round
4) If it's out of round by 0.03 mm you are in trouble

So - is your filament out of round by 1% of it's diameter? I (unfortunately) have seen some that is.
Re: Real-time filament caliper sensor
December 19, 2013 06:11PM
I wonder if you could bounce a laser off the front and back of it. Like range finder.


--------------------------------------------------
Check out my blogs: [oc3dprint.blogspot.com] & [forums.reprap.org]
Hit me up if you have any tips or tricks.
Re: Real-time filament caliper sensor
December 19, 2013 09:29PM
You need to get a reading that good to 0.01 mm. That's pretty tight.
A2
Re: Real-time filament caliper sensor
December 19, 2013 10:51PM
Air Ring Gage very accurate tool to measure diameter, and roundness:

Min Dia 2 mm
Resolution: 0,01 um.
Repeatablility range: < 0,15 um.
[www.mahr.com]
[www.marposs.com]


[www.westerngage.com]

The measurement principle is based on the variation of pressure,
which is proportional to the distance between bore gauge nozzles and part under test.
The measurement is obtained by means of the so-called "balanced pneumatic bridge" system,
with differential pressure transducers and electronic amplification of the signal.
The signal is converted from analog to digital through electronic converters.
[www.marposs.com]

Edited 1 time(s). Last edit at 12/19/2013 10:52PM by A2.
Attachments:
open | download - ScreenHunter_311 Dec. 19 22.45.jpg (15.3 KB)
Re: Real-time filament caliper sensor
December 20, 2013 08:07AM
More or less a swiss bore gauge in reverse ....
Sorry, only registered users may post in this forum.

Click here to login