Blinking LEDs To The Frequency of Musi

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Food Living Outside Play Technology Workshop

Blinking LEDs to the Frequency of Music


by dwang4 on November 17, 2013

Table of Contents

Blinking LEDs to the Frequency of Music . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Intro: Blinking LEDs to the Frequency of Music . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 1: Materials Needed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 2: Setting Up the Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Step 3: Setting Up the Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Step 4: Good to Go! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

http://www.instructables.com/id/Blinking-LEDs-to-the-Frequency-of-Musi/
Intro: Blinking LEDs to the Frequency of Music
Hey guys, in this tutorial I will be showing you exactly how I set up my Arduino board to take a standard audio input and then flash a set of LEDs based on the frequency
of the music playing.

Here's a short video of it in action:

YouTube

Step 1: Materials Needed


Here's a list of what materials you need and where to get them:

Note: I'm a big fan of Tayda Electronics, as their materials are very cheap and they usually post 15% off discounts on their Facebook Page.

1 x Breadboard
1 x 12V 5A power supply
note: this depends on how long you want your LED strip to be, I find that 5A is plenty for 5 meters, it could probably even handle more since you'll be fading between
colors instead of having everything on maximum. Here's a look link to how I figured out the current draw: link
1 x LED strip (waterproof and nice 1M long strip here , super cheap and ok-quality 5M here )
1 x Audio Jack
3 x 10k resistors
1 x 220k resistor
1 x 33pf ceramic capacitor
2 x 100nf ceramic capacitor
1 x 10nf ceramic capacitor
1 x Arduino (I used a sparkfun-branded RedBoard , but an Arduino Uno would work fine
1 x 3.5mm audio cable
1 x MSGEQ7
3 x N-channel MOSFET Transistors
Many x male to male jumper cables

Computer with Arduino Software Installed

Image Notes
1. 12V 5A Power
2. Headphone Splitter
3. LED Strip
4. Breadboard
5. Male to Male Jumper Cables
6. Arduino
7. Audio Jack
8. Ceramic Capacitors
9. Resistors
10. MOSFET Transistors
11. MSGEQ7
12. 3.5mm male to male audio cable

http://www.instructables.com/id/Blinking-LEDs-to-the-Frequency-of-Musi/
Step 2: Setting Up the Circuit
Look at the attached picture for details. I used a combination of:

The RGB LED strip tutorial from Adafruit

The MSGEQ7 tutorial from skoba

I also attached my Fritzing file if you want to look at it.

Step 3: Setting Up the Script


I attached my script, let me know if you have any trouble with it. It's pretty straight-forward. Upload it to your Arduino and you should be good to go!

Here's also a pastebin of my code:

http://pastebin.com/wsHFADWe

File Downloads

msgeq7-led-code.ino (1 KB)
[NOTE: When saving, if you see .tmp as the file ext, rename it to 'msgeq7-led-code.ino']
Step 4: Good to Go!

Related Instructables

How to Make an Arduino/Ableton How to Make


LED Ambient Color Organ; LEDs Flash to
Mood Light: A MIDI controlled Music with an Arduino PWM Easiest Way To Sophie's Music
Beginner (video) by _Aias Arduino by music LED Sync LED's Box, Light Show
Tutorial by Light by With Music by and Jewelry
Hyrulian
elevenbytes mysterion landonairey Box (Photos) by
craiglindley

http://www.instructables.com/id/Blinking-LEDs-to-the-Frequency-of-Musi/
Advertisements

http://www.instructables.com/id/Blinking-LEDs-to-the-Frequency-of-Musi/

You might also like