

A microphone (mic) is a device that converts sound waves into electrical signals, enabling the capture and transmission of audio. Microphones are widely used in various applications, including audio recording, communication systems, voice recognition, and sound sensing in IoT devices. They are essential components in devices such as smartphones, computers, hearing aids, and public address systems.
Microphones come in different types, such as dynamic, condenser, and electret, each suited for specific use cases. This documentation focuses on the electret microphone, a popular choice for electronics projects due to its small size, low cost, and ease of integration.








Below are the typical technical specifications for an electret microphone:
Electret microphones typically have two or three pins. Below is the pin configuration for a common two-pin electret microphone:
| Pin | Name | Description |
|---|---|---|
| 1 | V+ (Power) | Connects to the positive voltage supply (typically 3.3V or 5V). |
| 2 | GND | Connects to the ground of the circuit. |
For a three-pin microphone module (e.g., with a built-in amplifier), the configuration is as follows:
| Pin | Name | Description |
|---|---|---|
| 1 | V+ (Power) | Connects to the positive voltage supply (typically 3.3V or 5V). |
| 2 | OUT | Analog audio signal output. |
| 3 | GND | Connects to the ground of the circuit. |
Below is an example of how to connect a microphone module to an Arduino UNO and read the audio signal:
// Microphone signal reading example with Arduino UNO
// This code reads the analog signal from the microphone and prints the values
// to the Serial Monitor for visualization.
const int micPin = A0; // Microphone output connected to analog pin A0
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
}
void loop() {
int micValue = analogRead(micPin); // Read the analog value from the microphone
Serial.println(micValue); // Print the value to the Serial Monitor
delay(10); // Small delay to stabilize readings
}
No Output Signal:
Weak or Distorted Signal:
High Noise or Interference:
Arduino Reads Constant Values:
Q1: Can I use the microphone with a 3.3V power supply?
A1: Yes, most electret microphones and modules can operate with a 3.3V supply. However, check the specific voltage range in the datasheet of your microphone.
Q2: Do I need an amplifier for the microphone?
A2: Yes, the raw output of an electret microphone is weak and typically requires amplification for most applications.
Q3: Can I use the microphone to detect specific frequencies?
A3: Yes, you can use a microcontroller with a Fast Fourier Transform (FFT) library to analyze the frequency components of the audio signal.
Q4: How do I protect the microphone from environmental damage?
A4: Use a protective enclosure or foam windscreen to shield the microphone from dust, moisture, and wind noise.