I am trying to connect an electret microphone to the ADC port (port A) of Atmel Atmega16. My aim is to light an LED when there is a sound.
I have directly connected the mic to the input port of the micro controller. But there is no voltage detection at the input, even after changing the potentionmeter value.
Please advice me how i should connect the mic to the micro controller. Also please tell the IC number of any pre-amplifier, if required...
The image of the connection made by me is shown below:
The output voltage of these microphones is only a few mV, probably less that a single digit in your ADC measurement and it is AC. You must amplify it to make it's output voltage big enough to measure, then rectify it to recover the sound envelope and finally filter it to make it stable enough to give consistent ADC readings. If you assume the mcrophone maximum output is say 10mV you need to amplify it by about 500 times to be able to reach full scale reading on the ADC.
As you don't need high quality or low noise for your application, I would go for some cheap op-amps. Use two stages, set their voltage gain to say 20x to get the amplfication, then follow them with a simple diode and RC filter to recover measurable DC on your ADC input.