Skip to main content
Version: ACS CC

Smart Recycling Bin

The project represents a smart recycling bin that can be used to sort objects through AI material detection from photo.

info

Author: Niță Eduard-Eugen
GitHub Project Link: https://github.com/UPB-PMRust-Students/proiect-edwardnita

Description

The project is a smart recycling bin for waste, which automatically sorts an object based on the material it is made of. A camera will take a picture of the waste, which will be analyzed using AI and the result will determine the compartment into which the bin will automatically dispose of the waste.

Motivation

I always wondered what is the best method to sort waste as the public bins are still too generic when it comes to sorting trash by material. This idea was firstly explored in a hackathon but because of the insufficient time was only a proof of concept, now wanting to make it real.

Architecture

Diagram

Log

Week 5 - 11 May

Week 12 - 18 May

Week 19 - 25 May

Hardware

Raspberry Pi Pico W (Pico 2W)

Central controller for all peripherals, used for:

Wi-Fi: To communicate with the PC running the AI classifier.

GPIO: To control servos, camera trigger, LED, and read sensor input.

I²C: To communicate with the LED display.

Power Supply: Via USB (5V), also powers other 3.3V components via onboard regulator.

OV7670 Camera Module

Captures an image of the object placed in the bin, connected via SPI (via PIO or a dedicated SPI interface on Pico).

LED

Provides lighting for consistent image capture, connected to a GPIO pin via a current-limiting resistor.

It is turned ON/OFF by the Pico before/after taking a photo.

LED Display

Displays the material type detected (e.g., “Plastic”) and is connected through I²C.

Power: 3.3V or 5V depending on display model.

IR Proximity Sensor

Detects when an object is placed for analysis.

Power: 3.3V or 5V depending on sensor.

Connection:

VCC → 3.3V or 5V.

GND → GND.

OUT → GPIO pin on Pico.

SG90 Servo Motors

Move trays to direct waste into one of the four compartments, controlled with PWM.

USB Cable & Laptop

Powers the bin through the USB port and the laptop will use AI to analyze the data.

Schematics

Place your KiCAD schematics here.

Bill of Materials

DeviceUsagePrice
Raspberry Pi Pico 2WThe microcontroller39.66 RON x 2
OV7670 Camera ModuleCamera for object recognition16.33 RON
SG90 Servo MotorControls the rotating trays19.90 RON × 3
IR Proximity SensorDetects when an object is placed29.99 RON
White LED 5mmLights the object during photo0.30 RON
LCD 1602Displays the detected material14.99 RON
Breadboard & Jumper WiresFor prototyping22 RON
Total222.63 RON

Software

LibraryDescriptionUsage
embassyAsync embedded frameworkManages GPIO, PWM, I²C, Wi-Fi, tasks
embedded-halHardware abstractionStandard interface for controlling peripherals
hd44780-driverLCD driver for HD44780 via I²CUsed to display material name on LCD
defmtLightweight debug loggingDebug output over USB serial

AI Classifier (Python, runs on Laptop/PC)

LibraryDescriptionUsage
opencv-pythonImage capture & preprocessingCaptures image from the Pico and resizes/crops
tensorflow or torchLoads pretrained model and runs inferenceClassifies material (e.g., plastic, glass)
numpyNumerical operationsImage array manipulation
  1. Smart Trash Bin using Arduino and ML
  2. PWM lab
  3. SPI lab
  4. I2C lab