BinSight: Smart Waste Management System

BinSight is a smart waste management system that uses ultrasonic sensors on Raspberry Pi devices to monitor trash bin fill levels in real time. Bin data is sent to a cloud-hosted backend and displayed on a web dashboard with Google Maps integration and route optimization for collection crews.


Inspiration

I noticed a crucial ongoing issue in the city I grew up in, West Palm Beach. Overfilled public trash cans frequently overflow due to high pedestrian traffic and infrequent collection, littering streets and public spaces. Similarly, on college campuses like the University of Florida, overflowing bins are common in dining areas, student centers, and outdoor gathering spots.

This inspired the idea of BinSight, a smart, sustainable solution that prevents overflow, improves environmental health, and enhances community quality of life.


What it does

BinSight consists of three components:

  1. Sensor – A Raspberry Pi with an HC-SR04 ultrasonic sensor mounted inside a trash bin. It measures the distance to the waste surface, calculates fill percentage, and sends telemetry to the backend over HTTP.
  2. Backend – A FastAPI server that receives sensor telemetry, stores bin state in memory, and exposes a REST API for the frontend.
  3. Frontend – A React + TypeScript dashboard displaying bin locations on a Google Map, color-coded by fill level. Includes a route planner that generates optimized pickup routes prioritizing the fullest bins.

The system enables:

  • Real-time visibility into bin fill levels across a campus or city.
  • Optimized collection routes, reducing unnecessary pickups, saving time and fuel.
  • Sustainability, with a low-cost IoT pipeline and solar-powered units.

How we built it

Sensor Setup

  • Hardware: Raspberry Pi, HC-SR04 ultrasonic sensor, voltage divider for 3.3V GPIO logic.
  • Software: Python script reads 7 distance measurements per cycle, applies a median filter, calculates fill percentage, and posts telemetry to the backend every second.
  • Calibration: Adjusted EMPTY_DISTANCE_CM and FULL_DISTANCE_CM to match bin dimensions.
HC-SR04 Pin RPi GPIO
Trig GPIO 23
Echo GPIO 24
VCC 5V
GND GND

Backend

  • Built with FastAPI to receive and store bin data.
  • Exposes REST endpoints:
    • POST /telemetry – receive sensor reading
    • GET /bins – list all bins
    • GET /bins/{bin_id} – get a single bin

Frontend

  • Built with React + TypeScript
  • Displays bin fill levels on Google Maps
  • Implements route optimization for collection crews

Challenges we ran into

  • Sensor accuracy: Trash comes in various shapes, requiring careful calibration.
  • Signal interference: Wireless communication had to remain reliable in urban and campus environments.
  • Algorithm efficiency: Optimizing routes to balance distance and fill levels required multiple iterations.
  • Sustainability: Ensuring solar panels provided enough power for sensors and communications.

Accomplishments that we're proud of

  • Built a working prototype integrating sensors, backend, and dashboard.
  • Developed a route optimization algorithm using weighted prioritization:
  • Demonstrated a full IoT pipeline from sensor to cloud to dashboard.
  • Designed a scalable solution for both city streets and college campuses.

What we learned

  • How to integrate hardware, software, and cloud systems.
  • Practical lessons in real-time telemetry and sensor calibration.
  • How to design data-driven solutions for urban sustainability.
  • The challenges and importance of environmental impact mitigation in urban and campus spaces.

What's next for BinSight

  • Deploy BinSight across UF campus, targeting high-traffic and overflowing areas.
  • Improve the algorithm for dynamic, real-world traffic and campus patterns.
  • Explore additional features: compost monitoring, predictive overflow alerts, and battery optimization.
  • Measure community impact, including litter reduction and improved environmental quality.

Built With

Share this project:

Updates