Projects / Electret microphone preamp

Electret microphone preamp

Beginner1 hGuided buildReviewed

Build it step by step

0 of 6 done
  1. NANO

    Check the bias

    Wire the divider and measure about 2.5 V at node B.

  2. NANO

    Wire the microphone

    Add the capsule with its 10 kΩ bias resistor and coupling capacitor.

  3. NANOLM35822.7°C

    Add the amplifier

    Wire the LM358 with the 100 kΩ and 1 kΩ gain resistors.

  4. NANO

    Check the output

    With a meter, the output should rest near 2.5 V.

  5. NANO

    Read it with the Nano

    Upload the sketch and open the Serial Plotter.

  6. NANO

    Tune the gain

    Change the 100 kΩ resistor to 47 kΩ for gain 48 if it clips on loud sounds.

In short

How do you build an electret microphone preamp?

An LM358 boosts an electret mic so an Arduino or recorder can use it, with bias and gain set by resistors. You need Electret microphone (capsule), LM358 Op-Amp, Resistor 10 kΩ × 4, Resistor 100 kΩ, Resistor 1 kΩ, Electrolytic capacitor 10 µF × 3, Ceramic Capacitor 100 nF, Arduino Nano, Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm). It takes 6 steps and about 60 minutes.

Level
Beginner
Time
About 60 min
Parts
10

Parts list

Tick what you already own. It saves to My Garage, so “Build with what I have” knows.

Wiring

FromToWhy
Nano 5V+ rail, LM358 pin 8Supply
Nano GND- rail, LM358 pin 4Ground
100 nF capacitorLM358 pin 8 and pin 4Supply decoupling
10 kΩ resistor+ rail and electret + terminalMicrophone bias
Electret - terminal (case)- railGround
Electret + terminal10 µF capacitor +Coupling
10 µF capacitor -LM358 pin 3 (IN+)Signal in
10 kΩ resistor+ rail and node BHalf-supply divider top
10 kΩ resistorNode B and - railHalf-supply divider bottom
10 µF capacitorNode B and - rail, + on node BSmooths the half-supply node
10 kΩ resistorNode B and LM358 pin 3Biases the input at 2.5 V
100 kΩ resistorLM358 pin 1 (OUT) and pin 2 (IN-)Feedback, sets gain
1 kΩ resistor then 10 µF capacitorPin 2 and ground, + on ground sideGain 101 for sound, gain 1 for DC
LM358 pin 1 (OUT)Nano A0Signal for the Arduino, centred on 2.5 V

Code

Arduino IDE, board "Arduino Nano" (processor ATmega328P, or ATmega328P (Old Bootloader) for clones). The LM358 pins are 1 output, 2 inverting, 3 non-inverting, 4 GND, 8 V+. The electret capsule has two terminals: the one connected to its metal case is the negative one. The resting output should sit near 2.5 V; if it does not, check the divider. Open the Serial Plotter to watch the level move as you speak. An LM358 swings roughly 0.5 V to 3.5 V on a 5 V supply, so very loud sounds will clip.

Runs on a virtual Arduino Nano in your browser, with sliders for the sensors. Happy with it? Verify and upload to your real board from the same page (Chrome or Edge on a computer).

const byte MIC = A0;

void setup() {
  Serial.begin(115200);
}

void loop() {
  int lo = 1023, hi = 0;
  unsigned long start = millis();
  while (millis() - start < 50) {          // 50 ms window
    int v = analogRead(MIC);
    if (v < lo) lo = v;
    if (v > hi) hi = v;
  }
  Serial.println(hi - lo);                 // peak-to-peak loudness, 0 to 1023
}

What the serial monitor should show

Open the serial monitor at the baud rate in the code. This is what our simulator prints for a virtual Arduino Nano with its sensors at their default values. Your numbers will follow your real readings, but the format should match.

152
153
152
150
149
151

Test checklist

What you should see at each check. If a reading is far off, stop and use the troubleshooting list.

CheckExpected
Quiet roomSmall, steady value
Speaking closeReading rises well above idle
ClapLarge spike, possibly clipping
Output with meterAbout 2.5 V at rest

If it does not work

Output stuck at 5 V or 0 V

Check the supply pins and the half-supply divider.

No response to sound

Capsule is wired backwards. Swap its terminals.

Very noisy

Add the 100 nF capacitor close to the chip and keep wires short.

Clipping all the time

Lower the gain by reducing the 100 kΩ resistor.

Still stuck? Find the fault step by step with your multimeter →

Ask Lark AI

Common questions

What parts do I need for the electret microphone preamp?

Electret microphone (capsule), LM358 Op-Amp, Resistor 10 kΩ × 4, Resistor 100 kΩ, Resistor 1 kΩ, Electrolytic capacitor 10 µF × 3, Ceramic Capacitor 100 nF, Arduino Nano, Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm).

How long does the electret microphone preamp take to build?

About 60 minutes for a beginner maker, in 6 steps.

How do I know the electret microphone preamp works?

Quiet room: Small, steady value. Speaking close: Reading rises well above idle. Clap: Large spike, possibly clipping.

Output stuck at 5 V or 0 V: what should I check?

Check the supply pins and the half-supply divider.

No response to sound: what should I check?

Capsule is wired backwards. Swap its terminals.

Very noisy: what should I check?

Add the 100 nF capacitor close to the chip and keep wires short.

Clipping all the time: what should I check?

Lower the gain by reducing the 100 kΩ resistor.