ADC and Microphone (AnalogIn)

12 Mar 2012

Hi,

I think (as a purely coder student and not elec engineering) I'm missing something quite basic with regards to the ADC when it comes to reading a microphone in.

If someone has a moment could they either explain, or point me towards some good documentation about what precisely I'm looking at when I read in, in terms of Frequency and Amplitude?

Thanks for any help.

12 Mar 2012

Hi, I'll leave out frequency for the moment, but signal amplitude is what you need to sort out. The A/D is 0 to 3.3V for its input range. Your microphone is likely to be much less than that, but more importantly is bipolar, i.e. will have positive and negative peaks. So, the first thing to do is amplify your signal and bias it to somewhere in the middle of the converter range, e.g. 3.3/2 or 1.65V. This will allow you to read the input voltage.

For the frequency requirements you need to sample at a rate greater than 2x your maximum input frequency. So for speech you should probably sample at 6kHz or so.

You also need to filter out frequency above your range of interest as these will alias back into the digitised signal at an unwanted frequency.

Some useful general A/D mbed links:

http://mbed.org/users/bobanderson/programs/AnalogInAnalyzer/lmsyvr

http://mbed.org/users/chris/notebook/Getting-best-ADC-performance/

http://www.nxp.com/documents/application_note/AN10974.pdf