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)
Sorry, only registered users may post in this forum.

Click here to login