Voice-Controlled LED Strip
Project Overview
The Voice-Controlled LED Strip is a 5-metre WS2812B addressable RGB LED installation driven by an ESP32 microcontroller. It listens for voice commands through an INMP441 I2S microphone and responds with instant colour and mode changes. A companion web interface (served directly from the ESP32) allows control from any phone or laptop on the same Wi-Fi network. Music-reactive mode uses real-time FFT to pulse the lights in sync with ambient sound.
Key Features & Implementation
- On-Device Voice Recognition: The ESP32's dual cores handle both the audio capture and LED rendering. Voice commands ("red", "blue", "rainbow", "music mode") are matched against a compact keyword set using amplitude-envelope pattern matching — no cloud API required.
- Music-Reactive FFT: The I2S microphone streams audio at 16kHz. An FFT library computes frequency bins 30 times per second. Bass frequencies drive brightness peaks while mid/treble control hue shifts, producing vivid beat-synced animations.
- Web Control Interface: The ESP32 runs a lightweight async HTTP server with a colour-picker page. Users can select any RGB colour, choose from 12 preset animations, and adjust brightness — all updating the strip within 50ms over Wi-Fi.
Challenges Solved
Driving 150 WS2812B LEDs at full brightness caused a voltage drop along the strip that shifted colours at the far end from white to yellow. Power injection points were added at every 50-LED interval, and a capacitor was placed at each injection point to absorb current spikes — resulting in consistent colour accuracy across the full 5-metre length.