SVSEmbedded will do new innovative thoughts. Any latest idea will comes we will take that idea & implement that idea in a few days. We always encourage the students to take good ideas/projects.
SVSEmbedded providing latest innovative electronics projects to B.E/B.Tech/M.E/M.Tech students. We developed thousands of projects for engineering student to develop their skills in electrical and electronics
🚨 Women Safety System Using ESP32 | Live GPS Tracking + GSM Emergency SMS & Auto Call! | One Press Can Save a Life! 😱 ESP32 Women Safety Device | GPS + GSM + SOS Alarm | 🚨 Smart Women Safety Project | SOS Button Sends Live Location & Emergency Call! | ❤️ ESP32 Women Security System Working Model | GPS, GSM, SMS Alert & Buzzer | Engineering Project.
************************************************
🛠️ Do You Want to Purchase the Full Working Project KIT? 🛠️
Mail Us: svsembedded@gmail.com
Title Name Along With You-Tube Video Link
🔌 CODE & CIRCUIT DIAGRAMS FOR SALE 🔧 💡 Reliable – Affordable – Ready to Use
1. Design and Development of an ESP32-Based Smart Women Safety and Security System Using GPS and GSM Technology 2. IoT-Based Women Safety and Emergency Alert System with Real-Time GPS Location Tracking 3. ESP32-Based Women Security System with GPS Tracking, GSM Communication and Automatic Emergency Calling 4. Smart Women Protection System Using ESP32, GPS, GSM and SOS Emergency Button 5. Design of an Intelligent Women Safety Device with Live Location Sharing and Emergency SMS Alerts 6. Advanced Women Safety and Security System Using IoT and Embedded Technology 7. GPS and GSM-Based Women Safety Monitoring and Emergency Response System Using ESP32 8. Development of a Portable Women Safety Device with Location Tracking and Automatic Emergency Alerts 9. IoT-Enabled Women Security System with SOS Activation and Real-Time Emergency Communication 10. IoT-Based Smart Women Safety and Real-Time Geolocation Tracking System Using ESP32 11. Design and Implementation of an ESP32-Based Autonomous Women Security and Emergency Alert System 12. Real-Time Personal Safety and SOS Distress Signaling Device Using ESP32, GPS, and GSM Modules 13. Embedded Women Safety Architecture with Automated Voice Call and SMS Geolocation Dispatch 14. Smart Wearable Women Safety System Utilizing ESP32 Microcontroller and Cellular Telemetry 15. Low-Power IoT Women Security and Emergency Response System with Dual-Mode GSM/GPS Communication 16. Intelligent Personal Security System for Women Using ESP32 and Cloud-Integrated GPS Tracking 17. Microcontroller-Driven Women Distress Alert System with Instant SMS Coordinates and Acoustic Deterrent 18. Portable Emergency Alert and Live Location Monitoring Device for Women Using ESP32 19. Automated Women Safety and Rapid Emergency Notification System Based on ESP32 and SIM800L 20. Smart Wearable SOS Band for Women Safety Using ESP32, NEO-6M GPS, and GSM 21. Compact One-Touch Emergency Safety Gadget for Women Powered by ESP32 22. ESP32-Based Smart Jewelry / Pendant for Instant Women Distress Alert and Live Tracking 23. Miniaturized IoT Women Protection Device with Integrated GPS Tracker and GSM Auto-Dialer 24. Battery-Optimized Wearable Women Security System with High-Decibel Buzzer and SOS Trigger 25. Ergonomic Personal Safety Device for Women with Real-Time SMS Location Sharing via ESP32 26. Smart Keychain Women Safety System Using ESP32 Microcontroller and Cellular Alert Network 27. Hardware Prototype of a Standalone Women Safety Device Without Smartphone Dependency 28. Multi-Alert Wearable Security System for Women Featuring Acoustic Alarm and GSM Telemetry 29. ESP32 Women Safety System | Complete Working Model with Live GPS Map Link & Auto Call 30. How to Make a Women Safety Device Using ESP32, GPS & GSM | Full Engineering Project 31. Smart Women Security System Using ESP32 | Instant Google Maps Location via SMS! 32. Best Final Year Engineering Project: ESP32 Women Safety & Emergency SOS Alert System 33. DIY Women Safety Gadget Using ESP32 | One-Click SOS Call, SMS Tracking & Buzzer Alarm 34. ESP32 + SIM800L + NEO-6M GPS Women Safety Project | Circuit, Code & Working Demo 35. Smart Personal Safety Device Using ESP32 | Live GPS Tracking & Automated Guardian Call 36. Top IoT Project for Engineering Students: Autonomous Women Safety & Distress System 37. ESP32 Women Safety Working Model | Real-Time Emergency Alert System for Science Exhibition 38. Build a Life-Saving Women Safety System with ESP32 | GPS Tracker + GSM Auto-Dialer 39. Multi-Sensor Women Safety System Using ESP32 with Fall Detection, GPS, and GSM Alerts 40. Dual-Network (Wi-Fi + GSM) Women Security System Using ESP32 for Indoor and Outdoor Tracking 41. Smart Women Safety System with Pulse Rate Monitoring and Automated SOS Dispatch Using ESP32 42. IoT-Enabled Women Protection System Featuring Real-Time GPS Tracking and Firebase Cloud Logging 43. Intelligent Distress Detection and Emergency Response System for Women Using ESP32 44. Hybrid GSM-GPS Women Safety Device with Panic Button and Continuous Live Location Updates 45. ESP32-Based Smart Security System with Geofencing Alerts and Automated Emergency Calling 46. Next-Generation Personal Safety Device Using ESP32 for Instant Guardian Notification 47. Autonomous SOS Alert and Acoustic Defense System for Women Using Embedded ESP32 48. Real-Time Emergency Telemetry and Location Tracking System for Women Safety Using ESP32 49. Smart Women Safety Solution Integrating ESP32, Cellular GSM Network, and Satellite GPS 50. Comprehensive IoT Women Security Framework for Rapid Emergency Response and Geolocation
1.IoT-Based Smart Video Doorbell Using ESP32-CAM with Visitor-Triggered Live Streaming and Remote Door Access Control. 2.Design and Implementation of an Event-Driven IoT Smart Video Doorbell with Time-Limited Remote Door Actuation. 3.ESP32-CAM Based Smart Video Doorbell with On-Demand Live Surveillance and Servo-Actuated Door Control. 4.Visitor-Triggered IoT Smart Video Doorbell System with Dual-Port Web Server and Remote Access Management. 5.IoT Smart Video Doorbell Using ESP32-CAM: On-Demand Live Video Monitoring and Time-Bounded Door Unlocking. 6.Smart Video Doorbell and Remote Access Control System Using ESP32-CAM and Embedded Web Architecture. 7.On-Demand Live Video Doorbell with Time-Restricted Remote Door Lock Control Using ESP32-CAM. 8.IoT-Enabled Smart Doorbell System with Event-Triggered Video Streaming and Servo-Driven Access Control. 9.Low-Latency IoT Smart Video Doorbell Using ESP32-CAM with Non-Blocking Dual-Port HTTP Architecture. 10.Smart Home Entry Management System Using ESP32-CAM with Visitor-Activated Streaming and Remote Door Control. 11.A Dual-Port HTTP Architecture for Non-Blocking Live Video Streaming and Servo Actuation in an IoT Smart Doorbell. 12.Design and Development of a Resource-Optimized IoT Video Doorbell Using ESP32-CAM and Dedicated LEDC Timer Allocation. 13.Event-Driven Embedded Surveillance and Time-Windowed Access Control System Based on ESP32-CAM. 14.Architectural Design of a Visitor-Activated Smart Video Doorbell with Bandwidth-Conserving Stream Management. 15.Real-Time Embedded IoT Access Control System Utilizing Dual-Server ESP32-CAM Architecture. 16.Implementation of a Deterministic State-Machine Controlled Smart Video Doorbell Using ESP32-CAM. 17.Bandwidth-Efficient IoT Smart Doorbell with On-Demand MJPEG Streaming and Timed Servo Actuation. 18.Hardware-Software Co-Design of an ESP32-CAM Smart Doorbell Eliminating PWM Timer Contention. 19.A Privacy-Centric, Local-Network IoT Video Doorbell with Time-Bounded Remote Door Actuation. 20.Smart Residential Access Control System Integrating Event-Triggered Video Verification and Servo Actuation. 21.Privacy-First IoT Smart Video Doorbell with Visitor-Triggered Camera Activation and Expiring Remote Access. 22.Secure IoT Smart Doorbell System Featuring On-Demand Live Video Verification and Time-Limited Door Unlocking. 23.Zero-Idle-Streaming Smart Video Doorbell Using ESP32-CAM with Timed Remote Door Lock Control. 24.Anti-Spoofing Smart Video Doorbell with Time-Restricted Web Dashboard Access Control. 25.Smart Home Security Doorbell with Event-Driven Live Feed and Auto-Expiring Servo Door Control. 26.Contactless Visitor Verification and Time-Windowed Remote Door Access System Using ESP32-CAM. 27.Local-Host IoT Smart Video Doorbell with Controlled Video Exposure and Timed Actuation Window. 28.Fail-Safe Smart Video Doorbell System with State-Controlled Remote Door Lock Mechanism. 29.Smart Entry Security System: Visitor-Activated Live Camera Feed with Time-Limited Web Control. 30.IoT-Based Secure Doorstep Monitoring and Timed Servo Lock System Using ESP32-CAM. 31.IoT Smart Video Doorbell Using ESP32-CAM | Visitor-Triggered Live Streaming & Remote Door Lock Control. 32.ESP32-CAM Smart Video Doorbell with Live Video Stream & Servo Door Lock Control | Complete IoT Project. 33.How to Make an IoT Smart Video Doorbell Using ESP32-CAM | Live Streaming & Remote Door Access. 34.ESP32-CAM Video Doorbell with Web Dashboard | On-Demand Live Camera & Servo Door Control. 35.Smart Video Doorbell Using ESP32-CAM | Push-Button Live Stream & Timed Remote Door Unlock. 36.DIY IoT Smart Video Doorbell with ESP32-CAM | Live Surveillance & Servo Lock Control System. 37.ESP32-CAM IoT Doorbell Project | Visitor-Activated Live Stream & Mobile Web Door Control. 38.Build an ESP32-CAM Smart Doorbell with Live Video Feed & Remote Servo Door Access. 39.IoT Video Doorbell & Smart Lock Using ESP32-CAM | Dual-Port Web Server Project. 40.ESP32-CAM Smart Home Doorbell | Live Video Monitoring & Time-Limited Remote Door Control. 41.SmartPulse: Event-Triggered IoT Video Doorbell and Remote Access System. 42.ESP32-CAM Visitor-Triggered Smart Video Doorbell with Timed Door Control. 43.On-Demand IoT Video Doorbell and Servo Access Control System. 44.Smart Doorstep Surveillance and Timed Remote Lock System Using ESP32-CAM. 45.Event-Driven IoT Video Doorbell with Mobile Web Control. 46.ESP32-CAM Smart Doorbell: Live Visitor Verification & Remote Actuation. 47.IoT-Based On-Demand Video Doorbell with Servo Door Lock Mechanism. 48.Smart Video Doorbell with Time-Limited Remote Access via ESP32-CAM. 49.Embedded IoT Video Doorbell and Remote Door Control Dashboard. 50.ESP32-CAM Smart Entry System with Visitor-Activated Live Video.
AUTOMATIC METAL AND PLASTIC WASTE SEGREGATION SYSTEM USING ARDUINO UNO AND ESP8266 NODEMCU
Project Category: Embedded Systems, Automation and Internet of Things (IoT)
Main Controller: Arduino UNO
Wireless Communication: ESP8266 NodeMCU
Project Application: Smart Waste Management and Automatic Waste Segregation
TABLE OF CONTENTS
Abstract
Introduction
Problem Statement
Objectives
Existing System
Proposed System
Project Overview
Hardware Requirements
Software Requirements
Block Diagram
Circuit and Schematic Connections
Working Principle
Detailed Working Explanation
System Flowcharts
Hardware Implementation
Software Implementation
Arduino UNO Complete Program
ESP8266 NodeMCU Program
Data Communication
Bin Fill-Level Calculation
Testing and Results
Advantages
Applications
Limitations
Future Enhancements
Conclusion
1. ABSTRACT
The Automatic Metal and Plastic Waste Segregation System using Arduino UNO and ESP8266 NodeMCU is an embedded-system-based project designed to automatically separate metal and plastic waste into two different collection bins.
The primary objective of this project is to reduce manual waste segregation and improve waste management through automation.
The system uses an LM393 metal detection sensor to identify metallic waste and an infrared (IR) sensor to detect the presence of non-metallic objects. A servo motor is used as the mechanical sorting mechanism to direct the detected waste into the appropriate collection bin.
Two HC-SR04 ultrasonic sensors are installed in the metal and plastic collection bins to continuously measure the distance between the sensors and the waste surface. Based on the measured distances, the system estimates the fill percentage of each bin.
A buzzer provides an audible warning when the waste level reaches a predefined threshold.
An ESP8266 NodeMCU is connected to the Arduino UNO through serial communication. The Arduino sends the detected waste type and both bin fill percentages to the ESP8266, enabling future integration with an IoT dashboard or cloud monitoring platform.
The proposed system provides an affordable, automated and expandable approach to smart waste management.
2. INTRODUCTION
Waste management is one of the important challenges in modern society. Increasing population, industrial development and consumption of plastic products have resulted in the generation of large quantities of waste.
Metal and plastic are two commonly generated waste materials. These materials require different recycling and processing methods.
In conventional waste collection systems, metal and plastic waste are often mixed together. Separating these materials manually requires additional time, labour and effort.
Automatic waste segregation systems can help address this problem by identifying different waste materials and directing them into separate collection containers.
This project implements an automatic waste segregation mechanism using Arduino UNO, an IR sensor, an LM393 metal detection sensor, a servo motor and ultrasonic sensors.
The ESP8266 NodeMCU provides an interface for future wireless monitoring and IoT-based waste management.
3. PROBLEM STATEMENT
In conventional waste management systems, metal and plastic waste are frequently collected together.
Manual separation of these materials has several disadvantages:
Requires human effort.
Consumes additional time.
May result in incorrect waste classification.
Makes recycling operations less efficient.
Does not provide automatic information about dustbin fill levels.
Therefore, an automated system is required to identify metal and plastic waste, separate them into different bins and monitor the available bin capacity.
4. OBJECTIVES
The main objectives of the project are:
To detect metallic waste using an LM393 metal detection sensor.
To detect the presence of non-metallic objects using an IR sensor.
To automatically separate metal and plastic waste using a servo motor.
To collect metal and plastic waste in separate containers.
To measure the distance between the waste surface and each ultrasonic sensor.
To calculate the estimated fill percentage of both collection bins.
To generate an audible warning using a buzzer when a bin reaches the configured threshold.
To transmit waste information and bin fill percentages from Arduino UNO to ESP8266 NodeMCU.
To provide a foundation for future IoT-based waste monitoring.
5. EXISTING SYSTEM
In the existing conventional waste collection system, different waste materials are generally collected together.
The separation of metal and plastic waste is commonly performed manually or through separate industrial processes.
Disadvantages include:
Manual labour requirements.
Time-consuming segregation.
Possibility of incorrect separation.
Limited real-time monitoring.
Lack of automatic bin-level alerts.
6. PROPOSED SYSTEM
The proposed system uses sensors, a microcontroller and a servo motor to perform automatic waste segregation.
The system has two main operations.
A. Automatic waste segregation
The LM393 metal detection sensor checks for metallic material.
If metal is detected, the servo motor rotates towards the metal collection bin.
If metal is not detected, the IR sensor identifies the presence of a non-metallic object.
If the IR sensor detects the object, the servo motor rotates towards the plastic collection bin.
When the sorting operation is completed, the servo returns to its initial position.
B. Automatic bin monitoring
One ultrasonic sensor measures the metal bin's fill level.
Another ultrasonic sensor measures the plastic bin's fill level.
The Arduino calculates the estimated fill percentage.
If either bin reaches the configured distance threshold, the buzzer is activated.
Both readings and the latest waste classification are transmitted to the ESP8266.
7. PROJECT OVERVIEW
The project consists of the following functional modules.
Module
Function
Arduino UNO
Main system controller
LM393 metal sensor
Metal detection
IR sensor
Object detection
Servo motor
Waste sorting
Ultrasonic sensor 1
Metal bin monitoring
Ultrasonic sensor 2
Plastic bin monitoring
Buzzer
Bin-level warning
ESP8266 NodeMCU
Wireless communication interface
8. HARDWARE REQUIREMENTS
8.1 Arduino UNO
Arduino UNO is the main controller of the project.
It reads the sensor signals, processes the detection conditions, controls the servo motor, measures the ultrasonic distances and transmits the results to the ESP8266.
8.2 LM393 Metal Detection Sensor
The LM393-based metal detection module is used to identify metallic objects.
The module produces a digital output depending on the detected metal and its sensor configuration.
In this project:
HIGH = Metal detected.
LOW = No metal detected.
The sensor output is connected to Arduino digital pin D9.
8.3 IR Sensor
The infrared sensor is used to detect the presence of an object.
It operates using infrared light transmission and reflection.
In this project:
LOW = Object detected.
HIGH = No object detected.
The sensor output is connected to Arduino digital pin D7.
The IR sensor is used for identifying the presence of non-metallic waste after the metal sensor check.
8.4 Servo Motor
The servo motor acts as the mechanical sorting mechanism.
It rotates to different angular positions according to the sensor output.
Condition
Servo position
Metal detected
10°
Plastic/non-metal detected
170°
No object
90°
The servo signal is connected to Arduino pin D8.
8.5 HC-SR04 Ultrasonic Sensors
Two HC-SR04 ultrasonic sensors are used to monitor the waste levels in the collection bins.
The first ultrasonic sensor measures the metal bin distance.
The second ultrasonic sensor measures the plastic bin distance.
The sensors transmit ultrasonic pulses and measure the time taken for the reflected signal to return.
The Arduino uses this time to calculate the distance.
8.6 Buzzer
The buzzer provides an audible warning when either bin reaches the configured distance threshold.
The buzzer is connected to Arduino pin D6.
In this project, the warning threshold is 15 cm.
8.7 ESP8266 NodeMCU
The ESP8266 NodeMCU is used as the communication module.
It receives data from the Arduino UNO using serial communication.
The transmitted information includes:
Detected waste type.
Metal bin fill percentage.
Plastic bin fill percentage.
The ESP8266 can subsequently transmit this information over Wi-Fi to an IoT dashboard or cloud service.
9. SOFTWARE REQUIREMENTS
Software
Purpose
Arduino IDE
Programming Arduino UNO and ESP8266
Arduino C/C++
Embedded programming
Servo library
Servo motor control
SoftwareSerial library
Arduino serial communication
ESP8266 board package
Programming NodeMCU
10. BLOCK DIAGRAM
The following diagram represents the overall project architecture.
text
WASTE MATERIAL
|
v
+-----------------------+
| METAL SENSOR |
| LM393 |
+-----------------------+
|
v
+-----------------------+
| ARDUINO UNO |
| |
| Waste Classification |
| Sensor Processing |
| Servo Control |
| Distance Calculation |
+-----------------------+
| |
| |
v v
+-----------+ +----------------+
| SERVO | | ULTRASONIC |
| MOTOR | | SENSORS |
+-----------+ +----------------+
| |
+----+----+ |
| | |
v v v
METAL PLASTIC BIN DISTANCES
BIN BIN |
v
+---------+
| BUZZER |
+---------+
ARDUINO UNO
|
| Serial Communication
v
+-------------------+
| ESP8266 NODEMCU |
+-------------------+
|
| Wi-Fi
v
FUTURE IoT DASHBOARD
11. CIRCUIT AND SCHEMATIC CONNECTIONS
11.1 Arduino UNO pin connections
The following connections are used in the final implementation.
Component
Component pin
Arduino UNO
IR sensor
OUT
D7
IR sensor
VCC
5V
IR sensor
GND
GND
Metal sensor
OUT
D9
Metal sensor
VCC
5V
Metal sensor
GND
GND
Servo motor
Signal
D8
Metal ultrasonic
TRIG
D2
Metal ultrasonic
ECHO
D3
Plastic ultrasonic
TRIG
D4
Plastic ultrasonic
ECHO
D5
Buzzer
Positive
D6
Buzzer
Negative
GND
11.2 ESP8266 NodeMCU connections
Arduino UNO
ESP8266 NodeMCU
D11 (TX)
D5 (RX), through voltage divider
GND
GND
Arduino D10 is configured as the SoftwareSerial receive pin but is unused.
NodeMCU D6 (TX) is unused.
Important voltage protection:
Arduino UNO operates with 5V logic, while ESP8266 GPIO operates with 3.3V logic.
Therefore, a voltage divider must be used between Arduino D11 and NodeMCU D5.
Use:
1 kΩ resistor between Arduino D11 and NodeMCU D5.
2 kΩ resistor between NodeMCU D5 and GND.
Connect Arduino GND and NodeMCU GND together.
Do not connect Arduino D11 directly to ESP8266 RX.
11.3 Power supply connections
Power the Arduino UNO through USB or a suitable regulated supply.
Power the NodeMCU using USB or a suitable regulated 5V supply through VIN.
Power the servo using a suitable external regulated 5V supply.
Connect the external servo supply GND to Arduino GND.
Ensure all components share a common ground.
Do not power the servo from the Arduino 3.3V output.
11.4 Simplified electrical schematic
text
ARDUINO UNO
+----------------+
| |
IR OUT -------| D7 |
METAL OUT ----| D9 |
SERVO SIGNAL -| D8 |
METAL TRIG ---| D2 |
METAL ECHO ---| D3 |
PLASTIC TRIG -| D4 |
PLASTIC ECHO -| D5 |
BUZZER + -----| D6 |
| |
| D11 TX |---- 1K ----+---- NODEMCU D5 RX
| | |
+----------------+ 2K
| |
GND---------------------+---- GND
|
ESP8266 NODEMCU
Servo:
External +5V -------- Servo Red
Arduino D8 ---------- Servo Signal
Common GND ---------- Servo GND
The diagram is a simplified connection reference. Follow the pin tables and voltage-divider instructions when assembling the circuit.
12. WORKING PRINCIPLE
The project operates using sensor-based classification and automatic mechanical sorting.
The metal sensor is assigned priority in the sorting program.
When metallic waste is detected, the Arduino commands the servo motor to rotate to 10 degrees.
When metal is not detected, the Arduino checks the IR sensor.
If the IR sensor detects an object, the Arduino classifies it as non-metal/plastic and rotates the servo to 170 degrees.
When the object is removed, the servo returns to 90 degrees.
The two ultrasonic sensors operate continuously to monitor the collection bins.
The Arduino calculates the estimated fill percentages using the measured distances.
When either measured distance becomes equal to or less than 15 cm, the buzzer produces an audible warning.
The Arduino sends the waste type and bin fill percentages to the ESP8266 every second.
13. DETAILED WORKING EXPLANATION
Step 1: System initialization
When the system is powered ON:
Arduino initializes the input and output pins.
Servo motor moves to 90 degrees.
Ultrasonic sensors are initialized.
Buzzer is turned OFF.
Serial communication is started at 9600 baud.
ESP8266 communication is initialized.
The system becomes ready for waste detection.
Step 2: Metal detection
When waste approaches the sorting mechanism, the LM393 sensor checks whether metallic material is present.
If the sensor output becomes HIGH:
Arduino identifies the waste as metal.
Waste type is updated to METAL.
Servo rotates to 10 degrees.
The waste is directed into the metal bin.
After the sorting interval, the servo returns to 90 degrees.
Step 3: Plastic detection
If the metal sensor does not detect metal, the Arduino checks the IR sensor.
If the IR sensor output becomes LOW:
Arduino identifies the object as non-metal/plastic.
Waste type is updated to NON-METAL.
Servo rotates to 170 degrees.
Waste is directed into the plastic bin.
After the sorting interval, the servo returns to 90 degrees.
This project uses metal versus non-metal classification. The IR sensor detects object presence; it does not independently identify the chemical material as plastic. Other non-metal materials may also be directed to the plastic bin.
Step 4: Object removal
After the sorting operation, the Arduino waits until:
Metal sensor output becomes LOW.
IR sensor output becomes HIGH.
The object-processed condition is reset.
The system becomes ready for the next object.
Step 5: Metal bin monitoring
The first ultrasonic sensor is installed above the metal collection bin.
It measures the distance between the sensor and the upper surface of the waste.
The Arduino calculates the estimated fill percentage.
The reading is used to determine whether the bin has reached the warning threshold.
Step 6: Plastic bin monitoring
The second ultrasonic sensor is installed above the plastic collection bin.
It measures the distance between the sensor and the plastic waste surface.
The Arduino calculates the estimated fill percentage independently.
Step 7: Buzzer warning
The buzzer is activated if:
Metal bin distance is 15 cm or less.
Plastic bin distance is 15 cm or less.
Both bin distances are 15 cm or less.
If both distances are greater than 15 cm, the buzzer remains OFF.
Step 8: ESP8266 data transmission
Arduino sends the following information to the ESP8266:
Waste classification.
Metal bin fill percentage.
Plastic bin fill percentage.
The transmission occurs every one second.
14. SYSTEM FLOWCHARTS
14.1 Main waste segregation flowchart
mermaid
flowchart TD
A([START]) --> B[Initialize Arduino]
B --> C[Initialize Sensors and Servo]
C --> D[Set Servo to 90 Degrees]
D --> E[Read Metal Sensor]
E --> F{Metal Detected?}
F -->|YES| G[Set Waste Type METAL]
G --> H[Servo to 10 Degrees]
F -->|NO| I[Read IR Sensor]
I --> J{Object Detected?}
J -->|YES| K[Set Waste Type NON-METAL]
K --> L[Servo to 170 Degrees]
J -->|NO| M[Wait for Object]
H --> N[Wait for Sorting]
L --> N
N --> O[Servo Returns to 90 Degrees]
O --> P[Wait Until Object Removed]
P --> E
M --> E
14.2 Ultrasonic monitoring flowchart
mermaid
flowchart TD
A([START]) --> B[Read Metal Bin Ultrasonic Sensor]
B --> C[Read Plastic Bin Ultrasonic Sensor]
C --> D[Calculate Both Bin Fill Percentages]
D --> E{Metal Bin Distance <= 15 cm?}
E -->|YES| H[Activate Buzzer]
E -->|NO| F{Plastic Bin Distance <= 15 cm?}
F -->|YES| H
F -->|NO| G[Turn Buzzer OFF]
H --> I[Display Distances and Fill Percentages]
G --> I
I --> J[Send Data to ESP8266]
J --> B
14.3 ESP8266 communication flowchart
mermaid
flowchart TD
A([START]) --> B[Arduino Reads Sensor Data]
B --> C[Calculate Bin Fill Percentages]
C --> D[Prepare CSV Data]
D --> E[Transmit Serial Data]
E --> F[ESP8266 Receives Data]
F --> G[Read Complete Data Line]
G --> H[Display Received Data]
H --> I{Wi-Fi Connected?}
I -->|YES| J[Future Cloud or Dashboard Upload]
I -->|NO| K[Continue Local Reception]
J --> B
K --> B
15. HARDWARE IMPLEMENTATION
The physical project can be assembled in the following sequence.
Mount the Arduino UNO on the project base.
Install the IR sensor near the waste entry point.
Position the metal detection sensor near the waste classification area.
Install the servo motor with the sorting flap or diverter.
Place the metal bin below the metal sorting direction.
Place the plastic bin below the plastic sorting direction.
Mount the first ultrasonic sensor at the top of the metal bin.
Mount the second ultrasonic sensor at the top of the plastic bin.
Connect the buzzer.
Install the ESP8266 NodeMCU.
Complete the serial communication wiring and voltage divider.
Check the power supply and common ground connections.
Upload the programs.
Test the complete system.
16. SOFTWARE IMPLEMENTATION
The software is divided into two programs.
Program 1: Arduino UNO
Responsible for:
Reading metal and IR sensors.
Classifying waste.
Controlling the servo.
Measuring bin distances.
Calculating fill percentages.
Activating the buzzer.
Sending information to ESP8266.
Program 2: ESP8266 NodeMCU
Responsible for:
Receiving serial data from Arduino.
Extracting the received information.
Displaying the received information.
Providing the communication foundation for future Wi-Fi monitoring.
17. ARDUINO UNO COMPLETE PROGRAM
The following is the integrated Arduino program.
cpp
#include <Servo.h>
#include <SoftwareSerial.h>
// PIN CONFIGURATION
#define IR_PIN 7
#define METAL_PIN 9
#define SERVO_PIN 8
#define METAL_TRIG 2
#define METAL_ECHO 3
#define PLASTIC_TRIG 4
#define PLASTIC_ECHO 5
#define BUZZER 6
// ESP8266 COMMUNICATION
SoftwareSerial espLink(10, 11);
// SENSOR SETTINGS
#define METAL_DETECTED HIGH
const int detectionDistance = 15;
// SERVO POSITIONS
const int MAIN_POSITION = 90;
const int METAL_POSITION = 10;
const int PLASTIC_POSITION = 170;
// BIN CALIBRATION
const float METAL_BIN_EMPTY_CM = 30.0;
const float METAL_BIN_FULL_CM = 5.0;
const float PLASTIC_BIN_EMPTY_CM = 30.0;
const float PLASTIC_BIN_FULL_CM = 5.0;
// VARIABLES
Servo sortingServo;
bool objectProcessed = false;
bool servoActive = false;
unsigned long servoReturnTime = 0;
unsigned long lastSend = 0;
unsigned long lastPrint = 0;
String wasteType = "NONE";
int metalPercent = 0;
int nonMetalPercent = 0;
float metalDistance = 999;
float plasticDistance = 999;
// ULTRASONIC FUNCTION
float getDistance(int trigPin, int echoPin)
{
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
long duration = pulseIn(echoPin, HIGH, 25000);
if (duration == 0)
{
return 999;
}
return duration * 0.0343 / 2;
}
// FILL PERCENTAGE FUNCTION
int calculateFillPercent(
float distance,
float emptyDistance,
float fullDistance)
{
if (distance >= 999)
{
return 0;
}
float percentage =
((emptyDistance - distance) /
(emptyDistance - fullDistance)) * 100.0;
percentage = constrain(percentage, 0, 100);
return (int)percentage;
}
// WASTE SORTING FUNCTION
void sortWaste(String type, int position)
{
wasteType = type;
objectProcessed = true;
sortingServo.write(position);
servoActive = true;
servoReturnTime = millis() + 2000;
Serial.println("-----------------------------");
Serial.print("WASTE DETECTED: ");
Serial.println(wasteType);
Serial.print("SERVO POSITION: ");
Serial.println(position);
Serial.println("WASTE SORTING IN PROGRESS");
}
// SETUP
void setup()
{
Serial.begin(9600);
espLink.begin(9600);
pinMode(IR_PIN, INPUT_PULLUP);
pinMode(METAL_PIN, INPUT);
pinMode(METAL_TRIG, OUTPUT);
pinMode(METAL_ECHO, INPUT);
pinMode(PLASTIC_TRIG, OUTPUT);
pinMode(PLASTIC_ECHO, INPUT);
pinMode(BUZZER, OUTPUT);
sortingServo.attach(SERVO_PIN);
sortingServo.write(MAIN_POSITION);
noTone(BUZZER);
Serial.println("=============================");
Serial.println("AUTOMATIC WASTE SEGREGATION");
Serial.println("SYSTEM STARTED");
Serial.println("=============================");
Serial.println("ESP8266 COMMUNICATION READY");
}
// MAIN LOOP
void loop()
{
// READ SENSORS
int metalValue = digitalRead(METAL_PIN);
int irValue = digitalRead(IR_PIN);
// METAL AND PLASTIC SORTING
if (!objectProcessed)
{
// FIRST PRIORITY: METAL
if (metalValue == METAL_DETECTED)
{
sortWaste("METAL", METAL_POSITION);
}
// SECOND PRIORITY: NON-METAL
else if (irValue == LOW)
{
delay(100);
metalValue = digitalRead(METAL_PIN);
irValue = digitalRead(IR_PIN);
if (metalValue == METAL_DETECTED)
{
sortWaste("METAL", METAL_POSITION);
}
else if (irValue == LOW)
{
sortWaste("NON-METAL", PLASTIC_POSITION);
}
}
}
// SERVO RETURN
if (servoActive && millis() >= servoReturnTime)
{
sortingServo.write(MAIN_POSITION);
servoActive = false;
Serial.println("SERVO RETURNED TO 90 DEGREES");
Serial.println("REMOVE OBJECT");
}
// OBJECT REMOVAL RESET
if (!servoActive &&
digitalRead(METAL_PIN) != METAL_DETECTED &&
digitalRead(IR_PIN) == HIGH)
{
if (objectProcessed)
{
objectProcessed = false;
wasteType = "NONE";
Serial.println("OBJECT REMOVED");
Serial.println("SYSTEM READY FOR NEXT OBJECT");
}
}
// METAL BIN DISTANCE
metalDistance = getDistance(
METAL_TRIG,
METAL_ECHO
);
delay(50);
// PLASTIC BIN DISTANCE
plasticDistance = getDistance(
PLASTIC_TRIG,
PLASTIC_ECHO
);
// FILL PERCENTAGE
metalPercent = calculateFillPercent(
metalDistance,
METAL_BIN_EMPTY_CM,
METAL_BIN_FULL_CM
);
nonMetalPercent = calculateFillPercent(
plasticDistance,
PLASTIC_BIN_EMPTY_CM,
PLASTIC_BIN_FULL_CM
);
// BIN WARNING
bool metalBinFull =
(metalDistance <= detectionDistance);
bool plasticBinFull =
(plasticDistance <= detectionDistance);
if (metalBinFull || plasticBinFull)
{
tone(BUZZER, 2000);
}
else
{
noTone(BUZZER);
}
// SEND DATA TO ESP8266
if (millis() - lastSend >= 1000)
{
lastSend = millis();
espLink.print(wasteType);
espLink.print(",");
espLink.print(metalPercent);
espLink.print(",");
espLink.println(nonMetalPercent);
Serial.println("DATA SENT TO ESP8266");
}
// SERIAL MONITOR
if (millis() - lastPrint >= 1000)
{
lastPrint = millis();
Serial.println("=============================");
Serial.print("WASTE TYPE: ");
Serial.println(wasteType);
Serial.print("METAL BIN DISTANCE: ");
Serial.print(metalDistance);
Serial.println(" cm");
Serial.print("METAL BIN FILL: ");
Serial.print(metalPercent);
Serial.println("%");
Serial.print("PLASTIC BIN DISTANCE: ");
Serial.print(plasticDistance);
Serial.println(" cm");
Serial.print("PLASTIC BIN FILL: ");
Serial.print(nonMetalPercent);
Serial.println("%");
if (metalBinFull && plasticBinFull)
{
Serial.println("WARNING: BOTH BINS FULL");
}
else if (metalBinFull)
{
Serial.println("WARNING: METAL BIN FULL");
}
else if (plasticBinFull)
{
Serial.println("WARNING: PLASTIC BIN FULL");
}
else
{
Serial.println("BINS HAVE SPACE");
}
}
}
18. ESP8266 NODEMCU RECEIVER PROGRAM
The following program is uploaded separately to the ESP8266 NodeMCU.
The Arduino UNO communicates with the ESP8266 NodeMCU through serial communication using the SoftwareSerial library.
Communication speed: 9600 baud.
Data transmission interval: 1 second.
The data is transmitted in CSV (Comma-Separated Values) format.
Example:
text
METAL,25,40
NON-METAL,35,50
NONE,20,45
The data format contains three fields:
Field
Description
Field 1
Waste classification
Field 2
Metal bin fill percentage
Field 3
Plastic bin fill percentage
The ESP8266 receives these values and can subsequently transmit them through Wi-Fi.
Important: The receiver program currently displays received information on the ESP8266 Serial Monitor. Wi-Fi dashboard or cloud uploading is a separate future integration.
20. BIN FILL-LEVEL CALCULATION
The ultrasonic sensor measures the distance between the sensor and the surface of the waste.
As the waste accumulates, the distance between the sensor and the waste surface decreases.
The estimated fill percentage is calculated using:
Fill Percentage =
((Empty Bin Distance - Current Distance) / (Empty Bin Distance - Full Bin Distance)) × 100
Example calibration:
Empty bin distance = 30 cm.
Full bin reference distance = 5 cm.
Current measured distance = 15 cm.
Calculation:
((30 - 15) / (30 - 5)) × 100
= 60%
Therefore, the estimated bin fill percentage is 60%.
The calibration values in the Arduino program must be adjusted according to the actual bin dimensions and sensor mounting positions.
Buzzer warning threshold: 15 cm.
This threshold is independent of the percentage calculation. With the example calibration, a distance of 15 cm corresponds to approximately 60% fill.
21. TESTING AND RESULTS
The project components are tested individually before final integration.
Automatic separation of metal and non-metal objects.
Reduces manual waste segregation.
Provides separate collection bins.
Monitors bin fill levels automatically.
Provides audible bin-level warnings.
Uses affordable and commonly available components.
Can be expanded with IoT technology.
Supports improved waste collection and recycling processes.
23. APPLICATIONS
The proposed system can be applied in:
Smart waste collection systems.
Educational institutions.
Offices and commercial buildings.
Shopping centres.
Public waste collection points.
Small-scale recycling facilities.
Smart city waste management demonstrations.
24. LIMITATIONS
The metal sensor detection range depends on its design and calibration.
The IR sensor identifies object presence, not plastic composition.
Some non-metallic materials may also be directed into the plastic bin.
Ultrasonic readings may vary depending on waste shape and surface.
The sorting mechanism requires correct mechanical positioning.
ESP8266 communication requires suitable power and logic-level protection.
The present ESP8266 program receives serial data but does not yet upload it to a cloud platform.
25. FUTURE ENHANCEMENTS
The project can be improved by adding the following features:
1. IoT dashboard
Integrate Blynk IoT or ThingSpeak to monitor waste information remotely.
2. Mobile application
Develop a mobile dashboard displaying:
Current waste type.
Metal bin fill percentage.
Plastic bin fill percentage.
Bin warning status.
3. Cloud data storage
Store waste classification and bin-level information in an online database.
4. Additional waste classification
Add appropriate sensors or machine-learning-based image classification to identify paper, glass and other materials.
5. Automatic notification
Send notifications when a collection bin reaches its capacity threshold.
6. Data analytics
Maintain daily and monthly waste segregation statistics.
7. Solar power
Integrate solar energy to support low-power operation in outdoor installations.
26. CONCLUSION
The Automatic Metal and Plastic Waste Segregation System using Arduino UNO and ESP8266 NodeMCU demonstrates the application of embedded systems and automation in smart waste management.
The system identifies metallic objects using an LM393 metal detection sensor and identifies the presence of non-metallic objects using an IR sensor.
A servo motor automatically directs the waste into separate metal and plastic collection bins.
Two ultrasonic sensors continuously measure the distance between the waste surface and the top of each collection bin. The measured distances are converted into estimated fill percentages.
A buzzer provides an audible warning when either bin reaches the configured distance threshold.
The ESP8266 NodeMCU receives the waste classification and bin fill percentages from the Arduino UNO through serial communication.
The project provides a practical foundation for developing an IoT-based automatic waste segregation and monitoring system.
FINAL PROJECT OUTCOME
The developed prototype integrates:
Automatic metal detection.
Automatic non-metal object detection.
Servo-based waste segregation.
Separate metal and plastic collection bins.
Dual ultrasonic bin monitoring.
Bin-level buzzer warning.
Arduino-to-ESP8266 serial communication.
The system demonstrates how low-cost electronic components can be integrated to develop an automated and expandable smart waste management solution.