💡 Inspiration

In 2017, Hurricane Maria killed nearly 3,000 people in Puerto Rico — many from medical equipment losing power during 11 months of grid failure. The heartbreaking reality: some homes had solar panels and batteries, while their neighbors with oxygen concentrators sat in the dark.

We kept asking: "Why can't neighbors share power like we share Wi-Fi?" That question became GridPulse.

As a beginner entering this hackathon, tackling electrical engineering and power physics was intimidating. But this problem was too critical to ignore just because it was hard. So we went back to first principles and learned.


⚡ What It Does

GridPulse is a real-time, physics-accurate community microgrid resilience simulator that answers: "How do you keep life-support systems running when the central grid collapses?"

Core Capabilities:

  • 🌐 Peer-to-Peer Power Routing: Solar surplus is dynamically routed across the neighborhood mesh.
  • 🏥 3-Tier Medical Triage: Tier-1 (oxygen concentrators, dialysis) is strictly protected and NEVER shed. Ever.
  • 🔋 Real Battery Physics: State of Charge (SoC) numerical integration with Peukert's Law correction for high-rate discharge.
  • ⚡ Live Grid Events: Cut the central grid and observe the community autonomously island and self-organize in milliseconds.
  • ☀️ Real-time Environmental Controls: Cloud cover, solar output slider, demand spikes, and night cycles.
  • 📊 Calibrated Disaster Scenarios: Hurricane Maria, California Wildfire, Texas Freeze, and Loma Prieta Earthquake.

Every calculation is grounded in electrical engineering — from Kirchhoff's Current Law (KCL) node balancing to dynamic load-shedding priority queues.


🛠️ How We Built It

The entire application is engineered in zero-dependency Vanilla Web Standards (HTML5, CSS3, JavaScript, Canvas 2D).

Why? Because in a real disaster, the internet goes down. Heavy web frameworks that rely on CDN scripts fail. GridPulse is built to run 100% offline — cached on a phone or running on a Raspberry Pi at a neighborhood hub.

Key Technical Decisions:

  1. Float32Array Particle System: Initial OOP particle objects triggered garbage collection pauses every ~50ms. We shifted to flat Float32Array typed buffers and batch canvas drawing, slashing memory allocation to near zero and locking in 60 FPS.
  2. Finite State Machine for Islanding: When the central grid drops, the microgrid must transition in under 16ms (one AC cycle) to avoid voltage collapse. We implemented a 3-state FSM (GRID_TIED → ISLANDING_TRANSITION → AUTONOMOUS_P2P).
  3. Peukert’s Law Battery Model: Batteries do not discharge linearly at high loads. We applied Peukert’s equation ($I^k \cdot t = C$) with an empirical $k = 1.15$ (standard LiFePO4), delivering authentic runtime calculations.

🧗 Challenges We Ran Into

  • Learning Power Physics from Scratch: Balancing Kirchhoff's Current Law across dynamic node meshes required understanding electrical engineering concepts in a weekend.
  • 60 FPS Particle Rendering: Visualizing hundreds of energy flow electrons without frame drops demanded transitioning from object-oriented programming to a data-oriented layout with typed arrays.
  • Visualizing the Invisible: Electricity cannot be seen. Designing an intuitive visual language where colors, line widths, and speeds immediately convey grid health required continuous UX iteration.

🏆 Accomplishments

  • Engineered a 100% offline, zero-dependency physics simulator from scratch.
  • Real-time physics engine yielding authentic, engineering-grade wattage and battery depletion figures.
  • Four calibrated disaster scenarios demonstrating life-saving power redistribution.
  • Proved that beginner developers can dive deep into complex, life-critical systems and build impactful tools.

📚 What We Learned

The biggest transformation was mental: software isn't just about moving data packets — it can be a controller of physical energy and human survival.

Key Technical Skills Mastered:

  • Kirchhoff’s Current Law & nodal power equations
  • Battery SoC numerical integration (Euler's method)
  • Peukert’s Law for non-linear battery degradation
  • Load-shedding prioritization algorithms used by power utilities
  • Canvas performance profiling and Float32Array memory optimization

🚀 What's Next

  • WebRTC Mesh: Real-time multi-device peer simulation across community members.
  • PWA Service Worker: True one-tap offline install for disaster emergency kits.
  • Hardware Telemetry: Direct integration via Web Serial API with Arduino / ESP32 CT current clamps.

Built With

Share this project:

Updates

Submission history