Inspiration for the SmartSort: Toronto’s Public Waste Management Problem

The idea behind the SmartSort originates from a commonly observed problem within Toronto’s public waste management: the improper sorting of waste in local bins. Due to either a lack of time, awareness, or environmental responsibility, the public tends to discard waste into the incorrect category, which can lead to waste contamination, as depicted by this waste bin located in downtown Toronto.

Toronto public waste bin

When items are being placed in the wrong bin, so many of our current tools being used to process waste often end up compromised, which can result in increased waste collection and recycling costs by millions of dollars. In fact, if the rate of contamination decreases by 1% in Toronto, this could save up to $1 million in recycling costs per year.

What does the SmartSort do?

SmartSort The SmartSort is intended to be our team’s engineered solution to mitigating the risk of waste contamination in Toronto and automating a part of the waste management system by retrofitting public waste bins. The way we decided to tackle this issue was to nip the problem at its bud, which is why our team came up with the SmartSort design to sort trash automatically right when somebody decides to dispose of an item into a waste bin.

Using computer vision and machine learning frameworks, the SmartSort is able to recognize the material of the disposed waste and correctly categorizes it into three different categories:

  1. Cardboard / paper
  2. Glass / metal / plastic
  3. Trash

Through an electromechanical sorting system, the SmartSort is able to place the waste into the appropriate bin. The compact design of the SmartSort allows it to be easily retrofitted within Toronto public waste bins and it does not require any external wireless connection.

How we built and prototyped the SmartSort

Three different processes Before we built anything, our team spent significant time brainstorming designs for the SmartSort. The diagram above illustrates our initial idea for the SmartSort: an integration between different software and hardware systems. Therefore, the engineering journey of the SmartSort is comprised of three main processes:

  1. Computer Vision and ML Categorization
  2. Electrical and Motor Setup
  3. Mechanical Structure and Integration

Our team members all contributed towards the construction of the SmartSort. Armaan and Kevin developed an application for computer vision and ML categorization, while Liza worked on the electrical setup, and Hailin contributed to all three processes with a focus on mechanical structure.

Computer Vision Categorization

We used a wide variety of technologies to implement our solution to the problem of unsorted trash. Firstly, the image classification program that makes use of a Raspberry Pi as the brains of the operation; it is the machine that runs our image classification model. Essentially, we used Tensorflow’s implementation of the VGG16 model, which is a deep convolutional neural network that is able to identify complex dependencies in image data, to analyze photos taken by our Raspberry Pi camera module and accurately output a classification.

This model was trained on images so that it could identify whether a piece of trash was recyclable and what material category it belongs to. Using this image classifier, we are able to determine whether a piece of recyclable dry waste is made of Cardboard, Glass, Metal, Paper, or Plastic! As such, using the raspberry pi and its tiny camera module, we essentially had a compact sensor system that could accurately tell us which bin a piece of trash needed to be sorted into.

You can check out our computer vision folder in our SmartSort GitHub repo for more details.

Electrical and Motor Setup

Electrical and motor set up This brings us to the operation of the sorting system, which is controlled by the electrical and motor setup. For the electrical setup of the SmartSort System, we employed an Arduino Mega 2560 to control two standard rotation servo motors, as shown by the schematic above. Both servos are powered by a 5V-2A voltage source and the servos are programmed by the Arduino, which is later connected to the Raspberry Pi through a USB serial connection that utilizes the UART protocol.

The Raspberry Pi communicates to the Arduino by sending encoded bytes that are later decoded by the Arduino, and these conditional bytes indicate which angle position that the servos should rotate to.

More details on our electromechanical setup can be read here.

Mechanical structure and Integration

Side by side mechanical structure There are 3 mechanical components that form the foundation for the SmartSort system:

  1. The holding platform is composed of laser cut birch wood with two barriers that function as both an enclosure for the object and support for the camera.
  2. The 3D-printed arm controlled by a servo which acts as an actuator for the falling object. This was originally designed to push objects off the holding platform, but it was converted to a latch in our final prototype to improve sorting consistency and to let the force of gravity act as a moving force.
  3. A 180-degree servo which rotates a sliding ramp to three fixed angles for the three different waste categories (Cardboard/paper, glass/metal/plastic, and trash).

Challenges we ran into while engineering the SmartSort

There were a number of small modifications we had to make to our device throughout the testing process based on issues that came up along the way.

Angle of platform - Caused the object to fall off the ramp and into the wrong bin. We adjusted the angle by raising the front of the device.

Platform material - Friction prevented objects from sliding into the bins. To fix this issue, we coated the platform with smooth parchment paper, which provided both a slipperier surface as well as a neutral background for the camera to perform its classifications accurately.

USB serial communication - We ran into some issues while trying to have the Raspberry Pi communicate to the Arduino Mega, as the type of encoding of bytes sent or received through the UART terminal was not known. By learning about the different kinds of encoding (ASCII, int to char) and figuring out that the serial monitor could only act as a receiver or transmitter at one time, we were able to debug the issue and establish single byte communication with the Arduino as the receiver and the Raspberry Pi as the transmitter.

What's next for SmartSort: Areas of Improvement

Trash bin integration - Our final prototype accomplished the task of sorting the items however our vision would be to have the SmartSort retrofitted on every bin in Toronto. This would require modifying the mechanical design to fit within the constraints of the bins in Toronto. Although we were unable to source it given the time constraints, adding a solar cell would allow this entire mechanism to operate independently.

Mechanical robustness - Further improving the integration of various components would allow for a more seamless design capable of dealing with both larger and heavier items. So far, the current materials and components used allow for an effective proof of concept. However, using metal components, instead of laser cut wood, would be fireproof and allow for increased structural integrity.

Speed/accuracy of the classification model - The ability to quickly sort objects instantaneously would prevent issues such as backlog and overflowing, as so far we only considered the ideal case where objects fall one at a time with enough time between objects. This requires finding a more efficient machine learning categorization network that requires less time and computational power.

Prizes that our team qualifies for

The SmartSort product qualifies for two prizes, the first being the theme of ‘Smart City Automation’ as our design is intended to automate the waste sorting process located within Toronto waste bins.

The SmartSort also qualifies for the ‘Best Unconnected Hack’, as all of our components (Arduino, Raspberry Pi, and motors) are wired together and our computer vision categorization process is self-contained and does not utilize wireless connections.

Built With

Share this project:

Updates