RecycleBot: An AI Enabled Waste Sorting Trash Can

CAROLINE CHAN

she/her | age 13 | Toronto, ON

Excellence Award, Junior Category Gold; and Challenge Award, Junior Natural Resources Category — Canada-Wide Science Fair | Junior Category Gold Medal and University of Toronto Sigma Xi Award — Toronto Science Fair

Edited by Emily Lind


INTRODUCTION

Recycling is an important practice that helps protect the environment and conserve natural resources. However, many recyclable wastes are not recycled for two reasons. First of all, garbage is put into recycling bins. Recyclables that are contaminated by garbage cannot be processed, so they are sent to landfills. Each year, Toronto manages approximately 180,000 tonnes of recyclables through its blue bin program, and 30% (54,000 tonnes) goes to landfill (Zettler, 2019). This is largely due to contamination. Secondly, recyclable wastes are put into garbage bins. Improper sorting of waste leads to recyclables being dumped into landfills. In fact, 48.2% of items in US landfills are actually recyclable (Osborne, 2022).

Proposed Solution
My proposed solution is to make a trash can called the RecycleBot that sorts waste into the recycling or garbage bin. The RecycleBot solves improper recycling by sorting waste into the correct bin in the first place. Due to the RecycleBot’s small size and low cost, it will be designed primarily for private places, such as homes or schools. Additionally, in these locations, many young children improperly sort waste. The RecycleBot can sort properly and teach children how to sort waste correctly through examples. The RecycleBot will use an AI algorithm that determines whether a piece of waste is recyclable or garbage and automatically sorts it. 

Engineering Design Criteria

  1. An overall AI detection accuracy of over 80% for both recyclable and garbage waste.

  2. For this prototype, empty plastic bottles and metal cans are considered recyclable. Everything else is considered garbage.

  3. Completely automatic. No humans are needed.

  4. The cost of materials for making RecycleBot is less than $100.

MATERIALS & METHODS

First, I developed an AI model to distinguish between household recyclables and garbage waste. To do this, I trained a machine learning app called Lobe (Lobe, 2020) using 488 images of plastic bottles and metal cans as “recyclable” wastes and 1,272 images of other items as “garbage” wastes. Images were collected from a Kaggle database (Garbage classification, 2018) as well as images of objects in the RecycleBot taken using a webcam (Figure 1).

Figure 1: Training images for the AI model; images from the Kaggle database (top) and images taken from the RecycleBot webcam (bottom).

Next, I built the mechanical parts of the RecycleBot by modifying a small plastic trash can with a swing lid. The RecycleBot is composed of an Arduino microcontroller, two sensors, a servo motor, a camera, and a computer (Figure 2). I wrote the C++ programming language code to control the microcontroller.

Figure 2: RecycleBot design plan.

Step One
The RecycleBot is activated when an ultrasonic distance sensor attached to the top of the trash can detects an object less than 15 centimeters away, meaning that there is an object on the lid. The ultrasonic distance sensor emits a sound wave, too high for humans to hear, which travels through the air. If there is an obstacle, it bounces back to the sensor, and the travel time and speed can be used to calculate the distance of the object.

Step Two
Once activated, the AI model decides if the image of the object captured by the webcam is recyclable or garbage. The AI exports the result by changing the light intensity of the pixels of the output section of the computer screen, with darker pixels meaning garbage and brighter pixels meaning recyclable (Figure 3). The light-dependent resistor (LDR) attached to the screen checks the light intensity of the pixel. The electrical resistance of the LDR is sent to the Arduino microcontroller.

Figure 3: Garbage item and recyclable item inside the RecycleBot from the perspective of the computer screen. The output section of the computer is on the bottom left (circled in red), and where the LDR is attached to. The garbage outputs an area with darker pixels, while the recyclable outputs an area with lighter pixels, displayed by the white vertical lines.

Step Three
The Arduino uses a servo motor to turn the lid either 90 degrees clockwise or counterclockwise, depending on the LDR value. If the LDR value is under 800, it flips the object to the garbage side, but if the value is over 800, it flips the object to the recycling side. It waits for the object to fall and after 4 seconds, returns the lid to the level position. Then, this cycle starts again and waits for the detection of another object (Figure 4).

