Go Down

Topic: Record audio and save as .wav with on board mic (Read 1 time) previous topic - next topic

So I would like to record audio and save it as a .wav file onto a SD card with an onboard mic. I was thinking of using this: http://www.mouser.com/new/stmicroelectronics/stmicromp34db01/

How would I go about interfacing? Do I need a preamp? Thanks in advance.

--Mike

CrossRoads

Looking at the larger setup:  The arduino records 10-bit analog at ~10KHz, for <5KHz bandwidth. There will be pauses in the sampling as the SD card is written to.
Will those limitations be okay?
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.

How often?

And if that was a problem how would you get around that?

CrossRoads

I'd say every 512 bytes, maybe every 1024 tops, because of the limited SRAM available for data buffering.
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.

That will be fine. How should I/can I interface with the microphone I linked above?

CrossRoads

Connect it up per page 12 of the data sheet.
Power is 1.8V.
Clock speed - typical is 2.4MHz. If you use SPI at 1/4 processor speed, that is 2MHz.
You will have 512 bytes of data every couple of mS.
SD uses SPI to write data to the card.
You can try a loop to read the data
Code: [Select]

for (x=0; x<512; x=x+1){
dataArray[x] = SPI.transfer(0); //MOSI connects to nothing,  MISO connects mic data pin, SCK connects to mic CLK pin
}

then use SD library to send it to the 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.


Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy