The problem
Waste Segregation Bin with Moisture-Based Wet-Dry Sorting and Cloud Fill Alerts is an IoT bin that sorts waste at the point of disposal. Mixed waste is the everyday failure of household and campus segregation: wet kitchen waste soaks dry recyclables, makes them unfit for recycling, and turns bins into a source of smell and pests, while collection teams only discover an overflowing bin when they arrive. This project tackles both problems in one build. A capacitive moisture sensor tests each item as it drops in, a servo-driven diverter flap sends it to the wet or dry compartment, and ultrasonic sensors measure how full each compartment is. An ESP32 publishes both fill levels to a cloud dashboard and raises an alert before either compartment overflows, so collection can be planned instead of guessed. A 16x2 LCD and buzzer on the bin show the same status locally, so the system stays useful even when nobody is watching the dashboard.
Capacitive sensor reads how wet each item is as it is dropped in.
Follow the working sequence
How it works
The system runs as one loop from drop-in to dashboard. Waste is dropped through a single inlet onto a short sensing chute, where the capacitive moisture sensor takes a reading; the ESP32 compares it with the calibrated threshold and drives the MG996R servo to swing the diverter flap toward the wet or dry compartment, so the item falls into the right side. Two HC-SR04 ultrasonic sensors, one above each compartment, measure the distance to the waste surface and convert it into a fill percentage. The ESP32 publishes both percentages over Wi-Fi to the cloud dashboard every ten seconds, updates the 16x2 LCD, and sounds the buzzer with a dashboard alert when either compartment crosses the 80% fill threshold. Because the flap returns to its rest position after every item, the next piece of waste is always measured fresh, and the dashboard log records which compartment each item went to.
- Waste is dropped through the single inlet onto the sensing chute, where it rests briefly against the capacitive moisture sensor plate.
- The ESP32 reads the sensor's analog output (0–4,095 ADC) and compares it with the wet-dry threshold set during the two-point calibration.
- The MG996R servo swings the diverter flap to the wet or dry side, and the item drops into the matching compartment.
- An HC-SR04 above each compartment measures the distance to the waste surface; the ESP32 converts the reading into a fill percentage for that side.
- Both fill percentages, the last classification and the flap position are shown on the 16x2 LCD, and the ESP32 publishes them over Wi-Fi (MQTT) to the cloud dashboard every 10 seconds.
- When either compartment crosses the 80% fill threshold, the buzzer sounds, the LCD flags the full side, and the dashboard raises a fill alert with a timestamped entry in the collection log.
Tech stack:
- ESP32
- Capacitive moisture sensor
- MG996R servo motor
- HC-SR04 ultrasonic sensors
- 16x2 LCD · buzzer
- Arduino IDE
- MQTT · cloud dashboard
- HTML · CSS · JavaScript dashboard
| Parameter | Value |
|---|---|
| Controller | ESP32, dual-core LX6 up to 240 MHz (datasheet value) |
| Moisture sensor | Capacitive, 3.3–5.5 V operating (datasheet value) |
| Moisture reading | 0–4,095 ADC on ESP32 analog input (datasheet value) |
| Wet-dry threshold | ADC above 2,000 counts = wet (design target, set by two-point calibration) |
| Diverter servo | MG996R, 9.4 kg·cm stall torque at 4.8 V (datasheet value) |
| Servo speed | 0.17 s per 60° at 4.8 V (datasheet value) |
| Fill sensing | HC-SR04 per compartment, 2–400 cm range, ±3 mm (datasheet value) |
| Fill alert threshold | 80% full per compartment (configurable, design target) |
| Bin capacity | 2 × 10 L compartments (prototype build) |
| Dashboard update | Every 10 seconds over Wi-Fi (design target) |
| Display | 16x2 character LCD with buzzer alert |
| Connectivity | Wi-Fi 802.11 b/g/n up to 150 Mbps · MQTT (datasheet value) |
| Power supply | 5 V · 3 A adapter for logic and servo (design target) |
Project features
Waste Segregation Bin with Moisture-Based Wet-Dry Sorting and Cloud Fill Alerts combines four capabilities that are usually built as separate projects: moisture-based wet-dry classification of each item, a servo diverter that routes waste into two compartments, per-compartment ultrasonic fill sensing, and a cloud dashboard that tracks both fill levels and raises alerts before either side overflows. The ESP32 ties them into one loop, so a moisture reading, a flap movement, a fill measurement and a dashboard update always describe the same item. A 16x2 LCD and buzzer give the same status on the bin itself, and the wet-dry threshold is a calibrated setting the student tunes for their own waste samples, not a fixed guess. Every feature below is part of the base build; optional additions and future scope are listed separately and are not claimed as implemented.
- [Moisture-based wet-dry classification] A capacitive moisture sensor on the inlet chute reads each item as it is dropped in, and the ESP32 compares the reading with the calibrated threshold to decide wet or dry — no camera, no dataset and no manual sorting step.
- [Servo diverter mechanism] An MG996R servo swings a metal diverter flap to the wet or dry side in under a second, so each item falls into the matching compartment without the user touching anything.
- [Per-compartment fill sensing] An HC-SR04 ultrasonic sensor above each compartment measures the distance to the waste surface and converts it into a fill percentage, so both sides are tracked independently.
- [Cloud dashboard with fill alerts] Both fill levels publish over Wi-Fi (MQTT) to a web dashboard every 10 seconds, with a sorting-event log and a fill alert with a timestamped entry when either compartment crosses 80%.
- [On-bin LCD and buzzer status] A 16x2 LCD shows both fill percentages, the last classification and the flap position, and the buzzer sounds when a compartment is nearly full — the bin stays informative even without internet.
- [Calibrated wet-dry threshold] The threshold is set by a two-point calibration the student runs: read a dry sample, read a wet sample, and set the threshold between them, so the cut-off fits the actual waste the bin will see.
- [Fill history and collection log] Every sorting event and fill-alert is logged with a timestamp on the dashboard, giving a collection record that shows which compartment fills fastest and when it was last emptied.
What is included
- Working waste segregation bin prototype (two 10 L compartments, inlet chute, diverter flap, servo, sensors wired and labelled)
- ESP32 firmware (moisture reading, threshold comparison, servo control, fill sensing, MQTT publishing) with circuit and wiring documentation
- Cloud dashboard (per-compartment fill levels, sorting-event log, fill alerts) as a working web app
- Two-point moisture calibration guide (dry sample vs wet sample threshold procedure)
- Project report PDF (background, methodology, architecture, calibration, limitations)
- PPT presentation for final review
- Viva Q&A preparation document (moisture sensing, servo control, ultrasonic fill measurement, MQTT flow)
Limitations & prerequisites
- The moisture sensor reads surface moisture only — a wet item wrapped in dry paper, or a dry item with a wet surface, can be misclassified, and the threshold must be recalibrated for different waste types.
- Sticky or oily waste can coat the sensor plate over time, so the plate needs periodic wiping; the calibration guide covers how to re-check the threshold after cleaning.
- HC-SR04 readings are affected by uneven waste surfaces and angled reflections; the fill percentage is an estimate, and the 80% alert threshold must be checked against the real bin geometry.
- The system needs Wi-Fi for the cloud dashboard and alerts; if Wi-Fi drops, sorting, the LCD and the buzzer keep working locally and data syncs when the connection returns.
- The MG996R servo's torque limits the diverter flap size and weight; a larger or heavier flap needs a stronger servo or a counterweight, handled as a customisation.
- The prototype is an indoor academic demonstration model, not a weatherproof or certified municipal waste system.
Frequently Asked Questions
Is this project suitable for a final-year project?
Yes — for IoT & Embedded, Electronics & Telecommunication and Electrical Engineering programs. It combines embedded hardware (ESP32, moisture and ultrasonic sensors, servo actuation), a real-world sensing problem with a calibration procedure, and IoT communication (MQTT, cloud dashboard, alerts) in one demonstrable system. The build also gives clear individual modules — sensing, actuation, fill measurement, dashboard — that a team can divide and explain separately in the viva.
How does the moisture sensor tell wet waste from dry waste?
The capacitive sensor measures how much moisture is in the item touching its plate and returns an analog reading (0–4,095 ADC), and the ESP32 compares it with a threshold set by a two-point calibration. Wet kitchen waste reads high and dry paper, cardboard and plastic read low, so anything above the threshold goes to the wet compartment. The threshold is not a fixed guess: the student measures a dry sample and a wet sample on their own build and sets the cut-off between them.
What happens when a compartment fills up?
When either compartment crosses the 80% fill threshold, the buzzer sounds, the LCD flags the full side, and the cloud dashboard raises a fill alert with a timestamped entry in the collection log. The bin keeps sorting into the other compartment, but the alert stays active until the full side is emptied, so collection is planned before waste overflows. The 80% threshold is configurable in the firmware if a different margin is needed.
Does the bin work without Wi-Fi?
Yes — sorting keeps working without Wi-Fi, but the cloud dashboard does not. The moisture sensing, servo diverter, LCD and buzzer all run on the ESP32 locally, so wet-dry separation continues normally while the internet is down, and only the remote dashboard view and alerts pause until the connection returns. Only the cloud dashboard, the event log and the remote fill alerts need Wi-Fi and MQTT; if the connection drops, readings are held locally and sync when it returns. A fully offline deployment with on-bin logging only is possible as a customisation.
Can the threshold, bin size or alert levels be changed?
Yes. The moisture threshold, the 80% fill-alert level, the 10-second update interval and the compartment sizes are all configurable in the firmware and dashboard settings, so the same build can be tuned for different waste types or a larger bin. Changing the bin size means re-checking the HC-SR04 mounting height and the fill-percentage calculation, and adding a third compartment would need an extra sensor and a revised diverter, handled as a customisation before the build is finalised.
What will I receive with the project?
You receive the working segregation-bin prototype with the ESP32, moisture sensor, MG996R servo, two HC-SR04 sensors, LCD and buzzer wired and labelled, plus the ESP32 firmware, the cloud dashboard, the two-point calibration guide, the project report, PPT and viva Q&A document. Everything is built-to-order, so the bin size, threshold defaults and dashboard wording are set to your requirements before dispatch, and a working demonstration is shown before handover.
Components & software requirements
- ESP32
- Capacitive moisture sensor
- MG996R servo motor
- HC-SR04 ultrasonic sensors
- 16x2 LCD · buzzer
- Arduino IDE
- MQTT · cloud dashboard
- HTML · CSS · JavaScript dashboard
Delivery information
Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.
Support terms
Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.
Download free synopsis (PDF)
Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.