• No results found

Development of an Adaptive Voice Amplifier for Medical Purposes

N/A
N/A
Protected

Academic year: 2021

Share "Development of an Adaptive Voice Amplifier for Medical Purposes"

Copied!
28
0
0

Loading.... (view fulltext now)

Full text

(1)

Master Thesis

alardalen University

School of Innovation, Design and Engineering

Development of an Adaptive

Voice Amplifier for Medical

Purposes

Authors:

Fredrik Eklund mr.fredrik.eklund@gmail.com

Fredrik Paulsson paulsson.fredrik@gmail.com

Supervisor:

Martin Ekstr¨

om

Examiner:

Mikael Ekstr¨

om

(2)
(3)

Abstract

The problem that will be discussed in this thesis report will be whether it is possible to construct an adaptive voice amplifier that rivals the al-ready commercially available ones.

The report first attempts to give some insight and background into the fields considered by this thesis and after that the implementation section of the report will try to give some deeper insight into which problems occured and how some of them were solved.

The result of this thesis report was that it is quite possible to construct an adaptive voice amplifier given enough time. This report will give an insight into the results acquired and some guidelines for constructing such a device.

Also found in this report are some possible improvements to the system that would make the system perform even better.

This thesis has been very rewarding as a thesis project since the prob-lems has been very challenging and very fun to work with.

(4)

Contents

1 Acknowledgements 6

2 Introduction 7

3 Background & Related Work 8

3.1 Background . . . 8

3.1.1 Logopaedics . . . 8

3.1.2 The Anatomy of speech . . . 8

3.1.3 Electronics . . . 9

3.1.4 Acoustics . . . 9

3.1.5 Acoustic Feedback . . . 9

3.1.6 Wind Noise . . . 10

3.1.7 Li-Ion Battery Charging . . . 10

3.2 Related Work . . . 10 4 Implementation 11 4.1 System blocks . . . 11 4.1.1 Power management . . . 11 4.1.2 Microphone pre-amplifier . . . 12 4.1.3 Audio codec . . . 13 4.1.4 Sample clock . . . 13 4.1.5 Microcontroller . . . 13 4.1.6 Speaker . . . 15 4.1.7 Peripherals . . . 15 4.1.8 Serial terminal . . . 15 4.2 System Functions . . . 15 4.2.1 Adaptive Amplification . . . 15

4.2.2 Acoustic Feedback Attenuation . . . 16

4.2.3 Wind Noise Attenuation . . . 16

5 Results 17 5.1 Serial communication over UART . . . 17

5.2 Battery charging . . . 17

5.3 System gain and Audio Quality . . . 18

5.4 System power drain . . . 18

5.5 Acoustic feedback . . . 21 6 Improvements 22 6.1 Software Improvements . . . 22 6.2 Hardware Improvements . . . 22 7 Conclusion 24 8 References 25 8.1 Litterature . . . 25 8.2 Datasheets . . . 25 8.3 Web pages . . . 26

(5)

9 Appendix 27 9.1 Glossary . . . 27 9.2 Source Code . . . 28 9.3 Header Files . . . 36 9.4 Schematics . . . 40

List of Figures

1 Functional diagram of feedback in a system . . . 9

2 Top level overview of the first prototype . . . 12

3 Principle of a Bridge Tied Load configuration . . . 14

4 Functional diagram of the sample clock circuit . . . 14

5 Picture of serial transmission of the letter ’K’. . . 17

6 Graphs showing battery voltage and charge current over time. . . 18

7 Picture showing the signal level with white noise input at the microphones. . . 19

8 Picture showing the signal level with white noise input after the preamplifer. . . 19

9 Picture showing the signal level with white noise input at the speaker. . . 20

(6)

1

Acknowledgements

The writers of this report would like to extend our gratitude to our thesis supervisor Martin Ekstr¨om and our thesis examiner Mikael Ekstr¨om both at M¨alardalen University for their valuable help with many practical and theoret-ical issues. We would like to thank Alf Karlsson from M¨alardalen University for his help with this thesis. Along with these we would also like to extend our gratitude to the local company Netshell for giving us the opportunity to render this thesis possible and for their encouragement along the way. It is also in order to thank the entire coffee industry for the work they have done. Without you we would be nothing. Finally we want to thank our patient and supporting girlfriends for bearing with us during the long hours that this work has taken from them.

(7)

2

Introduction

