Skip to main content
Version: ACS CC

Smart Trash Can

A contactless, smart solution for detecting full trash bins and automatically opening the lid.

INFO

Author: Delia Tudor
GitLab Project Link: https://github.com/UPB-PMRust-Students/proiect-Delia37

Description

The Smart Trash Can is designed to make household waste management more hygienic, intelligent, and fair — especially in shared living spaces. The bin opens its lid automatically when a person approaches, using an infrared motion sensor that detects hand movement without requiring any physical contact.

To monitor the trash level, the system uses an ultrasonic distance sensor, which determines when the bin is full. When this happens, an audible buzzer alert is triggered to let users know it’s time to empty it.

What makes the project more engaging is its roommate-friendly logic: the software allows you to enter the number of people in the apartment, and when the trash fills up, the buzzer plays a personalized alert to indicate whose turn it is to take the trash out — solving the eternal “not my turn” dilemma in a smart, automated way.

Motivation

Taking out the trash is a task often postponed, especially in shared living spaces where no one feels responsible. Additionally, touching the bin lid can be unpleasant or unhygienic. This project was created to solve both problems by building a smart trash can that opens automatically when someone approaches and signals clearly when it’s full. The goal is to make waste disposal more hygienic, efficient, and user-friendly.

Architecture

Architecture Diagram

Log

Week 5 - 11 May

Week 12 - 18 May

Week 19 - 25 May

Hardware

  • Raspberry Pi Pico W – the microcontroller that runs the software and controls all components.
  • Infrared Sensor – detects movement (e.g., a hand) near the trash can to trigger the lid to open automatically.
  • Ultrasonic Sensors (HC-SR04) – used to measure the distance from the top of the bin to the trash, helping determine when it’s full.
  • SG90 Servo Motor – lifts the lid of the trash can when motion is detected.
  • Buzzer – sounds an alert when the bin is full and indicates whose turn it is to take out the trash.
  • Breadboard, wires, power supply – used for prototyping and connecting all components easily.
  • Male and Female Pin Headers – allow modular, solder-free connections between components and the microcontroller.
  • Battery Holder (2x 18650) – powers the entire circuit without needing a USB connection.
  • Mounting Bracket – securely holds the ultrasonic sensor inside the trash can.

Schematics

schematics Diagram

Bill of Materials

ComponentQuantityDescriptionPrice (RON)
Raspberry Pi Pico W2Main microcontroller unit37.00 x 2
HC-SR04 Ultrasonic Sensor2Measures distance to detect if the trash bin is full9.00 x 2
Infrared Obstacle Sensor1Detects hand movement near the trash can3.50
SG90 Micro Servo Motor1Opens the bin lid automatically8.00
Active Buzzer 5V1Alerts when the bin is full and whose turn it is2.00
LED & Resistor Kit1 setProvides visual indicators (e.g., full bin signal)15.00
Breadboard Kit with Wires & Power Supply1For prototyping and connecting components22.00
Female Pin Headers4 stripsConnect to male pins on the board and sensors2.00 x 4
Battery Holder (2x18650)1Provides portable power to the system6.50
Bracket for HC-SR04 Sensor1Mounts the ultrasonic sensor in position inside the trash can3.00

Software

LibraryDescriptionUsage
embassy-executorAsynchronous executor for Rust embedded systemsUsed for task scheduling and asynchronous programming
embassy-timeTime management libraryUsed for time-based operations such as delays
embassy-rpPeripheral access libraryUsed for initializing and interacting with peripherals
gpioGPIO control libraryUsed to control the pins connected to the sensors, buzzer, and servo
panic-haltPanic handler for embedded RustUsed to stop the program safely in case of an unrecoverable error
HC-SR04HC-SR04 manipulationUsed for controlling the ultrasonic sensor
  1. Embassy async embedded framework – Modern embedded async executor used in your project.
  2. HC-SR04 Ultrasonic Sensor in Rust – Crate for controlling the HC-SR04 distance sensor.
  3. Rust Embedded on Raspberry Pi Pico – PWM control example for servos on the Raspberry Pi Pico using Embassy.
  4. Sneha711/Smart-Trash-Can – A similar project written in Python using a Raspberry Pi and motion detection.