Open bhupiister opened 2 years ago
I think the problem is that the microphone is terrible and that every one is different. Mine has a huge DC offset which then settles after a moment and it looks like they all do and they all start at a different value. For frequency analysis though, provided you get clear of the initial spike you can remove the DC value and the frequency will analysis will still be valid. If you got a better result somehow let me know.
I've also noted a significant DC offset with my device. I solved it by averaging the samples and removing the average. Seems to work pretty well: https://github.com/atomic14/m5stack-core2-audio-monitor/commit/22b7b0f0f2e816ae4f983fb7f71c43ed33ec2d6a
I have set a sample code to record audio signal. One device is with my partner in USA and other is with me in India. Both device are M5 Core 2. We both get different Zero line for output. Our code is 100% same as same firmware is built and flash by me.
My Partner's output My output
My I2S setting to record audio
This is in Loop of 2 milliseconds to record audio. (Sample rate 500Hz)
If my settings are incorrect. Can you please let me know what should be the optimum setting to record at 500Hz, we are capturing industrial noise along with vibrations being recorded in same loop from MPU6886.