Hello.I'm rather puzzled what's going on here. I'm doing a thing to record some very faint sounds on an embedded device running Linux. The device has an analog audio input, so all I have to do is attach a mic to the correct pin. At least that was the plan... Since I didn't have a decent mic I thought I'd build my own. I ordered a bunch of electret mics from an online supplier and decided I also want a preamplifier. For this task I went to eBay and ordered a few of those red PCB's with a linear regulator and the MAX9814 preamp IC that has AGC with 40/50/60 dB gain. Anyhow, I wired everything up, connected the preamp board output to an oscilloscope and turned on the PSU on 5VDC. Wah wah wah waaaah...

The scope was showing a clear and strong 50Hz sinusoidal wave on the amplifier output. It seems that besides the audio, this mic was also picking up mains AC noise for some reason. I tried replacing the PSU with another and also hooking the preamp board directly to a 9V battery, but to no avail. If I disconnected the mic, all noise disappeared and I could see a flat line on the scope. The wire connecting the mic to the board was like 2 cm long. Funny thing is I've also tested the preamp board with some other electret microphones that I've salvaged from various devices. They're all different and most of them had unshielded wires (even up to 30 cm long), but none of them caused any AC noise on the preamp output. It's just this specific mic that happens to be picking up AC, but otherwise works fine audio-wise (can see audio appear on the scope while speaking aloud).
Electret mic datasheet: https://www.cuidevices.com/product/resource/cmc-6027-24t.pdfMAX9814 datasheet: https://datasheets.maximintegrated.com/en/ds/MAX9814.pdfPreamp board: https://www.ebay.com/itm/114828779130Any ideas why this is happening and how to solve it? I mean, I could just use one of the other electret mics, but I bought a bigger number of the noisy ones that I had planned to use.
Thanks in advance!