LED Smart Glasses
Colourful party glasses using WS2812B RGB LED chips, ESP32-C3 and WiFi.
Introduction
In this project, we combine the colourful and vibrant capabilities of WS2812B RGB LEDs with the connectivity and processing power of the ESP32-C3 to create fully app-controlled, WiFi-enabled party glasses. By individually driving 96 addressable LEDs around the frame, we will use mathematical functions in C++ code to display eye-catching animations, and even respond to music — all controlled over WiFi via a custom smartphone app. On the hardware side, we will design and assemble two PCBs, one densely packed with WS2812B LEDs to be mounted on the frame, and a logic PCB to house the ESP32-C3, user controls, power supply and other necessary electronics. These smart glasses demonstrate a modern approach to PCB design, microcontroller programming and wireless communications to turn an everyday item into an interactive light show.
Design Goal
A WS218B chips is...
The functional block diagram in Figure 2.1 illustrates the flow of data between high-level logic blocks in the circuit. Most notable are the D flip-flops (three - one each for \(S_{0}\), \(S_{1}\) and \(S_{2}\)), next-state combinational logic blocks and the binary and decimal outputs. Note that to drive the decimal output via the 7-segment display, we need a '7-segment decoder' logic block to drive the necessary segments for each input number. Lastly, a clock pulse is provided to the three flip-flops to synchronise the system. We will explore how each of these blocks work in the following section.
Early Prototype
Designed in KiCAD with a compact form factor. I paid extra attention to:
- Tracing each NAND gate without crossover.
- Clear silkscreen labels for every transistor and resistor.
- Rounded trace corners and generous via clearances.


Mechnical Design
- Hand-soldered all SMD resistors & capacitors.
- Placed BJTs and LEDs, checked orientation.
- Debugged early fan-out issues by increasing pull-ups.
- Cleaned with IPA and fitted into 3D-printed enclosure.
Electrical Design
Building logic from scratch taught me:
- The real impact of fan-out limits on voltage levels.
- How timing skews arise in ripple counters.
- Why integrated logic is so pervasive—so many transistors cram into each IC!
Software Design
- Logic Style: RTL NAND gates built from NPN transistors + pull-up resistors.
- Flip-Flops: D-type, edge-triggered on the falling edge of the clock.
- Counter: Three FFs in series → ripple counter.
- Clock: Manual push-button, hardware-debounced.
Assembly and Testing
Building logic from scratch taught me:
- The real impact of fan-out limits on voltage levels.
- How timing skews arise in ripple counters.
- Why integrated logic is so pervasive—so many transistors cram into each IC!
Finished Design
Building logic from scratch taught me:
- The real impact of fan-out limits on voltage levels.
- How timing skews arise in ripple counters.
- Why integrated logic is so pervasive—so many transistors cram into each IC!
Conclusion
Building these LED Smart Glasses was...
- The real impact of fan-out limits on voltage levels.
- How timing skews arise in ripple counters.
- Why integrated logic is so pervasive—so many transistors cram into each IC!