Author Topic: Measuring Average Voltage Over Time  (Read 2222 times)

0 Members and 1 Guest are viewing this topic.

Offline vargoalTopic starter

  • Regular Contributor
  • *
  • Posts: 52
  • Country: 00
Measuring Average Voltage Over Time
« on: January 09, 2015, 04:50:23 am »
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?
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Measuring Average Voltage Over Time
« Reply #1 on: January 09, 2015, 05:07:45 am »
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.
« Last Edit: January 09, 2015, 05:09:54 am by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline vargoalTopic starter

  • Regular Contributor
  • *
  • Posts: 52
  • Country: 00
Re: Measuring Average Voltage Over Time
« Reply #2 on: January 09, 2015, 05:20:55 am »
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.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Measuring Average Voltage Over Time
« Reply #3 on: January 09, 2015, 12:06:36 pm »
Quote
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.

noise 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.
================================
https://dannyelectronics.wordpress.com/
 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 7388
  • Country: nl
  • Current job: ATEX product design
Re: Measuring Average Voltage Over Time
« Reply #4 on: January 09, 2015, 01:14:22 pm »
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.
 

Offline katzohki

  • Frequent Contributor
  • **
  • Posts: 378
  • Country: us
    • My Blog
Re: Measuring Average Voltage Over Time
« Reply #5 on: January 09, 2015, 05:01:09 pm »
"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?).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf