Control Arduino by sound

Tomorrow I am purchasing an Arduino Uno, and I had an idea for a project, and would like to know if it is feasible, if even possible.

My idea was to hook up a microphone element to the Uno, and by playing a sine wave of certain frequencies from a different source (like my laptop) I could get the Arduino to react according to which sine wave is picked up.

If one were in a soundproof room I'd think it would be pretty easy, but with ambient noise I'm not sure how easy it would be to do, if possible at all.

I've never really done any electronics engineering before, so I don't know exactly what information the microphone sends to the Arduino and how you'd interpret it.

Is there an easy way to filter out background noise? Or maybe just ignore sounds below a certain decibel level?

Thanks for any advice!

I think you can detect certain frequencies with a Fast Fourier Transform (FFT) sketch. Google "FFT Arduino" and see what you get.

Thanks! After what feels like a couple hours of research, it seems that is exactly what I need (although FHT might be better, not sure).

I have found that I will need a preamplifier for the microphone if I am to use it.

I have found this schematic here:

Problem is, RadioShack doesn't have any 4.7uF/16V capacitors. Can a 4.7uF/50V capacitor replace that? That is all RadioShack has in stores.

Thank you very much.

I don't see a huge problem with an overrated capacitor.

Great!

Well, that should be it for questions then. Assuming I can get all the necessary parts, I'll be sure to write here how it goes.

Sorry for double-posting, but I am having problems with my circuit.

I bought all the parts needed for the circuit posted earlier (Simple Mic Pre-Amp based LM358 - Schematic Design), except no potentiometer since I don't need one, and a LM386N instead of an LM358.

However, my microphone has 3 wires and not 2. I've read that the two-wire mics have the power and output linked together. Does anyone know if it is it possible to make a preamp with these parts? Or do I have to build a different circuit with different parts?

When first learning something new I usually aim high so I can progress more quickly, but this time I may have bitten off more than I can chew. :blush: I've been researching for several hours now, but can't find anything conclusive (that I can understand anyway), so I don't want to finish a circuit only to fry everything. I don't have enough money to buy a ton of replacement Arduinos and components, so I'd rather get it right the first time.

Thanks to anyone that can help!

sjheiss:
Sorry for double-posting, but I am having problems with my circuit.

I bought all the parts needed for the circuit posted earlier (http://circuitdiagram.net/simple-mic-pre-amp-based-lm358.html), except no potentiometer since I don't need one, and a LM386N instead of an LM358.

However, my microphone has 3 wires and not 2. I've read that the two-wire mics have the power and output linked together. Does anyone know if it is it possible to make a preamp with these parts? Or do I have to build a different circuit with different parts?

When first learning something new I usually aim high so I can progress more quickly, but this time I may have bitten off more than I can chew. :blush: I've been researching for several hours now, but can't find anything conclusive (that I can understand anyway), so I don't want to finish a circuit only to fry everything. I don't have enough money to buy a ton of replacement Arduinos and components, so I'd rather get it right the first time.

Thanks to anyone that can help!

that 3rd wire might be phantom 48v volts. depends on the mic-- you might have to supply it with extra boost.

You get four different types of mic capsules.
There are also the ones that require a higher bias or phantom supply of around 48V, although those are more common for professional audio use.
See drawing below.