105
ECE 477 Final Report - Fall 2007 Team 3 - Humphrey’s Treasure Chest Steven Kingsley Tony Liechty Roy Scheck Charles Lan CRITERION SCORE MPY PTS Technical content 0 1 2 3 4 5 6 7 8 9 10 3 Design documentation 0 1 2 3 4 5 6 7 8 9 10 3 Technical writing style 0 1 2 3 4 5 6 7 8 9 10 2 Contributions 0 1 2 3 4 5 6 7 8 9 10 1 Editing 0 1 2 3 4 5 6 7 8 9 10 1 Comments: TOTAL

ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report − Fall 2007 Team 3 − Humphrey’s Treasure Chest

Steven Kingsley Tony Liechty Roy Scheck Charles Lan

CRITERION SCORE MPY PTS

Technical content 0 1 2 3 4 5 6 7 8 9 10 3 Design documentation 0 1 2 3 4 5 6 7 8 9 10 3 Technical writing style 0 1 2 3 4 5 6 7 8 9 10 2 Contributions 0 1 2 3 4 5 6 7 8 9 10 1 Editing 0 1 2 3 4 5 6 7 8 9 10 1

Comments: TOTAL

Page 2: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-ii-

TABLE OF CONTENTS

Abstract 1

1.0 Project Overview and Block Diagram 1

2.0 Team Success Criteria and Fulfillment 3

3.0 Constraint Analysis and Component Selection 5

4.0 Patent Liability Analysis 11

5.0 Reliability and Safety Analysis 15

6.0 Ethical and Environmental Impact Analysis 22

7.0 Packaging Design Considerations 27

8.0 Schematic Design Considerations 30

9.0 PCB Layout Design Considerations 36

10.0 Software Design Considerations 40

11.0 Version 2 Changes 47

12.0 Summary and Conclusions 49

13.0 References 50

Appendix A: Individual Contributions A-1

Appendix B: Packaging B-1

Appendix C: Schematic C-1

Appendix D: PCB Layout Top and Bottom Copper D-1

Appendix E: Parts List Spreadsheet E-1

Appendix F: Software Listing F-1

Appendix G: FMECA Worksheet G-1

Page 3: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-1-

Abstract

The MIDI-phone allows musicians to turn any single note instrument into a MIDI

instrument. The MIDI-phone converts an analog audio signal into a MIDI signal. This signal is

then processed and sent to the computer (or any device requiring a MIDI instrument) via a USB

connector. The user connects the MIDI phone to the receiving device, tunes their instrument

using the MIDI-Phone tuner, calibrates the input volume and then they are ready to play. Two

main functions are available on the MIDI-phone: a medium between a single note instrument and

digital studio, and a tuner to allow the musician to tune their instrument on the spot using a LCD.

1.0 Project Overview and Block Diagram

The MIDI-Phone is a device that allows you turn any single note instrument into a MIDI-

instrument in real-time with minimal user interaction. The MIDI-phone uses a microphone to

listen to a played instrument without any wires attached. It then amplifies and filters this signal

and uses a DSP to determine what notes you are playing and for how long. This information is

relayed to a PC through USB using the MIDI standard. The MIDI-Phone also allows the user to

tune an instrument and adjust the volume level to improve the accuracy of the analog to MIDI

conversion. This conversion will then allow the use of PC software to view the song played or

change the playback instrument to something other than what was recorded with.

Page 4: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-2-

Figure 1.1 MIDI-Phone connected to PC

The following figure displays all of the major components and the interfaces that connect them. Red wires contain analog signals and black wires are digital signals.

Page 5: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-3-

Figure 1.2 Block diagram of MIDI-Phone

2.0 Team Success Criteria and Fulfillment

1. Ability to detect the fundamental frequency of a note from a single note instrument

through an analog microphone.

PSSC 1 was demonstrated and fulfilled by playing a specific note from a single note

instrument into the MIDI-Phone and matching the expected note with the displayed note. This

demonstrates that the MIDI-Phone can detect the fundamental frequency by displaying the

correct note, which is determined by frequency.

2. Ability to determine/guess the “closest note” being played based on the fundamental

frequency detected (in 1 above).

Page 6: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-4-

PSSC 2 was demonstrated and fulfilled by playing a specific note from a single note

instrument into the MIDI-Phone and matching the expected note with the note displayed. This

demonstrates that not only does the MIDI-Phone detect the fundamental frequency of the signal,

but it can also match that frequency to the corresponding note. This is much like how PSSC 1 is

demonstrated.

3. An ability to calculate “how far off” (out-of-tune) the note being played is relative to the

intended “nearest note” (determined in 2 above).

PSSC 3 was demonstrated and fulfilled by playing a specific note from a single note

instrument into the MIDI-Phone; however this note was intentionally played flat or sharp. The

MIDI-Phone analyzed the signal and determined it was not the correct frequency for that note,

displayed the information to the user via a bar scale.

4. Ability to communicate note information to a computer.

PSSC 4 was demonstrated and fulfilled by playing a specific note from a single note

instrument into the MIDI-Phone. The PC that the MIDI-Phone was connected to would not only

recognize the MIDI-Phone as a USB device, but it will also receive the MIDI signal.

5. Ability to display note detection/operational status using an LCD display.

PSSC 5 was demonstrated by displaying note information and volume via an LCD.

Page 7: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-5-

3.0 Constraint Analysis and Component Selection 3.1 Introduction

Our project is a device that converts sound from a single note instrument into a MIDI

signal in real time. This allows single note instruments to be connected (through a microphone)

to the computer as if it were a MIDI instrument. There are professional tools as well as freeware

that can compose music from a MIDI input. Our device would make it possible to create real-

time compositions of songs played on a single note instrument using the freeware. Our device

will also operate as a standalone tuner to help with note detection accuracy. Consideration needs

to be put forth in order to make our device operate in real time and to determine accurately the

pitch and duration of a note.

3.2.0 Design Constraint Analysis

The next sections discuss a number of different constraints for our project. Of these the

computational requirements, off-chip peripheral requirements, and the on chip peripheral

requirements are most constraining. A buffer of sufficient size is needed to hold and perform

pitch detection algorithms on incoming samples. Our microcontroller or DSP needs to be able to

communicate through USB either through a built in USB interface or an off-chip interface. A

SPI to USB chip was found [1], so only a microcontroller with a SPI interface can be considered.

The microcontroller also needs enough GPIO pins to interface with buttons. These and other

constraints will be considered in this report.

3.2.1 Computation Requirements

The two main computations done by the DSP are: to determine what the pitch of the note

being played is and when that note starts and ends. This will be done in real time by first

buffering the incoming ATD samples, and then performing an analysis on the set of samples to

determine what pitch the signal is.

To determine how many samples are needed to be stored the range of frequencies that we

want to detect needs to be determined. A standard treble recorder can play two octaves (523 Hz

to 2093 Hz). We decided that we would like to support four octaves for our device. For our

calculation on the number of samples required we will use the notes A3 to A7 (220 Hz to 3520

Hz) [2].

Page 8: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-6-

The first calculation determines how many seconds do we need to sample. In order to

hold 3 full cycles at the lowest (220H) frequency we would need to hold 3/220 = 0.0136 seconds

of samples.

The second calculation determines what sampling rate is needed. In order to store three

samples per zero crossing (6 per cycle) at the maximum frequency (3520 Hz) we would need a

sampling rate of 6*3520 = 21,120 Hz sample rate.

Having 21,120 Hz sample rate and 0.0136 seconds of samples, our DSP needs to be able

to buffer 21,120*0.0136 = 287 samples. If each sample is two bytes this amounts to 574 bytes of

memory. To perform calculations on the samples and read the samples simultaneously we need

2*574= 1148bytes of RAM. This is because at any given point in time the DSP is writing

samples to one portion of the RAM and performing calculations on the other.

To determine an estimate on the frequency required for the DSP we will assume that the

algorithm needs to make 10 passes over the samples to determine the fundamental frequency.

This would consist of an outer loop of 10 and an inner loop of 287, making for a total of

10*287=2870 iterations of the loop. If each iteration takes 50 cycles to complete, including loop

overhead, then the loops will finish in 2870*50=143500 cycles. Many algorithms that determine

the frequency of a signal require many passes. Given that this should be complete before the

next set of samples is ready, the clock frequency of the microcontroller should be

143500cycles/0.0136s=10.55MHz.

3.2.2 Interface Requirements

The number of general purpose IO (GPIO) pins that the microcontroller is required to

have will depend the type of LCD interface used. Common LCD displays on the market can

either use SPI, UART, or use a parallel interface [3,4], taking up 10 GPIO pins. An external

shift register could be used for the 8 data pins of the LCD if the number of GPIO pins needs to

be reduced.

We will only need two buttons to control our device, taking up 2 general purpose IO pins.

From the LCD and buttons we will need at most 12 GPIO pins.

Page 9: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-7-

The microcontroller is not connected to any devices that have any considerable current

requirements because all interfaces to the microcontroller are to other digital devices. The

largest current device would be the backlight to the LCD. Many backlights require

approximately 100mA.

3.2.3 On-Chip Peripheral Requirements

Our chip requires one ATD to convert the analog signal from the microphone (after it is

amplified and filtered) to a digital signal. A built-in USB controller would be nice, but they are

not that common in simpler microcontrollers. If the microcontroller does not have a USB

interface it will need a SPI interface to communicate with an off chip USB controller. The last

on-chip peripheral is a UART interface, which would make communication to an LCD easier but

is not needed.

Therefore a microcontroller with 1 ATD converter, 1 UART or 10 GPIO, and 1 USB or

SPI interface is needed.

3.2.3 Off-Chip Peripheral Requirements

The only digital off-chip peripheral need for our project is a USB controller, if there is no

built-in USB controller. The external USB controller is connected to the microcontroller through

an SPI interface[1]. Unlike many USB interfaces the chip that we found is not a microcontroller.

This will save time and money by not needing to buy a development board, or learn a separate

assembly language for the USB interface.

All information to be sent over USB is received from the SPI interface from the DSP, and

all information received from USB is sent over the SPI interface to the microcontroller. This

includes both control transfers required for device setup as well as data transfers after device

setup.

The major analog off-chip peripheral is an amplifier and filter. This will take the output

from the microphone, amplify it and filter out higher frequencies which will make the frequency

calculations more accurate. We are considering using an op-amp circuit for both the amplifier

and filter circuit.

Page 10: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-8-

3.2.4 Power Constraints

Our device will be supplied with an external wall power supply and will use internal

regulators to supply voltages needed for the microcontroller and USB. USB uses 3.3V [5], and

the common microcontroller voltages are 3.3V and 5V.

One added feature we would like to have for our USB to MIDI device would be to allow

it to be powered over USB when connected to a computer. This is not a requirement for our

device but it would be convenient for the user. If we were to implement this the maximum

current supplied would have to be less than 500mA, which is the maximum current that USB can

provide [5].

3.2.5 Packaging Constraints

The container should have a flat surface to set on a tabletop, and made as small as possible

to save desk space. It should be able to withstand minor misuse

3.2.6 Cost Constraints

We found one product from Roland that is similar to what we are developing [6]. It is a

product for a guitar. The device requires you to buy a pickup which is used for each of the 6

strings. Each of those strings are fed into a device that converts the six strings into MIDI. This

product has an MSRP of $699 plus the pickup for $219 [7]. Our product doesn’t apply to a

guitar because it is a multi-note instrument but that is the price of a device similar to ours on the

market. We want our product to be an effective low cost solution of converting sound from a

single note instrument into MIDI.

Page 11: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-9-

3.3 Component Selection Rationale

3.3.1 Microprocessor Selection

We have looked at a number of microcontrollers and DSPs. Many of them are very

complicated and have a large number of features that we don’t need for our project. The hardest

