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!

  • \$\begingroup\$ Measure signal, then convert it with ADC peripheral on microcontroller, process obtained values (filtrate) with some equations, sum useful (voice frequency) values and show them on LCD display, that will be the concept. \$\endgroup\$ – Lazar May 14 '15 at 10:43
  • \$\begingroup\$ yackertracker.com \$\endgroup\$ – Scott Seidman May 14 '15 at 19:18

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


As EM Fields already said, the human voice range is roughly 300 Hz to 3 kHz. You probably need a gain of a few 100 to 1000 in this range to get voice sounds to microcontroller A/D levels when someone isn't directly speaking into the mic.

I'd probably just use two simple R-C filters, one high pass at 300 Hz and one low pass at 3 kHz. The micro can then sample at maybe 10 kHz. That's one sample every 100 µs, which is a "long" time for a modern micro to compute a loudness value, decide whether it is above some threshold, and then light a LED or whatever accordingly.

To compute a measure of loudness, you first have to subtract off the zero level. The signal should be AC coupled into the A/D input, which should float at 1/2 the A/D range from a DC bias. You could just use 1/2 the A/D range as a fixed number. That will be off a little bit but should be good enough for your purpose. For example, assuming a 10 bit A/D, ideally the quiet level would be 511.5. In reality it might be 520 or 492 or something. That small offset will be well below your "loud" threshold, so won't matter much. The fancy way to do this is to high pass filter the signal. Since you want to eliminate noise below 300 Hz anyway, you can do that filter in firmware instead of outside.

In any case, once you subtract off the A/D reading zero level, you have ± instantaneous sample values. Square each, then low pass filter this stream of squared values. You probably want to filter that at just a few Hz as this is how fast your loudness value responds to sounds it picks up. You compare this value to a threshold to decide whether it is above your excessive loudness limit or not.

This may sound complicated, but it's actually pretty simple, and something even a small micro can do given 100 µs per sample.


Let me start by saying that both of the existing answers (so far) are based on a couple of false premises.

First of all, it is NOT true that most of the energy in a human voice falls in the range of 300-3000 Hz. What IS true is that those frequencies are the most important ones for intelligibility, which is why the phone company limits what it carries to those frequencies. In fact, there's a LOT of energy below 300 Hz, especially for male voices, and this energy is what contributes most to the perceived loudness.

Second, looking at just the absolute level of the overall sound does not discriminate well between background noise sources and voices. What you need to look at is the short-term variations in the sound level, where those variations fall in the range of 1-10 Hz, which correspond to the rate at which people emit syllables. When this gets to be at an excessive level is when you should light your LED.

So, you're on the right track by amplifying the output of a microphone and then digitizing it, but the microcontroller firmware will need to have some sophistication in order to be really effective at what you want.

  • \$\begingroup\$ Can you post a link to the relationship between perceived loudness and the frequency VS amplitude characteristic of the human voice? \$\endgroup\$ – EM Fields May 15 '15 at 20:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.