Build it step by step
0 of 6 doneCheck the bias
Wire the divider and measure about 2.5 V at node B.
Wire the microphone
Add the capsule with its 10 kΩ bias resistor and coupling capacitor.
Add the amplifier
Wire the LM358 with the 100 kΩ and 1 kΩ gain resistors.
Check the output
With a meter, the output should rest near 2.5 V.
Read it with the Nano
Upload the sketch and open the Serial Plotter.
Tune the gain
Change the 100 kΩ resistor to 47 kΩ for gain 48 if it clips on loud sounds.
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
- AudioBuy
- Integrated CircuitsBuyLM358 Op-Amp × 1
- PassivesBuyResistor 10 kΩ × 4
- PassivesBuyResistor 100 kΩ × 1
- PassivesBuyResistor 1 kΩ × 1
- PassivesBuy
- PassivesBuy
- Development BoardsBuyArduino Nano × 1
- PrototypingBuy
- PrototypingBuy
Tick what you already own. It saves to My Garage, so “Build with what I have” knows.
Wiring
| From | To | Why |
|---|---|---|
| Nano 5V | + rail, LM358 pin 8 | Supply |
| Nano GND | - rail, LM358 pin 4 | Ground |
| 100 nF capacitor | LM358 pin 8 and pin 4 | Supply decoupling |
| 10 kΩ resistor | + rail and electret + terminal | Microphone bias |
| Electret - terminal (case) | - rail | Ground |
| Electret + terminal | 10 µF capacitor + | Coupling |
| 10 µF capacitor - | LM358 pin 3 (IN+) | Signal in |
| 10 kΩ resistor | + rail and node B | Half-supply divider top |
| 10 kΩ resistor | Node B and - rail | Half-supply divider bottom |
| 10 µF capacitor | Node B and - rail, + on node B | Smooths the half-supply node |
| 10 kΩ resistor | Node B and LM358 pin 3 | Biases the input at 2.5 V |
| 100 kΩ resistor | LM358 pin 1 (OUT) and pin 2 (IN-) | Feedback, sets gain |
| 1 kΩ resistor then 10 µF capacitor | Pin 2 and ground, + on ground side | Gain 101 for sound, gain 1 for DC |
| LM358 pin 1 (OUT) | Nano A0 | Signal 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.
| Check | Expected |
|---|---|
| Quiet room | Small, steady value |
| Speaking close | Reading rises well above idle |
| Clap | Large spike, possibly clipping |
| Output with meter | About 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 →
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.
