Measuring Average Voltage Over Time - Page 1
Forum section: electronics / beginners

author: vargoal
author_rank: Regular Contributor
timestamp: January 09, 2015, 04:50:23 am
content: Hi EEVBlog,I am working on a low power circuitry project(<5 ma) and am trying to trigger a micro controller interrupt based on an electret microphone. I am trying to wake my micro controller when the sound is above a specified amplitude for a few seconds. On most of my projects I would just use the ADC and software to analyze the sound but as I want to conserve power I don't want to turn on the micro controller until the sound is detected. I know how to trigger based on a peak detector for voltage but that doesn't add the timing part which is essential to cancel out background noises in my application. I am currently thinking maybe I could use a comparator to start a timing circuit based around a 555 timer which could then trigger the micro controller. As I deal mostly with digital sensors and software this design is completely based around research on the internet, can anyone verify that this is correct and I am not missing something completely obvious?

author: c4757p
author_rank: Super Contributor
timestamp: January 09, 2015, 05:07:45 am
content: The microcontroller running at low speed will use less power than the 555 circuit, and that's what I'd probably use. Wake up, set the clock to the lowest speed you can, and sample the voltage a few times. Obviously a micro with a flexible clock would be good.Alternatively, you may be able to make use of a peak detector to capture the amplitude. Combining that with a steep (high R, high C) RC lowpass filter will delay and average it, and you might be able to pull off the entire amplitude detection and averaging with a diode, two capacitors and two resistors. This may be desirable depending on what the signals look like and how versatile the MCU is.

author: vargoal
author_rank: Regular Contributor
timestamp: January 09, 2015, 05:20:55 am
content: Thanks for your advice I will probably try the RC filters first and use the MCU second if i can't get RC filters to work.

author: dannyf
author_rank: Super Contributor
timestamp: January 09, 2015, 12:06:36 pm
content: Quotenoise cancelling can be difficult and simple, all depending on how you think it should work.The simplest approach would be to amplify the signal from the mic and trigger the mcu on the positive side.Its downside is that a) it can be swamp'd by background noise and b) it is subject to low frequency mechanical forces applied on the mic.One way to deal with those issues is to adc the output from the mic and trigger on the window, or to filter the signal digitally. That approach can introduce its own problems, however.

author: tszaboo
author_rank: Super Contributor
timestamp: January 09, 2015, 01:14:22 pm
content: The peak detector's output can be level shifted (ambient noise should be slightly negative compared to the integrator's virtual ground), then fed into an integrator circuit, which is compared to a voltage set by experiment. This goes to a MCU's interrupt pin, to wake it from sleep. There are MCUs with built in comparator.

author: katzohki
author_rank: Frequent Contributor
timestamp: January 09, 2015, 05:01:09 pm
content: "A few seconds?" That's going to require your end user to make useless noise for a few seconds before your application starts. Either that or will cut off the beginning of his sentence or whatever audio you are working with. Check out an app on iPhone called Recorder Plus to see how a very good level detector can work (not sure if on Android?).