I have a MEMS microphone connected to the microcontroller on a PCB. The microphone collects the data and sends the analog data to the microcontroller in real-time. On the microcontroller, this data is converted to digital form and then I extract this digital data from the microcontroller. But when I plot the signal, I get the signal as a curved one. It looks like the DC offset is not constant. All the recordings have this issue.
However, for ex., I record a song and when I play the file (after converting them to .wav files using MATLAB with specs such as sampling freq: 40KHz, Bits/sample:16), I don't see any problem in the audio files, I am able to hear the song properly. I have attached the plot as well as the audio file for reference.
As the microcontroller and microphone are part of an assembled PCB, I plan to scratch off the insulation and expose the copper line (analog signal line from the microphone to the microcontroller's pin), and then I can probe there using an oscilloscope to check what could be happening there.
Can anybody suggest what could be the issue here or what can I try to get rid of this?
Thanks, Gagan
Link for the audio file: audio file