TOM BEDFORD: PART 1: 3 WEEK ARDUINO MUSIC REACTIVE LED PROJECT

I started off the project by researching into the thousands of things that can be done with Arduino’s, including scouring youtube for inspiration:

AND was taken in by this project, a liquid life-bar for video games using led’s and water:

And also videos like, sound reactive led’s:

I now wanted to combine water and music in one entertainment system.

I began to research into audio and water set up’s in Arduino:

http://www.instructables.com/id/Arduino-Audio-Input/

http://www.instructables.com/id/Arduino-Frequency-Detection/step2/Mid-Point-Detection/

http://www.princetronics.com/sound-sensitive-lights-w-sound-sensor-arduino/

Water solenoids

https://www.youtube.com/watch?v=yLEu80HYElE

This princetronic post was a huge help in creating my first 3 week project using extracts from the code and the authors knowledge of Arduino.

I search for the most suitable components required to make the rig for sound reactive led’s, as I wanted this to be goal at the end of the 3 weeks, to have the led’s reacting to the music and then move on to use water.

Before the mic arrived I used a photoresistor as an analogue read to get to grips with the code shown here:

https://www.youtube.com/watch?v=eFMF-Vcs8yU

I bought this sound sensor from sparkfun which with the use of the useful setup guide helped me learn about adjusting the gain and which type of signal I wanted to read from the microphone, digital or analogue as well as the three signals that could be read from the mic I wanted the envelope signal which gave the most accurate interpretation of the sound as the gate signal was too simple (on/off) and the voltage signal simply went and down with the sound, where the envelope signal mapped the sound Decibels (Db) closely.

https://www.sparkfun.com/products/12642

I also wanted to use RGB led’s to get changes in light with the volume of the music in Db.

https://learn.adafruit.com/adafruit-arduino-lesson-3-rgb-leds/arduino-sketch

How they work:

http://www.instructables.com/id/RGB-LED-Tutorial-using-an-Arduino-RGBL/step2/Testing/

Unfortunately due to other projects becoming increasingly pressured. I was unable to integrate these into the rig before presentation, I did however research into how it’s done and bought them :-/

When the mic arrived I used the code provided by sparkfun to get to grips with its sound calibration:

https://www.youtube.com/watch?v=kFlaOjMuPh8

I then used the mic with one led reacting to music first:

https://www.youtube.com/watch?v=iBaj-fymyAw

Then 7 led’s with sound reaction.

https://www.youtube.com/watch?v=4RWXTNc0wCA

The final result did not turn out as well resolved as hoped and I would have liked to have created more an alluring surround to the little entertainment system, but ran out of time.

Here is the final code I used for the part 1 VU meter.

int DA = A0;

int noise = 16;

int sensorvalue = 0;

void setup()

{

pinMode(3, OUTPUT);

pinMode(4, OUTPUT);

pinMode(5, OUTPUT);

pinMode(6, OUTPUT);

pinMode(7, OUTPUT);

pinMode(8, OUTPUT);

pinMode(9, OUTPUT);

}

void loop()

{

sensorvalue = analogRead(DA);  //Read the analog value

if (sensorvalue >= noise) { //Compare analog value with noise

digitalWrite(3, HIGH);

digitalWrite(4, HIGH);

digitalWrite(5, HIGH);

digitalWrite(6, HIGH);

digitalWrite(7, HIGH);

digitalWrite(8, HIGH);

digitalWrite(9, HIGH);

}

else

{

digitalWrite(3, LOW);

digitalWrite(4, LOW);

digitalWrite(5, LOW);

digitalWrite(6, LOW);

digitalWrite(7, LOW);

digitalWrite(8, LOW);

digitalWrite(9, LOW);

}

}

Here is a video of the Final part 1 sound detector working to drumming.

https://www.youtube.com/watch?v=e5KcaMxBIIE

The link below takes you to me to my youtube page where all of the mini projects I have enjoyed playing around with, to learn about the hardware and software can be seen.

Everything from simple blink through to photo resistors and servo’s

https://www.youtube.com/channel/UCcb2CXKREnnwzlobvPuQi0Q?view_as=public

The learning about microphones and frequency helped me progress quickly through the audio stage of the part 2 project.

At the end of the 3 week submission I found this interesting video on ‘’Cymatics’’ and sound vibration with water and small granules.

https://www.youtube.com/watch?v=Q3oItpVa9fs

Which inspired me to make a project based around a resonance tray and use the sound sensor with it with led’s.

https://www.youtube.com/watch?v=wvJAgrUBF4w

Unfortunately I did not take it forward as it would have been unsuitable as the frequencies required to produce grain patterns would require a versatile speaker and amp as well as making unbearable noise for listeners. :-/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s