Skip to content

WeAreBru/bru

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

128 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌱 B.R.U

Building a Greener Barcelona with Edge AI

B.R.U sees, thinks, and reacts β€” transforming urban spaces into intelligent, self-aware environments in real time.

Overview β€’ Dashboard β€’ Architecture



Overview

B.R.U is a modular IoT + Edge AI system designed to monitor environmental conditions in urban spaces and actively respond to them in real time.

Each module:

  • Collects environmental data
  • Detects trash and objects (e.g., rubber ducks πŸ¦†)
  • Runs Edge AI locally
  • Reacts via audio feedback
  • Sends structured data to the backend

Architecture

Architecture Diagram


πŸ“Έ System in Action

πŸ¦† Rubber Duck Detection

Our Edge AI model is capable of detecting objects like rubber ducks in real time directly on the device.


🚯 Trash Detection

The system can identify littering events and react instantly by triggering alerts and audio feedback.


🧍 Person Detection

Our system is also capable of detecting human presence in real time, enabling interaction-aware responses and smarter environmental monitoring.


πŸ“Š Dashboard & Monitoring

Our platform provides a full real-time view of the city infrastructure, allowing technicians to monitor, analyze, and control all deployed modules.


🧭 Main Dashboard

  • Overview of active nodes, alerts, and system health
  • Real-time metrics (temperature, air quality, dry zones)
  • Live alert stream for immediate incident awareness

πŸ—ΊοΈ City Map (Real-Time Nodes)

  • Interactive map with all deployed devices
  • Heatmaps for air quality, temperature, and risk levels
  • Visual clustering of nodes across Barcelona

🚨 Alerts Management

  • Centralized alert system
  • Severity levels (Warning, Critical, etc.)
  • Real-time issue tracking and triage

πŸ“¦ Devices Overview

  • Full inventory of devices
  • Status monitoring (online/offline/degraded)
  • Firmware and sensor data tracking

🌱 Botany & Irrigation Control

  • Soil moisture monitoring
  • Automatic irrigation rules
  • Smart pump activation based on thresholds

πŸ“ˆ Analytics

  • Historical sensor data
  • Time-series visualization
  • Environmental trend analysis

βš™οΈ Edge Console (Technician Interface)

  • Detailed view of a specific Arduino module
  • Real-time sensor readings and AI state
  • Direct control of actuators (pump, LEDs, relay)
  • Debugging interface for field technicians

This interface is designed for technicians and operators who need fine-grained control over individual devices in the field.

It enables:

  • Live inspection of module behavior
  • Manual override of automated actions
  • Troubleshooting and maintenance operations

πŸ€– User Web App (AI Assistant)

B.R.U also includes a user-facing web application that allows citizens to interact with the system in a natural and intuitive way.

Users can ask real-time questions about the city and receive intelligent, context-aware responses powered by live sensor data.


πŸ’¬ Conversational Interface

  • Ask about crowded places (e.g., Sagrada FamΓ­lia)
  • Get real-time occupancy insights
  • Access environmental conditions instantly
  • Natural language interaction powered by LLMs

πŸŽ™οΈ Voice Interaction

  • Speak directly with the system using voice
  • Real-time speech-to-text + text-to-speech
  • Hands-free interaction
  • Powered by ElevenLabs

🧠 Smart Responses (Context-Aware)

The assistant combines:

  • Real-time sensor data (crowd, air quality, temperature)
  • Historical insights
  • AI reasoning via LLM (Gemma 4)

Example:

β€œCan I visit Sagrada FamΓ­lia this afternoon?”

β†’ The system responds with:

  • Current occupancy level
  • Number of people in the area
  • Air quality conditions
  • Temperature
  • Smart recommendation

🌍 Use Cases

  • 🧳 Tourists checking crowded areas before visiting
  • 🌱 Citizens monitoring environmental conditions
  • πŸ™οΈ Smart city interaction layer
  • β™Ώ Accessibility through voice interaction

⚑ Edge AI (On-Device Intelligence)

The system runs machine learning models directly on the device using Arduino and Edge Impulse.

  • Powered by Arduino + Edge Impulse
  • Runs locally for real-time inference
  • Low latency and immediate response
  • Privacy-friendly (no video sent to the cloud)
  • Works even without internet connection

πŸ“‘ Communication (MQTT Messaging Layer)

Modules communicate with the backend using a lightweight publish/subscribe system.

  • MQTT protocol
  • Efficient and low-bandwidth communication
  • Scalable to many distributed devices

βš™οΈ Backend (API & Data Processing)

The backend is responsible for ingesting data, exposing APIs, and enabling real-time interactions.

  • Built with FastAPI
  • WebSockets for live updates
  • Dockerized services for deployment

πŸ—„οΈ Databases (Data Storage Layer)

Different databases are used depending on the type of data.

  • InfluxDB β†’ optimized for time-series sensor data
  • PostgreSQL β†’ stores users, devices, and system metadata

πŸ€– AI Layer (User Interaction)

The system includes a conversational interface powered by a large language model.

  • Gemma 4 (LLM) for natural language interaction
  • Uses real sensor and event data as context
  • ElevenLabs for voice responses

🌐 Infrastructure (Secure Deployment)

The system is exposed securely using modern edge infrastructure.

  • Cloudflare Tunnel
  • No open ports required
  • Zero-trust access model
  • Reliable global routing

🌍 Scalability (Designed for Growth)

B.R.U is designed to scale from a single module to city-wide deployment.

  • Modular architecture (independent nodes)
  • Edge processing reduces central load
  • MQTT enables large-scale distributed systems

The system can grow without significant changes to the core architecture.


πŸ› οΈ Tech Stack

Arduino ESP32 Edge Impulse FastAPI MQTT InfluxDB PostgreSQL Next.js Gemma ElevenLabs Cloudflare


🐳 Deployment

All backend and frontend services are fully containerized using Docker, making the system easy to deploy, replicate, and scale.

  • Backend APIs, databases, and services run in Docker containers
  • Frontend applications are containerized for consistent environments
  • Simplified setup for both development and production

Edge devices (Arduino-based modules) run independently and connect to the system via MQTT.


πŸ‘₯ Authors

Built with ❀️ at HackUPC by:


πŸ“„ License

Mozilla Public License 2.0 (MPL-2.0)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors