Inspiration
As global energy demands rise, rolling blackouts and power surges are becoming dangerously frequent. For most, a blackout is an inconvenience. But for patients relying on life-critical medical devices at home (like oxygen concentrators), a grid failure is a matter of life and death. We were inspired by the VoltHacks organizers to solve this real-world infrastructure problem not with basic breaker boxes, but with intelligent, proactive AI.
What it does
GridGuard AI sits between the main grid and a home's appliances. It monitors real-time telemetry from physical IoT sensors. Instead of simply tripping a breaker during a surge, our custom PyTorch neural network predicts the anomaly, instantly sheds non-essential loads (like TVs and Space Heaters), and seamlessly routes life-critical medical devices to a local UPS Battery or Solar power, ensuring zero downtime. Finally, a Generative AI agent creates a reassuring incident report for the homeowner.
How we built it
- Hardware Edge: Built using an ESP32 microchip (via Wokwi) programmed in C++ that transmits live grid voltage over a global MQTT broker (HiveMQ).
- The Brain: A Python FastAPI backend running a PyTorch LSTM Deep Learning model. We trained this model on Google Cloud GPUs using over 2 million rows of real-world smart-meter data from the UCI Machine Learning Repository.
- The UI: An enterprise-grade dark-mode React dashboard (with Tailwind and Recharts) that polls the backend to visualize the energy flow and battery physics in real-time.
- GenAI: We integrated Google's Gemini 2.5 Flash API to generate human-readable incident reports dynamically.
Challenges we ran into
Our biggest challenge was the Deep Learning model. We didn't want to use fake, generated data. We used a massive 2-million-row real-world dataset, which required us to build a custom PyTorch DataLoader to create a 60-second sliding window tensor matrix. Processing this locally was impossible on our hardware, so we had to move our training pipeline to Google Colab Cloud GPUs, export the weights, and build a dynamic inference engine on our local backend.
Accomplishments that we're proud of
We are incredibly proud of achieving true end-to-end integration. When you trigger a physical hardware surge on the ESP32, it travels over the internet via MQTT to our Python backend, passes through a PyTorch matrix, triggers a React UI state change, pings a Gemini LLM, and sends a command back over the internet to physically turn off the LED on the microchip—all in less than a second.
What we learned
We leveled up massively. We learned how to process massive time-series datasets for Deep Learning, how to bridge hardware and software using MQTT Pub/Sub protocols, and how to combine deterministic physics simulations (battery drain) with stochastic AI models.
What's next for GridGuard AI
We want to move from simulation to physical smart breaker boxes. We also plan to expand the AI to manage neighborhood-level micro-grids, allowing homes to dynamically share solar power during catastrophic grid failures.
Log in or sign up for Devpost to join the conversation.