A complete breakdown of the machine's hardware, software, and process flow — from bottle insertion to points credited to your account.
Before depositing, the resident logs into the site and starts a Deposit Session for the machine they're standing at. This tells the system who to credit — the machine itself has no way to identify a person, so the website is how it knows.
The resident places a used PET plastic bottle into the front input slot of the machine. The slot is sized to accept standard plastic bottles commonly found in Barangay Muzon.
This runs continuously and takes priority over everything else: an inductive sensor checks for metal the instant something enters the slot. If metal is confirmed (3 consecutive readings, to avoid false triggers), the item is rejected immediately — no further checks needed.
If no metal was detected, an HC-SR04 ultrasonic sensor watches the slot for an object within range. Once something is detected consistently, the system pauses briefly to let the item settle before validating it.
A capacitive sensor checks whether the object is plastic, while the inductive sensor does one final metal re-check at the same time. Only an item that reads "plastic" and "not metal" is accepted.
Based on the sensor readings, the ESP32 makes the final call: Accept or Reject. If valid, the servo motor opens the gate. If invalid, the LCD shows the reason and the item stays out of the bin.
A servo motor rotates to open the acceptance gate, allowing the bottle to fall into the collection bin. It then closes automatically to await the next item.
The 16×2 LCD display shows the result — "Accepted!", "Rejected — Metal Detected", or "Rejected — Not Plastic" — giving the resident clear, immediate visual feedback on the transaction.
If a deposit session is active for that machine, the accepted bottle credits points straight to the resident's account in real time — no physical reward is dispensed by the machine itself. Forgot to check in? A manual claim can still be reported and cross-checked by an admin afterward.
Once points build up, the resident redeems them from the Rewards page for items like water, biscuits, or an eco bag. An admin reviews and hands over the item — points are only spent once approved.
The ESP32 sends transaction and bin-level data over WiFi to the PC running XAMPP. A second ultrasonic sensor mounted above the bin also reports fill level every few seconds. PHP receives the data and stores it in MySQL for real-time monitoring on the public dashboard and admin panel.
| Component | Model / Specification | Qty | Purpose |
|---|---|---|---|
| ESP32 Microcontroller | ESP32 Dev Module (WiFi + Bluetooth) | 1 | Main controller — reads all sensors, drives outputs, and talks to the PHP backend over WiFi |
| Inductive Sensor | LJ12A3-4-Z/BX (via PC817 opto-isolator) | 1 | Primary trigger — detects metal and rejects it immediately, before any other check |
| Ultrasonic Sensor — Bottle | HC-SR04 | 1 | Detects a bottle entering the slot and measures it to confirm a valid size |
| Capacitive Sensor | LJC18A3-B-Z/BX (via PC817 opto-isolator) | 1 | Confirms the detected object is plastic before the gate opens |
| Ultrasonic Sensor — Bin Level | HC-SR04 | 1 | Second unit, mounted above the collection bin — measures fill level continuously |
| Servo Motor | SG90 or MG996R | 1 | Controls the acceptance gate — opens on a valid bottle, closes after |
| LCD Display | 16×2 with I2C adapter (PCF8574, addr 0x27) | 1 | Shows feedback to the resident — "Accepted", "Rejected", or "Bin Full" |
| Buzzer | 5V Active Buzzer | 1 | Audio feedback for accepted / rejected bottle events |
| LED Indicators | Green / Red 5mm LEDs | 2 | Visual accept/reject signal for the user |
| Power Supply | 5V 2A DC Adapter | 1 | Powers the ESP32 and all connected peripherals |
| Jumper Wires | Male-to-male / Male-to-female | 30+ | Circuit connections between components |
| Breadboard / PCB | Full-size breadboard | 1 | Prototyping and circuit assembly |
| Machine Enclosure | Wood / PVC / Acrylic box | 1 | Physical housing for the entire system |
Shows how reverse vending machines make recycling easier and more accessible by offering rewards, supporting this project's core approach.
Demonstrates automated plastic bottle collection using Arduino and capacitive/ultrasonic sensors — directly paralleling this project's hardware design.
Uses Arduino Uno, IR sensors, and load cell to detect and validate bottles. Users receive instant coin rewards — similar reward-based model.
Local Philippine study combining vending machine and garbage bin concepts — alerting authorities when full, tracking user activity. Closest local parallel.
Philippine study showing high user satisfaction when Arduino dispenses school supplies in exchange for empty plastic bottles — confirms reward-based acceptance.
Provides legal foundation for the project. The proposed machine directly supports RA 11898's goals of plastic waste recovery and community recycling.