Figure 4: The final RecycleBot design.

RESULTS

Testing Process
I tested the accuracy of both the AI model and the RecycleBot using 20 different objects: 10 pieces of garbage, and 10 recyclable items (Figure 5). The objects were not used for training the model.

Figure 5: Objects used to test the RecycleBot: 10 recyclable objects (left), 10 garbage objects (right).

Each object was placed in 5 different positions on the lid (Figure 6) for a total of 100 tests. I performed the testing process twice.

Figure 6: Bird’s eye view of the five different positions of objects on the RecycleBot: upright and at the center of the lid (a); upright and at the right-back edge of the lid (b); upright and at the left-front edge of the lid (c); horizontal and aligned with the camera axis (d); horizontal and aligned perpendicular to the camera axis (e).

AI Accuracy
I first determined the accuracy of the AI model by placing the 20 objects in 5 different positions on the RecycleBot lid, without allowing the lid to flip. I captured an image of the item, and inputted it into my Lobe model, then checked if the AI thought the object was garbage or recycling. I tallied how many items the AI correctly categorized.

RecycleBot Accuracy
Next, I repeated the 100 tests using the full RecycleBot, allowing it to flip the item to the garbage or recycling side. I placed the item on the lid, then I checked which side of the trash can the object fell into and tallied how many the RecycleBot correctly sorted.

Results
The AI model correctly classified 88% of the recyclable objects and 94% of the garbage objects, with an overall accuracy of 91% (Figure 7).

Figure 7: AI model accuracy.

The RecycleBot correctly sorted 92% of the recyclable objects and 84% of the garbage objects for an average accuracy of 88%, which surpassed one of my design criteria of 80% (Figure 8).

Figure 8: RecycleBot trash can accuracy.

I noted placing the object in different positions affected the accuracy of the RecycleBot. When items were placed in the center, 100% of the items were sorted correctly. Only 80% of objects placed in the right-back or left-front edge of the lid were sorted correctly. Items placed horizontally and aligned with the camera axis resulted in an accuracy of 90%. Items placed horizontally and aligned perpendicular to the camera axis resulted in an accuracy of 95% (Figure 9).

Figure 9: Accuracy of items placed in different positions on the RecycleBot.

DISCUSSION

The RecycleBot met all the predetermined design criteria. The RecycleBot is both completely automatic and can sort between recycling and garbage with a 88% accuracy, which surpassed the 80% criteria. The total cost of materials for the RecycleBot, excluding the computer, is less than $100. Many of the items that were used were household objects, such as the webcam and light, which were repurposed when creating the RecycleBot.

The RecycleBot correctly sorted recyclables more accurately than garbage items. This is likely because the recyclables - metal cans and plastic water bottles - had a very distinct cylindrical shape. The garbage items varied in shape and size, making it difficult for the AI model to distinguish. For example, a cylindrical food container contained non recyclable materials, but because of its cylindrical shape, the AI recognized the container as recycling.

The positioning of items on the lid of the RecycleBot also played an important role in the accuracy of the RecycleBot. Items placed in the center of the lid were sorted most accurately, while items placed at the very front or very back of the lid were sorted least accurately. A lot of the training data contained images of objects placed in the center, while less training data consisted of images placed in the very front or back. Placing items in the back or front also reduced details visible to the AI. These factors affected the accuracy in the final AI model. This problem can be solved by either expanding the training data to incorporate a larger variety of images, or placing a marker for the center location, where the AI can best sort items.

The RecycleBot’s accuracy was lower than the AI's accuracy because of the lid-flipping design. If the object was too large or placed on the opposite side of where it should be flipped into, the RecycleBot would sometimes sort the object into the wrong bin, even though the AI’s decision was correct. To do this, I can train it with more images and modify the sorting mechanism, allowing for items to easily fall into their predicted bin.

My current AI model only recognizes bottles and cans as recyclables. I would like it to be able to sort wastes into more categories such as food waste, by training the model with images of the other types of wastes. I can also add more categories within recycling, including glass, metal, and paper.

The current RecycleBot prototype is quite bulky, due to the computer’s required connection to the light-dependent resistor. It is possible to shrink the setup by uploading the AI model into a more powerful microprocessor, such as a Raspberry Pi.

