Arduino-Based Smart Dustbin with Waste Level Detection - Electronic Engineering Guide
1. Introduction
The Arduino-Based Smart Dustbin with Waste Level Detection is an embedded system project aimed at monitoring the fill level of a dustbin using an ultrasonic sensor and alerting users when it is full. It promotes smarter waste management in urban and domestic environments.
2. Objectives
• To automate waste level monitoring in dustbins.
• To alert the user when the dustbin is full.
• To display waste level in real time using an LCD or OLED display.
• To encourage timely disposal and efficient waste management.
3. Components Required
• Arduino Uno / Nano / ESP32
• Ultrasonic Sensor (HC-SR04)
• LCD Display (16x2 with I2C) or OLED Display
• Buzzer or LED (for alert)
• Jumper Wires and Breadboard
• Power Supply (5V/USB)
• Dustbin with lid (optional for auto open feature)
• Servo Motor (if implementing auto-open lid)
4. System Overview
The system measures the distance between the ultrasonic sensor mounted on the top of the bin and the surface of the waste. Based on this distance, the Arduino determines the fill level and displays the status. Alerts can be issued when the bin is full.
5. Ultrasonic Sensor Operation
• The HC-SR04 emits ultrasonic pulses and measures the time
taken for the echo to return.
• Distance is calculated using the formula: distance = (time × speed of sound)
/ 2.
• The sensor is placed at the top inside of the dustbin to measure the distance
to the garbage surface.
6. Arduino Integration and Logic
• The Arduino reads distance data from the ultrasonic
sensor.
• If distance < threshold (e.g., 10 cm), it indicates the bin is full.
• Thresholds can be modified based on dustbin size.
• Optionally, servo motor opens the lid when hand is detected near the bin.
7. Display and Alert System
• LCD/OLED displays current fill percentage or status (e.g.,
Empty, Half, Full).
• A buzzer or LED alerts when the bin is full.
• Wi-Fi module or IoT integration can be added for remote alerting.
8. Circuit Diagram and Setup
• VCC and GND of HC-SR04 connected to Arduino 5V and GND.
• Trig and Echo pins connected to Arduino digital pins.
• LCD connected via I2C interface (SDA to A4, SCL to A5 on Uno).
• Buzzer connected to digital pin with current limiting resistor.
9. Software and Arduino Code
Sample Arduino Code Snippet:
#define trigPin 9
#define echoPin 10
#define buzzer 3
void setup() {
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(buzzer, OUTPUT);
Serial.begin(9600);
}
void loop() {
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
long duration = pulseIn(echoPin, HIGH);
int distance = duration * 0.034 / 2;
Serial.println(distance);
if (distance < 10)
digitalWrite(buzzer, HIGH);
else digitalWrite(buzzer, LOW);
delay(1000);
}
10. Applications
• Public waste bins in smart cities
• Office and industrial waste management
• Domestic smart dustbins
• Hospital or hygiene-sensitive areas
11. Challenges and Improvements
• Environmental factors may affect ultrasonic sensor
readings.
• Add solar panels for power autonomy.
• Add GSM/Wi-Fi for alerting municipal authorities.
• Use multiple sensors for uneven waste surfaces.
12. Conclusion
The Arduino-Based Smart Dustbin is an effective low-cost solution for automated waste level detection. It supports clean city initiatives and helps optimize waste collection using embedded systems and sensors.