Inspiration

Crowd crushes rarely come out of nowhere. Before people get hurt, the crowd starts moving in waves: one person is pushed into the next, and the push travels through the crowd. Everyone in that crowd is already carrying a motion sensor in their pocket.

What it does

Pulse is an early warning system for crowd crushes that uses the phones already in the crowd. Phones open a web page (no app install) and stream their motion to a server. When neighbouring phones start swaying together in a wave that travels from person to person, the zone turns yellow, then red. Staff see it on a live dashboard map, Gemini writes a short briefing, ElevenLabs reads it out loud, and an Arduino sign flashes a warning. Phones in the danger zone get an arrow pointing to the less crowded way out.

Jumping or dancing together does not trigger it: everyone moving at the same moment is not a travelling wave. Math detects, AI only explains.

How I built it

  • Go server: one binary serves the phone page, the dashboard, WebSockets and APIs. It syncs each phone's clock, cross-correlates the motion of neighbouring phones to find travelling waves, and tracks crowd density.
  • TypeScript + Vite for the phone page and the dashboard.
  • Tiger Data stores readings and alerts for replay.
  • Gemini writes the staff briefing, ElevenLabs speaks it.
  • Arduino Uno R4 WiFi sign that shows the zone level.
  • A crowd simulator (Social Force Model) so the whole thing could be built and tested solo, without a real crowd.

Challenges

  • Phones are carried at any angle, so every reading has to be levelled using gravity before it can be compared.
  • Phone clocks disagree, so each phone gets an NTP-style clock sync.
  • Telling a dangerous push apart from dancing, walking, or someone just checking their phone.
  • Every external service has to fail soft: detection keeps running with no internet.

Privacy

No names, contacts, audio or photos. Just a random session ID, a position inside the venue, and motion numbers.

What's next

  • Build it into an event's official app so it keeps running when the screen is off.
  • Better positioning of phones in a real crowd.
  • Tuning thresholds with much larger crowds.

Built With

Share this project:

Updates

Submission history