top of page

LED Music Visualizer

OVERVIEW:

​

        When given the opportunity to think of a final project, we wanted to create something that would not only be impressive but that would also challenge us to use all of the skills we have learned throughout the semester. We are all extremely into music and we realized that listening to music is even better when you can visualize it. Which led to the idea of creating an LED cube that turns on and off in respect to high voltage levels coming from a song or any ambient noise. If able to implement this, we could then use this project as a reference to create an even bigger project with the same concept.

​

        As a starting prototype, we decided to first begin with only using two 4x4 LED squares and attaching them to the sides of a box to create the idea of a cube. The box consists of small holes on its walls so that the heads of the LEDs can be exposed while all the wiring can be hidden inside the box. In addition, the box also has a hole on the back so that a switch could be placed and accessed from the exterior. All of the LEDs are connected in rows and columns which are activated (multiplexing) by individual pins from the Tiva C Series TM4C123GH6PM microcontroller. Also attached to the microcontroller is a Sparkfun sound detector that is the source of all our input voltage. The sound sensor provides binary indication of the presence of sound and an analog representation of its amplitude.

​

        The way for this project to work consists of various steps. Continuous varying input analog signals (voltage) are detected by the sound sensor which are then converted into discrete digital signals using a 12-bit Analog-to-Digital Converter (ADC). One of the great benefits of the Tiva microcontroller is that certain pins already consist of the ADC, reducing the need of having to purchase one. The discrete analog input levels can be seen on a watch window on the μVision program which allow us to determine at what levels do we want the rows of LEDs to turn on.

​

        With the requirement of having a minimum of two interrupt service routines (ISRs), we also included the feature of having a default LED setting. When the switch on the outside of the box is flipped, the LEDs begin to turn on in a snake-like pattern. Once the sequence comes to an end, it returns to its original setting of reacting to ambient noise. With all these features put together, we were able to construct our LED cube, also known as the Terminator LED Visualizer (T.L.V.).

IMG_1535.jpg

PROJECT DESIGN:

​

FLOWCHART

ENGR 478 Final.jpg

        The flowchart above displays an idea of how our TLV is operating. When we completed our implementations, we now had to verify that our LED visualizer worked properly and performed the desired tasks. We began by first letting it respond to a complete song to make sure that it would continue running for a long time, in which it did. Our ADC was working properly, so we now had to test whether our default LED setting triggered at the correct time. When flipping an external switch connected to the PF0 pin on the Tiva microcontroller, the snake-like pattern did indeed execute. However, we did realize that when we flipped the switch one way it would perform the interrupt once and when flipped the other way it would perform the interrupt twice. We’re not too entirely sure why this occurs as it is not shown in our code but assume that it might have to do with the switch component that we used since we originally tried it with a push-button and did not encounter that issue.

 

        We originally had the idea of creating a 4x4x4 RGB LED cube but unfortunately concluded that we would not be able to reach that level of complexity since there are not enough GPIO pins on the Tiva microcontroller. We would have to use transistors in order to do a three dimensional cube and with the time frame that we had, it would be extremely difficult to do so. With that being said, we decided to only implement two 4x4 squares and attaching them to the sides of a box to make it seem as it was a cube. Another issue that we noticed was that the top row of our red LED square seemed to be dim compared to the other LEDs. We troubleshooted to check for any short circuits and then debugged our code to see if it was a software problem. Everything seemed to look okay resulting in the assumption that the reason the LEDs are dim might be because they are not receiving enough voltage power. Besides those minor flaws, the project executed pretty well with a nice clean finish.

DISCUSSION:

​

Throughout the implementation of the project, we were able to pick up a few techniques and skills that furthered our knowledge of what it takes to get a project to work. For instance, we learned how to execute interrupt service routines which is very useful since we can use them for future tasks or projects. Additionally, we learned how to multiplex using LEDs and import data from an ADC converter. Furthermore, we were able to practice soldering skills especially when it came to soldering the rows and columns of LEDs. We had to make sure that none of the pins came in contact with each other to prevent any shorts.

​

If more time was allowed on this project, we would have implemented more ideas. These ideas include making the LED cube a 4x4x4 instead rather than a 4x4, adding additional patterns to the default setting, a possible 4 player interaction game using LEDs and switches, and lastly using transistors to reduce the number of pins used by half in order to do the 4x4x4 grid. Also, we would create a more advanced LED design such as adding glass rims for the LED heads in order to improve brightness, using RGB LEDs to allow various colors, and using a glass box instead of a cardboard one. The box would also be organized in a way to hide the TIVA microcontroller and wires in order to have a neat and clean finish.

 

By implementing a unique box, we would contain dedicated switches which would do various tasks. These task would contain turning the LEDs on/off, activating game mode, and selecting the LED patterns. Another function we would like to add would be solar panels so the cube could become portable and run on solar power. Overall this was a fun and exciting project to make and it challenged the team not only in developing something that we have never built, but also allowed us to use all the skills gained throughout the class and labs we have taken throughout the course.

 

HEALTH AND SAFETY CONSTRAINT

​

For our LED project, health and safety was not an immediate factor in our design for a few reasons. One of the biggest safety factors involves data storing which could be a big security risks. If we had more time to optimize our LED cube there would be no need to worry about data lost or data being stolen since our LED cube will not record or store any data collected from the ADC mic. sensor. The primary worry for our LED cube would include shock exposure. If something was to happen like LED blowing out or a short the system we would have a casing around the LEDs. A glass would be surrounding the cube protecting not only people from getting hurt but also help protect the LEDs and wires from harm.

​

SUSTAINABILITY CONSTRAINT

​

If allowed more time to implement, further ideas to our LED cube we would make it more sustainable then it is. As it stands, the two LED squares are in a box which, the user can open and look inside if something needs maintenance. However, if we had our finished product the LEDs would be using the Tiva board which had the code we designed. Once inside the glass case it should prolong the longevity of the LEDs. However, if an LED burns out we would need to replace an entire square (one side) since they are all soldered together.

​

ENVIRONMENTAL CONSTRAINT

​

The environment is an important part of life. We must take care of the place we all live on. Our LED cube energy consumption is not very high especially for our size cube (hold in hand). The bigger the LED cube is the more energy it will need to power the LEDs, microcontroller, and sensors. Although, if we were able to implement the solar panels, it would not only make it portable but it would also make it much more environmentally friendly. The solar panels would allow the sun to charge up the battery naturally instead of using PG&E as the source. And by using multiplexing in our cube we are able to cut the amount of pins we use and thus allowing us to use fewer TIVA boards. This helps the environment by contributing less waste after the cube is no longer useful to the user.

IF_A543DC95.png
14262-04.jpg
Screen Shot 2019-05-02 at 1.41.14 AM.png
Screen Shot 2019-05-02 at 1.40.57 AM.png
Screen Shot 2019-05-02 at 2.12.41 AM.png
IMG_1538.jpg
IMG_1539.jpg
bottom of page