This report was written as part of the examination for the degree project for a degree in Master of Science in Engineering at M¨alardalen University. This project was performed in the summer and early fall of 2010. The goal of this project was to determine the feasibility of developing a voice amplifier for medi-cal purposes with adaptive signal processing. These kind of voice amplifiers are utilized to assist people with speech difficulties to ease their problems of making themselves understood.

The motivation for this project was to improve the quality and functionality of the existing range of voice amplifiers available. As such the construction of this system needed both electronic and programming skillsets in order to be realized and as such it was exemplary as a degree project.

The difficulties encompassed in this assignment ranged from electronic con-struction problems that needed solving such as filtering out unwanted sounds like acoustic feedback and ”wind” noise, as well as having to to learn the prac-tical skills needed in circuit design issues. Such problems involved not having used any electronic design automation tools (EDA) before. The problems that needed to be solved from the programming perspective was problems such as the adaptive amplification and digital filter designs. Other problems with the programming was such problems as having no previous experience developing in a environment. Such problems was quickly solved however since excellent documentation was readily available.

Noteworthy in this report is that some parts may have been censored due to secrecy reasons.

(8)

3

Background & Related Work

The contents of this chapter will attempt to give some degree of deeper un-derstanding of the problems faced when constructing a voice amplifier. Several different fields are addressed and several problems are highlighted. Finally some related work is presented and briefly described.

3.1

Background

The problem that this report will try to determine if it is possible to construct a voice amplifier with parameters which rivals other brands of voice amplifiers with greater quality at a lower cost. Such quality concerns include feedback elimination as well as a system to normalize output volume amongst others.

The field of the work considered within this report clearly fits into the in-terdisciplinary sciences since these areas touch analogue and digital electronics, logopaedics as well as the field of acoustics. As such, some background into these fields might be appropriate.

3.1.1 Logopaedics

The field of logopaedics is involved with the treatment and study of defects regarding speech and as such the work of this report might be of interest for this line of professionals. This due to the fact that the device described within this report might be utilized as an aid for people with certain speech disorders. These problems can manifest themselves in various forms but among the most common are [1]:

• Phonasthenia: an ailment from overexerting the voice.

• Vocal fold edema: a disorder which manifests itself by a gathering of fluids in the vocal cords causing them to swell as well as vocal fold.

• Polyps: a disorder which can be described as calluses on the vocal cords due to vocal exertion.

3.1.2 The Anatomy of speech

The speech organ of the human is a fairly straightforward organ. The air is inhaled into the lungs and as it is forced to exit during exhalation the air must pass through the vocal cords which will then oscillate if tensed by the muscles in an appropriate manner. Further manipulations of the vibrating air that continues on its way out of the body is possible with the help of the tongue and the oral cavity. This process with three steps with which to manipulate the exiting air is what makes it possible to produce speech. As such defects on any of these aforementioned parts will result in impairments in speech of different degrees. In this report an emphasis on defects of the vocal cord will be of greatest interest. This because these defects are the most common among professionals that rely on the use of their voice. Such professionals include teachers, singers, priests and many others [1].

The highest of the fundamental frequencies of speech is in the order of about 4 kHz with harmonics which goes up even higher into the range of about 10-20

(9)

Figure 1: Functional diagram of feedback in a system

kHz [2]. The harmonics is what gives the voice the spectrum needed to not sound artificial. The artificial quality of ”synthetic” speech is a product of not having included enough harmonical content to the fundamental frequency. 3.1.3 Electronics

The electronics used in this thesis range from basic understanding of both analog and digital electronics. The analogue parts include knowledge of Ohm’s law and operational amplifiers. The digital electronics include filtering techniques that might be required in general and some knowledge about digital filtering [3] in specific as well as knowledge of integrated circuits.

3.1.4 Acoustics

Some knowledge about the basic waveforms and general behaviour of audio is required since a great amount of work in this report deals with shaping these waveforms. Furthermore a basic understanding of how to interpret the digital representation of audio were required in order to be able to single out what parts of the data that could be manipulated and how.

3.1.5 Acoustic Feedback

The term acoustic feedback is a common term among people that work with sound and the amplification of it. The sound that the feedback results in is characterized by a sharp high-pitched squealing sound, howling, that most peo-ple recognize. The reason for the acoustic feedback is that a loop between the microphone and the speaker occurs and that the system gain is greater than one [4]. The sound the microphone receives is amplified and is then sent to the speaker which sends it out to the microphone again. This chain of events can be seen in figure 1.

