Garbage Segregation and Bin Level
Detection using ESP8266
Submitted by: Thanigaivel M
Institution/Organization: University College of Engineering Arani
Abstract
This project presents a smart waste management system titled ‘Garbage Segregation and
Bin Level Detection using ESP8266’. The primary aim is to automate garbage collection by
detecting waste type (wet or dry), controlling bin opening, and monitoring bin levels. The
system employs two ultrasonic sensors, two servo motors, a soil moisture sensor, and an
ESP8266 microcontroller for IoT-based functionality. By segregating wet and dry waste at
the source and providing real-time bin level monitoring, this project contributes to
improved hygiene, efficient waste management, and the development of smart city
infrastructure.
1. Introduction
Waste management is a critical issue faced by urban and rural areas alike. Rapid population
growth and urbanization have increased the generation of waste, creating challenges in
collection, segregation, and disposal. Traditionally, waste is collected in mixed form, which
complicates recycling and results in environmental pollution. Automated segregation at the
source ensures effective recycling and minimizes environmental impact.
This project proposes a smart dustbin system using ESP8266, which automatically opens
the bin lid when a person is detected, segregates waste into wet and dry categories, and
monitors bin levels. The objective is to build an intelligent system that enhances cleanliness
and supports smart city initiatives.
2. Literature Review / Related Work
Several research works and projects have explored smart waste management systems.
Common approaches include IoT-enabled dustbins with sensors to monitor waste levels
and notify authorities. Some projects integrate GSM modules for communication, while
others focus on mechanical segregation. However, many of these solutions lack a compact
design that combines both segregation and level detection.
This project improves upon previous work by combining ultrasonic sensors, servo motors,
and a soil moisture sensor with an ESP8266 microcontroller to achieve both waste
segregation and bin monitoring in a single system.
3. Components Used
ESP8266 Microcontroller – core controller for processing and IoT connectivity.
Ultrasonic Sensor 1 – detects presence of a person and triggers the lid to open.
Ultrasonic Sensor 2 – monitors the level of garbage inside the bin.
Servo Motor 1 – controls the opening and closing of the bin lid.
Servo Motor 2 – directs waste into wet or dry compartments.
Soil Moisture Sensor – differentiates between wet and dry waste.
Power Supply – provides necessary voltage for ESP8266 and components.
Jumper Wires and Breadboard – for circuit connections and prototyping.
4. Block Diagram and Circuit Explanation
The block diagram consists of ESP8266 as the central controller interfacing with sensors
and actuators. The ultrasonic sensor near the lid detects human presence and signals
ESP8266, which activates Servo Motor 1 to open the bin. When waste is dropped, the soil
moisture sensor checks its moisture level. Based on this reading, Servo Motor 2 moves left
or right to direct the waste into wet or dry compartments. Another ultrasonic sensor
mounted inside the bin monitors the garbage level and provides feedback. Power supply
and jumper wires ensure stable connections between modules.
5. Working Principle
1. Ultrasonic sensor detects human hand within range.
2. ESP8266 triggers Servo Motor 1 to open the dustbin lid.
3. Soil Moisture Sensor checks the type of waste dropped.
4. ESP8266 activates Servo Motor 2 to direct waste: left for wet, right for dry.
5. Ultrasonic sensor inside the bin measures the fill level.
6. If the bin reaches a threshold, an alert can be triggered for collection.
6. Algorithm / Flowchart
Algorithm:
1. Start system.
2. Measure distance using Ultrasonic Sensor 1.
3. If a person is detected, open lid (Servo Motor 1).
4. Wait for waste to be dropped.
5. Read soil moisture sensor value.
6. If value exceeds threshold → classify as wet waste → Servo Motor 2 directs to wet bin.
7. Else classify as dry waste → Servo Motor 2 directs to dry bin.
8. Ultrasonic Sensor 2 monitors bin level.
9. If bin is full, send signal/alert.
10. Close lid and reset.
11. Repeat process.
7. Advantages and Applications
Advantages:
Automated waste segregation improves recycling efficiency.
Prevents manual handling of waste, ensuring hygiene.
Compact and low-cost design suitable for local implementation.
IoT capability allows integration into smart city infrastructure.
Real-time bin monitoring prevents overflow and maintains cleanliness.
Applications:
Residential apartments and housing complexes.
Educational institutions and offices.
Hospitals and healthcare centers.
Public places such as parks and bus stands.
Smart city waste management systems.
8. Limitations and Future Scope
Limitations:
- Soil moisture sensor provides only a basic distinction between wet and dry waste.
- Servos may have limited lifespan under continuous mechanical load.
- Powering multiple components requires stable supply.
Future Scope:
- Integration with mobile applications for real-time monitoring.
- Adding gas sensors for hazardous waste detection.
- Using AI/ML algorithms for advanced waste classification.
- Solar-powered operation for sustainability.
9. Conclusion
This project successfully demonstrates an automated garbage segregation and bin level
detection system using ESP8266. By combining ultrasonic sensors, servo motors, and a soil
moisture sensor, the system efficiently detects, classifies, and manages waste. Such
solutions have the potential to enhance urban waste management, reduce human effort, and
support the development of cleaner, smarter cities.
10. References
Arduino Documentation – https://www.arduino.cc/
ESP8266 Technical Reference – https://www.espressif.com/
Research papers on IoT-based smart waste management systems.
YouTube tutorials and open-source project references for smart dustbin
implementations.