Smart Bin
Overview
The Smart Bin project presents an innovative approach to waste management by integrating advanced technologies such as embedded systems, machine learning, and hardware design into a waste sorting system.
The primary objective of this project is to create an intelligent waste bin capable of distinguishing between recyclable and non-recyclable waste, thereby promoting efficient waste sorting and recycling practices.
The Smart Bin uses a camera for waste identification and servo motors for physical sorting of the waste. A machine learning model, trained on the COCO (Common Objects in Context) dataset, is used to classify the waste based on specific characteristics such as size, shape, and color.
The project demonstrates the potential of technology to contribute positively to environmental sustainability and paves the way for future innovations in waste management.
Initial
My initial sketch of the trash can framework design. It includes a rough outline of the four compartments and a concept for the latch operation.
Sketch Concepts
Mechanism
A more detailed concept of the latch system, where it pivots up and down, allowing waste to fall into their respective compartments.
Bag Holder
I also conceived a rough concept for the compartments, where a bag holder would rest on top of the lower frame to secure the bags in place.
Latch
My subsequent idea for the latch operation. Instead of having a pivot point for the latch, I opted for it to rotate on a wooden rod.
Joinery
I realized that I needed to divide my prints into separate pieces to fit the 3D printer and decided to use joinery instead of glue for connecting these pieces.
Upper Layer Components
The upper layer consists of the latch frame, latches, servo motors, microcontroller, camera, and power supply. The components are all connected by a dowel that goes through each part.
Servo Motors Attachment
The Servo Motor Attachment allows the motor arm to swing 180 degrees without interference from the frame, while still maintaining the ability to push the ramp.
3D Prints
Latches
The latches are sloped towards the center, guiding the waste to the middle for optimal camera angle capture. To prevent the two latches from colliding with each other and the frame, spacers are printed and placed.
Waste Compartment Frame
The print of the waste compartment frame, which was too large for the printer, along with the latch frame, had to be split into two parts to allow for easier and stronger prints.
Side View of Latch Frame
Side view of the latch frame that shows the T piece, specifically designed to lock the two frames together. A hole is incorporated into the design to secure the latches and the two frames.
Waste Bag Holder
The waste bag holder, which is positioned on top of the frame to secure the waste bags. The waste bag holder was designed to be 1.5 millimeters larger than the holes in the frame for the bags.
Flow Chart
The flowchart used in creating the script for the embedded system. Camera data is captured and then processed through conditional statements for each different type of waste. Based on these conditions, the servo motors move accordingly to ensure the waste falls into the correct compartment. A delay is then implemented to allow sufficient time for the waste to fall into their respective compartments. Following this, the servos are reset to their idle positions and continuously loops.
Circuit Diagram
The circuit diagram of my embedded system. The red lines represent the power lines, the black lines denote the ground lines, and the blue lines illustrate the GPIO inputs from the servo motors. The power supply for the Raspberry Pi and Camera is separate from that for the servo motor to minimize any power fluctuations among the devices. The servo motors relay their inputs through the GPIO pins of the Raspberry Pi.
Software System
Operating System
The Smart Bin uses the Buster Operating System, a version of the Linux distribution specifically designed for the Raspberry Pi. The choice of Buster OS was due to its compatibility with the Raspberry Pi hardware and its ability to provide the necessary drivers and libraries for the hardware components.
Raspberry Pi 4 Model B
Machine Learning
The system uses a pretrained model that was trained on the COCO (Common Objects in Context) dataset. The choice of the COCO model was due to its large collection of diverse and well-annotated images, which provides a standardized benchmark for evaluating object detection models.
COCO
Image Processing Software
The system uses OpenCV, a popular open-source computer vision library, to process images captured by the camera. This includes tasks like image enhancement, feature extraction, and object detection.
Raspberry Pi Camera Module V2-8
Control Software
The system includes software that controls the physical components of the Smart Bin, such as the servo motors that drive the latch system. This software interfaces with the hardware and activates the servo motors based on the results of the image recognition process conducted by the machine learning model.
SG90 Micro Servo Motor Mini
Prototype
Testing was done with a small water bottle for the plastic compartment, apple for the compost compartment, and glass cup for the glass compartment.