Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Electret mic, PIC interface

Status
Not open for further replies.

Mosaic

Well-Known Member
Hi all:
I'd like to use a 2.2k Impedance electret mic sampled by a pic 12f675 adc.

I am only interested in sound levels as a sound switch.

I am currently using a 12mm diameter murata piezo 'buzzer' as the input and that works ok. The piezo has a high multimegohm impedance.

I have some size constraints so i am looking at a 6mm electret like this:

https://www.electro-tech-online.com/custompdfs/2012/01/25R0613.pdf

Since I am using ambient cancelling code in the PIC I don't mind the dc offset so I am eliminating the input cap. The supply is a 3.6 V Li ion batt. The RL resistor is a 3.9K.

Now since the rated impedance of the electret is 2.2k and the supply resistor is 3.9k does this mean i will get a dc offset of 2.2/3.9 * 3.6v on the PIC adc?
 
The spec has typical current consumption of 0.5 mA but there will be likely +/- 30% variation depending on given part. With 0.5 mA and 3.9k there will a quiescent average DC on output of 0.5 mA x 3.9k = 1.95 vdc drop from whatever DC supply is. If supply is 2 vdc then FET will be nearly in compression. If supply is 5 vdc then DC output average will be about 3 vdc.

The AC audio signal level will be quite small. Need to evaluate the resolution of your ADC in PIC to see if there is even enough AC swing to read by ADC. You will also get a bias shift versus temp. Better if you put some preamp after mic to get signal swing higher. AC couple to PIC with its ADC input biased with external resistors to middle of ADC range.
 
Last edited:
I agree with the AC coupling, so I add another 3.9k across the electret output forming a 1/2 Vdd split that the adc sees. I used that with the piezo as a noise floor reference and did software rectification of the ac signal.

At 8 bit sampling I have a resolution of about 15mV per bit. Once the electret can deliver perhaps 50- 60mV with a loud noise or a direct tap to the electret I should have a decent 'clap' type trigger? The intention is to detect 'impact' type noises on a hollow 9mm ID alum. tube . The electret sits inside the tube.
 
I dug up a old PC mic with an electret.....slapped on a few resistance values and drove it with a 3.3V from a pc pwr supply.

Scope says the avg dc offset is about 1.7V with a 0.165 mA drain using a 10K. Hand claps yield up to 400mV spikes with about a max decay between 5ms to 10ms.


Wired it up to the PIC and it works! Only 1 10K needed to land the adc median voltage near 1/2 Vdd.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top