20
University of Victoria 8/4/2005 Faculty of Engineering ENGR 499 report Classroom Noise Buster Peter Atwal Milos Jerkovic Ori Hadary

1elec499/2005b/group22/Documents… · Web viewFigure 7: Linx RF transmitter (left) and matched Linx RF receiver (right). 6 Figure 8: Linx RF receiver schematic. Address lines are

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 1elec499/2005b/group22/Documents… · Web viewFigure 7: Linx RF transmitter (left) and matched Linx RF receiver (right). 6 Figure 8: Linx RF receiver schematic. Address lines are

University of Victoria 8/4/2005Faculty of Engineering ENGR 499 report

Classroom Noise Buster

Peter Atwal

Milos Jerkovic

Ori Hadary

Page 2: 1elec499/2005b/group22/Documents… · Web viewFigure 7: Linx RF transmitter (left) and matched Linx RF receiver (right). 6 Figure 8: Linx RF receiver schematic. Address lines are

TABLE OF CONTENTS

LIST OF FIGURES AND TABLES...............................................................................................ii

FIGURES........................................................................................................................................ii

TABLES..........................................................................................................................................ii

1.0 ABSTRACT..............................................................................................................................1

2.0 INTRODUCTION.....................................................................................................................1

3.0 SYSTEM OVERVIEW.............................................................................................................1

3.1 SIGNAL TRANSFORMATION...............................................................................................2

3.1.1 Transducer Circuit..............................................................................................................23.1.2 Signal Conditioning............................................................................................................33.1.3 Band Limiting.....................................................................................................................3

3.2 REAL TIME NOISE THRESHOLD MODIFICATION..........................................................5

3.2.1 Initiation..............................................................................................................................53.2.2 Transmission.......................................................................................................................53.2.3 Reception............................................................................................................................6

3.3 DATA ACQUISITION AND CONTROL................................................................................8

3.3.1 Background Noise Signal Processing.................................................................................83.3.2 Real-time Processing of Noise Threshold...................................................................9

4.0 CONCLUSIONS.....................................................................................................................11

5.0 RECOMMENDATIONS.........................................................................................................11

ii

Page 3: 1elec499/2005b/group22/Documents… · Web viewFigure 7: Linx RF transmitter (left) and matched Linx RF receiver (right). 6 Figure 8: Linx RF receiver schematic. Address lines are

LIST OF FIGURES AND TABLES

FIGURES

Figure 1: System block diagram of Classroom Noise Buster..........................................................2

Figure 2: Circuit used to transform sound into an AC coupled electrical signal. The microphone converts sound to an electrical signal and C2 performs AC coupling.............................................2

Figure 3: A resistive voltage divider is used to set the DC bias of the input signal (pin 3 of U2) and U2 along with R1 and R2 (circuit 1) provides proper amplification such that the input signal is scaled between 0V and 5V...........................................................................................................3

Figure 4: Second order Butterworth filter (Sallen Key topology) with cutoff frequency of 2 kHz used to band limit input signal to A/D converter of PIC.................................................................4

Figure 5: Simulated frequency response of 2nd order Butterworth filter with cutoff frequency of 2 kHz...................................................................................................................................................4

Figure 6: 3-stage signal transformation scheme. Sound is first converted to an electrical signal which is then conditioned (scaled, offset, and band limited) prior to being fed to the PIC’s A/D input.................................................................................................................................................5

Figure 7: Linx RF transmitter (left) and matched Linx RF receiver (right)....................................6

Figure 8: Linx RF receiver schematic. Address lines are hardwired to match the address of the transmitter and an external antenna is connected to pin 28 to increase the receiver’s operational range................................................................................................................................................7

Figure 9: PIC1876A pin diagram. This device is programmed to determine the classroom noise level, turn on visual indicators if classroom noise exceeds set thresholds, and provide real-time updating of the noise threshold levels.............................................................................................8

Figure 10: On/Off scheme of red and yellow lights used to signal that the classroom noise level is too high. Red and Yellow thresholds can be updated in real time.............................................10

Figure 11: Constant current LED driving circuit...........................................................................10

TABLES

Table 1: Linx RF receiver pin descriptions.....................................................................................7

iii

Page 4: 1elec499/2005b/group22/Documents… · Web viewFigure 7: Linx RF transmitter (left) and matched Linx RF receiver (right). 6 Figure 8: Linx RF receiver schematic. Address lines are

1.0 ABSTRACT

Self conscious elementary school children with hearing disabilities often compromise their quality of classroom education due to their inability to fully decipher what their teacher is saying from the background noise generated by their peers. Concerned parents and teachers have asked UVATT (University of Victoria Assistive Technologies Team) to improve these children’s quality of class room education through the realization of a device that would signal the students in the classroom to remain quiet while the lecture is in progress. An existing system developed by UVATT indicates to the students that they are being too noisy by turning on a set of lights. These lights catch the students’ attention and remain lit until the noise inside the classroom is reduced to an acceptable level. The existing system employs a 3rd party sound meter to convert sound into an electrical signal for digital processing and a 3rd party wireless transmitter/receiver unit used for modifying the upper bound for acceptable noise thresholds. These third party components bring system cost into the several hundred dollars regime. As well, the current system is too sensitive to instantaneous noise fluctuations causing the light to flicker sporadically. The new system (Classroom Noise Buster) reduces the cost to less than $50 by replacing the sound meter and wireless RF transmitter/receiver unit with a signal transformation circuit and an RF transmitter keyfob/receiver chip. The Classroom Noise Buster also implements a more stable algorithm that eliminates sporadic turn-on and turn-off of the lights by incorporating a clever signal averaging scheme and software hysteresis.

2.0 INTRODUCTION

UVATT, an organization which strives to better the quality of life of children with disabilities, has undertaken a project to develop a system that would improve the classroom experience of children that have a hearing disability. Approximately one in nine children have an undiagnosed hearing complication which can make learning in the classroom a very challenging and frustrating experience if their peers are talking while the instructor is lecturing. Teachers and parents of these children requested that UVATT implement a system that would visually signal to the students inside the classroom that they are to remain quiet while the lecture is in progress. The initial system developed by UVATT utilizes third party components to accomplish certain tasks and is thus too expensive for large scale use by educational institutions. The initial system does not implement any form of hysteresis and as a result suffers from spurious turn-on and turn-off of the visual indicators. This report outlines the new system design and the efforts made to reduce system cost and eliminate the spurious behaviour of the visual indicators.

3.0 SYSTEM OVERVIEW

A speech processing device initiates the turn on of a yellow or a red light once the background noise exceeds the corresponding thresholds set by the impaired child through the use of a simple wireless pushbutton device much like that used to turn on a car alarm. The lights turn off once the background noise descends below the thresholds. A band limiting low pass filter, a microphone, and a signal conditioning circuit provide an electrical signal pertaining to the background noise generated within the classroom. This signal is processed by a PIC (programmable chip) that determines whether or not the preset noise level threshold has been exceeded or not. The impaired child can at any time increase or decrease the noise thresholds for the red and yellow lights by pressing one of two sets of buttons corresponding to each light. A system block diagram is shown in figure 1.

Page 5: 1elec499/2005b/group22/Documents… · Web viewFigure 7: Linx RF transmitter (left) and matched Linx RF receiver (right). 6 Figure 8: Linx RF receiver schematic. Address lines are

Figure 1: System block diagram of Classroom Noise Buster.

3.1 SIGNAL TRANSFORMATION

Signal transformation employs the use a sound transducer (microphone) to convert sound (variations in air pressure) into an electrical signal. This is necessary since the device used to determine the sound level of the noise generated inside the classroom can only process electrical signals (see section 3.3).

3.1.1 Transducer Circuit

A microphone converts sound pressure into an electric signal (voltage or current). The main parameters of interest for a microphone are the sensitivity, sound detection envelope, diaphragm type, and frequency range. Sound level meters (SLM) incorporate the use of an omni-directional microphone with an electret diaphragm and a flat frequency response over the audible range of 20 Hz- 20 kHz. Ideally, this microphone is equally sensitive to sound arriving from any direction and is therefore suitable for detecting the spatially random generation of classroom noise.

Sensitivity (S) is rated in dB and is relative to 1 output at 1 . To express the sensitivity as a ratio of output voltage per Pascal the following equation is used:

S[mV/Pa] = 10S[dB]/20 +3

A typical value for the sensitivity of an electret omni-directional microphone is -42 dB. Using the above equation this value corresponds to a sensitivity of 7.94 mV / Pa.

The circuit used to perform signal transformation is shown in figure 2. The value of R1 determines the output resistance of the circuit, and C2 is an AC coupling capacitor.

Figure 2: Circuit used to transform sound into an AC coupled electrical signal. The microphone converts sound to an electrical signal and C2 performs AC coupling.

Page 6: 1elec499/2005b/group22/Documents… · Web viewFigure 7: Linx RF transmitter (left) and matched Linx RF receiver (right). 6 Figure 8: Linx RF receiver schematic. Address lines are

The signal is AC coupled to allow for fixed DC biasing as described in section 3.1.2. R1 and C2 form a high pass filter; increasing the capacitance reduces the cutoff (-3 dB) frequency of the filter. The value of C2 is 0.33 uF; further increasing the value of C2 is associated with an unfavourable increase in the capacitor’s size and cost. The capacitor presently used costs $1.13 whereas a 33 uF capacitor costs $4 - $5. The frequency selectivity of the high pass filter is compensated for by the processing device (PIC).

3.1.2 Signal Conditioning

Signal conditioning involves superimposing a DC shift onto the microphone’s AC coupled (section 3.1.1) signal such that the lowest and highest noise levels of interest correspond to the PIC’s negative (Vss) and positive (Vdd) rail voltages which are 0V and 5V respectively. This also implies that the output voltage of the microphone must be amplified to meet the required specifications. The fact that all input signals to the A/D converter are positive also reduces the computational workload of the PIC. The circuit shown in figure 3 performs both amplification and DC shifting of the transducer’s output AC coupled signal (Vmic in figure 2).

Figure 3: A resistive voltage divider is used to set the DC bias of the input signal (pin 3 of U2) and U2 along with R1 and R2 (circuit 1) provides proper amplification such that the input signal is scaled between 0V and 5V.

3.1.3 Band Limiting

Most of the energy pertaining to speech is below 2 kHz thus a low pass second order Butterworth filter, using a Sallen Key topology, with a cutoff frequency of 2 kHz has been implemented to band limit the signal prior to being connected to the input pin of the PIC’s A/D converter

Amplification and DC shifting

Amplification and DC shifting

Page 7: 1elec499/2005b/group22/Documents… · Web viewFigure 7: Linx RF transmitter (left) and matched Linx RF receiver (right). 6 Figure 8: Linx RF receiver schematic. Address lines are

(section 3.3.1). The filter design and its frequency response (simulated using Micro Cap 7) are shown in figures 4 and 5 respectively. The filter’s measured frequency response closely resembles that of figure 5.

Figure 4: Second order Butterworth low pass filter (Sallen Key topology) with cutoff frequency of 2 kHz used to band limit input signal to A/D converter of PIC.

Figure 5: Simulated frequency response of 2nd order Butterworth filter with cutoff frequency of 2 kHz.

Page 8: 1elec499/2005b/group22/Documents… · Web viewFigure 7: Linx RF transmitter (left) and matched Linx RF receiver (right). 6 Figure 8: Linx RF receiver schematic. Address lines are

The entire signal transformation scheme is shown in figure 6 below.

Figure 6: 3-stage signal transformation scheme. Sound is first converted to an electrical signal which is then conditioned (scaled, offset, and band limited) prior to being fed to the PIC’s A/D input.

3.2 REAL TIME NOISE THRESHOLD MODIFICATION

The initiation, transmission, and reception of real-time noise threshold modification are discussed in this section.

3.2.1 Initiation

A wireless keyfob transmitter (figure 7) operating at 315 MHz is used to initiate a modification of the threshold noise levels pertaining to the turn on of the visual indicators (section 3.3.3). This is accomplished by pressing the one of the five buttons on the transmitter corresponding to the desired change of the noise thresholds. Pressing S3/S1 (figure 7) will increment/decrement the noise threshold for the red light whereas pressing S4/S2 (figure 7) will increment/decrement the noise thresholds of the yellow light. Pressing S5 causes the noise thresholds to return to the default noise threshold values. This scheme, therefore, allows for a dynamic range between the thresholds of the red and yellow lights (visual indicators).

3.2.2 Transmission

A Linx RF transmitter and matching receiver (figure 7) have been chosen for the RF link. The main criteria used in selecting the appropriate RF link were ergonomics, range of operation, cost and ease of use. The Linx RF transmitter has a LOS transmission range of 100+ feet.

Page 9: 1elec499/2005b/group22/Documents… · Web viewFigure 7: Linx RF transmitter (left) and matched Linx RF receiver (right). 6 Figure 8: Linx RF receiver schematic. Address lines are

Figure 7: Linx RF transmitter (left) and matched Linx RF receiver (right).

The transmitter has a compact five button key pad design. The buttons are configured as follows: S3 and S1 increment and decrement the upper and lower threshold levels of the red light

respectively. S4 and S2 increment and decrement the upper and lower threshold levels of the red light

respectively. S5 is used to reset the thresholds to predefined default values.

The keyfob (5 button transmitter key pad) can be set to one of 1024 (2^10) addresses. The keyfob can be assigned a unique address by cutting the appropriate address traces. The factory setting has all traces connected to ground which corresponds to a 10-bit address of 0x3FF (i.e. all address bits are 1’s). The keyfob operates as follows: when a button is pressed the power is applied to the internal circuitry and the encoder is enabled. The encoder then detects the “hardwired” address and logic states of the five buttons. The address and five button logic states are formatted into a 3-word message that is continuously transmitted until the button is released.

3.2.3 Reception

The receiver (figure 8) is “hardwired” to have an address identical to that of the transmitter. The matched receiver is used to decode the transmitted 3-word message. The first 10 digits of the received message correspond to the transmitter’s address. If this address matches that of the receiver the Valid Transmission (VT) line, which idles at low logic, is set high to indicate the reception of a valid signal.

Page 10: 1elec499/2005b/group22/Documents… · Web viewFigure 7: Linx RF transmitter (left) and matched Linx RF receiver (right). 6 Figure 8: Linx RF receiver schematic. Address lines are

Figure 8: Linx RF receiver schematic. Address lines are hardwired to match the address of the transmitter and an external antenna is connected to pin 28 to increase the receiver’s operational range.

Upon valid transmission, the decoder outputs data onto data lines corresponding to the logic states of the 5 buttons pertaining to the last transmission and then resets all data lines to a low logic level. The pins and their corresponding functions are listed in table 1.

Table 1: Linx RF receiver pin descriptions.

Page 11: 1elec499/2005b/group22/Documents… · Web viewFigure 7: Linx RF transmitter (left) and matched Linx RF receiver (right). 6 Figure 8: Linx RF receiver schematic. Address lines are

3.3 DATA ACQUISITION AND CONTROL

A PIC16F876A device (figure 9) is used for: Processing the incoming signal corresponding to the noise generated by students inside

the classroom while a lecture is taking place, Providing a visual indication to the students once the noise in the room exceeds the

threshold values, Real time updating of the upper bound (threshold) for the acceptable noise level inside

the classroom during a lecture.

3.3.1 Background Noise Signal Processing

To accurately determine whether or not the noise generated by students inside the classroom during a lecture is above a set threshold an adequate representation of the magnitude of the input signal (noise level) must be acquired. This can be done by sampling the input signal at a sufficient sampling rate and calculating the average over a small interval. This average can then be used to describe the noise level at some instance of time along a discrete time axis. Performing this over several intervals and acquiring the average of those intervals will then provide a good measure of the classroom noise generated over time and prevent spurious activation of the visual indicators. The processing device (PIC16F876A) and its external connections are shown in figure 9.

Figure 9: PIC1876A pin diagram. This device is programmed to determine the classroom noise level, turn on visual indicators if classroom noise exceeds set thresholds, and provide real-time updating of the noise threshold levels.

Since the input signal is biased such that the amplitude is always positive, squaring of the signal to eliminate algebraic cancellation during averaging is not necessary and its exclusion aids in reducing computational workload. The significant portion of energy pertaining to human generated speech is well below 1000 Hz. The current sampling rate of 4 kHz is used to obtain an

Page 12: 1elec499/2005b/group22/Documents… · Web viewFigure 7: Linx RF transmitter (left) and matched Linx RF receiver (right). 6 Figure 8: Linx RF receiver schematic. Address lines are

Noi

se le

vel

Red light threshold

Yellow light threshold

Yellow ONRed OFF

Yellow OFFRed ON

Yellow OFFRed OFF

accurate measure of the class room noise level. Sampling at this rate is achieved by using a timer interrupt that occurs periodically approximately every 250 μsec. To achieve this, Timer 1 is preloaded with a value such that timer overflow occurs every millisecond. Each time the timer overflows a timer 1 interrupt service routine (ISR) initiates an A/D conversion and disables timer 1 operation (Appendix A). Once the conversion is complete, an A/D interrupt occurs. An A/D ISR is then invoked; inside this ISR the A/D value corresponding to the current noise level is stored (for subsequent processing) and timer 1 is reloaded with the appropriate value and is re-enabled (Appendix A).

Inside the main loop of the program (Appendix A) a running average pertaining to the A/D values corresponding to the classroom noise is computed and stored for subsequent determination as to whether or not the visual indicators (section 3.3.3) are to be turned on or off.

3.3.2 Real-time Processing of Noise Threshold

As mentioned in section 3.2, a wireless key-type transmitter is used to adjust the upper bound of the noise level that an acoustically impaired child within the classroom can tolerate while still being able to decipher what the teacher is reciting. The transmitted signal is received by a matched receiver and is then decoded to provide five channels of data pertaining to the five buttons on the transmitter. A set of two buttons is used to increment and decrement the threshold value. Since there are two lights (see section 3.3.3) a total of four buttons are required for the visual indicators. Whenever one of the keyfob buttons is pressed a low to high signal transition takes place at pin 11 of the RF receiver (Table 1) to indicate that a that a transmission has just occurred. This pin is connected to pin 21 RB0/INT (figure 9) of the PIC which has been programmed to detect low to high signal transitions (Appendix A). Upon such detection a threshold update ISR is executed. Code inside this ISR determines which keyfob button was pressed and updates the value of the corresponding threshold. A maximum threshold for the yellow light and a minimum threshold for the red light ensure that the red light threshold is always higher than the yellow light threshold.

3.3.3 Visual Feedback

A yellow light and a red light are used to indicate to the students in the classroom that they are too noisy and need to quiet down (figure 10). If the noise generated inside the classroom exceeds the threshold corresponding to the yellow light but remains below the threshold corresponding to the red light then the yellow light will turn on. Once the noise level exceeds the threshold for the red light the yellow light will turn off and the red light will turn on. If the noise is below either threshold both lights will remain off (figure 10). Note that if the threshold level for the red light is updated while the red light is on and the new threshold exceeds the current classroom noise level then the red light will turn off and the yellow light will turn on.

Page 13: 1elec499/2005b/group22/Documents… · Web viewFigure 7: Linx RF transmitter (left) and matched Linx RF receiver (right). 6 Figure 8: Linx RF receiver schematic. Address lines are

Figure 10: On/Off scheme of red and yellow lights used to signal that the classroom noise level is too high. Red and Yellow thresholds can be updated in real time.

Two digital output pins on the PIC are used to control the red and yellow lights. The lights consist of super bright light emitting diodes made by Luxeon that require a driving current of 350 mA. A device for driving these LEDs is required since the I/O pin on the PIC can sink/source a maximum of 25 mA and one port (8 I/O pins) can source a maximum of 200 mA collectively. The driver circuit (figure 11) incorporates feedback to maintain a constant LED drive current of 350 mA.

Figure 11: Constant current LED driving circuit.

The LEDs are fitted into translucent shells as to diffuse the light and are connected to a long cord that plugs into the main board. The cord allows for flexibility in terms of where the lights can be mounted in order to ensure that all students can see the lights.

4.0 CONCLUSIONS

Page 14: 1elec499/2005b/group22/Documents… · Web viewFigure 7: Linx RF transmitter (left) and matched Linx RF receiver (right). 6 Figure 8: Linx RF receiver schematic. Address lines are

The Classroom Noise Buster (CNB) successfully monitors noise level corresponding to sound generated in its vicinity and provides a visual indication (by turning on a light) when the detected noise level exceeds the preset thresholds. The CNB is also capable of providing real-time modification of the noise thresholds. System cost has been dramatically reduced from several hundred dollars to less than fifty dollars by replacing the previously utilized sound meter and off the shelf transmitter / receiver units with a signal transformation circuit (figure 6) and a Linx RF transmitter/receiver kit (figure 7). Ergo, it is now financially feasible for educational institutions to take advantage of this technology on a large scale.

5.0 RECOMMENDATIONS

Using one light instead of two lights to indicate students are too loud

Since there is usually a well defined noise level beyond which comprehension of what the instructor is reciting is inadequate, having one light should be sufficient to signal to the students that they are being too loud. This modification will also reduce system cost by approximately $12 (Luxeon LED and mounting shell).