part of finding a microcontroller was finding one that did not have a lot more interfaces than

needed. The two major companies we looked at were Atmel and Freescale Semiconductor.

Atmel provided DSPs that already have a USB interface included. Freescale however had a

wider range of DSPs on both the low end and high end in terms of performance, but no USB

interface.

The two DSPs that we considered were Freescale’s 56F8014 and Atmel’s

AT32UC3B164 [8, 9]. The Freescale DSP is a 32 pin package and the Atmel DSP is a 48 pin

package. The Freescale DSP has 16Kbyte program flash and 4Kbyte RAM, while the Atmel

DSP has 64Kbyte flash and 16Kbyte RAM. The Freescale DSP operates at 32MHz while the

Atmel DSP operates at 90Mhz. This makes both of them meet the required 1148 bytes of RAM

and estimate of around 10MHz. Both DSPs also meet the GP6IO requirements and SPI

requirements. The Atmel does however have a UART interface, which would make

communication with the LCD easier.

As for cost, the Freescale DSP costs $3.15 in 1,000 quantities. However, the Atmel

product is very new. It was just announced in June 2007 that they were going to produce this

chip which is a DSP extension of their AVR®32 UC core. They only have the price listed for

the AT32UC3B1256 in a QFP package which is the same as the device we are looking at except

it has more flash and RAM. It is priced at $4.66 in 10,000 quantities[10]. We are currently in

contact with Atmel about using the product for our design, and are waiting for a response about

samples and a development board.

Because the Atmel DSP is very new, and are still waiting for correspondence, we will

choose the Freescale DSP to be used with our project. This will require us to use an external

USB interface, but no other DSPs with USB could be found that fit closely our requirements as

much as Freescale’s 56F8014.

Page 12: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-10-

3.3.2 USB controller selection

The two USB controllers that we considered for our design were Texas Instruments

TUSB3410 and Maxim Integrated Product’s MAX3420E [1,11]. TI’s interface is an I2c to USB

device, and Maxim’s interface is a SPI to USB device. We chose Maxim’s USB interface over

TI’s because it required no program code to be programmed into the chip. TI had a built in

microcontroller which we did not need. Maxim’s USB interface can operate at power up with no

prior ROM configuration.

3.4 Summary

Our project requires a DSP to sample and buffer an analog signal created from an

instrument played through a microphone. It will use an algorithm on the buffered data to

determine the fundamental frequency being played. This information will then be transmitted

over USB in the MIDI format. A DSP was selected that met all of the required constraints and

did not have too many extra features that we would never use. Because the DSP we chose has no

built in USB interface a SPI to USB external peripheral will be used.

Page 13: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-11-

4 Patent Liability Analysis 4.1 Introduction

The MIDI-Phone project allows the user to convert an analog signal (single note

instrument) into a MIDI signal. The process involved is fairly simple. The user plays a note into

a microphone; the signal is then processed and fed to the computer via a USB connector. This

unit can also act as a tuner, where it processes the signal and displays the note, and frequency

information locally. There are three major functions performed by the MIDI-Phone: determining

the frequency of the note being played, providing tuning feedback to the user, and converting the

analog signal into a MIDI signal. Before the MIDI-Phone can provide feedback to the user or

output any MIDI signal, it must first acquire the note currently being played. The algorithm used

to determine the note requires the signal be converted to digital. Once the note (frequency) is

acquired the MIDI-Phone can provide tuning feedback to the user, specifically the current note

being played (in the key of C) and the offset from the expected note. The MIDI-Phone also

provides the ability to take the signal acquired via the process above, and convert it into a MIDI

signal that can be outputted via a USB.

4.2 Results of Patent and Product Search

Midi-code generating device: [12] Patent number: 5367117 Filing date: Aug 29, 1991 Issue date: Nov 22, 1994 Abstract:

A MIDI-code generating device utilizing a musical instrument for producing a plurality of musical

tones which comprise a fundamental tone and a harmonic tone, includes a microphone for converting a

produced musical tone from the musical instrument into an electrical audio signal, an A/D converter for

converting the electrical audio signal into digital signal of wave-form data, a group of band-pass filters

for extracting wave-form data having frequency component respectively corresponding to each of the

fundamental tones, from wave-form data outputted by the A/D converter, and for deciding on a produced

fundamental tone when the musical tone is produced by the musical instrument, and a coding circuit for

generating a MIDI-code according to a result of a decision of the fundamental tone decision circuit.

Page 14: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-12-

Claims:

• A MIDI-code generating device for generating a MIDI-code corresponding to sound

produced by a musical instrument

• Generating a MIDI-code according to a result of the determining of the production of the

fundamental tone and the detected envelope data.

The very core function of the “MIDI-Phone” is an analog to MIDI converter, taking an

analog note and converting it into a MIDI signal. If one were to look at the function of “Midi-

code generating device” and the description of the MIDI-Phone, they would find remarkable

similarities. The similarities do not end with the function, but continue with the way the function

is performed. Both the MIDI-Phone and the patent call for a band-pass filter, analog to digital

converter, detecting the fundamental frequency of a signal, and outputting said frequency in a

MIDI format. The patent calls for harmonic frequency detections, a function that the MIDI-

Phone does not perform. Regardless, a very good argument in favor of infringement could be

presented.

Musical note detecting apparatus [13] Patent number: 4014237 Filing date: Aug 28, 1975 Issue date: Mar 29, 1977

Abstract:

Apparatus for automatically detecting the pitch of individual notes of music represented in

analog form by an electrical signal. The apparatus includes an arrangement of band-pass filters,

connected in parallel, for receiving the electrical signal and passing selected portions thereof which

contain the frequencies of the well-tempered scale. According to the invention, means are provided for

varying the sensitivity of the pitch detecting apparatus in dependence upon the loudness of the notes to be

detected to thereby inhibit the detection of harmonics.

Page 15: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-13-

Claims:

• An apparatus for automatically detecting the pitch of individual notes of music comprises

of an electrical signal in analog form.

• Pitch-detecting apparatus is operative to determine the presence of musical note

fundamentals, but not harmonics, notwithstanding variations in the loudness of said

notes.

• Amplifier, connected between said input means and said frequency detecting means, for

maintaining the average amplitude of said electrical signal at a constant level.

The MIDI-Phone is dependant on acquiring and audio signal and determining its note.

This patent performs the same function; however, it performs it with an analog circuit. The

patent also mentions the specific use of fundamental frequency and not harmonic frequency in

determining the note being played, much like the MIDI-Phone. Also, the patent mentions an

Amplifier, for maintaining the average amplitude. The MIDI-Phone implements a rotary knob,

or volume knob, hooked up to an amplifier to help maintain constant average amplitude. Many

ideas are similar between the patent and MIDI-Phone, however, the analog/digital difference

makes it a difficult to claim infringement.

Digital electronic tuner [14] Patent number: 4196652 Filing date: Dec 16, 1976 Issue date: Apr 8, 1980

Abstract:

A digital electronic tuning device is provided in which display element indicates when two

frequencies are equal. If the frequencies are unequal, the device provides an indication of both the

magnitude and direction of the inequality. In operation, a circular pattern of lights on the display elements

appears stationary when the instrument is in tune and appears to rotate or spin when the instrument is out

of tune.

Page 16: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-14-

Claims:

• An electronic tuning device for tuning a musical instrument.

Tuner functionality exists in the MIDI-Phone; therefore the possibility for infringement is

already high. This patent describes, in essence, what the tuning component of the MIDI-Phone

function is. It patent describes a device that accepts an analog audio signal and proceeds to

match it with a frequency range, then determine how far of the actual frequency being played is

from the frequency that it should be. It proceeds to display this information to the user how far

“off” they are from the correct note. The MIDI-Phone has a very high possibility for

infringement of this patent.

4.3 Analysis of Patent Liability

The MIDI-Phone’s potential liability for patent infringement is fairly high. There are no

literal infringements among the patents listed; there are enough differences between the patents

and the MIDI-Phone to eliminate the possibility for literal infringement. However, there is a

very high possibility for infringement under the doctrine of equivalence. “Midi-code generating

device”, patent number: 5367117 [12], has the most similarities with the MIDI-Phone. It

performs almost the exact same function as the MIDI-Phone almost the exact same way. Both

the MIDI-Phone and patent use analog filtering and digital processing in order to acquire note

data, as well as encode said data into a MIDI stream. However, differences include the

acquisition of the harmonic frequency, something the MIDI-Phone does not do, in order to

determine the note being played. “Digital electronic tuner”, patent number: 4196652 [14] also

presents a high possibility for infringement. The patent, a very general patent, describes a device

that digitally processes an analog signal and provides the closest note “match” and how far off

the incoming frequency is from the actually frequency of the note “match”.

Page 17: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-15-

4.4 Action Recommended

Unfortunately, the patents issued for the function that MIDI-Phone serves are extremely

generalized and therefore difficult to bypass. An analog to MIDI converter is a fairly linear

process that requires certain blocks of circuitry or code. However, in an attempt to minimize

patent infringement, the “tuner” aspect of the MIDI-Phone can be scrapped. This will eliminate

possible infringement on any electronic tuner that the MIDI-Phone might have had. Another

possibility exists that allows the MIDI-Phone to eliminate the Analog to MIDI converter patent

infringement. Instead of using MIDI, a proprietary format could be used. This has its benefits

and pitfalls: the MIDI-Phone is now free from possible analog to midi converter patents but

instead has significantly reduced its usefulness and would probably need to be coupled with PC

side software. The analog to MIDI converter however, will probably need to be licensed if it can

not be proven that there are substantial differences.

4.5 Summary

The MIDI-Phone, though self conceived, is in potential violation of a number of patents.

Its major functions: note acquisition, tuning, and MIDI conversion all have fairly general patents

associated with them. Because these patents are generalized, and the functionality of an analog

to MIDI converter is fairly linear, it is difficult to bypass these patents. The electronic tuner

capabilities, however, can be scrapped in order to avoid a patent infringement. The MIDI-Phone

will most likely be subject to patent licensing if ever marketed.

5 Reliability and Safety Analysis 5.1 Introduction

The MIDI-Phone is a very useful device that will convert audio signals into streaming

MIDI, virtually converting any instrument into a MIDI instrument. The potential for this product

is astounding, however without careful considerations and analysis, so could the dangers. For

example, the most dangerous aspect of the MIDI-Phone is the voltage regulators. If these devices

were to fail, the entire system may be damaged which may in turn cause harm to any users. The

following report is an in-depth analysis into the reliability and safety pertaining to the MIDI-

Phone.

Page 18: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-16-

5.2 Reliability Analysis

The lifespan of any product is limited by the shortest lifespan of any of the integrated

components. The MIDI-Phone consists of a number of components which may be susceptible to

failure. Fortunately, many of the components are fairly reliable discrete components and simple

integrated circuits. Components that operate at the highest temperatures and involve the greatest

complexity are likely to yield the highest failure rates. The DSP, USB Controller, and voltage

regulators of the MIDI-Phone circuit fit the previously described characteristics. These likely to

fail components will be analyzed to determine the overall reliability of the MIDI-Phone.

A few of the components involved in the design have significantly higher tendencies to

fail than other components. One of these components is the DSP. According to the Military

Handbook, Equation 1 and Equation 2 will be appropriate to model our DSP.

( ) LQETP CC ππππλ 21 += (1)

P

MTTFλ1= (2)

The first variable 1C is defined on page 25 in the Military Handbook to be 0.28 due to the

fact that our DSP is a 16 bit MOS microcontroller. The next variable Tπ called the temperature

factor is dependent on the junction temperature, TJ, and the effective activation energy, Ea. The

junction temperature may be evaluated by Equation 3.

( )DJAAJ PRTT ×+= θ (3)

