PDA

View Full Version : connect microphone to pic?



Kamikaze47
- 6th January 2008, 20:02
Hi,

I want to make a sound sensitive switch with a PIC. It needs to have variable sensitivity.

What i'm thinking is, use a PIC with a AD converter, and compare the AD reading against the currently set sensitivity variable.

What i'm not sure about is how to connect the microphone. Connecting the mic directly to an I/O pin surely wont work. I'm assuming i'd need some kind of amplification, but I have no idea where to start.

Does any1 have any ideas?

Darrel Taylor
- 6th January 2008, 20:34
This looks like it might work.
If you're using an electret microphone.

http://www.alanmacek.com/usb/

Look at the schematic near the bottom.
<br>

BobK
- 6th January 2008, 21:10
Hi Kamikaze,

If you want to consider another circuit, goto www.aaroncake.net/circuits and search for SOUND LEVEL METER. Where the input to the bar graph is you could feed that into a PIC analog pin and go from there.

There are many published articles for what you want to do but I think after looking at Darrel's and mine you should be able to accomplish what you are looking to do.

Did you get your other LCD project going? I was referring to using a serial LCD. Sparkfun has one very reasonably priced and very easy to work with.

HTH,

BobK

Kamikaze47
- 7th January 2008, 05:06
Thanks Darrel and BobK. I'll have a look at both of those now, and i'm sure i'll work it out.

I got the LCD going. In the end i opted the easy way out and went with an 18-pin PIC instead of the 8-pin i wanted to use - Mainly to minimize the physical size of the circuit.

Luciano
- 7th January 2008, 08:33
Hi,

See page 7 of this application note.

AVR335: Digital Sound Recorder with AVR® and DataFlash®
http://www.atmel.com/dyn/resources/prod_documents/doc1456.pdf

Best regards,

Luciano