Since the sound pressure levels decays with the distance [5], one of the easiest ways to eliminate feedback is to increase the distance between microphone and speaker. Another way to reduce the feedback in the system is to point the speakers away from the microphone thus making the sound pressure levels decay before reentering the microphone. Other more technically advanced methods is to use an equalizer to dampen the gain at frequencies where feedback occurs or a notch filter. Another technically advanced method is the Frequency Shifting

(10)

technique. A technique that basically shifts the entire spectrum by a few Hertz up or down [11].

3.1.6 Wind Noise

An audio noise form named wind noise which is characterized by its low fre-quency humming sound that originates from the act of blowing into the micro-phone or pronouncing letters as for instance ”t” or ”p”.

3.1.7 Li-Ion Battery Charging

Of concern for this report was that the system to be constructed was driven by battery. More precisely a Li-Ion cell which requires some additional logic in order to ensure a proper and safe charging cycle. The dangers of charging a Li-Ion cell incorrectly range from the battery losing its capacity very quickly to actual explosive decomposition [12].

3.2

Related Work

This field of research has earlier been subjected to similar or closely related studies. Some of the papers studied belong to fields including hearing aid de-velopment, feedback cancellation, digital filters and many others.

The field of hearing aids has proved to have many common problems with the voice amplifier since they share many traits. One of these traits is the ability to have large enough gain while avoiding acoustic feedback since microphone and speaker is situated closely to each other [6]. Another trait is the fact that they are mobile in the context that they are carried on your person and not attached to an electric outlet and as such is battery driven.

The acoustic feedback has been of the major obstacles to overcome and as such several documents has been read in order to determine a good solution of our own. A few of these are worth mentioning and among those are: [7] [8] and [3] as they have provided a solid theoretical basis of understanding in the field of signal processing. In the area of digital filtering a few books have been consulted in order to gain the theoretical knowledge needed to design and implement working digital filters. Two of those are Signaler och System [8] and Digital Signal Processing [3].

There are also commercial companies constructing voice amplifiers such as Asyst [16], Xena Medical [17] and Abilia AB [18] to mention a few.

(11)

4

Implementation

The solution of this master thesis project was approached by identifying a block structure of the individual parts that would realize the system. The blocks were designed as separate circuits that were then constructed and tested individually to the greatest possible extent. The aim has been to isolate the system blocks and to continuously add functionality as the individual parts were constructed and tested to function properly.

The construction and testing of the system blocks were initiated in a first prototyping stage. The aim of this stage was to ensure that the components in the system was able to communicate with each other properly and to ensure a basic microphone amplification functionality.

A second prototyping stage was carried out to make the system smaller when assembling everything and also to achieve even better quality of the system performance as well. One of the aims of this prototype was to reduce the noise due to the greatly reduced number of wires in the system.

4.1

System blocks

The system blocks were designed to meet the specification of the final product whose main purpose was to amplify speech. This required a microphone with a pre-amplifier as well as a speaker with a speaker amplifier. The system was chosen to be digital which required an analog to digital (ADC) and a digital to analog (DAC) converter. These components could be found in a single in-tegrated circuit component, an audio codec, that were chosen for this project. The system also needed a microcontroller for system logic and audio signal pro-cessing. The fact that the system was intended for mobile use and thus powered by a battery, required that a power management system with a charger and regulation circuit was needed. The overall structure of the system blocks can be seen in figure 2. The separate blocks will be explained in the sections that follows.

4.1.1 Power management

The system was powered by a 1100 mAh, 3.7 Volts lithium-ion battery (model no. , part no. ) intended for use in mobile phones. As there were little information regarding this specific model of battery and the fact that lithium-ion required a sophisticated charging supervisory system, the charging was carried out with caution. The actual charging was handed over to a

from . This

charging IC allowed the charger circuit to be powered from a 5 Volts Universal Serial Bus (USB) port, which satisfied one of the requirements of the system. The charger IC monitored the battery voltage and fed it with an appropriate current. The charger IC was configured to stop charging when the battery voltage had reached 4.2 Volts, after which a light emitting diode that indicated that the battery was charging, should switch off.

The rest of the system was powered by 3.3 Volts which required the battery voltage to be regulated down to the system voltage. The regulation were done by the low-dropout regulator, , that had an ability to source up to

(12)

UART Microphone pre-amplifier ADC/DAC Microcontroller Speaker amplifier Power management Sample clock Microphone Speaker Audio codec

USB Lithium-ionbattery

RS-232 Peripherals

SPI I²S

Figure 2: Top level overview of the first prototype

500 milliampere and to be be supplied with an input voltage range of 3.0 to 12 Volts [13].

To conserve system power all unused modules in the microprocessor and audio codec has been disabled.

4.1.2 Microphone pre-amplifier

The first prototype used one microphone that used the microphone pre-amplifier inside the audio codec. The second prototype’s input stage was realized with two microphones placed close to each other, connected to an instrumentation amplifier. The two microphone setup was chosen as an analogue solution to remove the acoustic feedback that arose when using one microphone close to the speaker. The instrumental amplifier amplifies the difference between the microphones thus cancelling the audio that both microphones pick up. Another positive side-effect of this is the ability to avoid ambient sounds from ever getting into the system.

The microphones used were two omnidirectional electret condenser micro-phones with a built-in field-effect transistor (FET) that needed power to func-tion. They were connected to the power supply through a 2.2 kΩ resistor thus allowing a current of at most 1.5 mA to flow through each microphone.

I =V R =

3.3 V

2.2 kΩ = 1.5 mA

The signal was then elevated to half the supply voltage to be used as input for the operational amplifiers that made up the instrumental amplifier. This was required because the operational amplifiers were of single supply type and thus could not amplify negative voltages. The difference of the signal, which

(13)

were in the 20 millivolts range, was then amplified approximately ten times to reach 200 millivolts. To avoid that the signal would be cut off out by the op-erational amplifiers when the signal difference was negative, the output signal’s zero reference was also set to half of the supply voltage.

4.1.3 Audio codec

The audio codec used in this project was the from

and was selected for its rich set of features where some of them included a built in microphone pre-amplifier and speaker amplifier as well as automatic level control and built in filters. The codec was also restrictive in its use of power, which matters much in a mobile device. The function of the audio codec was to convert the analogue microphone signal to a digital signal to be processed by the microcontroller. The codec also functioned as a converter for the digital signal received from the microcontroller back to an analog signal that were to be the output of the speaker. The microcontroller was setup to communicate with the audio codec via the Serial Peripheral Interface (SPI) and the audio data was transferred between the microcontroller and the codec via the Inter-IC Sound (I2S) protocol.

The product specification required high fidelity audio and thus constrained the reproducible frequencies to be greater or equal to the human hearing spec-trum which ranges from 20 Hz to 20 kHz [9]. The sample rate was then chosen to 48 kHz and thus the highest reproducible frequency was 24 kHz according to the Nyquist sampling theorem [8]. As mentioned in 3.1.2 this was well within what was needed to properly process speach. The sample rate of the audio codec was determined by a master clock generated via a oscillator circuit in the system mentioned in section 4.1.4.

The audio codec also contained a mono speaker amplifier which was con-nected to the DAC output with a bridge tied load (BTL) configuration. Con-necting the speaker this way allowed a theoretical increase of the signal power by a factor of four [10]. A graphical overview of this configuration can be seen in figure 3.

4.1.4 Sample clock

The sample clock required for the audio codec to sample at 48 kHz was 12.288 MHz. The clock was generated by from , a resistor-set oscillator that was configured to generate a 12 MHz clock. This clock were then adjusted to 12.288 MHz by a phase-locked loop (PLL) inside the audio codec depicted in figure 4.

4.1.5 Microcontroller

The microcontroller used was a from . This microcontroller was chosen for its digital signal processing capabilities and rich set of peripherals. The also featured a free of charge student edition of the development software and a relatively cheap programmer was available.

The microcontroller was configured with its internal fast resistor capacitor (FRC) oscillator and PLL to run at 80 MHz This yielded a computing speed of about 40 million instructions per second (MIPS) as the oscillator clock was

(14)

Input

-1

-+

L-(-R)=L+R

Figure 3: Principle of a Bridge Tied Load configuration

Oscillator 12 MHz PLL

Audio codec

12.288 MHz

(15)

divided by two and most instructions was specified to take one clock cycle [14]. With a frequency of 48 kHz this resulted in a headroom of about 830 instructions per sample for signal processing.

40 M IP S

48 ksps = 833.333... instructions per sample 4.1.6 Speaker

The speaker used was a regular 4 Ω speaker. The quality of this speaker was a limiting factor for the audible quality of the amplified speech. This because it was limited in the amount of reproducible frequencies. This in turn had the positive side effect of suppressing some frequencies of acoustic feedback. 4.1.7 Peripherals

The peripherals included a hexadecimal rotary encoder connected to four of the microcontrollers input pins with pull-down resistors. The rotary encoder sets a hexadecimal digital value on its four output pins. This was used for setting variables other than just on or off, such as for volume adjustments. Also, some light emitting diodes were used for various status indications, for instance if the power was enabled or not and as a state indicator for the microcontroller. 4.1.8 Serial terminal

A universal asynchronous receiver/transmitter (UART) interface was imple-mented for debug purposes that allowed messages to be printed from the mi-crocontroller to a personal computer through an external UART to RS-232 converter. This interface was used for debugging when dealing with a micro-controller with very limited capabilities to communicate with the user.

4.2

System Functions

The system was specified to incorporate a couple of features that would make the final product fulfill its purpose as well as making it more user friendly. These features include an adaptive amplification function and the removal of acoustic feedback and these features will be covered below.

4.2.1 Adaptive Amplification

The system was specified to have a feature that would penalize the user if he or she spoke to loudly, and thereby would stress the users voice. The user was in this manner forced to speak quietly thus relaxing his/her voice. The penalty was chosen to completely turn off the speaker amplification and to turn it on again first after the user was speaking in a more moderate manner.

The adaptive amplification was implemented by calculating an average of the signal power that the user was producing via the microphones. When the signal power reached a predefined value, the microcontroller was programmed to send zeros to the audio codec and and to turn the speaker volume to its minimum setting. This state was kept for two seconds or until the user spoke in a more gentle way, and thereby reducing the signal power.

(16)

4.2.2 Acoustic Feedback Attenuation

Specified was was also a feature to remove the howling noise when holding the microphone to close to the speaker. The removal of acoustic feedback was first attempted to be filtered out by applying a notch filter featured inside the audio codec. Attempts were also made by applying more advanced finite impulse re-sponse (FIR) notch filters with coefficients calculated with numerical optimiza-tion by using an General Public License (GPL) implementaoptimiza-tion of Remez [7] algorithm by Jake Janovetz.

The notch filters were positioned with its center frequency at the peak of the howling, detected with an implementation of a frequency detector. When the frequency detector detected a change in frequency, the filter center frequency was shifted to this frequency.

The frequency detector was counting the number of zero crossings detected in the sample buffer and thus calculating a frequency from that information. To avoid detecting frequencies that were not acoustic feedback, the frequency detection only became activated when the signal power reached a predefined threshold.

Another attempt was to filter out the howling already at the input stage of the system. This was implemented analogously using the two microphone setup that attempted to attenuate the howling.

4.2.3 Wind Noise Attenuation

In order to reduce the impact of wind noise the built-in highpass filter of the audio codec was utilized. This filter was a second order filter that attenuated the unwanted signals with 40 dB per decade. The operating cut-off frequency of this filter was set to Hertz.

(17)

Figure 5: Picture of serial transmission of the letter ’K’.

5

Results

In this section different results from the work will be presented. Some of these results worth mentioning are for instance battery related behavior. In the bat-tery subsection of this section a more in-depth overview is given.

A graph has been compiled to show the systems power load on the battery in order to verify that the battery chosen would have sufficient power to drive the system for as long as the specification stated.

Furthermore, the system gain was also of great interest during the work with this paper and as such some results regarding the gain of the final system can be found below.

Also found in this section is some results regarding acoustic feedback supres-sion and some results regarding the UART communication.

5.1

Serial communication over UART

The serial communication proved to be fairly straightforward to implement with some minor issues with regard to the baud rate which was quickly resolved. Further problems involved the voltage difference over the communication lines between the microcontroller and the computer. This was solved using a com-mercially available RS-232 level shifter. The last issue encountered with the communication turned out to be as simple as using the wrong settings on the receiving computer. A problem quickly resolved when consulting the specifica-tion for the UART module. An example of a transfer can be seen in figure 5 on page 17 where the ASCII letter ’K’ is transmitted.

5.2

Battery charging

One major problem with the battery charging component of this thesis project was the fact that no proper data sheet could be obtained for the battery cell used. This led to some guesswork regarding certain settings in the charging

(18)

3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 4 4.1 0 50 100 150 200 250 300 350

Battery voltage (Volt)

Time (minutes) Battery voltage vs. time

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0 50 100 150 200 250 300 350

Charge current (Ampere)

Time (minutes) Charge current vs. time

Figure 6: Graphs showing battery voltage and charge current over time.

supervisor IC. Under the circumstances the battery turned out to be charg-ing adequately. However some issues regardcharg-ing the notification of a completed charge cycle turned out to be problematic. The charging IC featured a output pin to connect a light emitting diode for this notification. Every attempt made to make the light to turn off when the battery was fully charged failed.

As can be seen on figure 6 the battery charge supervisor sources enough cur-rent into the battery during the charge cycle. This was also what was expected from the data sheet.

5.3

System gain and Audio Quality

This section will both discuss the subjective quality perceived by the user as well as the results from measurements between the source of the audio and the output from the amplifier.

When a certain subjectively good level of gain was achieved in the sys-tem some measurements were taken in order to ensure that suitable gain was achieved. That gain can be seen on figure 7 when receiving white noise as input at the microphone stage. Also seen in figure 8 is the gain of the white noise after the pre-amplification stage. Finally seen in figure 9 is the gain at the speaker stage and as can be seen from the figures mentioned the system gain between input to output is:

440 mV

37.6 mV = 11.7 times

The perceived audio from the amplifier was close to identical to the actual person speaking even though one could hear a small difference between them.

5.4

System power drain

When a satisfactory level of stability of the system was achieved some amount of data was required to measure the system power drain. Those numbers can be seen in figure 10 on page 20. The measurements has been done by applying different loads to the system in order to get sufficient data to be able to calculate battery life in the system.

As can be seen in the figure the system power drain at start is zero and that it rapidly increases when the power to the circuit is switched on (at 20 on the time scale). The drain of the system at that time is then about 100 mA

(19)

Figure 7: Picture showing the signal level with white noise input at the microphones.

Figure 8: Picture showing the signal level with white noise input after the pream-plifer.

(20)

Figure 9: Picture showing the signal level with white noise input at the speaker. 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0 20 40 60 80 100 120 140 160 180

Power drain (Ampere)

Time (seconds) Power consumption vs. time

(21)

when in a quiet room, that is, idling. After a while, at time 40, an increase in power drain is noticeable and that occurs when the system is actively fed with sound to amplify. Note that the system clips the system amplification when registering to loud a sound. This is to prevent the user of overexerting their vocal capabilities. This also have the positive side-effect of increasing battery life somewhat due to letting the system run in idle mode when the user has spoken too loudly into the amplifier.

With the 1100 mAh battery used and average drain of 110 mA, the system would be able to run ten hours in a single charge cycle according to the formula below. This satisfied the requirement of one working day of usage.

1100 mAh 110 mA = 10 h

5.5

Acoustic feedback

The attempts made with notch filters that shifted to the frequency of the howl-ing were hard to get right and did instead make the howlhowl-ing worse. This was because the filtered frequency only was the fundamental frequency of the acous-tic feedback. That is, the harmonics of the feedback was not cancelled out by the filter which lead to the feedback to just move one harmonic along the frequency scale. This in turn lead to the system identifying a new frequency where feedback occurred which then was set as the new frequency to filter. This behavior lead to the system jumping between two frequencies to filter which resulted in a kind of alarm sound.

Since there was hardware support for multiplications in the microcontroller there was sufficient processing power in the system to allow us to utilize digital filters. These was used to implement notch filters also at some of the harmonics of the howling. As the algorithm (Remez) used to compute the coefficients for the filter was quite computationally intensive and not optimized for the , these filters was implemented with fixed frequencies that were computed ahead on a personal computer. The result of this approach was similar to the single notch approach.

The solution with two microphones was the most successful, but required the user to speak sideways into the microphones to create a reasonable amplifi-cation. The reason for this was that all sound reaching both microphones at the same time was cancelled out by the pre-amplifier. Speaking sideways into the microphones caused the speech to reach the microphones at different times thus avoiding it to being cancelled out. The howling still occurred when holding the microphones very close to the speaker and the amplifier gain was very high, but for regular usage this would not be a problem.

(22)

6

Improvements

As in all work there is never such a thing as perfect and as such there are some points of improvement in this work as well. The possible improvements are divided into logical subcategories such as software and hardware improvements.