The first value AT stands for the ambient temperature. In order to approximate a worst

case scenario, this value was taken to be the maximum ambient operating temperature of our

DSP. The next variable JARθ was also provided in the DSP datasheet. The power dissipation, DP ,

was found on the Controlling Power Consumption application note provided by Freescale. In

order to compute the worst case scenario, the power consumption value chosen describes the

maximum power consumption when all modules are utilized.

Page 19: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-17-

Variable Value

AT 105 °C

JARθ 74 °C/W

DP 547.96 mV

JT 146 °C (Table 5.1)

Based upon this data, JT was determined to be 146°C. The effective activation energy

was determined by the fact that our DSP applies to the Digital MOS category. Tπ was

determined from the chart by using both of these numbers. The next variable 2C is defined for

surface mount technology by Equation 4.

( ) 08.142 108.2 PNC −×= (4)

The value PN is defined by the number of pins in our DSP and the result is computed in

Table 5.2.

Variable Value

PN 32

2C 11.82 x 10-3 (Table 5.2)

The next value to determine is the environment factor Eπ . Our product is classified as a

mobile ground device and therefore defines Eπ to be 4.0. The next variable Lπ , called the

learning factor, is determined to be 1.0 since the DSP has been in production for more than 2

years. The last variable Qπ is the quality control factor. The value of the quality control factor

will be 10 to represent that of any normal commercial component.

Page 20: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-18-

Variable Value

1C 0.28

Tπ 5.0

2C 11.82 x 10-3

Eπ 4.0

Qπ 10

Lπ 1.0

Pλ 14.47 MTTF 7.88 yrs

(Table 5.3)

Compiling all these values together yields the final result of 14.47 failures/106 hours.

Equation 2 yields a mean time to failure (MTTF) of 7.88 years.

Another component prone to failure is the USB controller. The USB controller may also

be modeled by Equation 1. The MOS component operates on a basis of 8 bits and therefore 1C

may be defined as 0.14 as listed in the Military Handbook. The junction temperature JT is

provided on page11 of the USB Controller datasheet. This value of 150 °C in conjunction with

the effective activation energy relating to Digital MOS circuits yields a Tπ value of 5.6.

Similarly to before, Equation 4 will apply to the USB Controller.

Variable Value

PN 32

2C 11.82 x 10-3 (Table 5.4)

The environmental factor Eπ and quality control factor Qπ are the same as the DSP since

all of our components are commercial components and will be used in the same environment.

However the learning factor Lπ equates to 1.5 since the USB Controller was released in

November 2006.

Page 21: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-19-

Variable Value

1C 0.14

Tπ 5.6

2C 11.82 x 10-3

Eπ 4.0

Qπ 10

Lπ 1.5

Pλ 12.47 MTTF 9.15 yrs

(Table 5.5) Computing the derived values yields a final result of 12.47 failures/106 hours. This value

equates to a MTTF of 9.15 years. The results are summarized in the Table 5.5.

The last component that requires reliability analysis is the two voltage regulators. Due to

the nature of these devices, Equation 1 will yet again provide an adequate model. The value of

1C equals 0.02 since the component is estimated to contain 101 to 300 transistors. The junction

temperature is listed on page 5 of the datasheet as 125 °C. This value in conjunction with the

corresponding activation energy for a linear component results in a Tπ value of 58. 2C may be

calculated from Equation 4 similar to the DSP and USB Controller.

Variable Value

PN 8

2C 2.645 x 10-3 (Table 5.6)

In addition, both the quality factor and environmental factors will not change for the

voltage regulators since the regulators are not separate from the rest of the circuit. The learning

factor is equal to 1 since the product was developed in May 1999 according to the voltage

regulator datasheet.

Page 22: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-20-

Variable Value

1C 0.02

Tπ 58

2C 2.645 x 10-3

Eπ 4.0

Qπ 10

Lπ 1.0

Pλ 11.71 MTTF 9.75 yrs

(Table 5.7) Compiling the results as before yields a final result of 11.71 Failures/106 hours. The

equivalent mean time to failure (MTTF) is 9.75 years as shown in Table 5.7.

The most significant failure rate calculated from the above analysis suggests that the DSP

is the most susceptible to failure. However, this data is construed due to the assumptions made

during analysis. Selecting the worst case scenario rather than the actual operating characteristics

will significantly increase the calculated failure rate and correspondingly decrease the calculated

mean time to failure. The actual failure rate is probably closer to that of the USB Controller and

voltage regulators. Unfortunately, the safest course of action is to assume that the DSP reliability

calculations are correct. The greatest contributing factor to the failure rate is the quality factor.

This value cannot be modified and is susceptible to debate and controversy. The next greatest

contributing factor is the temperature factor. This factor may be greatly improved my adding

heat sinks to the voltage regulators, DSP, and USB Controller. Another modification to eliminate

the contribution of the temperature factor would be to modify the packaging to allow air flow by

the installation of vents and a fan. These modifications would dramatically decrease the

contribution of the temperature factor to the failure rate.

Page 23: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-21-

5.3 Failure Mode, Effects, and Criticality Analysis (FMECA)

Safety is a top priority during the design and development of any product. Each aspect

and component of any design must be analyzed in great detail in order to ensure the

implementation of proper safety feature and measures. The level of safety required must be

measured in order to determine more specifically which components require the greatest

attention. In order to do so, a number of criticality levels must be defined. Analysis of the MIDI-

Phone circuit will consist of three criticality levels, low, medium, and high. Low criticality

implies that the device may operate improperly, but still be able to continue operation. Medium

criticality is defined as the fault that will cause the system to cease operation in some way,

including damaged components. High criticality is reserved for only the severe cases in which a

malfunction in the device may come to harm any potential users. Any failures that receive the

label as high criticality must also possess a failure rate of at most λ < 10-9. Any other failure rates

are acceptable around the λ < 10-6 range.

A number of assumptions were realized when determining the criticality levels and

effects listed in Appendix G. The most significant assumption was that only one component

would fail at a given time. Failure analysis would become significantly more difficult without

this assumption. Another assumption is that users operating the device would not open or modify

the device in any way. This of course, can not be accounted for when dealing with predicted

failures. Lastly, the assumption that the MIDI-Phone device would not be exposed to any harsh

environments and retain in the same environment as any given PC eliminated the analysis of

some involved and complex failures.

Page 24: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-22-

5.4 Summary

The contents of this report have critically examined the reliability and safety concerns

involved with the product named MIDI-Phone. The “worst case scenario” average life

expectancy of a given MIDI-Phone is 7.88 years. The actual life expectancy may be closer to 9

years, but this has yet to be determined. However before the product may be marketed, a number

of safety issues must be addressed. The most important safety issue is to eliminate or mitigate the

chance of failure from the two voltage regulators. Not only will these voltage regulators cause

damage to the entire system, they may even cause harm to any users. A consistent and safe

operation is necessary for any product to be successful.

6 Ethical and Environmental Impact Analysis 6.1 Introduction

The MIDI-Phone is a portable device that converts an audio input to MIDI. It is intended

to be used in homes as a low cost alternative to creating digital music. Various ethical and

environmental considerations have to be made to ensure the MIDI-Phone does not prove to be a

hazard in the homes it is used in or the environment in comes in contact with. This analysis

hopes to expound upon ethical concerns such as the products safety and its liability as an

intermediary used to record music. In regards to the environment, if the MIDI-Phone is intended

for mass production, analysis of its environmental impact during manufacturing and disposal are

of great concern and must be dealt with accordingly.

6.2 Ethical Impact Analysis

A product destined for mass production must have guidelines in place to ensure the safety

of the individual using it. It is ethical and necessary to ensure a product does not cause harm to

the people who use it. The ASCE says that “Engineers shall hold paramount the safety, health

and welfare of the public” [24]. To satisfy this notion, concerning the MIDI-Phone there are

two categories of concern. The first revolves around the safety of the product during use and

disposal. The second category involves the potential for misuse of the MIDI-Phone. This

analysis intends to delve into these two categories and find solutions for harm and misuse.

Page 25: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-23-

The MIDI-Phone is a compact device that doesn’t have protruding parts on its own. In

terms of user interaction the complexity is quite small. The user can adjust a volume knob to

increase the sensitivity of the microphone, this serves as the only input on the MIDI-Phone.

There is a possibility for two inputs to be connected to the device, a USB input and a wall wart.

The casing for the MIDI-Phone is a sturdy plastic box, held together with four screws. Under

normal use it is unlikely that this box will come apart.

The main concern for human safety lies within the wall wart. From the safety analysis of

the MIDI-Phone it was gathered that given a capacitor failure there could be a short between

power and ground. This short has the potential to make the MIDI-Phone hot to the touch and

possibly start a fire. To mitigate this problem, warnings could be placed on the MIDI-Phone

indicating that if the device becomes hot to the touch, to return it for service for repair and cease

use immediately. The addition of fuses is a viable solution to this problem.

Under pressure it is possible that the LCD screen providing user feedback could crack. In

this scenario it is possible that liquid can leak from the cracked screen. If it is consumed or

comes in contact with the eyes or skin there is a possibility for harm as the liquid crystals used

within LCDs are commonly toxic. As this scenario does not fall under normal use of the

product, warnings could be placed inside the user manual giving information on how to handle a

broken LCD to help prevent the user from coming under harm.

Electronic equipment generally contains toxic materials. At the end of the product life

cycle the MIDI-Phone will likely be thrown away. It is unreasonable to assume that all users

know about the harmful products within the MIDI-Phone. Warnings should be put in place to

provide the user this knowledge and a method for safely disposing of the product to reduce

possible harm to people who may come in contact with it after the MIDI-Phone is thrown away.

Questions must be raised concerning use of the product. The MIDI-Phone is designed for

home entertainment and is not meant to be used in an operation critical environment. Given the

functionality of the MIDI-Phone is quite bare, it is unlikely to be used in such an environment.

As a safety precaution, warning the user that the MIDI-Phone is not intended for such use can

help prevent against a scenario where it is used in an operation critical environment.

Page 26: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-24-

The MIDI-Phone acts as a medium between a user playing an instrument and a digital

interface. Possible uses include composing and transcribing music into a digital format. With

this in mind it is possible the user could use a recording of copyrighted material to produce a

digital version. This possibility could lead to copyright infringement where the MIDI-Phone was

used. However, since the MIDI-Phone is simply acting as a medium for communication it

shouldn’t be held accountable for wrongdoing. As an added deterrent to prevent unlawful use of

the product, explicit warnings can be added to the product informing the user not to violate

copyright infringements with the MIDI-Phone.

Functionality in the MIDI-Phone to prevent unlawful use of the device is not possible.

However, if a user does intend to use the MIDI-Phone to record copyrighted material, the result

won’t be accurate with the original given its ability to only detect one note at a time. The result

would be of a low quality given most copyright infringed music is more varied than a single

chord-less instrumental.

6.3 Environmental Impact Analysis

Electronic equipment is usually produced using harmful chemicals and metals, because of

this reducing the environmental impact of the MIDI-Phone can be seen as a safety precaution

and economically sound. Safety can be provided in the form of reducing harmful pollutants

released into the environment during the MIDI-Phone’s life cycle. Economically, recycling

resources used to make the MIDI-Phone can help reduce shortages of valuable materials used in

production. To consider these aspects this environmental analysis shall cover the life cycle of

the MIDI-Phone including manufacturing, normal use and its disposal.

Page 27: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-25-

Most of the environmental impact from the manufacturing phase of the MIDI-Phone

comes from the PCB. The manufacturing of PCBs include a wide range of chemicals many of

them toxic. Additionally, harmful metals such as lead and mercury are often used as well.

Furthermore, a large quantity of water is required in most of the PCB manufacturing process.

The leftovers in PCB manufacturing are recycled as much as possible however 100% of the

