Skip to content

rexendz/mrbin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

154 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MR BIN: Machine for Recycling Bottles with Incentive Noting

MR BIN is a smart, automated waste management system developed as a senior thesis project at Ateneo de Zamboanga University (ADZU). The device is designed to identify, measure, and compress PET bottles while rejecting non-plastic materials, providing a reward system to encourage sustainable recycling habits.


🚀 Key Features

  • Intelligent Detection: Distinguishes PET bottles from other materials using Machine Learning.
  • Precision Measurement: Calculates bottle volume via Computer Vision.
  • Volume Reduction: Mechanically compresses bottles to maximize internal storage efficiency.
  • Incentive System: Provides user rewards ("Incentive Noting") upon successful transactions.

🛠️ System Architecture

The device is divided into three core functional modules:

  1. Plastic Detection Module: Utilizes a camera and an ML model to verify object types.
  2. Volume Measurement Module: Employs image processing to calculate physical dimensions.
  3. PET Bottle Storage Module: Manages the mechanical compression and storage workflow.

📐 Methodology & Technical Evolution

Phase 1: Ultrasonic Sensing (Legacy Approach)

Initially, the system utilized four ultrasonic distance sensors within a 40cm x 20cm x 20cm enclosure. The goal was to calculate dimensions based on the distance between the sensors and the bottle:

  • Diameter ($d$): $X - (x_1 + x_2)$
  • Height ($h$): $Y - (y_1 + y_2)$
  • Volume Formula: $V = \pi \left(\frac{d}{2}\right)^2 h$

The Challenge: Despite integrating temperature sensors to calibrate the speed of sound, the approach proved unreliable. Because the radius is squared in the volume equation, even microscopic "noise" in the ultrasonic readings caused exponential errors in the final volume calculation.

Phase 2: Computer Vision & Pixel-per-Metric

To achieve higher accuracy, we transitioned to OpenCV. The system now captures a top-down image, detects edges, and creates a mask to encapsulate the bottle within a bounding rectangle.

  • Dimensioning: We calculate the Euclidean distance between the four bounding points.
  • Calibration: Using a Pixel-per-Metric constant, the system converts pixel distances into real-world metric units. This is calibrated based on the fixed height of the camera from the base.

Phase 3: Machine Learning Integration

For robust object recognition, we utilized TensorFlow and a Transfer Learning approach.

  • Model: ssd-mobilenet-lite (selected for its high efficiency on Raspberry Pi hardware).
  • Performance: After extensive training, the model achieved an average loss of 0.05. We carefully tuned the training to avoid overfitting, ensuring the Raspberry Pi can handle real-time inference during the recycling process.

💻 Tech Stack

  • Hardware: Raspberry Pi, Pi Camera, Mechanical Actuators.
  • Software/Libraries: TensorFlow, OpenCV, Python.
  • Model Architecture: SSD-MobileNet-Lite.

🎓 Acknowledgments

Developed as a Senior Thesis Project at Ateneo de Zamboanga University (ADZU).

About

Thesis for ADZU

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published