| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Stop wasting time looking for files and revisions. Connect your Gmail, DriveDropbox, and Slack accounts and in less than 2 minutes, Dokkio will automatically organize all your file attachments. Learn more and claim your free account.

View
 

Curtis Ryan Final Project

Page history last edited by Ryan Curtis 5 years, 2 months ago

Ryan Curtis

EE  47 - Summer 2015

Final Project Documentation

 

Point of View

My design point of view for the project is a way to enjoy music visually both as calming lights to study to and flashing to set the mood for a party or just hanging out with friends. The design of a cube would appear simplistic and meant to sit on a table. By using the frequencies in the music to be translated into a color it allows for increased enjoyment of the art in another form as well for pure entertainment of watching the LED's beat to the music. Because the best results using the LED visualization is with pop and rock music rather than slower music, it is targeted towards teenagers and students like myself.

 

Verplank Diagram

 

State Diagram

 

Paper Prototype

Breadboard Prototype

Perf Board Prototype

 

Parts List

 

1 Arduino Micro

1 MSGEQ7 Graphic Equilizer Chip

1 Speaker

4 Red LEDs

4 Yellow LEDs

4 Green LEDs

4 Blue LEDs

8 470 Ohm Resistors

4 1000 Ohm Resistors

4 TIP 120 transistors

1 Audio jack

4 .22 uF capacitors

1 33 pF

1 .1 uF

1 Button

1 180 ohm resistor

1 Superbright LED

1 10k Ohm Resistor

1 8-pin socket

 

Project Code

 

int analogPin = A0; // read from multiplexer using analog input 0

int strobePin = 2; // strobe is attached to digital pin 2

int resetPin = 3; // reset is attached to digital pin 3

int spectrumValue[7]; // to hold a2d values

int highSounds = 6; // corresponds with the high range of the audio file

int midSounds = 7; // corresponds with the medium range of the audio file

int lowSounds = 5; // corresponds with the low range of the audio file

int bassSounds = 4; // corresponds with the bass range of the audio file

 

const int buttonPin = 12;     // the number of the pushbutton pin

const int ledPin =  13;      // the number of the LED pin

 

int buttonState = 0;

void setup()

{

 

  Serial.begin(9600);

 

  pinMode(ledPin, OUTPUT);

  pinMode(buttonPin, INPUT);

  pinMode(analogPin, INPUT);

  pinMode(strobePin, OUTPUT);

  pinMode(resetPin, OUTPUT);

  pinMode(highSounds, OUTPUT);

  pinMode(midSounds, OUTPUT);

  pinMode(lowSounds, OUTPUT);

  pinMode(bassSounds, OUTPUT);

  analogReference(DEFAULT);

 

  digitalWrite(resetPin, LOW);

  digitalWrite(strobePin, HIGH);

 

  Serial.println("MSGEQ7 test by J Skoba");

}

 

void loop()