materials used cannot be reclaimed and the remaining materials must be disposed of. A solution

to this would be to turn to companies that provide PCB manufacturing using more

environmentally friendly processes. One process employed changes the methods in which

through holes are created. Instead of using a more conventional process using electroless

chemistry, which generates a lot of hazardous chemicals like formaldehyde, a process known as

carbon/shadow/graphite method is used. By utilizing graphite, those harmful chemicals

generated by more conventional methods are no longer necessary [25]. Methods such as the one

aforementioned provide ways to cut down on the waste-stream associated with PCB

manufacturing. Currently, the research that has been made into this topic has not yielded major

companies that put this process into practice.

Other environmental factors in the manufacturing process involve the other components

used in creating the device. The liquid within LCDs usually contain harmful chemicals. The

manufacturing of the ICs used in electronics today contain irreclaimable plastic and during

production, significant amounts of waste is generated [20]. The solution to these two

environmental problems would be to find cleaner alternatives available. Some LCD

manufacturers use less harmful liquids and dilute them so that the environmental impact is

minimized.

When the product comes into the hands of the consumer, the environmental impact of

using the product has been designed to be minimal. The MIDI-Phone was originally designed to

be powered by USB. This design choice affected all of the components chosen, to use the

minimum amount of power possible. For example, the LCD used in the MIDI-Phone is designed

for low power applications. By reducing the amount of power used by the device, less is needed

from power plants, reducing the amount of fossil fuels used.

Page 28: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-26-

Product disposal poses a much more difficult environmental problem. By trying to pick

more environmentally friendly manufacturing facilities, the environmental effect of disposing the

MIDI-Phone is reduced. However, valuable and harmful metals as well as other materials such

as plastic still need to be disposed of properly. Landfills may be a dangerous option for

disposing of the MIDI-Phone. As components in the product age, it is possible for the lead in the

solder used, as well as the liquid in the LCD to leak and possibly contaminate the water system

[21]. Incineration could be a viable method for safe disposal of the MIDI-Phone, by using high

temperature incinerators, electronic equipment has been shown to produce acceptable levels of

toxic gases and harmful metals [22]. Another alternative would be recycling. Several companies

exist for the purpose of recycling used electronic equipment. These facilities provide an

opportunity to strip the product for valuable metals to be reclaimed and used in the future.

Providing locations for recycling on the packaging is the best solution available given the lack of

control of the MIDI-Phone after it is sold. Within the United States some examples include

Azon Electronic & Computer Recycling as well as AAA Electronic & Computer Recycling.

6.4 Summary

There are several issues regarding ethics and the environment before the MIDI-Phone can

go into production. These issues range from warning labels concerning product failure, to proper

product disposal. By focusing on warnings about potential hazards and finding environmentally

friendly production and disposal methods the MIDI-Phone can be safely released as a product

meeting ethical and environmental guidelines.

Page 29: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-27-

7 Packaging Design Considerations 7.1 Introduction

The MIDI-Phone project allows the user to convert an analog signal (single note

instrument) into a MIDI signal. The process involved is fairly simple. The user plays a note into

a microphone; the signal is then processed and fed to the computer via a USB connector. This

unit can also act as a tuner, where it processes the signal and displays the note, and frequency

information locally. Due to the purpose of the application it would generally be found by a

computer or around an instrument as much so as it would benefit from being small in form and

with minimal wires extending from it. This will allow it to be easily managed around the

computer and also give it a degree of mobility.

7.2.1 Commercial Product Packaging

When considering existing products for the MIDI-Phone, one must look at both functions

it serves: Tuning and Analog to MIDI conversion. The MIDI-Phone user interface must be

intuitive for both of these tasks. We will be taking a look at one of each of these products.

Page 30: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-28-

7.2.2 Product #1

atoMIC Pro [29]

The atoMIC Pro, with regards to analog to midi conversion, is the closest match to the

functionality we desire. The atoMIC Pro has a LCD that displays to the user note information

and a number of push buttons that allow the user to alter the

information relevant to the note (including input volume.)

The design also utilizes female connectors, specifically

MIDI. The MIDI interface is the standard for MIDI

communication; however, more recently the USB has been

seen being used more often due to its compatibility with

many types of devices (PC, Mixers, etc.) The atoMIC Pro

also has ports for receiving the analog data, which in the case of many single note instruments,

would only lead to a microphone. The form of the atoMIC Pro is fairly large (6.5” x 9” x 1.5”),

not allowing it to be extremely mobile. The atoMIC Pro makes up for this, however, in being an

extremely capable device with a high resolution.

7.2.3 Product #2

Korg CA30 [30] The Korg CA30 is a handheld battery powered tuner that has an extremely small form

4” x 2.5” x. 05”. It is packaged in plastic and although it contains batteries it is extremely light.

This small form allows the tuner to be

extremely mobile, allowing it to be placed

anywhere which increases its ease of use.

The tuner also has an internal microphone.

This allows the user to play the instrument

without having to use an external microphone

and creating a mess of wires. The Korg

CA30 also uses a microphone jack, however

not all instruments use pickups or have built in microphones, so unless it is used for very specific

instruments it will go unused. This model has an LCD/LED display that conveys note

information to the user, displaying current note and flat/sharp information.

Page 31: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-29-

7.3 Project Packaging Specifications

Our design adapts features from the atoMIC Pro [29] and the Korg CA30 [30]. The

MIDI-Phone will be housed in a plastic casing decreasing the weight and increasing its mobility.

This plastic casing will be ~ 3.5” x 5” x 1.5”. The dimensions of the enclosure are based around

the size of the PCB and LCD. An LCD will display the user immediate feedback. This feedback

will display the current note being played and information pertaining to that note (flat or sharp

using a scale) and also the input volume (a series of bars.) The user will also have an ability to

increase the incoming signal amplitude using a rotary knob. The user will input the signal using

a built in microphone. This allows minimization of the wires required for the MIDI-Phone to

operate. The MIDI-Phone will communicate with the computer and be powered using a female

USB B connector; this allows the unit to be free of a power cord, which allows it to be easily

transported. The MIDI-Phone will be powered via the USB, since it will most likely be used in

conjunction with a computer, this will power the MIDI-Phone and allow the PC and MIDI-Phone

to communicate with just one cord.

7.4 PCB Footprint Layout

The MIDI-Phone uses the 32 LQFP [26][27] footprint for both its DSP (Freescale

MC56F8014) and its USB controller (Maxim MAX3420E.) The footprint dimensions are 10

mm x 10 mm [27], since there are two components that use this footprint, and these are the only

major components in the design, the PCB dimensions should be no larger than 4.5” x 3”,

allotting room for headers and minor circuit components. This is a conservative estimate and the

PCB could likely be smaller, however the LCD [28] dimensions restrict how small the packaging

can be, and the PCB should fit snugly into the packaging.

Page 32: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-30-

7.5 Summary

MIDI-Phone is a tuner and analog-MIDI converter in one. Because of its unique

functionality two different types of products must be inspected in order to grasp what kind of

packaging the MIDI-Phone requires. The Korg CA30 handheld tuner features a small form with

LED/LCD note information as well as an internal microphone. The atoMIC Pro analog to MIDI

converter features a larger form and also various inputs in the form of female connectors. MIDI-

Phone utilizes many of the features seen on both of these products and also implementing some

our own. MIDI-Phone is going to be packaged in a small form (3.5” x 5” x 1.5”) plastic casing.

It will have an LCD for note and volume information as well as a knob for adjusting incoming

signal amplitude. MIDI-Phone will communicate with the PC and also be powered via a USB B

connector located in the rear of the packaging. The size of the PCB’s major components is

trivial and the PCB size is only constrained by the size of the plastic casing. A 3” x 4.5” PCB

should be sufficient to hold all major and minor components and also snugly fit inside the

packaging.

8 Schematic Design Considerations 8.1 Introduction

The MIDI-Phone is a device that converts sound from a single note instrument into a

MIDI signal in real time. This allows single note instruments to be connected (through a

microphone) to the computer as if it were a MIDI instrument. There are professional tools as

well as freeware that can compose music from a MIDI input. Our device would make it possible

to create real-time compositions of songs played on a single note instrument using the freeware.

The MIDI-Phone will contain a microphone, an LCD display, buttons, a volume knob,

and a USB interface to connect to a computer. A digital signal processor (DSP) will be used to

control the operation of most of these components in conjunction with each other.

Page 33: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-31-

8.2.0 Theory of Operation

8.2.1 Power Supply

MIDI-Phone will operate over power supplied from the USB interface. The USB

interface supplies 4.75-5.25V and is capable of supplying up to 500mA[31]. All of the major

components, except for the LCD display, can operate on 3.3V. Because the LCD operates on 5V

the USB unregulated 5V will be used to power the LCD, and a regulated 3.3V will be used to

power all other components. Table 8.1 lists the maximum current consumed by all the major

components used in our design. The sum (178mA) meets the USB restriction of 500mA. A

3.3V linear regulator(TPS76733Q) with 1A current capabilities will be used[32].

Device Voltage(min) Voltage(max) Max current consumption (mA) DSP 3.0 3.6 42 USB Controller 3.0 3.6 45 LCD 4.5 5.5 82 Filter 2.7 3.6 3.5 OP Amp 2.2 5.5 5 Total 177.5

Table 8.1: Voltage and Current requirements

8.2.2 Microphone/Pre-amplifier/Filter

The first step of inputting sound from an instrument is through a microphone. The DSP’s

analog to digital (ATD) converter requires a signal from 0 to 3.3V, making the center voltage

(bias) to be 1.65V. A condenser microphone (WM-55A103) will be used because it can operate

on 3.3V, has a frequency response above what is needed [33], and can be biased to produce a

signal centered at 1.65V.

The next step is the pre-amplifier. To do this an op-amp that is capable of operating at

3.3V is needed, in order to make the center bias voltage at 1.65V. Another requirement is that it

has a frequency response of at least 3500Hz (frequency of highest note to be played). The

OPA365 from Texas instruments [34] meets all of these requirements. The gain will be adjusted

by a digitally controlled potentiometer, to allow the DSP to adjust the volume level

logarithmically based off of a RPG. The final result of the pre-amplifier will be a signal biased

at 1.65V ready to be filtered by a filter IC. The gain of the amplifier will be determined by the

output of the condenser microphone. When tested a gain of 100 will amplify a recorder to 1V.

So a gain of at least 300 is needed.

Page 34: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-32-

The filter IC needs to be able to filter off frequencies above 3500Hz from a signal

amplified by the op-amp. There should be no gain from the filter IC. The MAX7404 meets

these requirements [35]. Its cutoff frequency is controlled by a clock signal. The DSP will

provide this clock signal through one of the PWM ports. The final result is low pass filter with a

cutoff frequency at 3500Hz and output signal centered at 1.65V and maximum swing from 0V to

3.3V. The signal is now ready for the DSP’s ATD converter. Because the components used are

powered off of 3.3V the voltage swing cannot go above 3.3V, which protects the input to the

DSP.

8.2.3 Digital Signal Processor

The Digital Signal Processor (DSP) is the component responsible for taking the analog

audio signal that originated from the microphone and gather/compute information needed by the

MIDI standard. The MIDI standard requires the following information: when a note begins,

when a note ends, and what note is being played. The DSP communicates this information to a

USB interface chip, to be sent using the USB standard.

The DSP will also be interfaced to two buttons and a volume knob (RPG). The two

buttons will change the mode of operation between the “setup” (instrument tuning) mode, and

the “instrument to MIDI” mode. The volume knob (RPG [36]) will be read by the DSP and

converted to a logarithmic scale, allowing the DSP to control the gain of the pre-amplifier

logarithmically through a digital potentiometer.

Lastly, the DSP will be connected to an LCD to display operational status, volume, and

