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
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
Our Edge AI model is capable of detecting objects like rubber ducks in real time directly on the device.
The system can identify littering events and react instantly by triggering alerts and audio feedback.
Our system is also capable of detecting human presence in real time, enabling interaction-aware responses and smarter environmental monitoring.
Our platform provides a full real-time view of the city infrastructure, allowing technicians to monitor, analyze, and control all deployed modules.
- Overview of active nodes, alerts, and system health
- Real-time metrics (temperature, air quality, dry zones)
- Live alert stream for immediate incident awareness
- Interactive map with all deployed devices
- Heatmaps for air quality, temperature, and risk levels
- Visual clustering of nodes across Barcelona
- Centralized alert system
- Severity levels (Warning, Critical, etc.)
- Real-time issue tracking and triage
- Full inventory of devices
- Status monitoring (online/offline/degraded)
- Firmware and sensor data tracking
- Soil moisture monitoring
- Automatic irrigation rules
- Smart pump activation based on thresholds
- Historical sensor data
- Time-series visualization
- Environmental trend analysis
- 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
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.
- Ask about crowded places (e.g., Sagrada FamΓlia)
- Get real-time occupancy insights
- Access environmental conditions instantly
- Natural language interaction powered by LLMs
- Speak directly with the system using voice
- Real-time speech-to-text + text-to-speech
- Hands-free interaction
- Powered by ElevenLabs
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
- π§³ Tourists checking crowded areas before visiting
- π± Citizens monitoring environmental conditions
- ποΈ Smart city interaction layer
- βΏ Accessibility through voice interaction
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
Modules communicate with the backend using a lightweight publish/subscribe system.
- MQTT protocol
- Efficient and low-bandwidth communication
- Scalable to many distributed devices
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
Different databases are used depending on the type of data.
- InfluxDB β optimized for time-series sensor data
- PostgreSQL β stores users, devices, and system metadata
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
The system is exposed securely using modern edge infrastructure.
- Cloudflare Tunnel
- No open ports required
- Zero-trust access model
- Reliable global routing
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.
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.
Built with β€οΈ at HackUPC by:
Mozilla Public License 2.0 (MPL-2.0)
















