Three ultrasonic sensors, one servo motor and an Arduino UNO. One sensor watches the front and lifts the lid before you touch it. Two more sit inside and measure the waste from opposite corners, so an uneven pile of rubbish never fools the reading.
Every bin reports its fill level. Anything above 90% is flagged for immediate collection.
| Bin | Location | Zone | Type | Fill level | Status | Last seen |
|---|
This is not a video or a mock-up. It is the same state machine that runs on the ESP32 — same thresholds, same timings, same sensor-fusion rule — ported to JavaScript and running in your browser right now. Move a slider and the lid reacts exactly as the real bin would.
Press βUneven pileβ. Sensor A reads 90% and sensor B reads 10% —
a bag dropped on one side. A bin with a single sensor mounted where A is
would declare itself full and send a collection van to a half-empty bin.
The fused reading is 50%, and the firmware raises an
UNEVEN LOAD flag instead. That is the reason there are two
sensors inside.
Eight steps, from a hand approaching the bin to a van being dispatched.
An HC-SR04 sensor measures the distance to whatever is in front of the bin many times a second. Under 25 cm, the microcontroller drives a servo to 90° and the lid lifts. Nobody touches a dirty surface.
Rubbish is never flat. One sensor over a peak would shout "full" while the bin is half empty. Two sensors on opposite diagonals are averaged, so a 15 cm gap in a 30 cm bin really does mean half full — and a big disagreement between them flags a load piled to one side.
Green under 75%. Amber blink from 75%. Solid red plus a short beep at 90%, and the bin appears in red on the city map so a van is routed to it before rubbish ends up on the pavement.
The same design scales from a single classroom bin to a municipal fleet.
Touchless disposal cuts a contamination path in wards and corridors. Full-bin alerts keep clinical waste from overflowing.
Very high footfall, very uneven filling. Level data tells cleaning staff which of 400 bins actually needs attention right now.
Fewer pointless inspection rounds. Housekeeping is dispatched by data instead of by a fixed timetable.
Collection routes are planned from live fill levels, which cuts fuel, vehicle hours and missed pickups.
A cheap, visible sustainability project that students can maintain and extend themselves.
Segregated waste streams are monitored separately, which supports compliance reporting and audits.
| Controller | Arduino UNO (ATmega328P) or ESP32 |
| Sensors | 3 × HC-SR04 — 1 hand, 2 in-bin |
| Actuator | SG90 servo motor, PWM controlled |
| Indicators | Green LED, red LED, active buzzer |
| Display | 16×2 I2C LCD (optional) |
| Power | 5 V / 2 A supply or 4×AA pack |
| Language | Embedded C / C++ (Arduino) |
| Architecture | Non-blocking cooperative scheduler |
| Lid control | 4-state machine with safety re-open |
| Filtering | Median-of-3, then dual-sensor fusion |
| Telemetry | Human + JSON lines over UART |
| Simulation | Wokwi, Tinkercad, browser twin |
Smart Dustbin - Industry Oriented Embedded System is an academic project that covers the full path from a sensor pulse to a city dashboard: GPIO, PWM, ultrasonic timing, threshold logic, state machines, calibration, testing and a management console. Everything runs in simulation, so no hardware is required to reproduce the results.