setup/tuning information. The DSP that meets all of these requirements is Freescale’s

MC56F8014 [37]. Bit widths for each interface will be mentioned in the corresponding section

where applicable.

Page 35: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-33-

8.2.4 USB Interface

The USB interface chip will allow the MIDI-Phone to communicate the note start and

stop information over USB. The USB controller selected is the MAX3421E from Maxim

Integrated Circuits [38]. This chip is the interface allowing a microcontroller’s SPI port to send

and receive data over USB. It is capable of operating as a USB Full speed peripheral which is

required to support bulk transfers which are needed by the MIDI standard. The only interaction

this chip has with our circuit is with the DSP. When first connected to USB the MAX3421E

sends over SPI the requests made by the computer. The DSP then has to determine the correct

information to send back over SPI to the MAX3421E chip to then be sent to the computer over

USB. A SPI interface is 4 bits wide.

8.2.5 LCD screen

An LCD screen will be used to display device status, the mode of operation, volume

information, and tuning information (to ensure accurate note detection). The USB power supply

is limited to 5V and 500mA, so an LCD display that consumes 82mA and operates on 5V will be

used [39]. The LCD will be connected directly to the DSP through 7 GPIO pins using 4 bits for

data and 3 bits for control. Communication to the LCD is achieved by writing a routine(driver)

for the DSP that sets the values of the GPIO pins.

Page 36: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-34-

8.3.0 Hardware Design Narrative

The DSP has two main functions. Its first is to analyze an analog audio signal and

determine when a note begins and ends. The second function is to control all of the subsections

of the circuit. This is done through the following on-chip peripherals: SPI, I2C, PWM, and an

ATD converter. Table 8.2 displays pin out information regarding each peripheral.

DSP Port Description Connected to Pins Pins Used AD0x4 ATD converter channel 0 Microphone/amp/filter circuit 4 1 AD1x4 ATD converter channel 1 4 0 SPI Serial Interface SPI to USB interface 4 4 Timer precise timing 2 0 I2C serial interface digital potentiometer 2 2 PWMx5 Pulse width modulator filter IC 5 1 JTAG used to program device JTAG programmer 4 4 Reset reset pin 1 0 Power core, ATD power 3.3V 2 2 Vcap bypass capacitor bypass capacitor 1 1 Ground IO, ATD ground ground 3 3 Totals 32 18

Table 8.2 Note: “Pins” specifies how many pins are associated with that port on the MC56F8014 microcontroller. “Pins used” is how many pins are required from that interface to connect to the specified device. Unused port pins can be used as GPIO pins. There are 14 pins available for GPIO.

8.3.1 SPI

The SPI port of the microcontroller will be used to communicate with the SPI to USB

controller. It is through SPI that the MIDI “note on” and “note off” messages get sent. SPI will

be used for the USB interface because the IC found can only communicate using SPI [38].

8.3.2 I2C

The I2C interface will be used to connect to a digital potentiometer [39]. The digital

potentiometer will be used to adjust the gain of the microphone preamplifier so that instruments

with a wide range of volume levels can be used. The value of the potentiometer will be

controlled indirectly through a rotary volume knob. I2C will be used because that interface is

not being used for any other function.

8.3.3 Pulse Width Modulation (PWM)

The PWM module will be used to control the cutoff frequency of the low pass filter. The

cutoff frequency is directly related to the frequency of an input clock [5]. The PWM will be the

provider of this clock, and will be programmed to have a cutoff frequency of 3500Hz. The

PWM module will be used for this because it requires no extra DSP clock cycles once set up.

Page 37: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-35-

8.3.4 ATD Converter

The built in ATD converter is used to convert the signal from a microphone/amplifier

circuit into values that can be used by the DSP. The DSP needs to sample the value from the

ATD port once every sample period. To do this the timer module will be used to generate one

interrupt per sample period. The interrupt service routine (ISR) will be responsible for initiating

the ATD conversion and storing the sample into SRAM. Based off of previous calculations, the

ATD converter needs to be able to sample at 21,000 Hz.

8.3.5 GPIO

The GPIO pins will be used to connect to an LCD, volume knob, and buttons. Table 8.3

lists the pin requirements of each. The number of GPIO pins available on the DSP depends on

the number of interface pins used. Any unused interface pin can be used as a GPIO pin. With

our configuration we have 14 available GPIO pins. The LCD, volume knob, and buttons require

11 GPIO pins, leaving 3 unused GPIO pins.

Connected to Pins Used LCD 7 2-bit rotary encoder 2 buttons 2 Total 11

Table 8.3 GPIO pin allocation

8.4 Summary

By integrating all of the systems discussed in this report, the MIDI-Phone will be capable

of transforming a single note instrument into a MIDI instrument. With an onboard USB

controller our device can be connected to any computer with a USB port. It will feature an LCD

screen to assist in the tuning of a instrument, providing a more accurate conversion to MIDI.

The use of a volume knob (RPG) will be used to adjust how far away one needs to play from the

MIDI-Phone.

Page 38: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-36-

9 PCB Layout Design Considerations 9.1 Introduction

The MIDI-Phone is designed to convert audio into a real-time streaming MIDI signal.

The audio signal is input through a microphone which is amplified and filtered to produce a

clean signal for analysis. Analysis is performed by a DSP which determines the frequency,

duration, and volume of the note being played and relays this information to the LCD and a USB

controller. The LCD displays the pertinent information while the USB controller sends the MIDI

signal to the computer for further analysis and manipulation by the user. This product will

provide incredible flexibility and features to any musician. However, without a properly

designed PCB, any carefully designed circuit may fail. The design considerations analyzed for

the MIDI-Phone circuit includes trace width requirements, analog circuit protection due to

sensitivity, and bypass capacitor placement. A great emphasis on PCB design is necessary for

any product to achieve success.

9.2 PCB Layout Design Considerations – Overall

A great number of factors must be carefully researched and implemented to ensure an

effective and properly design PCB. The most general and one of the most important factors is

trace width. The circuit is designed for low power consumption and a thickness of 12 mils will

be sufficient for the average trace. However, all of the circuits must be examined in closer detail

to guarantee proper PCB design and implementation. The MIDI-Phone circuit consists of two

unique and separate systems, the analog signal manipulation circuit and the digital signal

analysis circuit. Each of these systems requires specific factors to consider for proper

implementation.

Page 39: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-37-

The analog circuit is the most sensitive part of the circuit. The condenser microphone

outputs signals at very low voltages, generally in the millivolt range. This makes the microphone

very susceptible to noise. Many online sources stress the importance of microphone placement in

circuitry. Fortunately, the MIDI-Phone analog design utilizes a very specific differential

amplifier that is specially designed to allow for long microphone leads. Despite this capability,

the microphone will be placed as close to the analog circuit as possible to ensure minimum noise

[41]. Other precautions were also implemented to minimize microphone noise. A ground wire

was placed between the digital and analog circuit to help diminish any stray electromagnetic

waves from the digital circuit. In addition, the entire analog section of the circuit will be

supplemented with a copper pour. The copper pour will provide a very good deterrent for stray

electromagnetic interference from sources in all directions.

The digital circuit requires much more general considerations for implementation. The

digital circuit must be separated from the noise-prone analog circuit to assist in avoiding

preventable noise through the digital circuit. Separation of the analog and digital circuits required

separate power and ground traces, in addition to the previously mentioned ground trace

separation. Isolation of the analog and digital circuits allowed for closer placement of the digital

components and therefore shorter traces. The shortest traces possible were used to minimize wire

impedance and inductance. These factors will impede accuracy, power consumption and noise

reduction during operation. Passive components such as resistors and capacitors, were placed as

necessary to allow the greatest flexibility for I/O pin traces.

Page 40: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-38-

9.3 PCB Layout Design Considerations – Microcontroller

The microcontroller or DSP in the case of the MIDI-Phone circuit requires unique design

considerations. One of these unique PCB layout considerations are the bypass capacitors. Bypass

capacitors are designed to regulate voltage level fluctuations. These capacitors are generally

specified by the supplier and must be placed as close to the chip as possible [42]. All of the

bypass capacitors used in the MIDI-Phone circuit are placed directly beneath their corresponding

component. This allows placement of a via to almost exclusively connect the pins to the

capacitor. Utilizing this design, the distance between the bypass capacitors and the associated

pins will be approximately equal to the thickness of the circuit board, a very small distance. The

56F8014 DSP requires bulk capacitors in addition to the standard bypass capacitors. These bulk

capacitors provide the same functionality as the bypass capacitors except that they are larger and

subsequently placed further from their associated pins. These bulk capacitors were placed in the

same vicinity as any other component.

The specific placement of the DSP is very important to the rest of the design of the

circuit. The DSP is the main component of our circuit and interfaces with most of the rest of the

circuit. For this reason, the DSP was placed in the center of the board to allow for ease of tracing

and minimal trace lengths. Once the placement of the DSP was determined, the layout of the

interfacing components was similarly determined. These components each require a specific

number of general purpose I/O pins to interface. Since general purpose I/O pins may be

configured in most locations about the DSP, these pin locations were moved closest to their

respective external component as possible. This allowed for easier tracing and shorter leads.

Page 41: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-39-

9.4 PCB Layout Design Considerations - Power Supply

Due to the need of keeping the analog and digital systems separate, each system requires

its own voltage regulator. The MIDI-Phone is supplied by a 5 V unregulated DC voltage from

the USB connection. This voltage is sent to two voltage regulators which regulate the voltage to

3.3 V for the rest of the circuit. Since both of these regulators feed from the same source, their

placement must be next to each other to minimize trace lengths. Similarly, the USB interface

device must also be near both voltage regulators to minimize trace lengths. The grounds from the

regulators provide the basis for the grounds for the respective system they supply. This ensures

that the analog and digital grounds will remain separate in addition to the voltage supply. Each

regulator also requires bypass capacitors, which are placed directly beneath the regulators for

greatest affect [43].

The trace routing from the power supplies is very important. The 5 V supply is

unregulated and therefore requires an extra precaution to ensure that the voltage level remains

stable. The traces for this supply are 80 mils. The other 3.3 V supplies and ground traces will be

70 mils. The smaller thickness is sufficient due to the voltage being regulated. The reduced size

also allows for a smaller PCB and thus greater flexibility during routing. Flexibility is important

due to the fact that all components but the LCD require a supply of 3.3 V.

9.5 Summary

PCB design is a highly important and integral part of the design of any product. No

matter how carefully a schematic may be designed, an improperly constructed PCB board may

cause the system to fail. However, with careful consideration and organization, any product may

be successfully realized.

Page 42: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-40-

10 Software Design Considerations 10.1 Introduction

The purpose of the MIDI-Phone is to create a portable plug-and-play device which

converts audio from single note instruments to the MIDI standard as an individual is playing. A

means to accomplish this goal is to provide output users can see to tell how far from the MIDI

equivalent their note was. User input on the device consists of a single volume knob to adjust

the input volume coming from the microphone. In order to satisfy the MIDI-Phone’s

requirements three specific design criteria must be met. There must be continuous stream of data

coming from the microphone input to the MIDI output from the USB port. Additionally, an

algorithm must be designed to quickly and accurately determine the frequency and amplitude of

the current note being played for conversion. Finally, the code must be compact due the space

constraints of the DSP chosen.

10.2 Software Design Considerations

The three main software considerations emphasize a larger goal for the MIDI-Phone, a

low-maintenance portable audio to MIDI converter. To meet these criteria the Freescale

56F8014 was chosen. The DSP provides 16KB of flash and 4KB of ram on chip and runs at a

frequency of 32MHz [43]. Functionality of the DSP includes ADC, ISR, I2C, SPI and PWMs.

Programming to the DSP is done through JTAG/EOnCE interface which allows for real time

