I'm making a pre-amplifier for my 9mm electret microphone to be read by an Arduino. Here's the schematic:
Note that the resistor I used connected to the output is 1Meg. My supply voltage is 5V.
Initially I used LM358 as the op-amp. When I plotted the output it seems to be normal -centered around 2.5V with a bit of noise (my plot range is 0 to 5V). But when detecting loud sounds, the output gets clipped to ~3.7V.
Because of that I decided to switch the op-amp with a rail to rail AD8051 instead. Wiring with corresponding pinout from its data-sheet and using the same resistors, capacitor and mic. Now the output I get is somehow centered at 0V and the signal seems to be amplified more than the last time.
Why did this happen and how do I get the output to center back at 2.5V? aren't op-amps interchangeable without having to change resistor values?