Music-Synced Lighting with NeoPixel LEDs and WLED
Introduction
I worked on a hobby project to create a dynamic lighting system that syncs with the music playing on my PC. Using NeoPixel LEDs controlled by an ESP8266 running WLED firmware, the setup produces colorful and reactive light effects. The ESP8266 connects to LedFx over Wi-Fi, which analyzes the audio and sends lighting data in real-time.
Apart from sound synchronization, the setup also offers various pre-programmed light effects through WLED, making it a versatile and visually engaging system. In this blog, I’ll share my experience and explain how this project works.
Components and Tools Used
- Hardware
- ESP8266
- WS2812B 5V Addressable RGB Non-Waterproof LED Strip Light
- 5V - 3 Amph Power supply adapter
- Software
System Architecture
![[architecture.png]]
Component roles
- PC with LedFx software : Captures audio, processes it, and sends lighting data.
- ESP8266 with WLED: Receives data from LedFx and controls the LEDs.
- NeoPixel LEDs: Display light patterns based on the data received.
Setting Up the System
- Connecting NeoPixel LEDs to ESP8266:
Connect the data pin of the NeoPixel LED strip to the GPIO pin on the ESP8266 (default is D4 or GPIO2 in WLED).
Power the NeoPixel LEDs with an appropriate power supply (e.g., 5V DC).
Connect the ground of the LED strip to the ground of the ESP8266.
- Flashing WLED Using Web Installer:
Go to the WLED Web Installer in your browser.
Connect the ESP8266 to your computer via USB.
Follow the on-screen instructions to flash the WLED firmware onto the ESP8266.
Once the flashing process is complete, connect the ESP8266 to your Wi-Fi network through the WLED setup page.
- Configuring WLED:
Access the WLED interface by entering the ESP8266’s IP address in a browser or using the WLED app.
Set up the LED strip configuration (e.g., the number of LEDs and GPIO pin used).
- Integrating with LedFx:
Install LedFx on your PC.
Add the WLED device in LedFx by entering its IP address.
Ensure that the PC and the ESP8266 are connected to the same Wi-Fi network.
- Testing the Setup:
Play music on your PC and ensure that LedFx syncs the lighting effects with the NeoPixel LEDs.
Explore different effects in WLED to verify the standalone light patterns.