debugging, a feature we will be using as our primary method of debugging [46]. The

programming will be done in C with optimizations being written in assembly directly. Figure

10.3 at the end of this section details our usage of the DSP via flowcharts.

10.3 Memory Mappings

The Freescale 56F8014 provides 16KB of flash memory and 4KB of ram arranged as

shown in figure 10.1[43]. The 4KB of ram is shared with the data space as indicated in Figure

10.1.

Page 43: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-41-

Figure 10.1 Memory Overview

The software being written will need to convert streaming audio input coming from the

ADC. Several samples of audio data need to be stored then analyzed to provide an accurate

determination of the frequency and volume of the note being played. A 300 sample resolution is

necessary to accommodate the lowest frequency used by MIDI. This value was calculated via

simulations and hand calculations from the frequency of the notes in the MIDI specification.

Each sample is two bytes wide as specified by the ADC module in the DSP. In order to prevent

reading from a sample being overwritten, two sample buffers are used, alternating in purpose for

reading and writing. A total of 1200 bytes in ram will be required for the buffers.

A lookup table for MIDI note to frequency will also be used to provide less calculation

overhead during run time. There are a total of 128 notes used in MIDI and frequencies take up 2

byte of space for a total of 256 bytes in ram necessary for the lookup table [44]. Given the low

complexity of the programs on the DSP, the stack size can be reduced, allowing more of the ram

to be utilized.

Page 44: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-42-

Figure 10.2 displays the locations of different parts of the program. Since no flash is

used to store data, the program length is limited by the flash available which is 16 kilobytes.

Location Start Length (words) Description Flash 0x0000 0x60 Interrupt Vector Table Flash 0x60 0x44 USB Descriptors Flash 0x124 <0x1EDB Program Length (value not known) Ram 0x8000 0x12C(300) Sample Buffer 1 Ram 0x812C 0x12C(300) Sample Buffer 2 Ram 0x8258 0x80 MIDI frequency table Ram 0x82D8 <0x5A7 Slack Ram for stack/etc

Figure 10.2 Memory Mappings (Each word is 2 bytes)

10.4 Code Organization

Programs in the DSP will reside inside the 16KB of flash memory. The main program

and the four modules being called by it are organized as polling loops. Polling was chosen so

while the frequency calculation occurs samples can be received at the same time. The two

modules outside the main program are interrupt driven. The sample writing module is interrupt

driven because of the necessity of a sampling rate and the USB module due to its specifications

in interacting with the device on the other end of the USB connection.

10.5 Software Design Narrative

There are six main modules for the MIDI-Phone. Four of the modules are called upon by

the main program. The last two are interrupt driven, controlling sample writing and USB output.

A hierarchical chart of the software modules has been included in figure 10.4 at the end of this

section for clarification.

10.6 Software Development Plan

The software development model we are following occurs in 4 stages. The first stage

was creating detailed flow charts of the program operation. Following the flow charts, simple

programs will be written to utilize each of the different functions of the DSP we need. Finally

the individual blocks will be put together and complete functionality testing will be done.

Currently software development is in the second stage, creating simple programs utilizing the

various components of the DSP, such as the ISR, I2C, PWM and SPI.

Page 45: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-43-

10.7 Main Program

The main program serves as an order of operations for each of the four modules residing

within it and a separate control for handling volume changes. The main program begins by

checking on the sample counter flag. The flag is enabled when 300 new samples are ready for

frequency and amplitude calculations. If the flag is enabled MIDI calculations proceed on the

current set of samples. The calculated values are then sent immediately over SPI to the USB

controller. Only after this point is the LCD refreshed with new data. At the end of the main

program a check is made to see if the user changed the volume level. If a change is reported, that

volume is reported via I2C.

10.8 Sample Writer

The sample writer is triggered on a timer interrupt and has priority over the USB interrupt

so samples can still be processed. This interrupt will be set to occur at a frequency of 21 KHz.

The sampling rate is set at 21 KHz which is six times the maximum frequency to detect. This

translates to A7 (3250 Hz). Each time this sample is called, there will be an increment to the

sample counter. After the counter increment a check is made to see if the sample counter has

arrived at 300 samples. If 300 samples have arrived, the sample ready flag will be toggled

indicating to the main program that there is data ready for MIDI and note offset calculations.

Additionally, the buffer write flag will be toggled in the main function to indicate that buffer

roles have been switched. This means the buffer that used to be read from will now be used to

write to and vice versa. At the end of this module, given the buffer write flag the new sample

data coming through the ADC is written to the write buffer.

10.9 MIDI and Note Offset Calculations

When a new set of sample data is ready this module is called upon by the main program.

Several algorithms have been considered to be used for frequency and amplitude determination,

but one has not been chosen yet. This block functions by first calculating the frequency and

amplitude of the sample set. This frequency is then compared to those listed in the MIDI lookup

table. Afterwards, the offset between the calculated MIDI data and the nearest frequency in the

lookup table is stored.

Page 46: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-44-

The algorithm chosen for frequency detection was autocorrelation. Utilizing the entire

set of 300 samples, cross-correlation is done between the sample set and itself. Broken down,

this process generates an array containing the absolute values of the difference between the

sample set and itself shifted. The resulting array is a graph that looks like a series of humps,

where the minimum values represent the fundamental period of the initial sample set. With this

value, the fundamental frequency can be determined. This method is widely applied as a pitch

detection algorithm and after testing the result, its values for frequency were far more accurate

than counting zero crossings or threshold crossings.

The amplitude algorithm simply takes the sample set and finds the maximum value. This

value corresponds to the volume bar on the LCD. For each threshold broken by the amplitude

determined, another character is added to the volume bar length.

10.10 MIDI Data Output

The three byte MIDI value is put together from the MIDI and note offset calculations

module and stored in a specified location in ram for access by the USB interrupt [44].

10.11 Output to LCD

Using the offset and amplitude value generated in the MIDI and note offset calculations

module a conversion will be made to a graphically meaningful product and sent to the LCD. The

data from the volume knob will also be converted to a graphical representation and output to the

LCD.

10.12 I2C Volume

Volume data is placed into a register specified by DSP for I2C output which will go out

to the digital potentiometer connected [43].

Page 47: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-45-

10.13 USB Output

The USB output is interrupt driven by a GPIO input coming from the USB controller. Of

the two interrupt modules, it has a lower priority so samples can be received during USB

interrupt. The USB device descriptors can be located here. There are two separate options for

output. During power on the MIDI-Phone will send device descriptor initialization information

to the USB controller to tell the connected device what MIDI-Phone is [45]. After that

initialization the data going through will be read from the location MIDI Data Output wrote to, to

contain the 3-byte MIDI value.

10.14 Summary

By utilizing polling and interrupts a continuous stream of data is easier to achieve. The

Freescale MC56F8014 provides us enough space and array of functionality to service our needs.

By carefully coding and structuring the program in line with the flowcharts developed, most

easily foreseeable errors can be avoided. Additionally, by utilizing the JTAG/EOnCE interface,

real time debugging can be conducted avoiding further errors and provide a more robust product.

Page 48: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-46-

Software diagrams

Figure 10.3 Program flow Charts

Page 49: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-47-

Figure 10.4 Hierarchical Block Diagram of Code Organization

11 Version 2 Changes

There are several considerations to be made for the second version of the MIDI-Phone.

The original goal of the MIDI-Phone was to provide a device that could translate any

instrumental song into the MIDI format. The MIDI-Phone only provides support for single note

instruments. Most instrumental songs can be supported by adding support for multiple note

frequency analysis. From the demonstrations of version one of the MIDI-Phone, it has been

proven that the range of the microphone is highly restricted. This must be improved for the MIDI

transmissions to the computer to be more accurate. As a final change to transition to version 2,

extra functionality such as a digital tuning fork on the MIDI-Phone could be provided.

To supplement the MIDI-Phone with support for any instrumental song, an analog circuit

for sweeping could be added. The different frequencies can be filtered out making multiple note

detection possible by sweeping the incoming analog signal. This change to multiple note

detection would make the MIDI-Phone far more robust and increase its marketability by

allowing a much wider array of instruments utilize the device.

Page 50: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-48-

After the project demonstrations, when other people who weren’t familiar with the device

used the MIDI-Phone, it was shown that the MIDI-Phone did not pick up their notes clearly.

Several suggestions were offered following an analysis of this situation. Currently, only one

operational amplifier is being utilized to increase the gain of the MIDI-Phone. Increasing the

number of op amps used would allow the MIDI-Phone to increase the range of note detection.

This change would allow the MIDI-Phone to be used in more environments along with the

volume knob. A better microphone and a jack for an external microphone could also be added to

provide more accurate audio input for the increased sensitivity.

With the addition of the aforementioned improvements, other software functionality

could be added to the device. The tuning function could be improved immensely with the

inclusion of a digital tuning fork that plays the note specified by the user. Many standard tuners

today come with this functionality.

All of these aforementioned improvements to the second version come with a greater

price tag. It is very important to consider the price of materials in adding this extra functionality.

The MIDI-Phone was originally designed as a cheap MIDI recording device intended for home

use. By including this extra functionality, the MIDI-Phone would be competing with a wider

array of audio products and may prove to be more marketable.

Page 51: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-49-

12 Summary and Conclusions

Through hard work and deliberation, the MIDI-Phone ended up being a resounding

success. The MIDI-Phone is fully functional and met all five PSSCs defined at the beginning of

the semester. We took an idea from conception to completion, and through this process we

learned invaluable technical information. This course has taught us many things, one of the most

important, being the ability to record information about our progress. Designing and

programming the MIDI-Phone required acquiring new technical information. New languages,

algorithms and development software were required in order to accomplish the ultimate goal of

the MIDI-Phone. Working in a team, though familiar, was still a learning process. Tolerance of

each other’s tendencies and knowing each other’s strengths was extremely important to the

success of the MIDI-Phone. The MIDI-Phone was a good project to end our stay here at Purdue.

It reminds us that even though our academic careers might be over, the education experience

never stops.

Page 52: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-50-

13 References [1] Maxim, “USB Peripheral Controller with SPI Interface,” [Online Document], June 6, 2007

http://datasheets.maxim-ic.com/en/ds/MAX3420E.pdf [2] B. H. Suits, “Frequencies for equal-tempered scale,” [Online Document], 1998,

http://www.phy.mtu.edu/~suits/notefreqs.html [Accessed: September 12, 2007]. [3] Crystalfontz America, “Serial LCD Module Specifications,” [Online Document], October,

2005, http://www.crystalfontz.com/products/632/data_sheets/CFA-632_v2.0.pdf [4] Crystalfontz America, “Specification: CFAH1602P-YYH-ET,” [Online Document],

http://www.crystalfontz.com/products/1602p/CFAH1602PYYHET.pdf [5] Compaq, Hewlett-Packard, Intel, Lucent, Microsoft, NEC, and Philips, “Universal Serial

Bus Specification,” April 27, 2000. [6] Roland, “GR-20 Synthesizer,” [Online Document],

http://www.rolandus.com/products/productdetails.aspx?ObjectId=592 [Accessed: September 13, 2007]

[7] Musicians Friend, “Search for GK-3, “ [Online Document],

http://www.musiciansfriend.com/navigation?q=GK-3 [Accessed September 13, 2007] [8] Freescal, “56F8014 Data Sheet,” [Online Document], January, 2007

http://www.freescale.com/files/dsp/doc/data_sheet/56f8014.pdf. [9] Atmel, “AVR32 32-Bit Microcontroller,” [Online Document], July 2007,

http://www.atmel.com/dyn/resources/prod_documents/32059S.pdf. [10] Atmel, “Atmel Extends its AVR 32-bit MCU Family,” [Online Document], June 20, 2007,