6.1

Software Improvements

There are connections prepared on the system to attach a SD-card bay and these connections are currently not in use. However that is merely a question about programming a suitable driver for it. The SD-card could then function as a recording medium for the audio that passes through the system.

In an effort to totally eliminate all acoustic feedback there would be a pos-sibility to make a digital equalizer in the software. This could be realized with the use of fast Fourier transform (FFT) and then manipulating the result with digital filters to attenuate needed bands of the audio spectrum.

There is also room to improve the handling of the Universal Serial Bus com-munication to allow for graceful handling of which current outputs the USB host can provide. As the system is constructed now it assumes that it is connected into a host that can source up to 500 mA.

Another improvement affects the rotary encoder that can be found in the system that controls the output volume of the speaker. This is currently con-trolled by a linear factor of 4 since the output register can handle a volume level of 63. This gives a resolution of the rotary encoder of: 64

16 = 4. That is every

step on the rotary encoder means an increase of the value on the encoder times 4. This gives a linear increase in the volume. The problem with this however is that every dB means an increase by a factor 2 of the volume. As such the encoder only works as expected in the last 4 or 5 steps of the rotational range. That is, the perceived volume rapidly decreases to a point where the sound cannot be heard anymore. This leads to not properly making use of all encoder steps. This could be fixed be making use of a non-linear weighted approach of how to encode the value of the rotary encoder.

6.2

Hardware Improvements

As previously stated some quirks regarding the state of the battery charge status LED has been encountered and as such that is one behavior in the hardware that can be improved. The system charges the battery just as it should when double checked against the datasheet [15] but the problem persisted anyway. Also an issue with the battery is the lack of a feature to shutdown the circuit when the battery is nearing a depleted state. This to avoid getting the system into a state where the supply voltage is below the specified supply of 3.3 Volts. This may be solved by for instance using a fuel gauge IC that are readily available from a range of distributors.

Further improvements can be done if spending even more time with choosing smaller components and dedicating enough time to the routing of the schematic which would then lead to an even smaller circuit which is highly beneficial when dealing with a hand-held mobile device such as this voice amplifier.

Even further improvements can be done in the microphone pre-amplification stage of the circuitry where the operational amplifier could be replaced with an

(23)

even better one with much higher common mode rejection ratio, CMMR. This to ensure that a maximal amount of acoustic feedback is suppressed at the analog level. This design is also good since it also suppresses ambient noise which will lead to a perceivably better sound quality.

A final hardware improvement could be to use directional microphones as these would be less prone to capture unwanted sound.

(24)

7

Conclusion

This section of the report is as the name of this chapter might suggest about the conclusions drawn from this project. As such there is many conclusions to be drawn.

As a start an easy conclusion to draw is that this thesis has been a highly interesting one with problems in both the electronic and programming domain. As such the work has been very stimulating. There also seem to be a great need in the industry and the users of these devices to have better functioning voice amplifiers.

The problems has been quite diverse in their nature ranging from learning the pitfalls of electronic designing and the programs that come with these as well as learning to design digital filters. Some issues has also been encountered with the development tools in respect to the compiler exhibiting strange errors at random intervals.

More particularly has the feedback problems turned out to be a bigger issue than preconceived. Several different attempts has been made in order to fully eliminate it but as the overall system gain and quality has improved the feedback has reappeared in the system. Some possible improvements to this problem can be read about further in the Improvement section of this report on page 22.

On the more general note a big conclusion made during the extent of this reports work was that planning your thesis work to take place during the summer when much of the industry and personnel have vacation might not always be a great idea. Some problems with this fact was encountered when having to order certain parts from a distributor that was entirely closed during the vacation.

(25)

8

References

8.1

Litterature

[1] Fritzell, Bj¨orn. Voice disorders and occupations. Log Phon Vocol 1996;12. page 7-12.

[2] Talbot-Smith, Michael. 2nd ed. Audio Engineers Reference Book. Focal Press. Oxford. United Kingdom.

[3] Emmanuel C. Ifeachor & Barrie W. Jervis. 1993. 1st ed. Digital Signal Pro-cessing. A Practical Approach. Addison-Wesley Publishers Limited. United States of America.

[4] Benesty, Jacob. 2008. Springer handbook of speech processing. Springer Ver-lag. Berlin.

