LED Music

Description:

As a college kid, I loved putting up LED lights in my room. I wanted to upgrade these LEDs and take the experience to the next level. My goal for this project was to make the LEDs light up based on the frequency of the music playing in my room.

Using a Raspberry Pi Zero and a MIC+ header as a microphone, a python program was written to analyze the audio data being played in a particular room. The program ran the Fast-Fourier Transform (FFT) algorithm on the audio data to split the audio into its respective frequencies. From the analysis of the FFT, the strongest frequencies were able to be identified for a particular time step. Certain colors within the RGB LED were present based on which frequencies were strongest in a present time step. Red was linked to the bass, green was linked to mid-range frequencies, and blue was linked to higher frequencies. 

There are four wires present within the LED strip. A 12-volt power line and three ground wires for each RGB LED color. These ground wires were cut and hooked up to three NMOS transistors which were connected back to the Raspberry Pi. The Raspberry Pi then sent PWM signals to the base of the NMOS transistors, which ultimately controlled the brightness of each LED color at a particular timestep.