http://www.atmel.com/dyn/products/view_detail.asp?FileName=AVR32_UC3B_6_20.html&family_id=682 [Accessed: September 12, 2007].

[11] Texas Instruments, “TUSB3410, TUSB3410l Data Manual,” [Online Document], July

2007, http://focus.ti.com/lit/ds/symlink/tusb3410.pdf [12] google.com “Midi-code generating device” [Online Document], October 02, 2007

http://www.google.com/patents?vid=USPAT5367117 [13] google.com “Musical note detecting apparatus” [Online Document], October 02, 2007

http://www.google.com/patents?vid=USPAT4014237 [14] google.com “Digital electronic tuner” [Online Document], October 02, 2007

http://www.google.com/patents?id=TVU1AAAAEBAJ

Page 53: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-51-

[15] MIL-HDBK-217F, “Military Handbook,” [Online Document], January, 1990

http://cobweb.ecn.purdue.edu/~dsml/ece477/Homework/CommonRefs/Mil-Hdbk-217F.pdf

[16] Freescale, “56F8014 Datasheet,” [Online Document], January, 2007

http://www.freescale.com/files/dsp/doc/data_sheet/56f8014.pdf

[17] Maxim, “USB Peripheral/Host Controller,” [Online Document], February, 2007

http://datasheets.maxim-ic.com/en/ds/MAX3421E.pdf [18] Texas Instruments, “Fast Transient Response Linear Regulators,” [Online Document],

January, 2004 http://focus.ti.com/lit/ds/symlink/tps76733.pdf [19] Freescale, “Controlling Power Consumption in 56F8300 and 56F8100 Family Devices,”

[Online Document], September, 2005 http://www.freescale.com/files/dsp/doc/app_note/AN1991.pdf

[20] S. Siddhaye, P. Sheng, and Chris Ooi, "Environmental Effects in Component Packaging

Selection," IEEE Trans. on Electronics Packaging Manufacturing, vol. 22, pp. 185-190, July 1999.

[21] T. G. Townsend, S. E. Musson, Assessing the Landfill Disposal Implication of Discarded

Electronic Equipment: IEEE International Symposium on Electronics and the Environment Electronics Recycling SUMMIT, May 8-11, 2006, Location Unknown.

[22] E. S. Stewart, P. M. Lemieux, Emissions from the incineration of electronics industry

waste: IEEE International Symposium on Electronics and the Environment, pp. 271-275. May 2003.

[23] J. D. Lincoln, O. A. Ogunseitan, and A. A. Shapiro, Meta-analysis of Hazard Criteria

Designation for Electronic Waste: IEEE International Symposium on Electronics and the Environment, pp. 89-94. May 2006.

[24] C. J. Andrews, From Professional Ethics to Technological Citizenship: IEEE International

Symposium on Electronics and the Environment, pp. 45-47. May 2006. [25] U.C. Pandey, V.C. Sethi, K. Schischke, H. Griese, and H. Reichl, Environmental

Management in Semiconductor and Printed Circuit Board Industry in India: IEEE Conference on Asian Green Electronics, pp. 139-149. 2004.

[26] Analog.com “32 LQFP Footprint,” [Online Document], June 1, 2007

http://www.analog.com/UploadedFiles/Associated_Docs/184996408st_32_2.pdf [27] Topline “32 LQFP Footprint,” [Online Document], February 04, 2000

http://www.topline.tv/drawings/images/qfp/LQFP32T30-2.0.gif

Page 54: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-52-

[28] Cystal Fontz “CFAH1602A-YYH-JPE Datasheet,” [Online Document], April 18, 2007

http://www.crystalfontz.com/products/1602a/CFAH1602AYYHJPE.PDF [29] atoMIC Pro “AtoMIC Pro : a Multiple Sensor Acquisition Device,” [Online Document]

http://hct.ece.ubc.ca/nime/2004/NIME02/flety.pdf [30] zzounds.com “CA30 Owner's Manual” [Online Document] September 06, 2007

http://cachepe.zzounds.com/media/CA30_EFG3-02639c6abeb47f4c1924bba1eb7d472.pdf [31] Compaq, Hewlett-Packard, Intel, Lucent, Microsoft, NEC, and Philips, “Universal Serial

Bus Specification,” April 27, 2000. [32] Texas Instruments, “TPS76733Q Datasheet,” [Online Document], January 2004

http://focus.ti.com/lit/ds/symlink/tps76733.pdf [33] Panasonic, “WM-64PN omni directional Condenser Microphone Cartridge,” [Online

Document], http://industrial.panasonic.com/www-data/pdf/ABA5000/ABA5000CE11.pdf [34] Texas Instruments, “OPA365 Datasheet,” [Online Document], April 2007

http://focus.ti.com/lit/ds/symlink/opa365.pdf [35] Maxim, “8th-Order, Lowpass, Elliptic, Switched-Capacitor Filters,” [Online Document],

July, 1999 http://datasheets.maxim-ic.com/en/ds/MAX7400-MAX7407.pdf [36] CTS Cooperation, “Series 288 Encoder,” [Online Document], October 5, 2007

http://www.ctscorp.com/components/datasheets/288.pdf [37] Freescal, “56F8014 Data Sheet,” [Online Document], January, 2007

http://www.freescale.com/files/dsp/doc/data_sheet/56f8014.pdf. [38] Maxim, “USB Peripheral Controller with SPI Interface,” [Online Document], June 6, 2007

http://datasheets.maxim-ic.com/en/ds/MAX3420E.pdf [39] Crystalfontz America, “Specification: CFAH1602P-YYH-ET,” [Online Document],

http://www.crystalfontz.com/products/1602b-color/CFAH1602BYTIJP.pdf [40] Maxim, “MAX4060-MAX4062,” [Online Document], May, 2005

http://datasheets.maxim-ic.com/en/ds/MAX4060-MAX4062.pdf [41] Freescale, “56F8014 Data Sheet,” [Online Document], January, 2007

http://www.freescale.com/files/dsp/doc/data_sheet/56f8014.pdf [42] Texas Instruments, “TPS7674 Data Sheet,” [Online Document], January, 2004

http://focus.ti.com/lit/ds/symlink/tps76733.pdf

Page 55: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

-53-

[20] Freescale.com, “56F8014 Data Sheet Preliminary Technical Data,” [online], Jan. 2007 [cited Oct. 23, 2007], http://www.freescale.com/files/dsp/doc/data_sheet/56f8014.pdf.

[44] Borg.com, “The MIDI Specification,” [online], Unknown publication date [cited Oct. 25,

2007], http://www.borg.com/~jglatt/tech/midispec.htm. [45] Compaq, Hewlett-Packard, Intel, Lucent, Microsoft, NEC, and Philips, “Universal Serial

Bus Specification,” Apr. 27, 2000. [46] Freescale.com, “DSP56F80x/DSP56F82x Family Targeting Manual,” [online], Jun. 20,

2006 [cited Oct. 23, 2007], http://www.freescale.com/files/soft_dev_tools/doc/user_guide/Targeting_56800.pdf.

Page 56: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

A-1

Appendix A: Individual Contributions A.1 Contributions of Steven Kingsley:

Senior Design required a lot of hours and work from all members of our design team. I

contributed a great amount of time and variety of abilities to complement the rest of the team. I

am the only member of our design team with a major in Electrical Engineering. The other three

members are all majoring in Computer Engineering. Due to this unique career choice, I offered

to pursue the design and implementation of the analog circuitry required for MIDI-Phone. Tony

Liechty also offered to assist in the analog circuit construction and design. The design of the

analog circuit included a great amount of time browsing datasheets from online sources to ensure

proper operation and acceptable results. The analog design was eventually determined to include

an operational amplifier for amplification of the audio signal, an 8th order filter to eliminate

noise, and a digital potentiometer to control the gain of the operational amplifier.

In addition to the analog circuit design, I also worked very closely with Tony Liechty to

finalize the schematic to ensure proper completion of the PCB design. Tony and I worked long

hours to properly complete the PCB design in a clean, concise, and dense manner. Many

footprints of the parts used in our circuit were missing and needed to be generated. Once the

footprints were created, we began to orientate the components of the rats nest to minimize trace

lengths. Tony and I then took turns creating the necessary traces and via. Once the PCB design

was finalized, I gathered all the necessary data and ran the required tests to successfully process

and fabricate the PCB design.

Roy Scheck was our official Team Leader. However throughout the semester, I found

myself assuming a managerial role for the team. I would communicate and remind all the

members of our team the dates and deliverables required for that week and weeks in advance. I

also urged my team members to complete assignments with a time buffer in mind. This ensured

that our deliverables were completed in a satisfactory and timely manner.

My main contributions were the analog system design and PCB fabrication. However, I

was also involved in many other aspects of the project. One example is correcting the algorithm

for the frequency detection. I assisted Tony Liechty with research, calculation, and determination

of methodologies for correcting the frequency detection. I also completed a number of technical

documents necessary for project completion.

Page 57: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

A-2

A.2 Contributions of Charles Lan:

My individual contributions to the project started out as the lead software developer

for the team. However, after the software was designed my role turned into support for PCB

population and fixes and software implementation.

During the beginning of the semester I spent my time deriving algorithms that could

be used for frequency detection. This period of algorithm development is highlighted by

utilizing a directx simulation of the ADC for an incoming song. Additionally it was also spent

looking up low power components so the MIDI-Phone could be powered over USB.

While completing the software design report, I designed each major block necessary in

the MIDI-Phone, including what data they required, what module they were supposed to use and

where the data is stored. Additionally, I worked out a schedule and a path for our software

development in order to eliminate the confusion for which block we should implement first.

When the PCB came in I assisted Tony and Roy in soldering the components together.

After we got the jtag programmer I partnered with Tony and started writing the code for the

MIDI-Phone. The main problem we had in implementing all our blocks was simply getting the

modules of the DSP to work, such as the ADC, SPI, I2C. By looking references up together with

Tony we were able to code the blocks together and assist each other in debugging.

After all the modules were useable together with Tony we wrote all the functions

necessary to communicate with the LCD via the GPIO pins available. At this stage Tony and I

switched focus while he wrote the USB and MIDI communications code, I focused on the main

component of the program, frequency and amplitude detection and writing the LCD display

functions. I developed a threshold crossing algorithm for use in frequency detection. Upon

implementation it was proved that this algorithm was too unstable even with the filter we

designed and we turned to the method Tony found consisting of autocorrelation.

Following the completion of frequency and amplitude detection I turned my efforts

onto creating an easy to read display for the MIDI-Phone. After implementation of this display

function, the project was complete. The last of my efforts have turned to proofreading

documentation and preparing for the final presentation.

Page 58: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

A-3

A.3 Contributions of Tony Liechty:

My role consisted mainly of making sure all of the different parts of our circuit worked

together. This involved working with Steve who was responsible for our analog circuit and

Charles who was responsible for software, and Roy who helped a lot during the soldering and

testing.

Because I was responsible for the component section rational and the design constraint

analysis homework I spent a lot of time picking our parts and making sure that they would

interface with each other correctly. After selecting parts I played a major role in connecting

them together in the schematic along with Charles. I did the initial placement of the PCB parts

allowing for a small PCB and making it so that it would be easier to route. I then worked with

Steve to route the PCB and make sure that we would not need to fly wire anything.

Once the PCB came in I was anxious to populate the board, and worked mainly with

Roy to do this. Because I have had practiced soldering, I took care of the IC chips while Roy

was really good with the discreet components. We would help each other as one held down the

part the other would solder. I also worked with Steve in the testing of the PCB one section at a

time.

Once the DSP was soldered I verified that it could be programmed with the OnCE

connector, and started to bring up each of the peripherals one by one. This consisted of working

with Charles and looking at datasheets to determine what to set each of the peripheral registers

to.

Once all of the peripherals were up I broke off and worked on the SPI to USB interface. I

