These LED Festival Badges Keep Themselves in Sync with Crowdsourced Timing

Tony Goacher came up with an ingenious way to keep the CrowdClock badges in sync with each other.

I’m not sure why this is — maybe a psychologist will let me know — but we humans seem to really like it when things sync up, especially on a large scale. Tony Goacher wanted to make festival badges that light up with LED effects and wanted to harness the satisfaction of syncing. To pull that off, he came up with an ingenious way to keep the CrowdClock badges in sync with each other, all without any central command or two-way communication.

Here’s the situation: you have a bunch of people scattered throughout a crowd, all wearing badges with blinking LEDs. You want the LED animations to stay in sync, but you don’t want to create some kind of master broadcast station. You also don’t want to deal with complex topology or communication, like you would with mesh networking.

How do you achieve that?

Goacher’s solution is pretty darn clever. Each badge has an ESP32 microcontroller telling its WS2812b individually addressable RGB LEDs what to do. The magic comes from ESP-NOW, which is a wireless protocol that allows for peer-to-peer communication. But crucially, the badges aren’t forming peer-to-peer connections with each other.

Instead, each badge simply checks the network time being broadcast by any other badge it sees. If that time is later than its own time, it adopts the new time. As the clocks in the ESP32 microcontrollers drift, they can grow slightly out of sync. But the overall system will naturally correct itself, as the latest time propagates across all of the badges.

This does mean that total drift may end up being pretty significant, as the most extreme drift always propagates if it happens to be later (rather than earlier). But that doesn’t actually matter in this case, because the time is irrelevant. All that matters is that the badges work from the same time in order to keep their lights in sync.

It is a fantastically simple and reliable method for synchronization on a large scale.


cameroncoward

Writer for Hackster News. Proud husband and dog dad. Maker and serial hobbyist. Check out my YouTube channel: Serial Hobbyism

Latest Articles