Record Audio to your Audino Mega SD card.
The audio file can be played back on a standard audio application or analysed byte by byte.
This Instructable will show you how audio input can be repeatedly added to a 512 byte buffer and then transferred to a SD card in real time. The period recorded can be altered.
The sample rate is 9.4 KHz and the wav file output 8 bit, mono. Whilst not hi-fidelity, the sound quality is perfectly adequate.
The recorded wav file can be saved as tabulated data. It can also be displayed as a simple scrolling graph on the monitor.
All files are time stamped using a unix time code sent from the serial monitor.
The inspiration for this article came from reading Amanda Ghassaei: http://www.instructables.com/id/Arduino-Audio-Inp...
My latest program update at the end of this instructable, increases the sample rate to 19 KHz with a significant improvement in audio quality.
You may also be interested in my instructable on playing wav files from the Arduino:
Inevitably SD card technology has already improved. I have tested with a Sandisk Ultra 8GB sd card. This is significantly faster than the Kingston 4GB card I started with. Using my updated software I am able to record at 38.3KHz, with no degradation in quality. (4/8/2014)
Step 1: Requirements
Arduino Mega 2560
The following components work- alternatives may be viable (with program tweaking- I leave that to you!)
LCD Keypad Shield http://www.hobbytronics.co.uk/arduino-lcd-keypad-...
MicroSD Breakout Board Regulated with Logic Conversion V2
4GB Micro SD Memory Card http://www.hobbytronics.co.uk/microsd-card-regula...
ac coupled with a potential divider to centre the voltage between Arduino 0-5 V rail
Amanda Ghassaei has published a circuit at http://www.instructables.com/id/Arduino-Audio-Inpu...
I designed my own with bass, treble and volume controls. However there are plenty of pre-amp designs on the web.