Automatic Waste Segregation System
An automatic waste segregation system built using Arduino, an ultrasonic sensor, a soil moisture sensor, and a servo motor. The system detects waste, identifies whether it is wet or dry, and automatically directs it into the appropriate bin.
Supplies
- Arduino Uno
- Ultrasonic Sensor (HC-SR04)
- Soil Moisture Sensor
- Servo Motor
- Cardboard
- Jumper Wires
- Breadboard
- Battery / Power Supply / Power Bank
Hardware Setup
Assemble the waste segregation system using cardboard and mount all the components as shown in the images below.
Main Components
- Ultrasonic Sensor – Detects the presence of waste.
- Soil Moisture Sensor – Identifies whether the waste is wet or dry.
- Servo Motor – Directs the waste into the appropriate bin.
- Arduino Uno – Controls the entire system.
Connections
Ultrasonic Sensor (HC-SR04)
- VCC → 5V
- GND → GND
- Trig → D9
- Echo → D10
Soil Moisture Sensor
- VCC → 5V
- GND → GND
- AO → A0
Servo Motor
- Signal → D6
- VCC → 5V
- GND → GND
Power
- Arduino powered using a Power Bank
Arduino Code
Upload the code using the Arduino IDE.
The Arduino reads data from the ultrasonic and moisture sensors. Based on the moisture level detected, the servo motor rotates and directs the waste into the corresponding collection bin.
Note: Since this project was built several years ago, the original source code is no longer available. The code provided below is a sample implementation that demonstrates the same working principle. Pin numbers and moisture threshold values can be adjusted according to your hardware setup.
Downloads
Working
When an object is placed into the system, the ultrasonic sensor detects its presence and initiates the sorting process.
The moisture sensor then checks the moisture content of the waste. Based on the sensor reading, the servo motor rotates to guide the waste into either the wet waste bin or the dry waste bin.
This allows waste to be sorted automatically without manual intervention.