LM358 microphone amplifier
After the unconvincing performance of the LM386 mic amp, another design is put to the test. This time, based around a LM358 operational amplifier.
Operational amplifiers are high-gain voltage amplifiers. There’s a huge amount of information available on how to use them and the guide I followed is TI’s“Op Amps for Everyone”. The schematic is an “Inverting AC amplifier” (A.3.18, p. 424). From the equations there, the voltages on the two outputs are:
- V_OUT_UC = – V_IN * R5 / R4 + VCC / 2 = – 100 * V_IN + VCC / 2
- V_OUT = -100 * V_IN, as the C3 capacitor is blocking the DC component
(V_IN is the voltage at pin 2)
Op amps do not provide a lot of output power. In-ear headphones can be driven from V_OUT, but it’s unlikely that a LM358 will power even a small speaker. For a microcontroller, connected to V_OUT_UC, output power does not matter, only voltage does.
LM358 sound sensor performance
As in the LM386 mic amp setup, V_OUT_UC is connected to Arduino’s A0 pin and the Min-Max sketch is uploaded. By using different R5 resistor values (10K, 47K, 100K), gains of 10x, 47x and 100x are achieved:
|10x||510 ~ 512||2||307 ~ 735||428|
|47x||505 ~ 517||12||17 ~ 754||737|
|100x||500 ~ 525||25||7 ~ 755||748|
Pretty good! The noise level in silence increases linearly with gain. Moving from 10x to 50x gain gives a good increase in the maximum output swing. Pushing the gain to 100x provides only a minor improvement. Overall, the 50x setup gives the best noise vs. output swing results.
The LM358 does not have a true rail-to-rail (0V to VCC) output. The datasheet specifies an “output voltage swing 0V to (VCC – 1.5V)”. This means that when VCC = 5V, the largest possible analog reading is in the 715 – 750 range. In order to get an wider output range, a better op-amp should be used.
Current draw was 1.52mA, in the 100x setup
|C1||10uF||Microphone coupling capacitor|
|C2||100nF||Power supply decoupling|
|R1||1 ~ 10K||Microphone load resistor|
|R2, R3||10K||Voltage divider: 1/2 VCC|
|R4||1K||Gain = – R5 / R4|
|VSS||3 ~ 30V||Supply voltage|