(This is my first Hackster.io project. Please be gentle!)
I volunteer at a local none profit tech hub and this project demonstrates how we made a set of LED badges that automatically synchronise their lighting effects for a local light festival —no master device, no pairing, and no central control.
Each badge runs independently, but periodically exchanges timing information using ESP-NOW. From this, they converge on a shared timebase, allowing coordinated lighting patterns across a group.
The result is a distributed system where badges “fall into sync” naturally when in range of each other.
- 🔋 Runs on compact ESP32-based hardware
- 📡 Wireless synchronisation using ESP-NOW
- 🔁 No master device (fully distributed system)
- ⏱ Time quantisation for stable visual alignment
- 💡 Stateless lighting effects (no shared state required)
- ⚡ Reasonable convergence (seconds)
Each badge runs its own internal clock and lighting effects.
2. Broadcast TimingBadges periodically transmit their current time quantised to 5ms over ESP-NOW.
3. ConvergenceWhen a badge receives another’s timestamp that is higher than localtime, it nudges its own clock toward it.
Over time, all devices converge to a shared timing reference.
4. Quantisation (The Key Trick)Instead of rendering LED effects on exact time, each badge snaps to fixed time boundary (50 ms steps).
This prevents jitter and creates visually stable synchronisation.
5. Stateless EffectsLighting patterns are generated purely from time:
EffectManger.RunEffect(time) -> effect[n].RunEffect(time)No history or shared state is required, which makes synchronisation robust.
🔷 HardwareMain Components- ESP32 development board
- WS2812 / NeoPixel LED ring
- Power source (LiPo (+ charger) or USB)
- Optional badge PCB / mounting
A PCB created in Design Spark is included in the repo but the circuit is very simple.
The battery and manager circuit can be omitted and the ESP-C3 USB power could be used if desired.
- LED Data → ESP32 GPIO 0
- Common 5V between ESP32, battery manager and LEDs
- Common ground between ESP32, battery manager and LEDsN.B. The PCB has 3 large solder pads for a wired connection to the LEDs.
- ESP-NOW (low-latency broadcast communication)
- FastLED WS2812 library
- Custom timing synchronisation logic
Each device continuously:
- Updates its local clock
- Broadcasts its time
- Receives other timestamps
- Adjusts its own time slightly if a higher time is received
- Renders LEDs from the current time
- Maintain a local time value
- On receiving another badge’s time:
- Compare difference
- Apply small correction
- Snap to nearest time 50ms quantum for LED effects.
This avoids oscillation and keeps everything visually aligned.
🔷 Results- Badges synchronise within a short time after coming into range
- Effects remain stable even with packet loss
- No visible “fighting” between devices
- Works with multiple badges joining/leaving dynamically
- Conference badges
- Festival wearables
- Interactive group lighting
- Swarm-style visual effects
- Assemble ESP32 and LED ring
- Upload firmware
- Power multiple badges
- Bring them into proximity
- Watch them synchronise automatically
This project explores how simple devices can achieve coordination without central control. By combining lightweight wireless communication with time-based rendering, it creates a robust and scalable synchronisation system.





Comments