Record Sound And Send It To A Speaker

This is my first project. I need to capture my sound when I press a button, and play it in a speaker. (On releasing the button, the recording/capturing should stop)

Please specify which board I should use and all necessary equipment's. I am completely new to this.

That's an ambitious first project and The Arduino probably isn't your best option... It doesn't have a true-analog output and it has very limited memory.

If you want to try it, there is a library called [u]TMRpcm[/u] that can read an audio file from an SD card and "fake" the analog with fast PWM. It also has recording capability but "recording **is still being tested and may not perform as expected."

You'll need an amplifier to drive the speaker (or amplified computer speakers) but unfiltered PWM can sometimes do "bad things" to an audio amplifier.

You'll also need a preamp for the microphone and you have to bias the analog input because the Arduino can't read the negative-half of an AC audio waveform. A simple solution is a "microphone board" or "sound sensor board" which as a microphone and preamp built-in and the biased output.

You might look for a specialized recording/playback chip. There used to be one but I don't know if it still exists.

Or, you might consider using a [u]Raspberry Pi[/u] which is a "single board computer" (unrelated to the Arduino). It's got an operating system, memory, a regular analog audio output* (you still need an amplifier), and you can connect a USB computer-microphone.

  • The analog output is also PWM-based but I believe it's filtered and higher-frequency PWM so it's easier to filter-out the PWM to get analog audio.

Arduinos aren't generally very good for sound. Among other things most do not have much memory.

But more details might help. What type and quality of sound do you need and what will the maximum length of time the sound will last. How many recordings do you plan to store at any one time and what do you plan to do with them?

Steve

This is a tough project even for an experience engineer/programme. I would suggest you order the Arduino cookbook (arduino bible) and while you are waiting for it to arrive go through several Arduino and basic electronic tutorials. After you get through the cookbook you might even find your project contained therein. In any case you will be better equipped to determine what you need.