I am trying to create a clap switch using arduino . I presume i need an electret mic for this . I pulled out one from a broken headset( the one's you connect to your computer for voice chat ) . Now the whole objective of this is to create a clap to turn on/off the light. I know that part of the project but i have a doubt in getting input from this electret mic. I know i need to connect it one of the analog pins to get a value based on the sound intensity around.Hence based on that i can set a threshold and if the clap exceeds threshold i can turn on a light.
But i am not sure how to get these analog values from the electret mic to the arduino . I did some searching but im getting mixed results . I know how to read analog values and print it over a serial connection . I just want to know how to interface the electret mic to the arduino. Im pretty sure i cant just connect it directly. Do i need any capacitance or resistance? In some places i saw people using comparators as well. COuld somebody point me to a circuit diagram?Eagerly waiting for your replies..Thanks a lot..
I just want to know how to interface the electret mic to the arduino
Have a look at the interface circuit we use in our Gadget Shield (http://ruggedcircuits.com/html/gadget_shield.html) (on the 4th page):
It's not the only way to do it but it is relatively simple and gives pretty good results.
The Rugged Motor Driver (http://ruggedcircuits.com/html/rugged_motor_driver.html): two H-bridges, more power than an L298, fully protected
thanks for your reply.. im looking at page 4 of the pdf. i presume thats the circuit i should follow.. could you tell me what t20,t25,t26 are? Is this a similar circuit? http://wiring.org.co/learning/basics/microphone.html .. im very new to electronics so hoping to use a simple circuit..Thanks again
T20, T25, and T26 are just testpoints. They are places on the circuit where you can probe the voltages to learn about how things work (many of our Gadget Shield (http://ruggedcircuits.com/html/gadget_shield.html) customers are in the educational world and use the gadgets on the shield for teaching).
The circuit you reference is different. All it can do is measure the sound level, while our circuit lets you record the sound itself.
The Aussie Shield (http://ruggedcircuits.com/html/aussie_shield.html): breakout all 28 pins to quick-connect terminals
Thanks for your reply..COnsidering the fact that i want to build a clap switch.. wont the circuit i referenced be enough?I dont need to record the sound , just need to get the sound intensity. Is a comparator required? Ive read somewhere i can just connect a resistor in series with the mic.. and then take a capacitor from one pin of the mic and along with a capacitor connect it to an analog pin.. will that work?or should i just follow the circuit i referenced for the clap switch?Thanks..
COnsidering the fact that i want to build a clap switch.. wont the circuit i referenced be enough?
Probably, but it doesn't look like it's any lower complexity than the full-recording circuit.
Ive read somewhere i can just connect a resistor in series with the mic.. and then take a capacitor from one pin of the mic and along with a capacitor connect it to an analog pin.. will that work?or should i just follow the circuit i referenced for the clap switch?
That doesn't sound right. I would follow one of the standard circuits (either ours or the LM386-based one). What you describe is basically just R34 and C4 from our circuit (I think....not too sure of your description....) which is just going to give a very low level signal. It needs some kind of amplification to be usable.
The Arduino Drum Machine (http://kck.st/faK7R4): MIDI development system with 14-track MIDI drum machine sequencer / groove-box software
Thank you so much for your reply..will give it a shot..
This was my circuit:
I think I'd rather use that gadget shield though.