was responsible for this because I have worked with USB in the past and have already had a

handle of how to comply with the USB protocol. I first made sure I could read and write to

registers within the USB chip, and then made it so that I could communicate with the computer.

I set up all of the USB descriptors that define what type of device is connected. I then made it so

that USB bulk transfers required for MIDI devices worked.

After the MIDI over USB interface worked I then jumped back to working with Charles

on the rest of the program. He wrote an initial frequency detection algorithm that we tried out.

It worked decently well but not as well as we had hoped. I then researched more frequency

detection methods and found one called autocorrelation. I helped implement this algorithm and

optimize it to run faster allowing it to complete in time before the next set of samples arrived. I

Page 59: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

A-4

found a method called parabolic interpolation that is used to more accurately determine a

minimum or maximum of a graph. With the help of Steve I implemented that in software to

more accurately determine the frequency being played.

Page 60: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

A-5

A.4 Contributions of Roy Scheck:

As team leader my contributions should be oriented towards the management side.

However, the team dynamics called for a more laissez-faire approach. The members of team 3

were all very independent and self motivated, also all of the team members lived in extremely

close proximity (three in the same apartment) which decreased the need of someone to call “team

meetings”. A leadership role was not required. Instead I oriented most of my time and effort

towards assistance of the three major components of our device: software, analog and digital

circuitry, as well as packaging and assembly.

My role in the design of the project was oriented more towards the assistance role. I

had no specific specialization, which allowed me to gravitate where help was needed. Initially I

helped to brainstorm ideas and algorithms during the onset of the project. When it came time to

design the project, I helped design and test small circuits that would be used in the analog portion

of the PCB. Primarily this was done to free up the analog specialist so he can concentrate on

more important things. Also I took part in component research and selection. Time was spent

looking for ICs and components that met our requirements and were also cost effective. Later,

when the design was initially complete, I spent a significant amount of time reviewing the

proposed design for mistakes. This prevented any last minute alterations of the PCB.

I played a significant role in the assembly of the PCB and testing of populated board.

When the board was received Tony and I spent time populating and testing the board. Power

supplies were soldered and testing ensured they supplied 5 volts. Voltage regulators had to

ensure that 3.3 volts was supplied to the proper traces. Other components populated and tested

included: condenser microphone, analog filter, DSP and various other discrete components. I

also tested the connections after every solder to ensure there were no open circuits present on the

PCB.

Packaging was a task in which I was the main contributor. Selection of the enclosure

had to meet fairly specific standards, so significant amounts of time was spent modeling and

creating layouts of how the parts would be placed in the enclosure. I also machined the

enclosure to fit the specifications of our components. This included creating openings for the

LCD, microphone, RPG, and USB-B connector as well as mounting of the PCB while

considering special constraints.

Page 61: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

B-1

Appendix B: Packaging Note all drawings referenced from: http://www.tekoenclosures.com/drawings/pdfs/Hand_Held/tks.pdf

Figure B.1 Top view of packaging

Figure B.2 Back view of packaging

Page 62: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

B-2

Figure B.3 Bottom view of packaging

Figure B.4 Side view of packaging

Page 63: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

B-3

Figure B.5 Top picture of finished packaging

Figure B.6 Side picture of finished packaging

Page 64: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report

G-1

Appendix C: Schematic

Page 65: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project
Page 66: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

D-1

Appendix D: PCB Layout Top and Bottom Copper

Figure D.1 PCB Top layer with silkscreen

Figure D.2 PCB Bottom layer with silkscreen

Page 67: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

G-1

Appendix E: Parts List Spreadsheet

Item Number Quantity Description Part Number Manufacturer 1 1 Digital Signal Processer MC56F8014 Freescale 2 1 USB Peripheral/Host Controller with SPI Interface MAX3421E Maxim 3 1 LCD CFAH1602B-YTI-JP Crystalfontz 4 2 Fast-Transient-Response 1-A Low-Dropout Linear Regulator TPS76733 Texas Instruments 5 1 Omnidirectional Back Electret Condenser Microphone Cartridge WM-64PN Panasonic 6 1 Nonvolatile, I2C-Compatible 256-Position, Digital Potentiometer AD5259 Analog Devices 7 1 8th-Order, Lowpass, Elliptic, Switched-Capacitor Filter MAX7404 Maxim 8 1 2.2V, 50MHz, Low-Noise, Single-Supply Rail-to-Rail Operational Amplifier OPA365 Texas Instruments 9 1 Rotary Encoder, 2 Bit, Binary Code 288T232R161A1 CTS 10 1 Pushbutton Pushbutton Generic 11 1 Capacitor Non-Polar (100 nF) Capacitor Generic 12 3 Capacitor Non-Polar (1 uF) Capacitor Generic 13 7 Capacitor Non-Polar (0.1 uF) Capacitor Generic 14 1 Capacitor Polar (100 uF) Capacitor Generic 15 1 Capacitor Non-Polar (4.4 uF) Capacitor Generic 16 1 Capacitor Polar (4.7 uF) Capacitor Generic 17 2 Capacitor Polar (10 uF) Capacitor Generic 18 1 Resistor (2.2k Ohms) Resistor Generic 19 1 Resistor (500 Ohms) Resistor Generic 20 2 Resistor (1k Ohms) Resistor Generic 21 1 Resistor (8 Ohms) Resistor Generic 22 2 Resistor (75k Ohms) Resistor Generic 23 1 Resistor (47k Ohms) Resistor Generic 24 2 Resistor (33 Ohms) Resistor Generic 25 5 Resistor (10k Ohms) Resistor Generic 26 1 Resistor (2.85k Ohms) Resistor Generic 27 2 Resistor (250k Ohms) Resistor Generic

Page 68: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

D-1

Appendix D: PCB Layout Top and Bottom Copper

Figure D.1 PCB Top layer with silkscreen

Figure D.2 PCB Bottom layer with silkscreen

Page 69: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

G-1

Appendix E: Parts List Spreadsheet

Item Number Quantity Description Part Number Manufacturer 1 1 Digital Signal Processer MC56F8014 Freescale 2 1 USB Peripheral/Host Controller with SPI Interface MAX3421E Maxim 3 1 LCD CFAH1602B-YTI-JP Crystalfontz 4 2 Fast-Transient-Response 1-A Low-Dropout Linear Regulator TPS76733 Texas Instruments 5 1 Omnidirectional Back Electret Condenser Microphone Cartridge WM-64PN Panasonic 6 1 Nonvolatile, I2C-Compatible 256-Position, Digital Potentiometer AD5259 Analog Devices 7 1 8th-Order, Lowpass, Elliptic, Switched-Capacitor Filter MAX7404 Maxim 8 1 2.2V, 50MHz, Low-Noise, Single-Supply Rail-to-Rail Operational Amplifier OPA365 Texas Instruments 9 1 Rotary Encoder, 2 Bit, Binary Code 288T232R161A1 CTS 10 1 Pushbutton Pushbutton Generic 11 1 Capacitor Non-Polar (100 nF) Capacitor Generic 12 3 Capacitor Non-Polar (1 uF) Capacitor Generic 13 7 Capacitor Non-Polar (0.1 uF) Capacitor Generic 14 1 Capacitor Polar (100 uF) Capacitor Generic 15 1 Capacitor Non-Polar (4.4 uF) Capacitor Generic 16 1 Capacitor Polar (4.7 uF) Capacitor Generic 17 2 Capacitor Polar (10 uF) Capacitor Generic 18 1 Resistor (2.2k Ohms) Resistor Generic 19 1 Resistor (500 Ohms) Resistor Generic 20 2 Resistor (1k Ohms) Resistor Generic 21 1 Resistor (8 Ohms) Resistor Generic 22 2 Resistor (75k Ohms) Resistor Generic 23 1 Resistor (47k Ohms) Resistor Generic 24 2 Resistor (33 Ohms) Resistor Generic 25 5 Resistor (10k Ohms) Resistor Generic 26 1 Resistor (2.85k Ohms) Resistor Generic 27 2 Resistor (250k Ohms) Resistor Generic

Page 70: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 71: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 72: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 73: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 74: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 75: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 76: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 77: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 78: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 79: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 80: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 81: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 82: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 83: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 84: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 85: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 86: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 87: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 88: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 89: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 90: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 91: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 92: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 93: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 94: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 95: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 96: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 97: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 98: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 99: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 100: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 101: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

For Evaluation Only.Copyright (c) by Foxit Software Company, 2004 - 2007Edited by Foxit PDF Editor

Page 102: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

G-1

Appendix G: FMECA Worksheet

Failure No. Failure Mode Possible Causes Failure Effects Method of Detection Criticality Remarks

A1 Vcc = 0 V Wall wart/USB cable

disconnected, TPS76733 damaged

The device will not activate

Observation Medium System will not function

A2 Vcc > 3.3 V or 5 V

TPS76733 damaged, Capacitor short (C91,

C94)

The device will cause other

components to fail and

eventually the system itself

Observation High

Could cause entire product to fail and poses danger to user

A3 Exposure to maximum

rating

Wall wart/ USB cable faulty

Voltage regulators will fail

over time Observation High

Product will be limited to a shortened

lifetime and poses danger to

user

Page 103: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

G-2

Failure No. Failure Mode Possible Causes Failure Effects Method of Detection Criticality Remarks

B1 No audio

output

Microphone fault, Amplifier fault or gain

set too low, Digital Potentiometer open-fault, Filter fault or cutoff set too low

The device will not output any

data Observation Low

Operation will still continue

B2 Audio input

exceeds expected value

Amplifier fault or gain is set too high, Loud

input by user

Signal will be incorrectly analyzed

Observation Low

The signal will saturate but still remain safely below VCC

B3 Noisy signal Filter fault or cutoff set

too high, External interference

Signal will be incorrectly analyzed

Observation Low Operation will still

continue

Page 104: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

G-3

Failure No. Failure Mode Possible Causes Failure Effects Method of Detection Criticality Remarks

C1 No power

Voltage regulator fault, bulk or bypass

capacitor fault (C41, C42, C43, C44)

The device will cease operation

Observation Medium No damage to the system

C2 Improper power level

Voltage regulator fault The device may become damaged

Observation Medium Potential for

damage if power level is high

C3 Incorrect output

Software error, PIN damage or ESD

MIDI conversion will be incorrect or

non-existent Observation Medium

ESD and pin damage may

damage system

C4 System

sporadically resets

Reset switch fault, Voltage regulator fault, Power connector fault

System will restart Observation Medium No damage to

system

C5 No output on

the LCD

Software error, DSP fault, resistor fault (R17, R75, R76)

System may operate normally Observation (LCD) Low

Other processes will not be impeded

C6 Incorrect

output on the LCD

Software error, DSP fault

System may operate normally Observation (LCD) Low

Other processes will not be impeded

Page 105: ECE 477 Final Report Fall 2007 Team 3 Humphrey’s Treasure ...€¦ · ECE 477 Final Report Fall 2007 -5- 3.0 Constraint Analysis and Component Selection 3.1 Introduction Our project

ECE 477 Final Report Fall 2007

G-4

Failure No. Failure Mode Possible Causes Failure Effects Method of Detection Criticality Remarks

D1 No power or

improper power level

Voltage regulator fault, bulk or bypass

capacitor fault (C51, C52),

USB connection fault

The device will cease operation Observation Medium

System operation will cease

D2 Improper

power level Voltage regulator fault, USB connection fault

The USB Controller will

become damaged Observation Medium

Damage will result to the USB

Controller

D3 Transmit error Software error, DSP fault, USB cable fault

MIDI conversion will be incorrect or

non-existent Observation Medium System operation

will cease

D4 Receive error Software error, DSP

fault, USB cable fault, host computer fault

Operation will pause until

expected data is received

Observation Medium System operation will cease