Electronic – Clean/reduce static in electret microphone caused by “dirty” Raspberry Pi pin output voltage

dcgroundraspberry pi

I'm currently trying to wire up an electret microphone to a Raspberry Pi. I just figured out how to wire it up to a button cell battery after a couple of days of struggling. Still learning electronics so bear with me.

schematic

simulate this circuit – Schematic created using CircuitLab

I want to remove the button cell, and replace it with the +3.3V to GRND pins on the Raspberry Pi 3B+, but the problem I'm encountering is when connecting ground to the ground pin on the Pi, I get a lot of audible static in my voice recordings.

I'm assuming that this is because the ground pin isn't limited to -3.3V like with my button cell.

Is there a way to limit the negative voltage potential of the ground pin?

My instincts tell me that using a capacitor can accomplish this somehow, but I'm not sure of the approach.

Best Answer

Expanding on KD9PDP's answer.

If the 3.3V from the RPi is noisy, you can improve the filter by adding a series resistor, electret mics don't draw much current. You may need to experiment with the resistor values.

If you have noise on the ground wires, that is harder to fix. If you can float your RPi, connect the mic circuit ground to one point at the RPi.

schematic

simulate this circuit – Schematic created using CircuitLab