Pages: [1]   Go Down
Author Topic: Sound Monitor  (Read 802 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 47
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello everyone! I have a question on project feasibility and I would love your input.

Basically I want to make a sound monitor using an Arduino Uno. Specifically this device would take audio input and transmit it to some location. For now, lets say that location is a computer.

The requirement is that the sound must be intelligible though quality is not important. Preferably the sound would be transmitted as digital data. The receiver (computer) can be responsible for processing the data so all the Arduino must do is capture the data and transmit it.

So is this feasible? Can the Arduino potentially do this?

Off the top of my head I would think that a simple speaker w/ po-amp (something better than a piezo) would capture the data and the arduino could just route the raw pcm frequency data via a WiFly or XBee to the computer which can then encode to wav/mp3. My concern is that it is just not powerful enough to do this at a reasonable hz.

Another option which I am reserving but would rather not have to do is to send the audio via am transmitter to the computer. I would still need the Arduino for additional sensor information but this would at least get the audio to destination.

Thoughts, suggestions, concerns?

Thanks for any input!
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 538
Posts: 27089
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So you want to digitize at some rate, such as 10KHz, and send to a PC?
Yes, that is doable.
If you want a faster sampling rate, you will likely need go to external chip A/D converter via SPI, and pass that data along.
A part like this from gravitech.us could do it for you also, 50KHz sampling, 12 bit resolution.
http://www.gravitech.us/i2c128anco.html
Logged

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.

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 538
Posts: 27089
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, if serial comm's at 115.2K are achievable, then it would seem reading from an SPI device and transmitting out at 88.2K (single channel audio sampled at 44.1K) could be possible.
My IDE setup is dead at the moment, need to get it running again so I can do some more playing. Too many summer projects in the works, along with that 1284 board I have almost ready to release for PWBs ...
Logged

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.

Offline Offline
Edison Member
*
Karma: 3
Posts: 1001
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, if serial comm's at 115.2K are achievable, then it would seem reading from an SPI device and transmitting out at 88.2K (single channel audio sampled at 44.1K) could be possible.
This is not correct.

If you sample audio at 44.1k samples per second you get 44.1k*n bits (where n is your ADC resolution at 8, 10, 12 or whatever) for every sample. The minimum serial bit rate required to transfer this stream (8 bits of data + 1 start + 1 stop) would be 441k.
Logged

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

Thanks for the feedback so far. You've made some great points.

As I mentioned before the quality is unimportant and 44.1k is way more than I need. I just did a rough test in Audacity and I think I can get away with cassette tape quality (8k samples at 8-bit depth)

From the specs on gravitech the Xbee can output 250Kbps which is roughly 32KB/s. Thats only 64Kb (8KB), well within the transmit rate of the Xbee with room for more. Please correct me if I'm wrong but that element of the project _does_ seem feasible if I went in this direction.

Something better than the piezo (electret) as in something that can capture more than just sound intensity. Something like this perhaps:
http://www.sparkfun.com/products/9868
with this?
http://www.sparkfun.com/products/8636

Thoughts?
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 538
Posts: 27089
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yeah, okay, I was thinking SPI was bytes/sec and not bits/sec, so maybe the math is a little off.
But I've read it can do 440K and higher, so it's pretty darn fast!

ADC would be good if the signal is already an electronic signal (vs a sound wave).
« Last Edit: May 31, 2011, 12:49:05 pm by CrossRoads » Logged

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.

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 538
Posts: 27089
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm all for guessing!  Much better for coming up with 'Rube Goldberg' solutions that way ...
Logged

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.

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

I'm not sure how much clearer I can be. As CrossRoads said, I want to make an Arduino based device that captures and wirelessly transmits digital sound data to some host destination. The resulting audio can be lossy and low quality. Does the application really matter when the requirements are clearly stated? I could be making a hidden microphone or a baby monitor -- the requirements remain the same (FYI it is the latter). :-)
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 538
Posts: 27089
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, give the internal 10-bit ADC a shot and see how it turns out.
If you can achieve 10KHz sampling and transmit it out as 8-bit bytes, that might be close to telephone quality sound.
Go arduino to arduino over serial interface to start:
Capture a sample
shift right 2 bits to drop 2 LSBs,
Transmit via serial

Receive,
Write it to a DAC.
Wonder how it would sound coming out of PWM? Probably weird, with high volume converted to high frequency.
Logged

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.

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

Good plan, I'll let you  know when/if I make any progress.

Thanks again for taking the time to help!
Logged

Pages: [1]   Go Up
Jump to: