Chapter 2. Creating a Spy Microphone

In this chapter, we are going to build a very useful device for any secret agent: a spy microphone. The project will be based on Arduino, with a simple amplified microphone and an SD card.

The following are the steps that we are going to take to build this project:

  • We will see how to configure the project in order to make sure that it is recording for a given amount of time that can be configured by the user
  • Then, the recorded audio file will be written on the SD card and be accessible from any computer
  • Before doing that, we will test all the components of the project individually

Let's dive in!

Hardware and software requirements

Let's first see what the required components for this project are. As usual, we will use an Arduino Uno board as the 'brain' of the project.

Then, we will need a microphone. I used a simple SparkFun electret microphone, which has an amplifier onboard, as shown in the following image:

Hardware and software requirements

The most important thing here is that the microphone is amplified. For example, SparkFun is amplified 100 times, making it possible for the Arduino Uno to record usual sound levels (such as voices).

Then, you will need a microSD card with an adapter:

Hardware and software requirements

You will also need a way to record data on the SD card. There are many ways to do so with Arduino. The easiest, which is the solution that I chose here, is to use a shield. I had an Ethernet Shield available, which is great because it also has an onboard microSD card reader.

You can, of course, use any shield with a microSD card reader or even a microSD reader breakout board.

You will also need a breadboard and some jumper wires to make the required connections.

Finally, the following is the list of all the components that we will use in this project:

On the software side, you will need a special version of the SD card library called SdFat. We can't use the usual Arduino SD library here as we will do some really fast write operations on the SD card, which can't be handled by the SD library that comes with the Arduino software. You can download this library from https://github.com/greiman/SdFat.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.4.167