This is an old revision of the document!
Smart Bin
1. Introduction
What it does
The “Smart Touchless Waste Bin” is an automated trash receptacle that opens its lid automatically when it detects a user's hand approach. Additionally, it continuously monitors the internal trash level, providing comprehensive feedback through an LCD display (showing the exact fill percentage and system status), an LED interface (Green, Yellow, Red for quick visual capacity indication), and an active buzzer (emitting an auditory warning while refusing to open if the bin is completely full).
The purpose of the project
The main purpose is to create a hygienic, hands-free waste disposal experience while preventing the common issue of overfilling the bin.
The initial idea
The idea stems from the everyday inconvenience of disposing of messy waste (e.g., while cooking) without dirtying the bin's lid. Furthermore, in shared spaces (offices, kitchens), bins often get overfilled because people don't realize the capacity is reached until they force the lid open. Combining motion-sensing opening with a precise, screen-based capacity-monitoring system solves both issues effectively.
Why it is useful
This project is highly useful for improving hygiene and sanitation in environments like hospitals, kitchens, or public restrooms by eliminating cross-contamination. For the user, the addition of an LCD display provides clear, precise data regarding the bin's status and when it's time to empty the trash, ultimately promoting better waste management habits.
2. General Description
The system is built around a central microcontroller (AVR ATmega) which acts as the main processing unit, orchestrating the inputs and outputs through a non-blocking state machine design.
Interaction Flow:
The system operates in three main states: CLOSED, OPEN, and COOLDOWN.
Input Layer: Two HC-SR04 ultrasonic sensors act as the “eyes” of the system. The exterior sensor continuously scans for a user's hand (triggering at a distance of ⇐ 20cm). The interior sensor, mounted under the swing-top lid, measures the distance to the trash. To prevent echo interference and optimize CPU load, the internal measurement is only triggered once, shortly after the lid closes.
Processing Layer: The microcontroller receives the distance data. If a hand is detected, it checks the internal trash percentage (calculated mathematically based on the bin's total depth). It also formats this data to be transmitted over the I2C communication protocol.
Output Layer:
Mechanical Action: If the bin is not full, the microcontroller sends a PWM signal to the SG90 Micro Servo Motor, which acts as a mechanical lever to push the swing-top lid open.
Textual Feedback: A 16×2 LCD Display connected via an I2C module shows real-time information, such as the exact trash percentage (e.g., “Level: 45%”) and the current status of the bin (e.g., “OPEN”, “FULL!”). The I2C module is crucial as it drastically reduces the number of pins required to interface the screen with the microcontroller (using only SDA and SCL pins).
Visual & Auditory Warnings: If the bin is full (>= 85%), the system blocks the opening mechanism, the Red LED lights up, and an Active Buzzer emits a warning beep. The current fullness level is also continuously displayed using 3 LEDs (Green < 50%, Yellow < 85%, Red >= 85%) for quick visual reading from a distance.
3. Hardware Design
3.1. List of Components
To build this project, the following hardware components are used:
1x ATmega Microcontroller Board (e.g., Arduino Uno used as AVR development board)
1x Small Swing-Top Plastic Trash Bin (Platform for the project)
2x HC-SR04 Ultrasonic Sensors (One for exterior detection, one for interior level measurement)
1x 16×2 Character LCD Display
1x I2C Serial Interface Module for LCD (e.g., PCF8574, used to minimize wiring)
1x SG90 Micro Servo Motor (Used as a lever to push the lid)
3x LEDs (1x Green, 1x Yellow, 1x Red for capacity indication)
3x 220Ω / 330Ω Resistors (Current limiting for LEDs)
1x TMB12A05 Active Buzzer (For auditory full-bin warning)
1x Breadboard (For circuit prototyping)
Assorted Dupont Jumper Wires (Male-to-Male, Male-to-Female)
Power source (e.g., USB cable or battery pack)