Pages: [1]   Go Down
Author Topic: sample short audio clips and save to sd card as .wav  (Read 1037 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 39
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I have this microphone http://www.fasttech.com/products/1012008-lm386-digital-microphonesound-sensor-shield-module and with it I would like to record audio for 5 seconds, save it as .wav and send it to Sd card. I don't know where to begin. Any help would be appreciated.

Thanks in advance, Mike.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27115
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

Start by defining your sampling rate and # of bits/sample.
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: 39
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

10khz and 10 bits?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27115
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

Ok, 10KHz, 10 bits.
You have 1024 words (16 bits) of SRAM. Total.
So you could store 1024 samples max.
You need 10,000 sample/sec * 5 sec = 50,000 samples.
Can you add some external memory? None of the AVR chips have enough for a 1 clip capture.
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: 39
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ram or flash storage? I have a SD card wired and ready.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27115
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

Need more RAM to capture the 5 seconds before you transfer to the SD card.
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.

0
Offline Offline
Edison Member
*
Karma: 8
Posts: 1249
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have never used it.. but maybe the WaveRP lib.. (its a lib for recording..)..

not sure how it all works myself.. never tried it.

http://code.google.com/p/waverp/downloads/list

quote:
Quote
WaveRP is an Arduino library for recording and playing Wave files with the Adafruit Wave Shield. It records 8-bit mono files at 4,000 to 44,100 samples per second.

Use of the Wave record/play library, WaveRP, requires the following:

Arduino with a 5 volt 328 processor.

Low noise power source such as a nine volt DC adapter or battery.

Adafruit Wave Shield (version 1.1 is best but 1.0 works)

Microphone preamp. A circuit for a simple preamp is included in the documentation.

Microphone, PC type with 3.5 mm plug. See the documentation for details.

SD/SDHC formatted with 32KB allocation units.

See the readme.txt file and library documentation for more information
Logged


Pages: [1]   Go Up
Jump to: