Autonomous Sorting of Plastic Resin Using Near-Infrared and Machine Learning

Edward Xiong

Age 15 | Sudbury, Ontario

CWSF 2019 Gold Medalist | YSC 2020 Challenge Award for Digital Technology

According to an Environment and Climate Change Canada funded report published in 2019, 87% of plastics end up in landfills or the environment, 4% of plastics are burned for energy recovery and only 9% of plastics get recycled. Out of the seven types of plastics, only three types get recycled. 

My solution to the problem has two parts:

  1. To design a cheap near-infrared device to sort the 7 types of plastics

  2. Use machine learning to distinguish them

Six near-infrared emitters were mounted into a TV remote control as the light source to shine on the plastic object. A modified Raspberry Pi camera with a filter was used to cut out the visible light

(< 760 nm). The camera was used to photograph the reflection and absorption style of the plastics.  Over 50 plastic bottles of plastic types #1, 2, 4 and 5 were collected and pictures were taken. Each picture was classified into one of the four plastic types. Next, the training model, and the object detection webcam models were run to test the identification of the plastic. 

My device is significantly cheaper than buying a commercially made infrared spectrometer that is used in research labs to distinguish different types of plastic. Each type of plastic had a characteristic reflection and absorption properties. Machine learning could identify the types of plastics 90-99% certainty. This research is important because recycling and diverting more plastics from landfills will, in turn, prevent these plastics from polluting the environment. 

INTRODUCTION

Plastics are used every day in our lives from water bottles to food containers to toys. They are cheap to produce and durable. Plastics can be melted and moulded into any shape and colour. They are resistant to corrosion and oxidation. Since plastics are durable and resistant to decay, they are frequently used but the downfall is that they don’t biodegrade. Only certain types of plastics are recycled while the others are sent to the landfill for future generations to deal with. They end up floating in lakes and oceans where marine life can get tangled up in them or digest them. 

There are seven different types of plastics (Table 1):

  1. Polyethylene Terephthalate (PET)

  2. High Density Polyethylene (HDPE)

  3. Polyvinyl Chloride (PVC)

  4. Low Density Polyethylene (LDPE)

  5. Polypropylene (PP)

  6. Polystyrene (PS)

  7. Other

The plastic resin code is the number in the three looped arrows. 

Table 1: Most commonly used plastic

Table 1: Most commonly used plastic

Most plastics go into landfills

According to an Environment and Climate Change Canada funded report published in 2019, 87% of plastics end up in landfills or the environment, 4% of plastics are burned for energy recovery and only 9% of plastics get recycled (Petigny et al., 2019). The main generating sectors for plastic waste are packaging (47% of total plastic waste), automotive (9%), textiles (7%), and electrical and electronic equipment (7%). The vast majority of post-consumer mechanical recycling economic activity occurs at approximately 10-11 facilities across Canada, which typically (but not exclusively) produce resins and/or flakes of multiple resins. These facilities primarily recycle PET, HDPE, LDPE and PP, which almost exclusively originate from packaging. These four types of plastic are relatively easy to recycle. PS used for takeout food containers and PVC used for pipe fittings are more difficult to recycle (Crowe, 2020).  Other plastics (#7) are used for chip and salad bags are almost impossible to recycle and they go into the landfill. 

In most recycling facilities, the glass, cardboard, paper, and steel cans are automatically separated from the mixed recycling material that is travelling along a conveyor belt (Crowe, 2020). Then humans manually separate out the aluminium cans, PET, HDPE and LDPE. This is labour intensive and costly. There is a market for the recycling facilities to sell PET, HDPE and LDPE. However, while PP is recyclable, it is often not separated and collected because there is not much of a market for the recycling facility to sell them.

Plastic Polymers

Plastics are composed of polymers, which are chains of molecules. Plastics are typically composed of hydrocarbons (hydrogen and carbon) with the C atoms making up the backbone of the molecule and H atoms bonded along the backbone (American Chemistry Council, 2020). Polyethylene (PE), polypropylene (PP) and polystyrene (PS) plastics are composed of polymers of H and C. Polyethylene Terephthalate (PET) is composed of carbon, hydrogen and oxygen atoms and polyvinyl chloride (PVC) is composed of carbon, hydrogen and chlorine (Cl) (Rubio, 2019). The Cl atom in PVC makes it difficult to recycle. If the polymer chains are randomly distributed in the plastic, then the plastic is soft and transparent (e.g., LDPE) (American Chemistry Council, 2020). If the polymer chains are organized in a repeatable pattern, then the plastic is hard and solid (e.g., HDPE).

Infrared Spectrometry

The electromagnetic spectrum is composed of energy that may behave as a particle and as a wave. The particle is called a photon. The wave is like the waves of water on the beach with crests and troughs. The distance between two crests is called a wavelength measured in nm. The electromagnetic spectrum consists of a wide range of energies. From the lowest energy to the highest energy, these waves are: radio, microwave, infrared, visible, ultraviolet, x-ray and gamma ray. This project will focus on distinguishing between types of plastics using near infrared (NIR) which is between visible light and microwave energy. NIR is closer to the visible energy than far infrared. Infrared beams are how a TV remote control communicates with a TV to turn on the TV and change the channels.

Infrared energy interacts with an object by vibrating its molecules. The chemical bonds between two atoms can either stretch or bend as they vibrate. The wavelength of the peaks on an infrared spectrum relates to the stretching and bending of particular bonds like C-H, O-H or C-C bonds. Each plastic polymer has a characteristic near-infrared spectrum with peaks based on the vibrating bonds. The vibrating molecules give off heat in people and animals which can be seen using night vision goggles. 

HYPOTHESIS

Several researchers have identified that plastic resin types can be sorted using NIR spectroscopy (Masoumi et al., 2012; Rani et al., 2019; Zhu et al., 2019). While this is known in research theory, most recycling centres across Canada use manual sorting of plastics rather than mechanical automated sorting of plastics as the theory has been rarely applied to practical use.
The research question that embodies this project is: can I make a device that automatically distinguishes between all seven different types of plastics to reduce the number of plastics in landfills?

MATERIALS & METHODS

This project consists of two main parts: the near-infrared (NIR) detection and machine learning detection of plastic resins. To start, multiple examples of each of the seven types of plastics were collected.

Part 1 – NIR Detection
For the NIR detection part, infrared emitters with wavelengths of 850 nm, 940 nm, 1050 nm series (1030 to 1070 nm range), 1200 nm series (1170 to 1230 nm range), 1300 nm series (1270 to 1330 nm) and 1550 nm series (1510 to 1590 nm range) were obtained to cover the whole near-infrared spectrum. Since TV remote controls use infrared to communicate with the TV, the existing LED lights were removed from three TV remote controls and the infrared emitters were soldered in. This was a simple way to turn the IR emitters off and on.

After setting up the emitters, a Raspberry Pi Camera was connected to a Raspberry Pi 4 (Figure 1). The two 850 nm wavelength emitters were removed to make it easy to be able to use multiple emitters. Then an Infrared High Transmittance Filter was placed in front of the camera lens to filter out all visible light (<760 nm). To test the NIR response to the plastic objects, each IR emitter was shone at a plastic object and the response was observed through the night vision camera (Figure 1). The tests were conducted in a dark black room, so there is no visible light interference. The 940 nm emitter was placed 40 cm away and the 1030 nm emitter was placed 10 cm away from the plastic object. The plastic resin number and a description of the reflectance and absorbance of the NIR light was recorded for each object in a table.

Figure 1: Photo of NIR device setup with NIR emitter in the remote control and the camera connected to the Pi pointed at a plastic shampoo bottle.&nbsp;

Figure 1: Photo of NIR device setup with NIR emitter in the remote control and the camera connected to the Pi pointed at a plastic shampoo bottle. 

Part 2 – Machine Learning
Over 50 plastic bottles of plastic types #1, 2, 4 and 5 were collected to start with objects with the same shape (Figures 2 to 4). 

TensorFlow–GPU was installed on a desktop and an object detection directory and Anaconda Virtual Environment was set up. Next, 400 pictures were taken of plastic objects with 4-5 plastic objects per photo. The plastic objects were photographed in 4-5 different orientations, backgrounds and light conditions. The photos were cropped so that there was only one object per photo and labelled the photo with the plastic resin number. The labels from the photos were used to generate TFRecords which served as input data for the TensorFlow training model. A total of  20% of the pictures were put into a test category and 80% into a training category and  then the training model was run on the PC for 200,000 steps. 

A label map was created to tell the trainer what each object is, by defining a mapping of class names to class ID numbers. The training pipeline defines the parameters that will be used for training. Finally, The training model was run and the object detection webcam models were tested for the identification of the plastic bottles.

Figure 2: Type #1 Plastic bottles

Figure 2: Type #1 Plastic bottles

Figure 3: Type #2 Plastic bottles

Figure 3: Type #2 Plastic bottles

Figure 4: Type #5 Plastic bottles and objects

Figure 4: Type #5 Plastic bottles and objects

RESULTS

Part 1 – NIR Detection

My device was significantly cheaper than buying a commercially made IR spectrometer that is used in research labs.

The NIR response for each type of plastic tested was:

  • #1 – PET – This plastic is normally smooth, transparent with glassy luster. It has a strong reflection with multiple glowing spots, no absorption, and responds to the NIR beam at a distance (Figure 5).

  • #2 – HDPE – This plastic normally has a rough surface and is opaque with a greasy luster. Generally, it has a moderate to strong reflection, strong to moderate absorption and the intensity of the absorption decays quickly with an increasing wavelength of NIR emitter (Figure 5). 

  • #3 – PVC – this plastic is used in pipes and it has no reflection and moderate to strong absorption.

  • #4 – LDPE – This is typically plastic bags, but I tested semi-transparent bottles with a strong reflection and weak absorption.

  • #5 – PP - Transparent objects have a strong reflection and weak to no absorption whereas, black objects have no reflection and no absorption.

  • #6 – PS – This plastic has small areas reflection like sparkling stars if the surface is smooth. It has moderate reflection and moderate absorption.

Figure 5: Types #1 and 2 plastic bottles with NIR light at 850 nm.

Figure 5: Types #1 and 2 plastic bottles with NIR light at 850 nm.

Part 2 – Machine Learning
After the training model was run on the Google Tensor Flow server for 200,000 training steps, the model was complete. Plastic bottles for types #1, 2, 4 and 5 were tested with different backgrounds and orientation. Plastic bottles of types #1 and 2 which are in the sample database and not in the sample database can be easily identified in different orientations and backgrounds with up to 99% accuracy. For plastic bottles of type #1 and 2, the process of identification is artificial intelligence because the model can recognize plastic bottles of these types outside of the database (Figure 6). For plastic bottles of type #4 and 5, the sample database was not big enough and thus the process of identification could be empirical.

Figure 6: Artificial intelligence distinguished between type #1 and # 2 plastics.

Figure 6: Artificial intelligence distinguished between type #1 and # 2 plastics.

DISCUSSION & CONCLUSION

Plastics are used every day in our lives from water bottles to food containers to toys, but only certain types of plastics are recycled while the others are sent to the landfill for future generations to deal with. Of all the plastics that are collected in blue boxes, 87% of plastics end up in landfills or the environment, 4% of plastics are burned for energy recovery and only 9% of plastics get recycled (Petigny et al., 2019).

Plastics are going to the landfills because only certain types can be sold for reuse and most recycling facilities across Canada use manual sorting of plastics rather than mechanical automated sorting. Manual sorting of plastics is expensive, so only a fraction of the plastic is recycled. 

The goals of this project were 1. to design a cheap near-infrared device to sort the 7 types of plastics and 2. to use machine learning to distinguish the types of plastic. The results successfully distinguished between 6 of the 7 types of plastic using their properties when near-infrared light is shone on them. The results also successfully used machine learning to identify type #1 and 2 plastic bottles. Both of these methods can be used at recycling facilities to identify plastic types cheaper than manual labour. 

This research is important because if it is applied, more plastics can be recycled and diverted from landfills which in turn prevents plastics from polluting the environment.

FUTURE STEPS

Future steps would be to take more pictures of types #4 and 5 bottles to improve the training model because there is a possibility that it may be empirical. Another future step would be  to take pictures to recognize plastic of different shapes (e.g., plastic containers and bags). 

Another future step would be to use a strong near-infrared emitter light source to illuminate the whole plastic bottle or multiple bottles instead of using just a focused beam and take a picture with the infrared camera. Then use the picture in the training model to distinguish different types of plastic.

REFERENCES

American Chemistry Council (2020). The Basics: Polymer Definition and Properties. Retrieved September 15, 2020, from https://plastics.americanchemistry.com/plastics/The-Basics/

Crowe, V. (2020, June 09). How to recycle in the UK. Retrieved June 29, 2020, from https://www.which.co.uk/reviews/recycling/article/how-to-recycle-in-the-uk

Masoumi, H., Safavi, S.M. & Khani, Z. (2012). Identification and classification of plastic resins using near infrared reflectance spectroscopy. International Journal of Mechanical and Industrial Engineering, v. 6, p. 213-220.

Petigny, J., Ménigault, C., Luisce, T., Harscoët, E., David, A., Mitsios, A., Laberge, M. & Lysenko, D. (2019). Economic study of Canadian plastic industry, markets and waste, Summary Report to Environment and Climate Change Canada, 63pp.

Rani, M., Marchesi, C., Federici, S., Rovelli, G., Alessandri, I., Vassalini, I., Ducoli, S., Borgese, L., Zacco, A., Bilo, F., Bontempi, E., & Depero, L.E. (2019). Miniaturized near-infrared (MicoNIR) spectrometer in plastic waste sorting. Materials, v. 12, p. 1-13.

Rubio, M. (2019, April 02). Recycling of PVC - Prospects and Challenges. Retrieved September 15, 2020, from https://www.ecomena.org/recycling-pvc/

Zhu, S., Chen, H., Wang, M. Guo, X., Lei, Y., & Jin, G. (2019). Plastic solid waste identification system based on near infrared spectroscopy in combination with support vector machine. Advanced Industrial and Engineering Polymer Research, v. 2, p. 77-81.

ABOUT THE AUTHOR

edward_xiong_.png

Edward Xiong

My name is Edward and I'm 15 years old. I'm a pre-IB French Immersion student in grade 10 at Lo-Ellen Park Secondary School, Sudbury. I've been involved in robotics since grade 4. I am a programmer for my robotics teams and I have competed at a Provincial level for both FLL and FTC robotics.