Go Down

Topic: sample short audio clips and save to sd card as .wav (Read 1 time) previous topic - next topic

mikejonesab1

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.

CrossRoads

Start by defining your sampling rate and # of bits/sample.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.


CrossRoads

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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

mikejonesab1

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

CrossRoads

Need more RAM to capture the 5 seconds before you transfer to the SD card.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

xl97

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

Go Up