Electronic – arduino – Measure human voice for ambient noise level

arduinoaudiomicrophonesignal

I need to develop an ambient noise level to measure the loduness in an office. Sometimes during the day people raise their voice more than they should and a lot of confusion is created. So this device should be installed somewhere, like on the table or on the roof, and it should light up an LED when the noise is too high.

I thought of doing it in this way:

-Connect the electret to a band-pass filter to isolate only the human voice, which has to be analyzed
-Connect the output of the filter to an operational amplifier (is a x100 amp enought?)
-Connect the output of the amplifier to a microcontroller (like arduino) and read the voice level.

Should that work? I am expecting to read a value from 0 to 1024 from the microcontroller, is that possible?

Thank you very much!

Best Answer

The spectrum of the human speaking voice lies roughly in the band between 300 and 3000 Hz, so to make sure your widget responds primarily to that band you'll need a bandpass filter somewhere downstream from the electret mic, as you noted.

After that, instead of anything digital, I'd simply use a 555 in monostable mode with its TRIGGER input AC coupled to the filtered audio source and the gain of the audio source set so that when someone in the room spoke too loudly it'd trigger the 555.

Using a pot to vary the output level of the audio source would allow the trigger amplitude to be set by having someone at the limit of the detection range talk loudly while the pot was being adjusted by someone else, the correct setting being found when the LED lighted.

Then when the LED lighted, it'd stay ON for the length of time determined by the time constant of the 555's external RC, then turn OFF and stay off until the next time somebody yelled, starting the cycle anew.

Alternatively, the trigger level of a voltage comparator could be adjusted, as shown below, by changing the ratio of the resistors in the reference divider, R3R4, which could just as easily be a pot to make the adjustment easy in situ.

Here's the schematic:

enter image description here

V2, V3, and V4 simulate a flat electret output from 300Hz to 3kHz, with a 6dB spike at 1350Hz reperesenting the loud sound signal into the electret.

C3, R6, R5, R8, and C5 comprise a crude bandpass filter to provide some selectivity at the - input of U3, an opamp being used as a voltage comparator with its switch point determined by R3 and R4.

In operation, when the signal on U3- goes higher than the reference voltage on U3+, U3's output will go low, triggering U1 and generating a pulse with a width of about 1.1R1C1 and an amplitude of about 11 volts into R7 and the LED.

here's the plot: enter image description here

You can see the output of the 555 going high and lasting for about 1 second when the small perturbation on U3- causes it to generate a low-going trigger for the 555.

Finally, here are the files you'll need to run the LTspice simulation if you want to. Download both files into the same folder and then left click on the .asc file to bring up the schematic editor.

Schematic 555

Related Topic