Pages: [1]   Go Down
Author Topic: Can I use an Arduino + an electret mic to read in audio to a computer?  (Read 3087 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Essentially, I'm trying to record audio data using an electret microphone (the sparkfun breakout board with the 100x gain opamp)

I want the mic to be able to pick up everything it can hear with as little noise as possible, send this data to the arduino which will just send it back to a computer, where I intend to save the data into a wav file.

Is this possible?

What kind of clarity / quality can i expect?

Does the arduino have the sampling rate i need to capture the sound accurately,? If not, is there anything I can do about it?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://www.sparkfun.com/products/9365

I just found this on the spoarkfun website.
"The PCM1803A is a high-performance, low-cost, 24-bit stereo analog-to-digital converter that can sample as high as 96k. The PCM1803A is a great choice for a wide variety of applications where high performance is necessary."

Can i use this ADC to receive input from one/two microphones, convert them to digital data and send them over the arduino via an Xbee?
Logged

Offline Offline
Edison Member
*
Karma: 32
Posts: 1289
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I want the mic to be able to pick up everything it can hear with as little noise as possible, send this data to the arduino which will just send it back to a computer, where I intend to save the data into a wav file.
If you are using a computer, why don't you just plug a mic into your computer?  Almost every computer has a soundcard/soundchip with a "mic" input.

Quote
...with as little noise as possible...

...What kind of clarity / quality can i expect?
There are two sources of noise.   Acoustic noise, which you can minimize by using a directional mic and by getting the mic as close to the sound source as possible.   And electrical noise from the analog circuitry, which you can minimize by using a good low-noise preamp/op-amp and by using a professional mic with a balanced connection into a balanced preamp(with an XLR connector.)

If you want "studio quality", you need a good mic (which is going to cost around $100 USD or more) and a good preamp/interface, or a good USB mic such as the AT2020 USB.   Of course, you also need a low-noise environment.

Regular "computer mics" and the mic preamps built-into most soundcards are low quality, and the input on a regular soundcard is high-impedance unbalanced, which is wrong for low-impedance, balanced, studio/performance mics.
Logged

Montreal
Offline Offline
Faraday Member
**
Karma: 27
Posts: 2573
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What kind of clarity / quality can i expect?
Does the arduino have the sampling rate i need to capture the sound accurately,? If not, is there anything I can do about it?
I have no clue, why do you need arduino-in-the-middle,  but you should have an application (program) running on the computer which would accept data from serial link and store them in a file .wav or like that.  It just cross my mind, that I've seen a few oscilloscope projects recently, and probably you could ac-customize one of them. Basically, they do exactly what you need : sample analog input and stream data to PC. Make your search.
Regarding PCM1803A, you can't fits data flow in serial link, even 1 channel.    Someone could correct me if I'm wrong, but it's about 64 x 32 ksps = 2 Mb/sec for lowest sampling rate.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I should have elaborated on my intents a little more...I plan on making a little remote sensor network with 3 arduino's, each with a set of microphones....they will be recording the sounds from their locality and sending it back. I planned to build one first and then expand to 3, THAT's why I need arduino. smiley


Regarding PCM1803A, you can't fits data flow in serial link, even 1 channel.    Someone could correct me if I'm wrong, but it's about 64 x 32 ksps = 2 Mb/sec for lowest sampling rate.

I don't understand what you mean....can't I convert the data to digital data and then send it at a lower speed, using a data buffer?
I thought that was what the PCM1803A was used for....

If i'm mistaken, could someone please explain how this should be done?
I've never used an external ADC before.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everybody,

I have a similar problem. I do need to capture sound in the arduino, and then send the audio to a computer through serial.
Afterwards, the computer will perform some audio analysis. Depends on this analysis, the computer will send a different command back to the arduino.

My question is:
How can I capture the environment audio through arduino, send it to the computer through serial and then convert serial data received by the computer in audio again?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No solution so far? smiley-cry
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you looked at http://arduino.cc/playground/Main/InterfacingWithHardware#audio_input
Logged

Montreal
Offline Offline
Faraday Member
**
Karma: 27
Posts: 2573
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Solution greatly depends on
Quote
send it to the computer through serial
. This is the bottle-neck, do your homework, and make estimation of through-output 115200  BIT per second than compare with 10 BIT x sampling rate.
http://www.noah.org/wiki/Bandwidth
Logged

Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Serial data can go out the Arduino port at 200k or maybe even 500kbps.  That is fast enough for phone quality sound.
It does not appear to work with Wifly or Xbee.

From another thread:
Quote
I've noticed Wifly cannot go nearly as fast as you might expect.  I have not yet gotten to 10KB/sec without losing data.  The limitation is NOT the maximum serial speed which is about 20K.  The lost data occurs for me when I'm talking to an FTP server.  But I don't believe that protocol is the limitation.  When I'm using the fast baud rate 230kbps+ I'm forced to add large delays between each buffer.  As an alternative to waiting for a empty buffer response.  I've tried that, it is a constant interval.

Has anyone gone faster than 10KB/sec for many Megabytes over Wifly?
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Pages: [1]   Go Up
Jump to: