Arduino LED Audio Spectrum

31,871

241

32

Published

Introduction: Arduino LED Audio Spectrum

About: Youtube: http://www.youtube.com/user/s293pqrn

This is a guide using Arduino Uno to display the audio waveform of your music using a matrix of LEDs (Light emitting diodes).

Step 1: Gathering Your Materials

This is a list of all the materials you will need

1. Arduino Uno (or cheaper alternative)

2. Spectrum Shield (you may have to buy headers and solder them on yourself)

3. A Solder-less Bread Board

4. Wood or 3D Filament

5. Solder

6. A bunch of Wires

7. LED's and Resistors (I used these, The number of LED's may vary depending on how many rows and columns you want)

Step 2: Gathering Your Tools

It is important to use the right tools! This is a list of the tools you will need

1. Wooden Block

  • 1. A drill
  • 2. A 3/16 Drill Bit
  • 3. Some type of saw to cut the wood (I used a round-saw)
  • 4. Two clamp bars (optional: to hold down wood)
  • 5. A right angle ruler to measure the wood (ruler will work)
  • 6. A pen to mark the wood

OR

1. Plastic Block

  • 1. A 3D Printer

2. A Soldering Iron

3. long nose Pliers (To easily bend wires while working with soldering iron)

4. Wire Strippers/cutters

5. And of course a computer to program the Arduino using the Arduino Software

Step 3: Block

In this guide I will be making a 7 by 5 LED Matrix

7 columns, 5 rows = 35(7 * 5) LEDs and 12(7 + 5) pins

The more columns and rows you put into your matrix: the more pins you will need.

For this project there are 13 available pins so the sum of your rows and columns should not exceed 13.

Each LED should be 15mm apart from each other to ensure easy soldering

The matrix will be 90mm by 60mm we will add a 40mm margin to all sides

Wooden Block

  1. So cut a piece of wood out that is 170mm(17cm) by 140mm(14cm)
  2. Now using a ruler and a pen draw the 90mm by 60mm grid
  3. Drill a hole through each point using the 3/16 drill bit
  4. after you drill you may want to sand it down
  5. You can paint or stain the wood (I stained mine to give it a darker color)

Plastic Block

  1. Download and 3D print this STL model: https://www.thingiverse.com/thing:2865701

Step 4: LED Matrix



1. Flip your block of wood over and put an LED in each hole place each LED so that the ground pin is directed toward the bottom left corner of the wood piece.
2. Bend each ground pin straight down, make sure the ground pins are not overlapping any power pins.
3. Now bend all the power pins to the right
4. Solder all the ground pins together
5. Bend the power pins so they will not touch the ground pins and solder them together.
6. Double check to make sure no ground pin is touching a power pin!
7. If you are using hook up wire like I am, cut and strip wires for each row and column long enough to reach the Arduino
8. Solder the wires together

Step 5: Connecting Your LED Matrix to Your Arduino

  1. Connect your Spectrum Shield to your Arduino
  2. Connect row 1 wire to digital pin 6 and row 2-5 wires to Analog pins 2-5
  3. Connect columns 1-7 to the breadboard through resistors and to the Arduino digital pins 7-13
  4. Run this code to make sure all of your LEDs work, I had to swap some out

  5. Run this code I made using Multiplexing to light up to audio

Step 6: Playing Music

Use an auxiliary cord to connect your shield to any device that has an aux jack(smart phone, computer, ipod, etc)

Then use another auxiliary cord to output to speakers or plug in headphones!

I have the older DEV-10306 - Spectrum shield so both my auxiliary jacks can be used as input or output.

The newer model should specify which aux jack is input and output on the board.

You can use a 9v battery and take the LED matrix anywhere!

Share

Recommendations

  • Make it Move Contest

    Make it Move Contest
  • Clocks Contest

    Clocks Contest
  • Woodworking Contest

    Woodworking Contest
user

We have a be nice policy.
Please be positive and constructive.

Tips

Questions

I’ve run the spectrum code but it’s lightning up even when music isn’t playing, and when it’s plugged in, the waves don’t match the music, what do you think the problem is?

32 Comments

Are the other leds getting power bled over to them or is light bleeding over? Noticeable when one line spikes high then a few leds in the nearest line look to be slightly lighting up.

Hey there, this project looks awesome! I plan on using it to put the spectrum display in between two speakers in a custom box. The tutorial is very thorough, but I am missing one thing. What value resistors did you use? Thanks!

1 reply

I used 200 ohm resistors

Hi, I have followed your tutorial 100%. I have made everything, connected everything and copied your code in my software. Though nothing happends. My leds only light up and dont respond to the music I play through my laptop. I need help

Hello,

i have the Problem with the LEDs. I don´t have started the music, but the first 2 rows are lighten up and go on and off. When I started the Music then it works only the 3 rows above very well. (Sorry for my bad Englisch) I hope you can help me.

Has anyone tried making this with RGB LED's? Would be awesome.

1 reply

That would be cool I've been looking into doing just that. You would need more pins and would have to use shift registers!

Hi, I am making this project for a class but i've run into a few difficulties. I've created the matrix and it receives power the problem I have with the matrix is that for the row that goes into digital 6 doesn't light up when i run the test code. But it lights up if i put it in another digital pin such as digital pin 3. Should I switch it and put it in the 3 instead? Also when i run the audio code all the LEDS come on with no movement is there something I can change to fix that?

1 reply

Hi! I am unsure what is causing row 6 to not light up! By all means use pin 3 if 6 isn't working. If all the LEDs come on when playing audio that may mean that your audio might be too loud. Try changing the hard coded numbers in the if statements in function void spec(int col, int height) to larger numbers

if (height > 73) // change 73 to some bigger number

{ // you can use the serial monitor to find the minimum number for first row

digitalWrite(rowpin1, HIGH);

}

I recommenced you watch the video in step 5

Great job!!!! Thanks for sharing. I'll do it for my bedroom in a big scale.

iw noticed that your shield has Soldered audio in L G R, i have new shield so im curious if i have to do it to, if so, how? :) also iw noticed that you use Solder-less Bread Board but in step 6 you connected directly (when you put it in your EQ box) why so? :)

12511128_887206031399156_1514823072_o.jpg
2 replies

When I got the shield I had some old speakers laying around so I used the LGR pins to connect them directly. It turned out those speakers weren't very good so I decided to use the auxiliary output instead. You won't have to use LGR.

I had made two models the first was the version with the breadboard the second I tried to make like a "finished product" and soldered the resistors and wires on directly so I could use the other wires and breadboard for other projects.

cool mate, thanks for reply, i should get missing parts tomorrow and start the project! :)

has anyone done this project and actually works?

I
did this project and the code provided doesnt make the design shown on
the video, the leds just goes up and down, it doesnt get split by
frequencies

I have tried a lot of things to fix the code but i cant get it to look like that

3 replies

It works. However the code can be tricky I'm going to make a video explaining the code and multiplexing when schools out during winter break you want to make sure that all your leds work and that no row wires are touching column wires

yea I tested the leds by using the 7x5test code and all the leds turn on ,so that means they all work, I even bought the same leds you did. And i triple checked the row wires are not touching column wires i even put those little tubes that are left when you strip a wire to protect them

It might be the volume levels try turning the volume up or changing values in the spec function

I just put up a video in step 5 along with a schematic check it out it may help

The song is Shark by Oh Wonder (Illenium Remix)

Thanks so much for letting me know

Jonathon