University: University of California Davis
Team Members: Alexander Coffman, Delvin Huynh, Davit Khudaverdyan, Andrea Lopez, Andro Nooh, Hanzhe Wang
TI Parts Used:
- MSP-EXP430F5529LP LaunchPad
- MSP-EXP430G2 LaunchPad x2
- TI PFC8574N I/O Expander
As part of the EE-Emerge project based learning class our team consisted of Electrical Engineering and Computer Engineering Undergraduate students. We had a diverse team with transfer as well as returning students, in addition to being comprised entirely of second and third year undergraduates at UC Davis. With most of our team being at the theoretical level in courses and some in the process of completing college level physics and mathematics we had no experience in actual systems design. Few of us had knowledge of microcontrollers and programming, notwithstanding all the soldering, wiring, IR sensor, LED control and PCB design knowledge of which we had zero. This optional course was taken by many members as a way to further our understanding of electrical engineering and gain hands on experience which is often not acquired by students until their fourth year with Senior design classes.
Professor André Knoesen offered this course as a way to give students in the College of Engineering hands on practical experience in electronic systems design. In EE-Emerge we conceived, designed and built an interactive electronic systems that appeals to the general public. EE-Emerge offers participants the opportunity to develop and apply their electrical and computer engineering principles. EE-Emerge is also sponsored by Texas Instruments. A new component of the program this year was the K-12 STEM outreach. Our project was designed explicitly to engage students and children and to encourage them to pursue higher education in engineering. With supervision of an EE Emerge Alumni and UC Davis Graduate student Anuj Bhardwaj we built off of the proximity box project from a previous year.
In the Fall we defined the scope of the exhibit, formed design teams, and explored critical elements to decide on final exhibit pieces. During Winter quarter the electronic systems are implemented and tested and then demonstrated in early Spring. During the Spring Quarter presentations and demonstrations are given at Picnic Day, the annual campus wide Undergraduate Research Conference, Industrial Affiliates, and the Engineering Design showcase. If projects are well received, as they have been every year, EE-Emerge projects are demonstrated at the Makers Faire, which is a high-visibility technological event that is annually held in Silicon Valley. In particular our project infuses the qualities of light and sound to attract an audience in any venue from a quiet room to a loud event. The sounds with the prox box gives it a musical flavor and the mirror display gives a sense of magic and mystery, both of which serve to attract people of all ages with a fun way to engage in technology and learn more about the field of electrical and computer engineering.
The proximity box served as the user interface for the entire system. Hand sensing data occurred at its infrared sensor and LED surface, and was utilized for various outputs of this project. The proximity box uses an MSP430F series as the brain of the box. This MSP430 gathers all the information using polling functions. While polling, both I2C and SPI are used to make the box function properly. Infrared sensors use I2C as their method of communication, so that was used to understand the values that they were outputting to make the LEDs on the box light up a certain color at proximity range. This was done by using special addressable LED strips, such that we were able to communicate with each LED individually using SPI. The sensitivity of colors were able to be adjusted using the several MOSFETS on the motherboard PCB. Changing the resistor values on the potentiometers attached to the MOSFETS would increase or decrease the output of the MOSFETS, making the attached infrared sensors output a higher or lower signal for the receivers to get.
The sound portion of the project is done using all components in conjunction with each other. Information from the infrared sensors is read in by using I2C communication. That information is used to determine whether or not the user’s hand is considered close enough to play the sounds. Should the hand be close, that information will then be sent to another MSP430G2553 microcontroller to play a certain corresponding sound. The sounds used will be several distinct sounds stored on an Adafruit VS1053 Audio Codec breakout. The sounds will then be sent through a MAX93860 Class D amplifier to external speakers for clear and loud sound.
To get things started, first the MAX93860 audio amp was tested. In order to do that, it had to be soldered and hooked up to speakers. We had not done much soldering at first, leading to several contact points being dirty and having to be taken off using a solder sucker. Once the device was done being properly soldered testing was finally able to take off. Testing was done by using an audio jack input at first for sound input. We used a laptop to play any songs we wanted to get a clear range of possible sounds. We tested bass-heavy music as well as pure tones to understand the limits that we could push that device. Once that was working, the next step was to get sound playing from our MSP430 microcontrollers.
To do this we had to get the VS1053 codec working. Once again we had to solder all the header pins to the device to ensure the device would work. We did not have great vice grips to make the soldering easy so we had to use tape to stop the pins from moving around, finally allowing us to solder the device together. Wiring was up next. Following the tutorial from Adafruit’s website, we took the example code and pin configuration for testing. Once we had a clear understanding of the way the codec code’s worked and how we wanted to configure the pins we were able to take configure the chip the way we wanted it to. The initial idea was to use Serial communication to send over a “yes” signal from one microcontroller to another to play a sound. So for initial testing we had one microcontroller take a serial input and play a sound if the correct one was inputted. We rejoiced once that happened, as clear progress had been made. Now that we had figured out how to get music playing when we wanted, we had to get the communication between microcontrollers working. We decided to do by using pull-up resistors and wiring pins to pins from both microcontrollers. This served to get the information going from one microcontroller to another to tell us when a user’s hand was in the proper position for a sound to be played. When the user’s hand was close a pin would go high, and then a sound would play.
Musical Buttons Box
The button box of this project enables the user to switch between the already programmed six instruments. The instruments include electric guitar, piano, bass, bells and other instruments. The idea of the buttons was to allow the user to play different sounds at different times, because having only one sound is not exciting. The design of this box is a very simple circuit. Here is the circuit schematics for one button.
The idea of this circuit is to have the microcontroller sense either a zero for when the switch is off, or some voltage (eg. 2.8 V) when the switch is on. This circuit does exactly that. When the switch is off, the wire going into the microcontroller is connected to ground, therefore the micro controller reads a zero, which means that the switch is off. When the switch is asserted, the microcontroller reads some voltage values, and therefore changes the state of this particular button to on. The full circuit schematics has six of the diagram above, with each corresponding to one switch. Each switch controls one instrument. Once the microcontroller recognizes that one of the switches is, it sends specific instructions to the midi player to play a specific sound from the midi library. For example, when switch one is on, the micro controller, by using interprets, sends a command to the midi to switch to instrument 9, which is piano instrument, and to play the notes from 65 to 127. To inform the user which instruments are selected, an LED lights up once an instrument has been selected.
The idea for the Infinity Mirror initially came about as a way to create a 3D display of LED strips that the team was hoping would engage the public in unique way, while showcasing some of the proximity box features. By placing two WS2812b LED strips in series between a two-way mirror and a one-way mirror in an enclosed wooden frame, an illusion of lights drifting off into infinity was created. The LED strips were operated of a power, ground, and control line. A separate power source was used for the mirror because it was drawing too much power from the system proximity box system. The data control line was connected to an MSP430 in order for the user to change the color of the LEDs through the proximity box interface. The infinity mirror-MSP430 received data from the proximity box-MSP430 through GPIO pins (pins 2.1 and 2.2 of the infinity mirror microcontroller, and pins 3.3 and 3.4 of the ProxBox microcontroller. From that data received, the infinity mirror-MSP430 would communicate a set of signals to the LEDs through the SPI pin 1.7. The LEDs were programmed to shine blue if the sensors on the left half of the proximity box were activated, and red if the sensors on the right half of the proximity box were activated. If nothing happened to the proxbox, the LEDS would shine green.
The size of the wooden frame was chosen based on the length of the LED strips, one meter. Since we wanted to use two strips, the frame was cut to be 0.5m x 0.5m at a local hardware store. After testing the LEDS with different frame depths, we chose a 1.5” depth because it gave the best illusion when the strip was placed equidistant from the two mirrors. To increase the intensity of the lights, the rubber wrapping on the strips was removed prior to installation. Programming the LEDs proved to be the most challenging part of constructing the mirror because the team did not have any prior experience with SPI Protocol. We also learned that everything needed to have common ground or else the LEDs would act abnormally. Ultimately, this part of the project was a valuable addition to the system because it intrigued people of all ages and prompted them to ask many questions about the functionality of the entire system.
Infinity Mirror Architecture:
To use the Musical Prox Box and Infinity Mirror one must simply wave ones hands over the prox box which will respond to the location of the users hand and the closeness using sound and lighting displays on the box and in the mirror