[5] Tashev, Ivan Jelev. 2009. 1st ed. Sound Capture and Processing: Practical Approaches. John Wiley and Sons. Chippenham. United Kingdom. Great Britain.

[6] Robert E. Sandlin. 2000. 2nd ed. Textbook of Hearing Aid Amplification. Singular Publishing Group. San Diego. United States of America.

[7] Mitra, Sanjit K. 2nd ed. Digital Signal Processing A Computer Based Ap-proach. McGraw Hill. New York. United States of America.

[8] Lennart Harnefors & Johnny Holmberg & Joop Lundqvist. 2004. 1st ed. Signaler och system med till¨ampningar. Liber AB. Stockholm. Sweden. [9] Elaine Nicpon Marieb & Katja Hoehn. 2007. 7th ed. Human anatomy &

physiology. Pearson Education. San Fransisco. United Stated of America. [10] Self, Douglas. Audio Power Amplifier Design Handbook. Focal Press.

Ox-ford. United Kingdom.

8.2

Datasheets

[11] Rane Corporation. Understanding Acoustic Feedback & Suppressors, Ra-neNote 158. 2005.

[12] [13] [14] [15]

(26)

8.3

Web pages

[16] Asyst. retrieved 2010-11-04. http://www.asyst.us

[17] Xena Medical AB. retrieved 2010-11-04. http://www.xenamedical.se [18] Abilia. retrieved 2010-11-04. http://www.abilia.se

(27)

9

Appendix

Within this section various appendices can be found. These appendices cover a glossary, source code and schematics.

9.1

Glossary

BTL Abbreviation for Bridge Tied Load. A way to connect a speaker. CMMR Abbreviation for Common Mode Rejection Ratio. A value of how

much an operational amplifier can attenuate signals with that share com-monalities.

EDA Abbreviation for Electronic Design Automation. A program to aid the construction of an electronic circuit board.

EDEMA An abnormal accumulation of fluid beneath the skin or surface of an organ.

FIR Abbreviation for Finite Impulse Response. A digital filter type.

HARMONICS Frequencies higher than the fundamental frequency with even spacing between them.

IC Integrated circuit.

I2S Abbreviation for Inter IC Sound. A serial protocol for communicating

sound between two integrated circuits. LED Abbreviation for Light Emitting Diode.

LOGOPAEDICS The logopaedics or phoniatrics is a field concerned with issues of human speech and verbal communication disorders.

MIPS Abbreviation for Millions of Instructions Per Second. A measure of how fast a microprocessor can work.

PLL Abbreviation that stands for Phase-Locked-Loop. A device used to adjust clock signals.

RS-232 RS-232 is an abbreviation for Recommended Standard 232 and is a protocol for serial communication. Commonly found in a standard PC. SPI Abbreviation for Serial Peripheral Interface. A serial communication

pro-tocol.

UART Abbreviation that stands for Universal Asynchronous Receiver/Trans-mitter. A piece of hardware that translates data in parallel form into serial form.

(28)

Appendix 9.2, 9.3 and 9.4 on pages 28-42 was intentionally left out from this copy for secrecy reasons.

References

Related documents

Genom att använda en förenklad metod för mätning av syrgashalten i blodet som kommer tillbaka till hjärtat SvO2 har vi kunnat ta prover på alla patienter och för första

sivt sysslade med ursprunget och dess roll för det hierar­ kiska systemets vidmakthållande, åstadkom George Eliot i roman efter roman utmanande antitetiska mönster

Och det kan vara av att jag läser en till tidningsartikel om att nu har Trafikverket gett den här rapporten att vi kör mer och mer fast vi borde köra mindre och mindre bil i det

The choice of colour in this work has been especially difficult considering the multiple design elements (sound, physical contact, tactility and tufting). The thought of adding

Kapitalstrukturens utformning illustrerar både hur företaget är finansierat som hur pass självförsörjande företaget är. Med utgångspunkt i pecking order teorin

Målningen uttrycker konstnärens inre bilder av en mänsklig katastrof (en minibild finns i Nationalencyklopedin band 10, sid. 215, och en större bild i boken om Asger Jorn

Important information from measurements on pellet bulk material showed that the thermal properties of the bulk sample are dependent on the size fraction of the pellets.. The

Pedagogerna beskriver i vår studie att Hjallipedagogiken inte kompenserar flickor och pojkar på samma sätt, utan pedagogen ser till individen och ger plats