This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

microphone peak-to-peak reading

Hi 

I'm currently testing a microphone, I only want ADC reading from it to show how loud the sound is, so kinds like volume.

If I only using simple ADC to read the number, it's always a similar reading, it doesn't change with how loud the environment is.

I did some research on it, I think I kind "missing the peak"? like the peak of the sound is only for a really short period of time and it's hard to catch it?

I don't know if anyone worked on a similar project? Any solution or suggestion will be appreciated. 

thanks,

Cindy

Parents Reply Children
  • I dont have an oscilloscope, but I changed the sampling rate from 400ms to 20ms, I still got the same numbers regardless of the environment, but the number increased, I got confused about the situation. 

    I got results like this, even when I'm knocking the table, I still got some reading.

    then I changed the sampling rate (let me know if I did it wrong)

    the number changed, but not really changing.

    Please help.

    Cindy

  • My suggestion is to first follow up on: "measure the signal on an oscilloscope you can find the duration and level of the peak."

    Then you can find how often you need to sample the ADC to detect the peak. I expect you need to measure every <1ms or similar, in which case you won't have time to output all the sample data on UART. So you need to analyze the data (e.g. calculate average value first), and if the value suddenly changes by much you can output the data (e.g. peak detected). 

  • but why when I change the sampling rate the ADC value changes, higher sampling rate with higher ADC reading. it doesn't seem to make sense. 

    I changed the sampling rate to 3ms ( it will fail when I change it to 2ms) the ADC reading is around 120, but stable which isn't really want I want to see.

    wondering if there's anything wrong before I get into "analyze the data"

    Thanks,

    Cindy

  • I tested it with another ADC component, the code doesn't work, did I use the example right?

    I used saadc, and ADC output A0(p0.03). is this correct?  

    Cindy

Related