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

Classroom Noise Buster

Peter Atwal

Milos Jerkovic

Ori Hadary

10

10

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 2

3.1.2 Signal Conditioning 3

3.1.3 Band Limiting 3

3.2 real time noise threshold MODIFICATION 5

3.2.1 Initiation 5

3.2.2 Transmission 5

3.2.3 Reception 6

3.3 data acquisition and control 8

3.3.1 Background Noise Signal Processing 8

3.3.2 Real-time Processing of Noise Threshold 9

4.0 CONCLUSIONS 11

5.0 RECOMMENDATIONS 11


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

10

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.

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.

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 (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.

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.

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.

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.

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,