The Final Hurdle

Here are some pictures and video of the project it it’s (almost) final states.

20141211_213503 20141211_213512
20141211_213451 20141211_213517
And a video of the visualiser in action:
Advertisements
Standard

Coding the Display

The point of the display was to take music and visualise this on the LED matrix.

The easiest way to do this, was to transfer data via a serial connection from a PC to the Arduino. Therefore Processing was used load, play and analyse the song and then transmit the data to the board. Processing analyses the music using a minim library, a Fast Fourier Transform (FFT) is performed on the songs features and it is the output of this as a byte that is transferred to the Arduino, some code was acquired from the instructable at http://www.instructables.com/id/Arduino-Processing-Audio-Spectrum-Analyzer/ to perform the FFT correctly.

However as the hardware components were different, different Arduino code was used. This was done from scratch. There are several components to it. Also initially the Arduino Uno was to be the preferred Arduino to use however it appears that it did not have sufficient memory to cope with two arrays and the screen would just display artefacts unrelated to what was required therefore and Arduino Mega2560 was used.

There are two methods for drawing either a visualiser or a circular display. However both use the same values in different manners. The visualiser display take each FFT transform value it receives (maximum of 16) and loads these values into an array. Then each elements in the array is used to determine the height of the line it is required to draw to the matrix, each position in the array corresponds to how far across the display the line should be drawn, two lines are drawn for each element. The circular visualisation simply uses each value as a radius. The colour of the circle is randomised for each loop.

A push button is used to switch between the visualisations. To enable smooth switching between visualisations an Interrupt is attached to pin 2 on the Arduino, such that the array loops can be exited as without this the user would have to press the button at precisely the correct moment to switch visualisations.

Arduino Code (.ino)
Processing Code (.pde)

Standard

Testing the components

So now that we have all our parts, we decided to test them out to see if they work. We tested the LED matrix panel by wiring it up to the Arduino Mega by using these tutorials:

We connected a 5V 2A power supply to it in labs. For some odd reason, the panel wasn’t working. Not sure if this is due to the power supply or if the wires aren’t in the right place. We’ve taken all the wires out and reconnected but it’s still not working. We’ve ordered a generic UK 5V 2A power adapter so once that’s arrived we’ll resume testing. We’ll try testing it on the Uno too to make sure it isn’t just the wiring on the Mega.

  • Generic UK 5V 2A power adapter: http://www.amazon.co.uk/exec/obidos/ASIN/B00DJ4UFCC/ref=ox_ya_os_product
Standard

Parts have arrived!

So after 2 weeks of waiting, 3 UPS failed attempts at delivery and a £23.95 charge for additional duty… our parts have finally arrived! The sound shield is in pieces so we have to solder all its components on. Other than that, everything else looks like it’s good to go!20141203_173732[1]

Standard

Getting started

So we’re making a sound visualizer, woo hoo! We’ve just ordered our parts for our project, including an Arduino Mega and an LED matrix panel, which should hopefully reach within a week. The list of the components that we’ve ordered is below, including the prices and links.

In the meantime, we’ll get started on creating a prototype with an Arduino Uno and a couple dozen LEDs, creating a program to take sound waves as an input and have a cool LED pattern display as an output, as well as the music itself through speakers.

Standard