Abstract: Musical sound and visual light are considered to be
amongst the most enjoyable input signals that the biological sensory system can detect. Music and light have the ability to enhance or depress an environment. For this reason, the synchronization of music and light has become ever prevalent in our technologic society. The proper combination of these two electromagnetic waveforms creates the unique ability to manipulate the tone of an environment. With the use of a programmable microcontroller and sound sensor, we have created a system that emulates the audio/visual experience one has when at a concert, as they listen and see the on stage performance. I. INTRODUCTION
LEDs have become an integral part of the music and entertainment industries, and are widely used today by some of the most famous DJs in the world to boost their stage performances. Synchronized music and lighting can control the mood of an audience, and enhances the effects of the music. Humans are visual creatures; therefor adding a visual element to an already amazing audio experience can really transform the musical experience. The goal of this project was to design and build a sound activated light system that would essentially flash to the beat of whatever music is being played within its vicinity.
The motivation for this project was to create a prototype that would demonstrate the concept behind sound activated light shows seen at popular concert events. Our system works by listening for a certain frequency threshold, and then sending a signal to the microcontroller on our board once that threshold frequency is detected. The control of the system was designed around the basic if-else logical statement. The output of our system is the 4 LEDs on the LPC1758 SJSU CMPE Development Board, along with an external El wire, which we used for additional lighting and mood enhancement effects. The external sound sensor used is rated to operate on 5V, but the LPC1758 SJSU CMPE Development Board only supplies 3.3V when connected to USB, therefore an additional power source was used, along with other electrical control components such as: a DC to AC converter, a voltage regulator, and a logic transistor (used as a switch). The complete design is a bit more
complicated than we had initially expected, although necessary to achieve the results we set out to achieve. Our team used a USB microcontroller development board to load our program onto the board.
II. DESIGN METHODOLOGY
The LPC1758 SJSU CMPE Development Board was programmed to work in sync with an external Parallax sound impact sensor. This particular sound sensor requires a 5V power supply to turn on and function properly. Since the LPC1758 SJSU CMPE Development Board is powered by a USB connection, only 3.3V of power is supplied to the board, meaning some additional power needed to be supplied for the 5V sound sensor. To properly power the sound sensor, an additional 9V battery was designed into the system, as well as a 5V voltage regulator to drop the power down to the specified 5Vs. The Parallax sound impact sensor works by sending a single bit active-high output signal whenever a certain frequency threshold is detected by its on board microphone. This particular sensor was chosen for two main reasons. The first reason was because it has a built in series resistor that made it compatible with the 3.3V microcontroller that is built into the LPC1758 SJSU CMPE Development Board. The second reason was because it features a potentiometer that could be manually adjusted in order to make the sensor signal a high output at our desired threshold.
Parts List
LPC1758 SJSU CMPE Development Board Parallax sound impact sensor 3V El wire 3V El inverter 5V Voltage Regulator Small breadboard Logic N-Channel MOSFET transistor 9V Battery Solid copper wire Stranded copper wire
CmpE 30 Lab Final Project: Sound Activated LEDs & El Wire <Melissa Ortiz, Kyle Soder> - <008823256, 008768903>, CmpE 30 Spring 2014, Lab Section 03 Page 2 of 6 A. Schematics *** Fully drawn and labeled figure may be seen at the end of the report, please refer to appendix C.
III. TESTING PROCEDURES
1. Step one. Draw schematic of board and connections on paper. 2. Step two. Logically step through the schematic to make sure the correct connects are made. 3. Step three: Check program for any errors in Hercules. 4. Step four: Load the program onto the board via Hercules and check for power. 5. Step five: Allow for test to idle-no noise. Hercules should display a statement declaring that all LEDs and EL wire are off. 6. Step 6: Introduce a high frequency noises to confirm that Parallax sound impact sensor is working. Hercules should display a statement declaring that all LEDS and EL wire has been activated. 7. Step 7: Play music and adjust threshold on sensor accordingly.
IV. TESTING RESULTS
Many difficulties arose throughout the course of this project. Incorrect connections were the main problems, which restricted the proper flow of current to each component of our design. Consequently, this led to many complications that were not easily detected. During the first round of testing, the Parallax sound impact sensor seemed to work flawlessly; however, none of the LEDs or the EL wire lit up. This made it difficult for the group to determine if the code we wrote was working properly. To troubleshoot this issue, printf statements were added into the program to produce on screen verifications of what lines of code were actually being executed.
After editing the code, and rewiring the board, we began testing again. During the second round of testing, a new issue arose. We discovered that upon adding voltage to the board, all 4 LEDs and EL wire immediately light up, and remained lit, without an initial sound activated high output signal from the parallax sound sensor. To troubleshoot this issue, we again added printf statements to the code, and then ran the program through the Hercules software. This time we found the code to be stuck in an infinite loop. Puzzled by this, we decided to test the code in a stepwise fashion. In doing this, we discovered each individual line of code in the program worked as expected, which meant the problem had to be related to the hardware components of the project.
To find where this problem was, the group referred back to the original schematic drawings, and eventually realized we had issues with the wiring. The first issue came from improper grounding of the external components, and the second issue came from a hole in our circuit. Somehow we had failed to fully connect to all pins of our transistor. After properly wiring the transistor, and correctly grounding all components, all issues were resolved, and the system worked perfectly.
V. CONCLUSION
This project was meant to demonstrate the concept behind large-scale light shows. To a certain extent this was achieved with success; however, the restricted time period in which we were able to work on this project ultimately caused us to greatly simplify our design. The system we created responds to only a single frequency threshold. However, a typical song incorporates a wide range of sound frequencies, which is essentially too dynamic for our system to handle. Nonetheless, this project does effectively demonstrate a proof of concept, and can easily be scaled up to create more intricate light shows, such as those seen on professional stages.
Throughout the project we experience several set backs, and frustrations. In fact, one of the most important skills we learned from this project was how to deal with frustration. This project involved a tremendous amount of troubleshooting and evaluation before we got it to work properly. This project also extensively tested our critical thinking abilities, and our willingness to persist through difficult times. In the end, we did achieve our goal, and the performance of our system was exceptional.
The purpose of this code is to allow our EL Wire and 4 LEDs on the board to respond to the high and low sound frequencies of music.
*/
int main(void) { while(1) // Infinite Loop { GPIO pin20(P1_20); //Declaring that the SIG Port on Parallax Sound Impact Sensor is connected to GPIO 20 pin20.setAsInput(); /* Using Pin 20 as INPUT */
GPIO pin23(P1_23); // EL WIRE Connected to GPIO 23 pin23.setAsOutput(); /* Pin 23 Set as OUTPUT */
if(pin20.read()) // Determining if the Parallax Sound Sensor is picking up High or Low sound frequencies { LE.setAll(15);22 pin23.setHigh(); //Turn on voltage to 3.3v
f // Turn on all LEDs on the board // Turn on EL wire
printf("All LEDs and EL wire have been activated \n");
// printf statement is a check for the program. While using Hercules, this statement should pop up when a high frequency sound has been detected. } else { LE.setAll(0); pin23.setLow(); // Turn off voltage to 0v
Page 4 of 6 // Turn off all LEDs on the board // Turn off EL wire
printf("\nAll LEDs and EL wire have been deactived\n");
// The seconf printf statement is a second check for the program. While using hercules, this statement should pop up when there is no sound-or a low frequency sound. }
delay_ms(50); // 50 millisecond delay in before the infinite loop restarts