Pages: [1]   Go Down
Author Topic: Control Arduino by sound  (Read 782 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 87
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Jr. Member
**
Karma: 0
Posts: 87
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
http://circuitdiagram.net/simple-mic-pre-amp-based-lm358.html

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.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Jr. Member
**
Karma: 0
Posts: 87
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 87
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. smiley-red 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!
Logged

Offline Offline
Full Member
***
Karma: 3
Posts: 188
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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. smiley-red 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.

http://www.dt4u.com/jpg/phantom.jpg
Logged

for(i = 0, i < 820480075, i++){ Design(); Code(); delay(1000); } // hellowoo.com

Offline Offline
Sr. Member
****
Karma: 7
Posts: 468
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.


* MicCapsules.jpg (106.86 KB, 906x639 - viewed 18 times.)
« Last Edit: December 18, 2013, 02:39:54 pm by UnoDueTre » Logged

Pages: [1]   Go Up
Jump to: