Smart Bin
Author: Robert Postolache
GitHub Project Link: https://github.com/UPB-PMRust-Students/acs-project-2026-RobertP1021
Description
Smart Bin is a trash bin that automatically sorts waste without any user intervention. When it detects a hand nearby, it opens a flap and lets the object fall onto an internal analysis platform. There, humidity, metal, and weight sensors analyze the object and classify it into one of three categories: wet, dry, or metal. A motor then rotates the container platform until the correct one is in position, after which the object is released. If a container is full, the system refuses to accept new waste for that category.
Motivation
My motivation to tackle this project came from my daily commute to work. Every day, before getting on the metro, I would buy a coffee cup and something to eat. Sometimes, if the metro was in the station, I hurriedly threw the cup and the food wrapper in the nearest trash bin, without looking for the correct label. So while I was searching for a project idea, I remembered that it would be nice to have a trash bin that could automatically sort the waste, without me having to worry about it.
Architecture
Smart Bin is built around an STM32U545RE-Q Nucleo board that coordinates all sensors and actuators through firmware written in Rust with Embassy.
Main flow:
- The proximity sensor detects a hand at the entry and the first servo opens the entry flap
- The object falls onto the analysis platform where the following are read simultaneously:
- humidity sensor
- metal sensor
- Based on the readings, the microcontroller classifies the object as WET / DRY / METAL
- If the container is available: the stepper motor rotates the turntable to the correct position, the second servo releases the object
- The display shows feedback to the user about the classification result and if a container is full or not
- The fill level of the containers is checked (one infrared sensor per container)
Interfaces used:
- SPI: ST7735 LCD Display
- PWM: servo × 2
- GPIO: stepper motor, metal sensor, infrared reflective sensors × 3
- ADC: humidity sensor
Log
Week 5 - 11 May
I bought the hardware components, and mapped out the pin connections. I started testing each component with simple and minimal code.
Week 12 - 18 May
I completed the initial testing for each component, and presented them to the lab assistant.
Week 19 - 25 May
I started integrating the components, and writing the main logic for the project. I also assembled the final version for PM Fair.
Hardware
Schematics

Bill of Materials
| Device | Usage | Price |
|---|---|---|
| STM32U545RE-Q Nucleo | Microcontroller | 90 RON |
| Servo Motor SG90 × 2 | Entry flap + platform trapdoor | 13,99 RON × 2 |
| TCRT5000 Infrared Line Sensor Module with Adjustable Sensitivity x 3 | Container fill level detection | 3.87 RON × 3 |
| ULN2003 Stepper Driver + 5V Stepper Motor | Stepper motor control for turntable | 16.97 RON |
| Rain Sensor Module | Humidity sensor for wet/dry | 9.99 RON |
| Senzor inductiv de proximitate - LJ12A3-4-Z/BX | Inductive proximity sensor for metal detection | 15.57 RON |
| Senzor Ultrasonic de Distanță HC-SR04+ | Ultrasonic sensor for hand detection | 14.99 RON |
| 1.8 Inch 128 x 160 SPI TFT LCD Display Module ST7735 51/AVR/STM32/ARM 8/16 Bit | Display for user feedback | 45.86 RON |
| Breadboard + Jumper Wires | Connections | 15 RON |
| Resistors assorted | Pull-ups, current limiting | 5 RON |
Software
Embassy framework
- embassy-executor
- embassy-stm32
- embassy-time
- embassy-embedded-hal
- embassy-sync
Display
- mipidsi
- display-interface-spi
- embedded-graphics
Hardware
- embedded-hal
Software Diagram
| Library | Description | Usage |
|---|---|---|
| embassy-stm32 | Async HAL for STM32 | Pin control, PWM, SPI, ADC |
| embassy-executor | Async executor for embedded | Running concurrent tasks |
| embassy-time | Async timers and delays | Timing for sensors and motors |
| embassy-embedded-hal | Embedded HAL adapters for Embassy | SPI bus sharing for display |
| embedded-graphics | 2D graphics library for embedded | Rendering text on the display |
| embedded-hal | Hardware abstraction layer traits | PWM control for servo motors |
| mipidsi | Display driver for MIPI displays | ST7735 display driver |
| display-interface-spi | SPI display interface | SPI communication with ST7735 |
Project Photos