{

  buttonState = digitalRead(buttonPin);

  if (buttonState == HIGH) {

    // turn LED on:

    digitalWrite(ledPin, HIGH);

    digitalWrite(bassSounds, LOW);

    digitalWrite(lowSounds, LOW);

    digitalWrite(midSounds, LOW);

    digitalWrite(highSounds, LOW);

 

  } else {

    digitalWrite(ledPin, LOW);

    digitalWrite(resetPin, HIGH);

    digitalWrite(resetPin, LOW);

    for (int i = 0; i < 7; i++)

    {

      digitalWrite(strobePin, LOW);

      //delay(30); // to allow the output to settle

      spectrumValue[i] = analogRead(analogPin);

 

      /* determines what the value of the bass is, and how to 

       display it to the led for bass by using a map and then 

       analogWrite function.

       */

     if (i == 0) {

       //int bassValue = map(spectrumValue[i], 200, 900, 0, 255);

       int bassValue = map(spectrumValue[i], 0, 1023, 100, 255);

       analogWrite(bassSounds, bassValue);

       //Serial.print(bassValue +"   ");

     }

 

 

 

  /* determines what the value of the mid range is, and how to 

       display it to the led for bass by using a map and then 

       analogWrite function.

       */

 

      else if (i == 2) {

       //int lowValue = map(spectrumValue[i], 200, 900, 0, 255);

       int lowValue = map(spectrumValue[i], 0, 1023, 0, 255);

       analogWrite(lowSounds, lowValue); 

       //Serial.print(lowValue +"   ");

     }

 

  /* determines what the value of the high range is, and how to 

       display it to the led for bass by using a map and then 

       analogWrite function.

       */

 

 

      else if (i == 4) {

       //int midValue = map(spectrumValue[i], 200, 1000, 0, 255);

       int midValue = map(spectrumValue[i], 0, 1023, 0, 255);

       analogWrite(midSounds, midValue); 

       //Serial.print(midValue +"   ");

     }

 

     else if (i == 6) {

       //int highValue = map(spectrumValue[i], 200, 950, 0, 255);

       int highValue = map(spectrumValue[i], 0, 1023, 0, 255);

       analogWrite(highSounds, highValue); 

       Serial.print(highValue +"   ");

     }

 

 

      if (spectrumValue[i] < 10)

      {

        Serial.print("    ");

        Serial.print(spectrumValue[i]);

        //delay(10);

      }

      else if (spectrumValue[i] < 100 )

      {

        Serial.print("   ");

        Serial.print(spectrumValue[i]);

        //delay(10);

      }

      else

      {

        Serial.print("  ");

        Serial.print(spectrumValue[i]);

        //delay(10);

      }

 

      digitalWrite(strobePin, HIGH);

    }

  Serial.println();

  }

 

Video Demo:

http://youtu.be/NyhjoyGNDmA

 

Challenges:

During the process the biggest challenge was making a secure connection on the perf board with the MSGEQ7 chip because of the short leads. This issue was solved by incorporating a socket for a more secure connection. 

 

Extensions:

If I had more time to work on the project, I would add an audio amplifier with volume control buttons. I also want to replace the power cord with a battery and an on-off switch.

 

References:

http://pressplay.pbworks.com/w/page/68312750/CameronSteinfeld_FinalProject

https://www.sparkfun.com/datasheets/Components/General/MSGEQ7.pdf

http://pressplay.pbworks.com/w/page/41203030/Graphic%20Equalizer%20Display%20Filter%20(Sound%20analysis) 

 

Comments (1)

David S said

at 1:59 pm on Aug 18, 2015

Your point of view is straightforward, describes your initial concept well, and makes your design intent clear.

Regarding your Verplank diagram, the metaphor of a disco ball is apt, and, maybe a little too close to the actual idea. The thing about metaphors is that they’re often most informative when they’re from a domain very different from that of the project. For example, a disco ball is already a music visualizer of sorts. What other products bring more senses to the enjoyment or use of a product? Maybe the music soundtrack for a movie? Or haptic vibration for a phone ringer?

We like your state diagram: it seems to pretty accurately reflect the states that your device operates within. Also, the paper prototype seems like a good exploration of possible device housing design. It looks like you were initially considering having the device be a music player as well. It would be good to read what factors led you to change you mind: ability to fit features within your housing, availability of components, time to complete additional tasks?

We wish that you had included a circuit diagram, or a simple mechanical schematic, showing the arrangement of interface elements, such as buttons: it’s not clear from the photos or video what the exact arrangement is, or how someone operates the device (other than powering and connecting to an audio source).

Your description of the short leads causing difficulty is interesting: was the challenge that the leads wouldn’t make contact with the lab’s female breakaway headers?

Overall, this is a nicely conceived and constructed project. It’s great that you took an acceptable risk purchasing and using previously unknown components (MSGEQ7 and TIP120) and that it worked out. Well done!

David, Dongao, Praveen, Samyuktha, Tian, Xiangyu, Zahra

You don't have permission to comment on this page.