We (gberthou & ekyr) would like to present you an Instructable that started as project for the course of Sensor Based Systems in KTH, Sweden. Our initial idea was to build a microphone from scratch, at low cost, but due to the fact that we were lacking the proper tools and materials to build a proper coil-magnet setup, we decided to use an old earpiece speaker. The results we got where better than expected and we successfully built a relatively accurate microphone for human voice recording that features noise cancellation and pre-amplification, in the total cost of 5 USD!
In the steps below you will learn:
- How to build such a microphone system
- What are the performance charateristics
- How you can customize it to fit your needs
Step 1: Building the Microphone
Our specifications where to build a sensor that acts as a microphone that can sense, relatively accurately, the full frequency spectrum of the human voice (300 to 3000 Hz) and can be plugged into a PC or other recording device. Since there is only one sensor, the microphone audio has only one channel (mono).
Our system is organized within four blocks:
- The sensor block which is basically the old earphone speaker
- The analog noise filtering block which consists of a low-pass filter. Its cutoff frequency is 7958 Hz
- The pre-amp block made of an op-amp and an adjustable resistor
- The power-supply block
The output of the system ends with a male jack plug so that it can be used to get sound in any piece of hardware that has an audio input jack port (computer, etc.).
To build the microphone system you will need:
- 1 x LED, green or red
- 2 x Resistors 330 Ohm and 220 Ohm respectively
- 2 x Capacitors 10 μF and 100 nF respectively
- 1 x Potentiometer 10 kOhm
- 1 x LM386-N4 Op-Amp
- 1 x 9V Battery
- 1 x 9V Battery Connector
- 1 x Toggle Switch
- 1 x male jack plug, which you can propably get from the speaker you used.
Step 2: The Hardware Schematics
1. Sensor Block
The mechanical sensor of the microphone is simply made of an earphone. It provides a flexible membrane that moves a coil around a magnet to generate a voltage.
2. Filter Block
In order to filter out the high-frequency noise that made the interesting signal hard to discern from the noise itself, we added an RC filter as a low-pass filter which cutoff frequency is quite low regarding the dynamic range of the human ear (20Hz-20 kHz). The resistor value R1 is 220 Ohms and the capacitor value C1 is 100 nF. Hence the cutoff frequency is around 7958 Hz. The range that is not filtered out (0 Hz-7958 Hz) contains human voice frequency range (300 to 3000 Hz). So this makes the our microphone efficient for phone calls or anything that requires only human voices. As a result, you might want to play around with the values of the filter depending on the application you would like to use the microphone.
3. Pre-amp Block
The amplification block consists of a Texas Instruments LM386 op-amp. It naturally provides a gain of 20, but the gain value can be modified by connecting components to the gain pins (1 & 8) of the chip. Since the voltage variations of the coil corresponding to the voice was very low, we figured out that we needed a higher gain. By connecting a 10 µF capacitor to those pins, the gain value increased to 200. We chose to use this op-amp as it is cheap (around 1$) and overall because of its low distortion (< 0.8% for frequencies lower than 8kHz) and its gain that is constant over the range of audible frequencies. Indeed, it was designed as an audio/video amplifier.
4. Power-supply Block
The output voltage of the amplifier is always in the range 0-3V and in the documentation it is specified that the minimum supply voltage is 5V. So any power-supply which voltage was higher than 5V might be used. We decided to use a 9V battery since 9V battery connectors are common to find and make wiring easier. The power-supply block is equipped with a switch in order to save battery and an indication LED.
Step 3: Frequency Response Analysis
The charts above show respectively the spectrum from the demo sound we played and the spectrum we recorded with our microphone. The demo sound was composed from all the audible frequencies at the same power. In the recorded sound spectrum we can clearly see that around 8 kHz the gain falls very quickly which is due to our low-pass filter.
NOTE: The recorded sound spectrum (2nd graph) is also influenced by the speaker sensitivity that played the demo sound. This can be clearlty seen in the 'big' spike centered at around 7 kHz.
Step 4: Performance Analysis
The charts above represent the performance in terms of signal power of our microphone versus distance and orientation respectively. As we can see the microphone loses it's signal strength very fast as the distance from the sound source increases which indicates suitable for use as a headset microphone or any other similar device. Also, the second graph shows us that our microphone 'hears' more clearly when we use it at 0 or 90 degrees.
Step 5: Further Optimizations
Many optimizations are possible but I think the most important one is in terms of frequency filtering versus the application the microphone is going to be used.
i.e. guitar microphone: lets say you wanted the microphone to be used as a recording mic for an acoustic guitar then it would be useful to implement a bandpass filter for the frequencies 82 Hz to 4696 Hz. Such a microphone would successfully filter out any background noise and only keep the recording of the guitar.