Introduction: Music Sync Flashing LEDs (Arduino & MSGEQ7)
I am a novice in the world of Arduino, but I thought I would try my hand in something a bit more intricate than turning on an LED light. I decided to use a MSGEQ7 (spectrum equalizer) and an Arduino Uno to flash an LED strip in sync with music.
Step 1: Gather Material
Here's a list of materials needed to complete this project and few links to where I purchased the supplies from:
1 - Breadboard
1 - 12V 5A power supply
1 - LED strip (This link also has a 12V 5A power supply)
1 - Audio Jack
3 - 10k resistors
1 - 220k resistor (or 2 - 110k resistors in series)
1 - 33pf ceramic capacitor
2 - 100nf ceramic capacitor
1 - 10nf ceramic capacitor
1 - Arduino (I used an Arduino Uno)
1 - 3.5mm audio cable
1 - MSGEQ7
3 - N-channel MOSFET transistors
1 - Speaker
1 - Computer with Arduino Software Installed
A LOT of male - male jumper cables
NOTE : I did a lot of research before beginning this project, I found a few alternatives that people used for this project -- TIP120 transistor over MOSFET transistor. Arduino MEGA over Arduino Uno.
Step 2: Understanding the MSGEQ7
The image above is a circuit diagram for a MSGEQ7. This will help with setting up your circuit.
Step 3: Creating the Circuit.
The wiring can be confusing; make sure you have a color system you understand before you start. Follow the schematic above to set up your circuit. Personally, I start with the MSGEQ7 and capacitors, and work my way out.
Remember to connect your 12V 5A power supply to the Arduino!
Step 4: Time for the Code!
Between researching other instructables and a billion Arduino Forums I have found a code that works. I used David's code; I only changed a few things so that it would work for my purposes. You can find the original code here. If you haven't already, make sure to download and install the Arduino Software, open the file in this step, upload to your arduino, and Viola!
7 Comments
Tip 3 years ago
just a tip if you are using N channel Mosfets you dont need a resistor at the PWM outputs only if you are using NPN transitors
4 years ago
.I have problem with this setup, everytime I connect the 3.5mm aux to the computer I am getting random buzz from the extrenal speaker and the led strip blinks itself with that buzz without any music
6 years ago
It's not viola (raped in french) but voila !
Reply 6 years ago
Actually, that would be 'violer'. Viola is just an instrument.
Reply 6 years ago
Thanks for the correction!
6 years ago
same like mine.. but i make it IoT..
https://www.instructables.com/id/Lumen-Histoire-IoT-App/
6 years ago
These are fun ) I'd love to set them up to Christmas music!