Go Down

Topic: Microphone question... (Read 1 time) previous topic - next topic

cmac678

Hello all,

I am looking into buying a arduino and I would like to buy a microphone that can plug in to the board. I have looked into some mics and from reviews that I have found online they have not worked very well with the arduino. I would like to build a clapper light switch with the mic and the arduino.

Any suggestions on microphones that I could buy?


Thank you.

mem

#1
Jul 12, 2011, 04:46 am Last Edit: Jul 12, 2011, 06:02 am by mem Reason: 1
The signal from a typical microphone is too weak to be read by Arduino, you need an amplifier to increase the output.

You can use something like this  

edit: fixed the url

Magician

#2
Jul 12, 2011, 05:15 am Last Edit: Jul 12, 2011, 06:08 am by Magician Reason: 1

mem

Hi Magician, that was the item linked in the earlier post,  the url was broken and is now fixed.

CrossRoads

#4
Jul 12, 2011, 06:56 am Last Edit: Jul 12, 2011, 06:59 am by CrossRoads Reason: 1
@cmac678, you are in the US?
I suggest something like a condensor microphone from radioshack.
Power it from 9V battery, connect its ground to arduino ground, and its output to arduino ADC thru an electrolytic capacitor.
Here's one wired up in a box from ages ago, I put a new battery & battery clip on it, thing still picked up nicely with a guitar amplifier!


The output of the capacitor will be at 0V and swing positive & negative - connect two 100K resisters like this: +5V to resister, other side to 2nd resister+capacitor+Arduino input, other side of 2nd resister to gnd. The Arduino input should sit ~2.5v with no mic input.
You'll have to play with the ADC outputs, see if you can get a decent enough readings away fom 2.5V (reading of ~512) to make a decision on.   If not, may have to add some gain using a single supply op-amp and  a couple of resisters.
You'll have to play with the ADC outputs, see if you can get a decent enough level to make a decision on. May have to add some gain using a single supply op-amp and  a couple of resisters.
http://masteringelectronicsdesign.com/how-to-derive-the-summing-amplifier-transfer-function/
Use a circuit like this instead - the capacitor output will be V1 and V2 will be the junction of the 100K resisters. Or a trimpot! Then you can dial in the voltage needed to keep the output at 2.5V while adjusting the gain needed to adust mic sensitivity.

I'll see if I can find you an envelope follower circuit as well, that might come in handy if your ADC sampling loop doesn't run fast enough to see the hand clap with this mic.
Gotta get to bed tho, darn day job ...
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

CrossRoads

http://en.wikipedia.org/wiki/Envelope_detector

Heck, this will work - put this simple circuit after the op-amp.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

cmac678

Thanks for all the repilies

@crossroads I dont have radioshack where I live, would this work?http://store.curiousinventor.com/electret-condensor-microphone.html

When I build this (http://en.m.wikipedia.org/wiki/File:C_Simple_envelope_detector.gif) where do I attach the to ends to (the mic and the arduino?)

cmac678

Do I still need to amplify the microphone if I get this board?  http://www.sparkfun.com/products/9964

CrossRoads

Two answers:  The curious inventor mic would work.
The left side, Vi(t) is driven by the output of the op amp circuit.
The right side, Vo(t) goes to an arduino Analog pin, and to ground.

Sparkfun: No, you don't need a seperate amplifier - if you look at the schematic, you will an amplifier design almost identical to what I linked to earlier.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Magician

No, it has mic + amplifier, and it outputs DC bias signal.
As for envelope detector, you also don't have to solder it with external components,
you can do all audio processing in software: rectification, integration, filtering etc.

oscarcar

Buy it from sparkfun, or somewhere else you can find it.

I just ordered mine from radioshack but I later found it much cheaper on sparkfun. It cost me a little over $12 with shipping for 2. At least with sparkfun, I would have probably ordered some other parts at the same time.

electret mic
http://www.sparkfun.com/products/8635
http://www.sparkfun.com/products/9964

mems mic
http://www.sparkfun.com/products/10028
http://www.sparkfun.com/products/9868

Go Up