Inspiration

Barcelona has two silent urban problems that rarely make headlines: incorrect waste sorting and animal infestations around bins. Walk past any public bin at night and you will likely find pigeons, rats, or even wild boars rummaging through unsorted garbage. Meanwhile, contaminated recycling streams cost the city millions in processing and landfill fees every year. We wanted to build something that tackled both problems at once, automatically, without relying on human behavior change.

What it does

Smart-Bins is an edge AI waste management system built on the Arduino Uno Q with Qualcomm on-device inference. It does three things:

  • Classifies waste automatically — a top-mounted camera analyzes each item deposited and routes it mechanically to the correct bag: Glass, Paper, Plastic, Organic, or General Waste.
  • Deters urban wildlife — the same camera monitors the surrounding perimeter. When a rat, pigeon, or wild boar is detected, the system triggers LED strobes and acoustic deterrents to scare them off without causing harm.
  • Reports in real time — every bin streams fill levels and animal incident data to a web dashboard, with predictive analytics that tell sanitation teams which bins need collection before they overflow.

How we built it

The Arduino Uno Q runs two processors simultaneously: the STM32U585 MCU handles real-time hardware control (LEDs, buzzer, distance sensor) via a C++ sketch on Zephyr RTOS, while the Qualcomm QRB2210 MPU runs a Python application that drives the AI inference pipeline and communicates with the cloud.

The two processors talk through Arduino RouterBridge, an RPC layer that lets Python call functions on the MCU and vice versa. This allowed us to keep hardware logic in C++ where it belongs and business logic in Python where it is easier to iterate.

The AI model was trained on Edge Impulse with a custom dataset covering waste categories and urban pest species. On the software side, we built a Node.js + Express backend deployed on Railway and a dashboard in Astro + React on Vercel.

To reduce false positives without retraining the model, we implemented a 10-frame consensus filter in Python: a label must appear in 10 consecutive camera frames before any hardware action is triggered.

Challenges we ran into

  • MCU↔MPU latency — early versions of the Bridge calls were timing out under load. We solved this by making all hardware calls non-blocking with short timeouts and graceful fallbacks, so a slow sensor read never freezes the detection pipeline.
  • I2C address conflicts — four Modulino Pixels modules on the same bus share the same default address, causing all LEDs to respond to every command. Resolving this required configuring unique I2C addresses on each module at the hardware level.
  • False positive rate — the object detection model triggered too easily in variable lighting conditions. Beyond the 10-frame filter, we added a minimum confidence threshold in Python to discard weak detections before they reach the counter.
  • Edge deployment constraints — running inference, a web server, a Bridge RPC layer, and a camera loop concurrently on a single board required careful resource management to avoid dropped frames and missed detections.

Accomplishments that we're proud of

  • Getting a full AI inference pipeline running entirely on-device on the Arduino Uno Q, with no cloud dependency for detection.
  • Building a bidirectional MCU↔MPU communication layer that lets Python and C++ coordinate hardware actions in real time.
  • Shipping a working IoT dashboard with live bin data, animal incident logging, and predictive fill-level analytics within the hackathon timeframe.
  • Designing a pest deterrence system that is effective without being harmful — no traps, no chemicals, just light and sound.

What we learned

Working at the intersection of embedded systems and AI inference taught us to think carefully about where logic lives. The split between MCU and MPU is not just a hardware constraint — it is a useful architectural boundary. Keeping deterministic, time-critical code on the MCU and probabilistic, high-level logic on the MPU made the system more reliable and easier to debug.

We also learned that filtering at the application layer can be as effective as retraining a model, and far faster to iterate on during a hackathon.

What's next for Smart-Bins

  • Train the model on a broader dataset of real urban waste and pest species for production-grade accuracy.
  • Add mechanical actuation for automatic physical bag routing.
  • Expand the dashboard with multi-bin fleet management and city-level heatmaps for sanitation planning.
  • Partner with a municipality to run a real-world pilot in Barcelona.

Built With

Share this project:

Updates