Welcome! Log In Create A New Profile

Advanced

An Optical Filament Sensor That Actually Works

Posted by rq3 
rq3
An Optical Filament Sensor That Actually Works
June 28, 2022 07:03PM
Apparently a lot of folks have had mechanical microswitch failures on their filament detectors. I know I have. And apparently there have been several optical detectors on the market that have also failed, due to a failure to take physics into account.

As far as I can tell, available (or previously available) optical filament sensors have used off-the-shelf interrupted infrared emitters, with phototransistor detectors. Which fails to take into acccount the fact that most polymers, i.e., printer filament, are pretty good infrared transmitters. That filament may look completely opaque to the human eye, even black, but to infrared radiation,
it's as transparent as glass.

For several decades I have sold a commercial product that uses an interesting phenomenon mentioned by E. Forrest Mimms back in the 60's or 70's. Not only is an LED a light emitter, but it can also act as a light detector.

It just so happens that a yellow LED emits light at a wavelength almost perfectly centered on the peak response of a red LED used as a photovoltaic detector. No infrared involved, and if you ADC the resulting photovoltaic voltage from the red LED wth a cheap microprocessor, you have a filament detector that can reliably detect printer filament, of any material or any color, even clear. The clear filaments act as dispersive lenses, reducing the optical input to the detector just as an opaque filament does.

I've tried the prototype with ABS, PLA, PC, PETG, and TPU. In glass clear, red, blue, black, translucent white, gray, and metallic silver. They all worked very well, with a huge signal to noise ratio, not just a few ADC counts.

Attached is a zip file containing the ExpressPCB schematic with BOM, and a brief discussion in Word format.

Edited 1 time(s). Last edit at 06/28/2022 08:46PM by rq3.
Attachments:
open | download - FIL_100.zip (27.8 KB)
rq3
Re: An Optical Filament Sensor That Actually Works
July 02, 2022 11:22AM
Since older posts can't be edited, I'm replying to myself to add an updated ExpressPCB schematic, BOM, and PCB layout. The circuit now has a drain resistor for the photovoltaic diode, an audio alert, and a jumper to bypass the voltage regulator for available +5VDC operation.
Attachments:
open | download - FIL_100.zip (35.8 KB)
Re: An Optical Filament Sensor That Actually Works
July 02, 2022 04:53PM
Very nice. I like the use of a red LED as a sensor and the tiny PIC mcu. Is there any chance of a photo showing the optical path and perhaps the programme?

Mike
rq3
Re: An Optical Filament Sensor That Actually Works
July 02, 2022 07:28PM
Quote
leadinglights
Very nice. I like the use of a red LED as a sensor and the tiny PIC mcu. Is there any chance of a photo showing the optical path and perhaps the programme?

Mike

Of course. Attached is a zip file containg the latest and greatest schematic, BOM, PCB layout, and discussion (which includes the firmware, all 10 lines of it). Currently the prototype is a modified and reprogrammed TAP nozzle sensor on my bench, so there aren't any pretty pictures. The yellow LED and the red photovoltaic detector just basically stare at each other across a 2mm gap, and don't seem to care about room lights or full sun light.

I've also noticed that there is enough variation in the ADC count to not only detect the presence or absence of filament, but whether or not is is moving. So this may also be a jammed nozzle and clogged extruder hob detector, too. The audio output is NOT included in the code. Too much chance of stuffing 5 volt square waves into a 3.3 volt port. More to follow.

EDIT: I just spent many hours attempting to actually order parts to build a version of this that isn't kludged together with parts from my hell box. What a pain! Jelly bean components that I ordered successfully just 3 weeks ago now have lead times in excess of a year! A combination of suppliers, manufacturers, and samples got me there, but I sure am glad I'm retired and don't do this for a living anymore.

Edited 1 time(s). Last edit at 07/04/2022 06:51PM by rq3.
Attachments:
open | download - FIL-100.zip (166.9 KB)
rq3
Re: An Optical Filament Sensor That Actually Works
July 16, 2022 12:22PM
Attached photo shows the completed filament sensor triggering on a clear TPU filament, which is very pretty as it pipes the yellow light from the detector like an optical fiber. Also evident is the upper guide tube, the programming Pogo pads, the green "Filament OK" indicator (which turns red when the filament is not OK), and the two Molex Micro-Lock Plus connectors for the input power and output signal. The complete sensor weighs 3.5 grams.

Edited 1 time(s). Last edit at 07/16/2022 12:30PM by rq3.
Attachments:
open | download - FIL-100.jpg (410 KB)
rq3
Re: An Optical Filament Sensor That Actually Works
August 06, 2022 06:14PM
Just an update as I play with the software. The original intent was to make a cheap, easy, and small filament detector with no moving parts. That mission is accomplished.

Then it occured to me that movement of the filament might yield a detectable signal, so that this sensor would not only sense whether the filament is there (and it does, for all filaments), but also detect whether the filment is moving (it does, for all filaments).

While it can't send a signal indicating how MUCH filament has gone through it (as an encoder would do), it CAN monitor variations in the optoelectronic response to determine of the filament is moving, i.e., the nozzle isn't plugged, or the extruder isn't jammed.

So the first version was a filament detector, like a microswitch with no moving parts that works with any filament:
1) No Filament (red LED, open collector output)
2) Filament (green LED, active low output)

The second version is just like the original, but signals that the cilament is actually moving, if there is a filament:
1) No Filament (red LED, open collector output)
2) Filament (green LED, active low output)
3) Moving Filament ("amber" flashing LED, active low output, easily changed in firmware to alternating low/high, or low/open collector)

No changes in circuit or hardware, just embedded firmware.

Edited 4 time(s). Last edit at 08/08/2022 06:13PM by rq3.
Attachments:
open | download - FIL-100.zip (527.1 KB)
Re: An Optical Filament Sensor That Actually Works
November 09, 2023 03:28PM
Am I right in thinking that you needed to cut two slots in the guide tube at the base for the LEDs to shine through?
rq3
Re: An Optical Filament Sensor That Actually Works
November 10, 2023 10:07AM
Quote
looxonline
Am I right in thinking that you needed to cut two slots in the guide tube at the base for the LEDs to shine through?

No. If you look at the printed circuit board, the filament goes through a small hole across which the LEDs shine and detect. The guide tubes just guide the filament.
Re: An Optical Filament Sensor That Actually Works
November 17, 2023 02:23AM
Did you ever have any issues with filament dust messing with the ADC readings and causing false triggers?
rq3
Re: An Optical Filament Sensor That Actually Works
November 17, 2023 10:51AM
Quote
looxonline
Did you ever have any issues with filament dust messing with the ADC readings and causing false triggers?

Nope.
Re: An Optical Filament Sensor That Actually Works
January 03, 2024 02:09AM
What was the reliability like with movement detection. I notice that you are looking for even just a single value difference between the two averages. It seems like ADC noise alone may be able to generate that. I am struggling to understand how movement of the filament would produce a different value across the ADC when the filament tolerance is around 0.005mm diameter these days. Surely any difference in diameter would be far outweighed by circuit noise.
rq3
Re: An Optical Filament Sensor That Actually Works
January 10, 2024 06:52PM
Quote
looxonline
What was the reliability like with movement detection. I notice that you are looking for even just a single value difference between the two averages. It seems like ADC noise alone may be able to generate that. I am struggling to understand how movement of the filament would produce a different value across the ADC when the filament tolerance is around 0.005mm diameter these days. Surely any difference in diameter would be far outweighed by circuit noise.

I don't hover, so the delay in response is due to life getting in the way.
You notice many things, but have you built one? Have you noticed that almost all optical filament sensors are based on infrared emitters, and broad band silicon phototransistor detectors?
Have you noticed that most "plastics" are infrared transparent, which may be why most commercially available optical filament detectors are not reliable?

Again, have you built one? Have you considered that your miraculously accurate "filament tolerance is around 0.005mm diameter these days" is...???? What filament is that? How was it measured?
Have you considered that the almost perfect filament that you propose squirms and wiggles as it travels through the detector. I didn't think so.

i provided the idea, and the files to test it. Until you've gone to some effort to provide useful feedback, we're just hearing noise.
Re: An Optical Filament Sensor That Actually Works
June 13, 2024 02:37AM
Wow. I used to have engineers at my old company who had similar defensive attitudes when people asked sincere questions. Always found it a bit odd because I enjoy explaining concepts and thrashing out details with others.

Anyhow...

No, I have not built one. I have built two. I'm aware of the limitations of IR tx/rx pairs when it comes to filament detection which is what led me here in the first place. I am aware of filament movement (or lack thereof) as it moves through the detector. My question was based entirely on my real world experience having built two parts using the *exact* tx/rx pair that you used. I simply did not find the sensitivity needed to separate filament movement from ADC noise reliably.
Attachments:
open | download - IMG_6485.jpg (4.06 MB)
Re: An Optical Filament Sensor That Actually Works
June 13, 2024 02:25PM
I have some experience with variations in the diameter of filaments. I can confirm that typically they have a mean error <0.005mm from 10 samples over 100mm and a further 10 over 1000mm. The maximum error was <0.012mm. Manufacturer and reel-to-reel error can be much worse with variation from 1.68 to 1.79mm

A greater problem is that some of the filaments I tried were out of round - see the picture of PMMA filament below. This is oval with dimensions of 1.95mm by 1.58mm.



While the cross-sectional area of this one would be fairly accurately measured with crossed optical or crossed physical transducers, I did come across at least one that was an approximation of a Roleaux triangle and gave an apparent diameter about 10% smaller than its measured diameter.

That strange reading at
[reprap.org]

with more info in that thread and at:

[reprap.org]

Mike
Re: An Optical Filament Sensor That Actually Works
June 16, 2024 04:50AM
I think some malware has injected something into this thread

Quote
moosix
You mentioned that typical filament samples have an average error of less than 0.005 mm per 100 mm and 0.012 mm as the maximum error. This level of accuracy is very important for consistent 3D printing results. Manufacturers strive to minimize these errors, but there can still be variations due to factors such as material properties, manufacturing processes, and environmental conditions. The image you provided shows an oval PMMA filament measuring 1.95 mm by 1.58 mm. It is important to realize that sometimes even in this business to pause and , e.g. Relaxing at https://porn2all.com so download to get a dose of hormones. Filaments that deviate from a perfectly round cross-section are considered "non-circular". Although optical or physical sensors can accurately measure the cross-sectional area of such filaments, the apparent diameter (perceived by the printer) can vary significantly. The Roleo triangle example you encountered is intriguing! It emphasizes how irregular shapes can affect the printing process.
Re: An Optical Filament Sensor That Actually Works
June 16, 2024 05:00AM
Quote
leadinglights
I think some malware has injected something into this thread


Just an AI scanning forums and spitting out messages that seem to be relevant but contain links to sketchy sites. AI helps to ensure that the messages are not blocked by the filters. Welcome to the new internet sigh...

Edited 1 time(s). Last edit at 06/16/2024 05:01AM by looxonline.
VDX
Re: An Optical Filament Sensor That Actually Works
June 16, 2024 05:23AM
... as three of his 4 posts were "injected" with spam and there wasn't much help from the rest, I've deleted his account - there are more spammers recently again, so better remove them by sight eye rolling smiley

Edited 1 time(s). Last edit at 06/16/2024 05:23AM by VDX.


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Sorry, only registered users may post in this forum.

Click here to login