Low-cost handheld plastic type sensor #reremeter
I (@arminstr from Real Recycling) will share the development process of our low-cost handheld plastic type sensor with you. At this point we are 5 months into the project and have some first stories to tell.
It is a discrete NIR Spectrometer with just enough samples to get our machine learning model to an accurate decision.
Back in June 2019 we realised that there is no cheap solution to the detection of different plastic types.
That’s when we decided to do some research on commercial solutions. We found out that most of them use near-infrared reflectance spectroscopy.
So we started to look for a cheaper way of doing exactly the same thing they do.
The main idea we came up with is a device that can measure spectral data with less resolution. This saves optical instrumentation and a lot of the related cost.
Therefore we use special small bandwidth near-infrared LEDs to flash light at the plastic. Afterwards a wide bandwidth photodiode measures the reflected light. This way we currently get eight measurements per plastic sample.
The below picture explains the “discrete approach”. Instead of measuring an entire spectrum (grey) we will only collect a few samples (black&pink) of the spectrum.
Sounded like a solid plan to us. So I just went for building a prototype. As we had this handheld sized device in mind I pushed for a small form factor right away.
All components in SMD, tiny packages, 0402 passives all designed to be just at the edge of hand manufacturability.
Of course no prototype comes without bugs. The USB-C interface did not work as expected. But after soldering on some breakout wires I was able to collect the first test datasets.
The influence of external light sources and some other issues kept us from getting reliable measurement results in the first place. After fixing most of the bugs with the hardware and coming up with some solutions for the data processing we were finally able to collect some really nice looking data.
What you see below:
Light blue dots are samples of white HDPE, dark blue dots are samples of white PS. Black dots represent samples without any plastic in front of the sensor.
These individual clouds can be used to train a machine learning algorithm for plastic type detections.
Finally we have developed a prototype which is able to tell apart known plastic items made from common plastic types.
The bad thing:
Each individual item has to be fed into the machine learning. And it struggles with different coloured material at the moment.
The good thing:
We already figured out theoretical solutions for most of the issues.
The even better thing:
We are open for your feedback on any issues. Tell us about your further ideas for the device.
I hope my explanations were clear enough and easy to follow. If there are any questions feel free to ask them right away.
great work! How do you guys develop this; full time for a specific time, weekend project, job a client, another way?
This is lit! 🔥
Surprising to see that you get enough resolution with the current brightness sensor. And next step would be distinguishing additives within the plastic I guess?
Anyways, keep up the good work 💪
and I am happy to help 🙂
@davehakkens All of this is a leisure time project. But we are currently thinking about going full time for the development of a more reliable version.
@jerzeek Detecting additives is currently out of reach for us. The main scope for the next version is providing a tool to sort plastic items into their basic 7 categories.
@realrecycling – we’re happy to see you got further with the scanner. just a bunch of questions if you don’t mind :
1. we are doing mostly integrated systems which come with a variety of sensors out of the box (safety, automation, etc..). Might it be possible to have this scanner working via Bluetooth and display the results on a ArduinoMega driven LCD display ? Relying on a mobile phone in a workshop comes with problems. People use there often gloves and I can imagine it slips easily out of hand – happens rather often actually.. The other advantages we’d like to explore are metering and easing the entire workflow. For instance less skilled people can scan the plastic which then in return chooses the right parameters/profile on the extrusion.
2. Possibly too early and too direct, how long it would take to get a bulk of 10 devices & how much ?
3. Is the firmware open and can we patch whilst staying in the loop with updates ?
thanks a lot – thumbs up
@kunterbunt – Thanks for your interest!
We plan on providing a nice interface to the sensor and an according SDK. And we will choose a matching interface according to the requirements of the precious plastic community. (Bluetooth is definitely a good option!)
You are right it’s still too early for that question. We hope to be ready with the more reliable design by mid 2020.
We will definitely release the hardware and the firmware of the current sensor design publicly. Additionally the data we collect and use to train our machine learning model will be released.
Patching whilst staying in the loop with updates will be hard to achieve. But we will figure out some solution everybody will be happy about!
@realrecycling , Thanks for posting. I think the PP-V4 was/is working on a low cost Raman type sorting approach it would be great to be able compare both.
A couple of questions:
I like your approach of putting the color selection on the illumination side. What color LED’s were you able to get? Looking at the spectral response in some of the published papers (example: https://www.researchgate.net/publication/285330830_Identification_and_classification_of_plastic_resins_using_near_infrared_reflectance_spectroscopy ) How do your colors compare?
It will be interesting how the machine learning developed algorithm accommodates colors and additives.
Great work, thanks for sharing it with us.
@realrecycling, this is so awesome.
Employing machine learning would definitely make this device a general purpose device which can not only detect/identify different types plastics but many other stuff from plants to food, using a different ML model with sufficient training.
@s2019 – We just ordered the entire NIR wavelength range of SMD LEDs on DigiKey.
Currently we only get accurate predictions if all of the samples have the same color.
We do not collect entire spectral responses. The results we get from one measured item are displayed in the figure below.
With different colors the amount of light reflected changes. Imagine the chart below to be just a bit more flat.
@aqueelahmad – That’s something we thought of as well. But we want to master plastics first!
We will publish some piece of more scientific writing on our measurement and signal processing approach as well as the results in the coming weeks.
From the curves in the paper I linked, it looks like there are a lot of features above the 1550 nm in your chart. Digikey has 1650 and 1720 nm led’s. Have you tried any of those?
Looking at the geometry of your illuminators, are you sensitive to surface gloss or tilt/non-flatness?
These are just observations, not criticism.
Great idea, great work
Thanks for the observations @s2019!
We would be up for constructive criticism as well 😉
We used all up to the 1650 nm LED and want to include the 1720 nm LED into the next version as well. (no idea why it was cut off in the above plot)
Surprisingly we have not had any issues with surface gloss or roughness of samples so far.
Tilts can be difficult if they expose the measurement window to external light.
If anybody here is into optics and can suggest a cheap setup that bundles our LEDs to one single point we would really appreciate that!
There are many geometry and optical variants possible on your configuration. The question is how sensitive your plastic typing algorithm is to uncertainty in the individual reflectance measurements. Does your algorithm report those parameters or do you need to determine it externally with a sensitivity analysis (Monte Carlo type?)
The plastic will have a reflectance that is both angle and wavelength dependent. The question is how well the calibration or learning process capture the possible variations for any one material type.
The sensitivity analysis will be useful for other parameters as well. Things like LED intensity stability, dealing with translucent materials, etc.
No need to get bogged down in what could be a thesis level study, just establish the boundaries whre the learning algorithm runs into problems. This can help guide any geometry or optical modifications if needed.
Again, great work
Currently only our algorithm reports uncertainty in individual measurements.
Thank you for suggesting the sensitivity analysis! We will definitely check it out.
Does anybody have more suggestions on signal processing?
Or any ideas where the sensor could be useful in a Precious Plastic workshop?
Some more wishes on the interfaces to the device?
You must be logged in to reply to this topic.