












Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Project; Class: Senior Design Project Lab; Subject: Electrical and Computer Engr; University: University of Illinois - Urbana-Champaign; Term: Spring 2008;
Typology: Study Guides, Projects, Research
1 / 20
This page cannot be seen from the preview
Don't miss anything!













by Tzu-Hao J. Lee Steve A. Meadows ECE 445 Senior Design Project Spring 2008 TA: Purvesh Thakker Project #
The Speaker Optimization Circuit (SOC) is a system which can be used to avoid an inferior quality audio experience when the ideal sound system placement cannot be achieved. Specifically, it considers the spatial arrangement of a Dolby Digital 5. Surround Sound system's speakers and adds appropriate gains to the system's amplifier's outputs in order to accommodate users who are unable to place their speakers in an "ideal" setup. The core of this project is the TMS320VC5510/5510A Fixed-Point Digital Signal Processor, which we used to program our calibration calculation. We have an analog multiplexer with the sound system and microphone inputs connected to the input of the DSP board, which will output the modified sound to the speakers. We also have the remote control connected to the memory extension available on the DSP board. Accuracy is analyzed through an oscilloscope for both intensity values of each channel as well as the time delay due to distance difference.
1. Introduction 1.1 Purpose The purpose of this project was to use our experience in electrical engineering to develop a product that could reduce the costs of formal acoustic consultations. The idea is that an acoustical treatment company could mail the measurement device to a customer’s home and let the customer provide the necessary data to be later analyzed by the acoustical treatment company. We decided that the device would need to be extremely easy to use and robust enough to survive shipping. The device would also need to provide accurate data, free of extraneous noise and distortion, and be able to store multiple measurements. 1.2 Specifications The project was divided into multiple modules as portrayed by the block diagrams in appendices A.0 and A.5. For individual module specifications, refer to section 1.3. The voltage into the memory extension cannot exceed 3.3 V. The timing of the components must be matched; therefore multiple instances of certain actions must be available to ensure that the specified action takes place during the clock cycle. The phase difference between the ideal value and actual value should be kept minimal, preferably within several degrees, to maintain the integrity of the sound. 1.3 Components The design was divided into four main functional groups: DSP board coding, DSP board Memory Extension usage, and User Interface. 1.3.1 DSP Board The DSP board is the modulator for the signal, and will take in commands from users as well as the signal that needs to be modified. 1.3.2 DSP Board – Memory Extension The memory extension is a series of pins on the DSP board that allows additional circuits to be added upon the original design. We decided to use this as the method of connecting the user interface to the board.
1.3.3 User Interface The user interface provided two switches and 4 LEDs. The switches allow the user to control the behavior of the system, while the LEDs allow the user to check the state of the system. The switch cannot continuously send a signal as it would result in an error in how the program moves through the design hierarchy. 1.3.4 Analog Multiplexer This component is a simple multiplexer that takes in the microphone and the sound system amplifier output as its input. It will choose between the two depending on the user specified action and current state.
2.3 User Interface The design of the remote control (user interface) did not change much. We only had to implement minor changes to make it compatible with the DSP board. The original design was two switches that were de-bounced, and fed to a multiplexer which would output to the tri-state buffer. We wanted to implement the switch recognition as a two step process; the first switch will be read, and when the first switch is high, the selection bit will go high, allowing the second switch to be read, which will change the state of the program accordingly. We scratched this idea because it required unnecessary additional work. Having to read from the memory extension multiple times to obtain the entire signal is pointless and reduces efficiency. Instead, we just selected two bits from the register used by the memory extension and read both signals at the same time. We now retake in the switch inputs every clock cycle. 2.4 Analog Multiplexer The original design did not actually include the analog multiplexer as a component of the project. With DSP board from ECE 420, we assumed that the already provided chip extension that gives the user additional inputs would be enough for the purpose for our project. After becoming more familiar with the board, we discovered that such an implementation will not work effectively as there would be channel timing issues. The additional inputs still use the same channels as the four basic inputs and outputs, so both sets of I/O cannot be used at the same time. With our design, we needed to use the DSP board to generate a sample function for calculation of intensity, and with this design, our resolution would have been extremely low and inaccurate because of the delay between the closing of one set of channels and opening of the other set. This would have caused us to lose most of the samples we sent out for calculation. Instead, we took a similar, but a bit more applicable approach with the analog multiplexer. Instead of using a different set of I/O, we simply use an analog multiplexer, its selection bit being one of the switches on the user interface, and feed in the desired output depending on the state. This was a simple tweak on our design, but had potential to improve the resolution of the test signal, providing a more accurate intensity value.
3.1 The Calibration Specifics There are many factors that we did not take into account in our amplification calculation. Propagation, reverberation, and greater phase difference were among the important factors left out because of complexity. We used a very basic equation for our intensity modification: Where we treat our system as a two-dimensional system and set the distance from the speaker to the specified location as radius r. Our initial method for time delay calculation was going to be a measure of the delay between the output and the input of a sine function generated by the DSP board. We decided against that method because the delay caused by the code execution. The way our code was written made it so that input is always before the output. Therefore, our calculation is actually taking in the output signal of the previous clock cycle for use in calculation for the current clock cycle. The clock cycle delay itself would have been too long relative to the time it took for the signal to travel from the speaker to the microphone, so the measurement would not have been accurate and indicative of the actual distance. We decided instead to calculate the distance between the speaker and specified location via the intensity of the signal (as we can use the above equation’s relationship to figure out the distance). We fed 100 samples of the sine wave function and took an average of the values we record to be used in the calculation of the distance. This number of samples should provide a decent resolution for our purpose. We specified our amplification value to be variable K, which is: 2 2 actual actual specified specified
We used this format because with the DSP board, we can only modify four of the five channels, as the DSP board only offers four channel inputs. Therefore, we specified the amplification factor this way to ensure that there was still a correlation between the center channel speaker (not connected to the DSP board) and the other four speakers. Since each channel’s amplification factor had to be strictly within 0 and 1 (e.g.
be strictly less than the specified intensity/radius.
3.2 User Interface and Memory Extension The memory extension reference can be found in A.3. We used the D register, location #(400000h), as our switch input into the board. We used the second and third bit of the register, which are D2 and D3 on the chart. The modes are specified by 00, 01, 10, and 11, which we translated into equivalent values of 0, 4, 8, and 12 respectively for comparison to determine the mode of operation. Conveniently, the memory extension also provides the voltage and ground to run the user interface. The user interface was built with a de-bouncer, shown in A.6. This was to ensure that when the switch is flipped that it will not be read for more than one cycle, which would deviate from our calibration hierarchy. 3.3 Analog Multiplexer This component is a simple analog multiplexer, as shown in A.2.
To prove that the performance of the device works as we intended, we had to test two different components. First, we needed to be able to detect a signal and calculate its intensity. Second, we needed to ensure that we were able to modify the amplitude of each specific channel signal. 4.1 Sine Function Detection and Measurement We first used the oscilloscope to determine sine function. We also had to adjust the frequency of our sine function so it could be more easily detected by the microphone. Once we confirmed our waveform, we used Code Composer Studio to run the calibration with an ideal setup to determine our reference intensity value. We first did hand calculation for what the value should be, then cross-checked with our obtained value. We were able to determine that the value obtained was what we expected. Our calculations for the intensity values for all channels, likewise, worked. 4.2 Amplification Modification of Channels For this part, our main concern was to ensure that we are providing values that the DSP board can understand and thus make the correct adjustments for each of the channels. We used several values we calculated from arbitrary distances, and applied them to each channel. We then compared the channel output to the function generator input to see if the percentage of peak to peak voltage difference was as expected. We were able to obtain a desired waveform for each of the four channels. We then tested it by putting music through the system. This result was also what we expected. 4.3 User Interface The user interface component itself worked fine. However, we were unable to send a signal telling the DSP board that a signal needs to be read from the memory extension. We believe the problem is that we were unable to input the desired ARDY (asynchronous ready). 4.4 Conclusions Overall, the results were good. Other than the user interface compatibility issue, the system worked very well. We were not happy that we had to implement certain restrictions in our range of possible amplification. Otherwise, we believe the project was a success.
6. Conclusion Overall, we consider the project a success. We did have to add a constraint, but were able to implement the project’s most important functionality. 6.1 Accomplishments Our project implement’s the basic functionality we offered in our proposal. That is, we can take the output of our surround sound system, modify its intensity value, and output this result to the system’s speakers. These modifications are also accurate, based on a hard-coded distance to the center channel speaker. We were able to verify this using an oscilloscope and by listening to the modified system. Additionally, both of us gained valuable design and debugging experience of an Electrical Engineering project. 6.2 Uncertainties The user interface module was not completely functional. Unfortunately, this kept us from successfully interfacing the remote control. As mentioned previously, we believe the problem is that we were unable to input the desired ARDY (asynchronous ready). Another issue we faced was with the timing of the calibration routine. In the current implementation, this routine is run in a single sample when certain control signals are set. We now think that this may not be enough time to get a good response from the microphone. 6.3 Ethical considerations There are no relevant ethical considerations for the SOC. 6.4 Future work / Alternatives The project could still benefit from future work. This work would include fixing the user interface so the remote control signals could be read properly. Amplification factors could also have their accuracy improved by looking into is the aforementioned timing issue with the calibration routine. The project would also benefit greatly by using a similar DSP with two additional channels. This would remove the spatial constraint we had to add.
Calibrating Set Flag to 1, Continue Calibration Is Channel 4? Continue Calibration Sampling Is flag = 1? Exit Calibration Increment Channel Continue Calibration Sampling Is counter 100? Exit Calibration
Y
Output = Input * amp Reset counter and flag Output = Buffer Sample = Channel input Inc. counter, update sum Reset counter, flag, and sum. Use acquired distance value to calculate the amplification factor for each channel. Ready for modification. From Exit Calibration, Run Normally