Identification of Plastic Types Using Discrete
Near Infrared Reflectance Spectroscopy
Armin Straller and Bernhard Gessler
Abstract - This paper presents a low-cost and
handheld system for the identification of plastic
types based on discrete near infrared (NIR)
reflectance spectroscopy. For identification
among different types, a method based on
machine learning is introduced. The current
capability of the system includes differentiation
between polyethylene terephthalate (PET), high
density polyethylene (HDPE), polypropylene (PP)
and polystyrene (PS). Accurate detections of the
machine learning model are demonstrated within
the constraints of the current solution. Finally,
improvements to the setup are suggested.
With the worldwide plastic production historically
growing 9% p.a., packaging being the single
biggest source of plastic waste  and its impact
on climate change being proven , recycling
plastic is one of the main challenges of this
century. The recycling process gets threatened
predominantly by the following four factors:
polymer cross contamination, additives,
non-polymer impurities, and degradation ,
which is why much of the municipal plastic waste
still can’t be recycled. To reduce polymer cross
contamination and non-polymer impurities proper
sorting before disposal is mandatory.
This paper aims to introduce one possible solution
by proposing the use of a discrete spectrometer
for differentiating common kinds of plastic. Such
a solution is cheap to manufacture even at low
volume and can be realized in a handheld form.
A. Straller, B.E. University of Applied Sciences Augsburg, Germany
B. Gessler, M.S. University of Augsburg, Germany
It makes the capability of easily sorting plastics
available to individuals as well as public
institutions. The authors of this paper suggest the
application of such a device primarily in
education, in environmental projects, and in
The system used to collect measurement samples
consists of a custom made discrete spectrometer
and a computer running the machine learning
A. System Properties and Dimensions
The developed system is displayed in Figure 1.
A 3D printed case is used for enclosure and to
ensure more constant lighting conditions for each
individual measurement. It has the overall
dimensions of 65 x 35 mm with a 15 mm diameter
window as interface to the plastic item under test.
Figure 1: Handheld Discrete Spectrometer
Further mentions of the term ‘measurement
window’ will refer to the circular cutout in the
black case of the device.
B. Discrete Spectrometer Electronics
The discrete spectrometer consists of different
light emitting diodes (LED) (white, 850 nm, 960
nm, 1200 nm, 1300 nm, 1450 nm, 1550 nm, 1650
nm) and a InGaAs photodetector. The
photocurrent of the detector is measured using a
24 bit analog digital converter (ADC) and the
LEDs are controlled using a dedicated controller.
A microprocessor controls the measurement and
establishes a USB connection to the host
computer. When a new measurement is requested
by USB the LEDs are turned on one by one.
During the on-time, the photocurrent is filtered
analog and measured by the ADC. This procedure
is carried out for all eight LEDs in a row and
afterwards transmitted back using USB.
C. Calibration and Noise Reduction
When items are measured using the system
neither transmittance of light through the item nor
direct entry of light to the photodiode can be ruled
out. As radiation in near infrared range is
commonly present (e.g. halogen light bulbs) and
no optical filters are present in the system,
solutions for the reduction of its influence had to
be developed. In addition to this, the influence of
the LEDs to the Photodiode further reduce the
signal noise ratio of the measurement. That’s why
calibration and reference measurements are
required to enable good system performance.
First the calibration of the system specific
LED-Photodiode influence is conducted. The
LEDs are turned on in a non-reflective chamber
and in the meantime the photodiode current is
measured. This way only the direct light shining
onto the photodiode and reflected from the
systems case are measured. The measured value
can then be subtracted from each individual
To further improve the quality of the
measurement, the influence of additional light
sources is deducted from the measured values.
This is achieved by measuring a sample without
the NIR LEDS being turned on before and after
each actual measurement. Using this method only
ambient light is measured which can later be
averaged and subtracted from the actual
D. Data Transfer and Storage
To communicate with the custom discrete
spectrometer, a python script is used. It runs on a
host computer and automatically handles received
data. The external light, as well as the
LED-photodiode influence, (section II.C) get
subtracted automatically from the measured
Training samples for the machine learning are
stored in a comma separated values (CSV) file.
This way they can be easily modified and
When the system is used for identification,
detection samples get uploaded to a real time
For the system samples evaluation process, plastic
items are collected and used to train the machine
learning model. Afterwards the system can be
used to make predictions for unknown plastic
A. Plastic Items and Collected Samples
The plastic items used in the present study are
collected from municipal waste. For each plastic
type (PET, HDPE, PP, PS) several different
colored items were selected based on their ability
to cover the systems measurement window. Table
1 shows the composition of the scanned items.
Table 1: Measurement Sample Overview
Samples of all individual plastic items were
collected. Ten measurements per individual item
are collected as explained in section II.D and
stored to a CSV file.
B. Collected Data Analysis
Another publication has shown that accurate
identification of plastic types can be obtained
through calculating the relative reflectance at two
wavelengths in the NIR region . Applying this
concept of relative reflectance to a discrete
spectrometer, the ratios of individual sample
wavelengths will add crucial information to the
machine learning model. The different ratios
visible in Table 2 represent characteristic
absorption spikes within the full resolution NIR
reflectance spectra of the different types of
The ratio therefore represents the/RR(1200 nm) (1300 nm)
relation of the reflection values obtained at
1200 nm and 1300 nm.
Table 2: Reflectance Ratios used for Plastic identification
/RR(1200 nm) (1300 nm)
Plotting those values in a three dimensional
scatter plot allows easy visual identification of the
different plastic types. Figure 2 visualizes the
samples collected according to Table 1 and clearly
shows a separation of the individual sample
Figure 2: 3D scatter plot of identification features
C. Plastic Identification using Machine Learning
For data analysis a deep neural net (DNN) is used.
This dramatically decreased the development time
as no specific algorithms had to be developed.
The model was trained to tell apart the individual
types of plastic using roughly 200 measurement
samples. The trained model is stored in a file and
can be loaded by a python script. This happens
within a python script which listens for new data
to be uploaded to the real time database. New data
is then downloaded, fed to the machine learning
model and the prediction is uploaded back to the
database. Predictions can then be visualized in a
web application. The accuracy of the trained
model reached a high of 95%. Using the machine
learning model for predictions of the previously
trained plastic samples was therefore possible.
During testing of more than 100 individual scans
no wrong positives occured.
It has been demonstrated that the identification of
municipal plastic waste using discrete NIR
spectroscopy is theoretically possible. Only
measurements at few measured wavelengths are
required to make highly accurate predictions
among a limited range of samples.
To be able to apply this approach to generic
identification of plastic samples, the signal
processing needs to be improved and additional
wavelength LEDs should be added. This way a
low-cost and small form solution can be provided
for use in recycling education and small scale
 Hopewell, Dvorak & Kosior. (2009). Plastics
recycling: challenges and opportunities.
Philos Trans R Soc Lond B Biol Sci. 364(1526): 2115–2126
 Hamilton, Feit, Muffett, Kelso, Malone Rubright,
Bernhardt, Schaeffer, Morris, Moon & Labbé-Bellas. (2019).
Plastic & Climate: The Hidden Costs of a Plastic Planet
 Pivnenko, Kostyantyn & Jakobsen, L & Eriksen,
Marie & Damgaard, Anders & Astrup, Thomas. (2015).
CHALLENGES IN PLASTICS RECYCLING.
 Masoumi, Hamed & Safavi, Seyed Mohsen &
Khani, Z.. (2012). Identification and classification of plastic
resins using near infrared reflectance spectroscopy.
International Journal of Mechanical and Industrial
Engineering. 6. 213-220.