Skip to content
yeashaswiPublic

About

A prototype automated waste sorter using ESP32/Arduino, servo motors, and Gemini Vision / YOLO for waste classification.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

SmartSort ♻️

An automated waste sorting prototype using microcontrollers, servo motors, and computer vision.

SmartSort is an engineering prototype built to test automated segregation of mixed household waste into three categories: Wet (organic/food scraps), Dry (clean recyclables), and Reject (soiled wrappers, composites, non-recyclables).


How It Works

  1. Feeding: A rotating paddle wheel (driven by an Arduino Uno and an MG996R servo) meters waste items one at a time from a hopper onto an inspection platform.
  2. Drop Detection: An IR sensor detects when an item falls onto the inspection plate and signals the camera.
  3. Image Capture & Classification: A USB webcam captures a still frame. A Python script sends the image to Google's Gemini Vision API (or a local YOLO model) to classify the item into WET, DRY, or REJECT.
  4. Mechanical Diversion: Based on the classification, an ESP32 rotates a diversion chute to the target angle and drops the item into the corresponding bin.

Hardware Components

  • Microcontrollers: Arduino Uno (feeding wheel control) + ESP32 (inspection flaps & diversion chute)
  • Actuators: 4 × MG996R standard hobby servo motors
  • Sensors: 2 × IR proximity modules (drop confirmation) + USB webcam
  • Chassis: Acrylic/wood experimental test rig with 3-way bin collection

Software & Scripts

  • waste_detector.py: Webcam capture, Gemini Vision API call, and serial command dispatcher.
  • main_dashboard.py: Motion-settling frame detector and local model testing interface.
  • Espcode/: Arduino/ESP32 C++ firmware controlling servo angles and serial command reception.

⚠️ Real-World Flaws & Limitations

  • Mechanical Jams: Real waste is irregular, sticky, and heterogeneous. Tangled plastic bags or food scraps frequently stick to the paddles or fail to drop cleanly from the inspection plate.
  • Cloud Latency: Using Gemini Vision over a network introduces a 1–3 second roundtrip delay per item, which limits throughput.
  • Lighting Sensitivity: Shadows, uneven ambient lighting, or a dirty webcam lens noticeably hurt classification accuracy.
  • Hobby Servos Under Load: Standard MG996R servos are prone to overheating, gear stripping, or jitter under continuous mechanical resistance.
  • Academic / Benchtop Scope: This is a small-scale student proof of concept, not a finished industrial waste sorting machine.

Getting Started

1. Python Environment Setup

python3 -m venv venv
source venv/bin/activate
pip install opencv-python pillow pyserial google-genai

2. Configure Serial Ports & API Key

In waste_detector.py:

  • Set GEMINI_API_KEY with your Google AI Studio API key.
  • Set ESP32_PORT to your microcontroller's serial device (e.g. /dev/cu.usbserial-0001 or COM3).

3. Flash Microcontrollers

Upload the code in Espcode/ to your ESP32 and Arduino boards using the Arduino IDE.

4. Run the Classifier

python waste_detector.py

License

MIT

About

A prototype automated waste sorter using ESP32/Arduino, servo motors, and Gemini Vision / YOLO for waste classification.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors