STM32-Based Smart Waste Bin for Hygienic Disposal Using Embedded Sensing and Automated Control
Organizations: Department of Electrical and Computer Engineering, North South University, Dhaka, Bangladesh
Abstract
The increasing demand for hygienic and contactless solutions in public and private environments has encouraged the development of automated systems for everyday applications. This paper presents the design and implementation of a motion- sensing automatic waste bin using an STM32 microcontroller, ultrasonic sensors, and a servo motor. The system detects user presence through ultrasonic sensing and automatically opens the bin lid using a servo motor controlled by the microcontroller. An additional ultrasonic sensor is used to monitor the internal waste level of the bin, while an OLED display provides real- time feedback regarding system status. The proposed system offers a low-cost, reliable, and easily deployable solution for touch-free waste disposal. Experimental evaluation demonstrates fast response time, stable sensing performance, and smooth mechanical operation. The system can be effectively deployed in homes, educational institutions, hospitals, and public facilities to improve hygiene and user convenience.
Figures & tables
| Component | Model | Qty |
|---|---|---|
| Microcontroller | STM32F103C8T6 | 1 |
| Programmer | ST-LINK V2 | 1 |
| Ultrasonic Sensor | HC-SR04 | 2 |
| Display | OLED (I2C) | 1 |
| Servo Motor | SG90 | 1 |
| Component | Pin | STM32 Pin |
|---|---|---|
| OLED Display | SCL | PB10 |
| OLED Display | SDA | PB11 |
| Ultrasonic Sensor 1 | TRIG | PA9 |
| Ultrasonic Sensor 1 | ECHO | PA8 |
| Ultrasonic Sensor 2 | TRIG | PB9 |
| Ultrasonic Sensor 2 | ECHO | PB8 |
| Parameter | Result |
|---|---|
| Hand detection range | 3–10 cm |
| Average response time | 0.8 s |
| Servo rotation angle | 0–90° |
| Operational reliability | 95% success rate |