Currently, only large-scale AI-enabled waste sorters exist. These sorters are used in recycling plants (Vasarhelyi, 2022). The problem is that waste can be contaminated inside recycling bins in our homes. For example, a glob of yogurt in a yogurt cup that was improperly placed into a recycling bin could contaminate a tonne of recycling. However, the RecycleBot tackles the problem from the source, by sorting waste in homes before it ever reaches recycling bins.

AI waste sorters are also being developed for large public places. They are meant to be placed in offices, food courts, or public parks (Thompson, 2023). On the other hand, the RecycleBot is designed for private use specifically, as it is cheaper and smaller.

CONCLUSION

Canadians are throwing too much garbage into blue bins and too much recyclables into garbage bins. Not only is this practice bad for the environment, it is also very costly to our society. Toronto has a recycling contamination rate of 26%, one of the highest in Canada. If we lower this percentage to even 25%, it could lower recycling costs in Toronto by $600,000 to $1,000,000 a year (Chung, 2019). 

I have made the RecycleBot to help solve this problem by using AI and robotics to automatically sort wastes into recycling or garbage bins at home. My prototype version of RecycleBot shows that this can be done using relatively inexpensive components. My long-term goal is to create an affordable home-use version of the RecycleBot.

REFERENCES

Chung, E. (2018, April 9). Many Canadians are recycling wrong, and it’s costing us millions. CBC. https://www.cbc.ca/news/science/recycling-contamination-1.4606893

Cook, J. S. (2022). Ultrasonic Sensors: How They Work (and How to Use Them with Arduino). Arrow.com. https://www.arrow.com/en/research-and-events/articles/ultrasonic-sensors-how-they-work-and-how-to-use-them-with-arduino

Garbage classification. (2018, November 24). Kaggle. https://www.kaggle.com/datasets/asdasdasasdas/garbage-classification

Geyer, R., et al. (2017). Production, use, and fate of all plastics ever made. Science Advances, 3(7). https://doi.org/10.1126/sciadv.1700782

Kumar, R., & Uffe Kock Wiil. (2019). Recent Advances in Computational Intelligence.

Kshirsagar, P. R., et al. (2022). Artificial Intelligence-Based Robotic Technique for Reusable Waste Materials. Computational Intelligence and Neuroscience, 2022, 1–9. https://doi.org/10.1155/2022/2073482

Lobe (2020, October 26) Lobe Blog: Machine Learning Made Easy.  https://www.lobe.ai/

Mohammed, M. A., et al. (2022). Automated waste-sorting and recycling classification using artificial neural networks and features fusion: a digital-enabled circular economy vision for smart cities. Multimedia Tools and Applications. https://doi.org/10.1007/s11042-021-11537-0

Osborne, M. (2022, May 9). At Least 85 Percent of U.S. Plastic Waste Went to Landfills in 2021. Smithsonian Magazine. https://www.smithsonianmag.com/smart-news/the-us-recycled-just-5-percent-of-its-plastic-in-2021-180980052/

Recycling, Organics & Garbage. (2019, January 3). City of Toronto; City of Toronto. https://www.toronto.ca/services-payments/recycling-organics-garbage/

Thompson, E. (2023, December 26). Meet Oscar, the Canadian-built, AI-driven recycling system helping governments go green. CBC News; CBC. https://www.cbc.ca/news/politics/artificial-intelligence-recycling-government-1.7069063

Vasarhelyi, K. (2022, April 6). AI robotics in recycling. Environmental Center. https://www.colorado.edu/ecenter/2022/04/06/ai-robotics-recycling

Zettler, M. (2019, March 26). Toronto recycling: Why so much material still goes to landfill. Global News. https://globalnews.ca/news/5099574/toronto-recycling-packaging-landfills/


ABOUT THE AUTHOR

Caroline Chan


Caroline is a Grade 9 student at A Y Jackson Secondary School in Toronto, Ontario. She is interested in science and technology, especially artificial intelligence and how it can be used to improve people's lives. She has been participating in science fairs for three years, and this is her second time as a Canada Wide Science Fair Finalist. Outside of school, you might find her reading a good mystery or playing volleyball with friends.