Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSM261S4030H0 support #1

Open
civic9 opened this issue Nov 16, 2019 · 6 comments
Open

MSM261S4030H0 support #1

civic9 opened this issue Nov 16, 2019 · 6 comments

Comments

@civic9
Copy link

civic9 commented Nov 16, 2019

I found on aliexpress quite cheap i2s mems board, eg. https://www.aliexpress.com/item/33054636550.html
Sellers state it is using MSM261S4030H0 chip.

Datasheet:
http://dl.sipeed.com/MAIX/HDK/Chip_DS/%E9%BA%A6%E5%85%8B_MSM261S4030H0(%E4%BD%BF%E7%94%A8%E7%9A%84).pdf

Looks better than inmp441.
Sensitivity Matching within +/‐1dB

Maybe you can add support for this mic.

@ikostoski
Copy link
Owner

Sadly the datasheet for the mentioned microphone shows frequency response only for 100Hz-10KHz range. You can try to guess the response for lower frequencies and plug the data into ics-43434.m file, to get some compensating coefficients, but that will be just a guess. You can also measure the response of single microphone, but that may not be valid for the next one, etc...
For A-weighting, the lower frequency band will be heavily attenuated by the weighting filter anyway, so depending what you are attempting to achieve, it may not matter much.
Other than that, it should work out-of-the box: 24bit data, -26dBFS @ 94dB. If there is a 'DC offset' (values are not centered around zero), I have some code in the pipeline that should take care of that.
Also, I don't have sample of this microphone, so I don't know if it will play nice with ESP32 (I2S bit timing, etc...). If you have this microphone and do some testing, please share the results. Thanks.

@keeshanam
Copy link

I have the Sipeed I2S Mic which has this chip. It is working as expected using default config. The sound floor seems to be quite high. Resting at ~40dba. Not sure if that is normal in current environment typing 2 feet away is about 50 dba. I will map in frequency and update parameters. If you would like me to check any specifics let me know.

@ikostoski
Copy link
Owner

Hi keeshanam, in normal urban environment noise will rarely go below ~40dB (library noise level), or ~35dB at quiet night, so that would be expected result. For less than that you would need quiet anechoic chamber. I would recommend no equalization filter as it is 'flat' in the specified range, and the rest we simply don't know (no data). If you want to test it, perhaps see the following project log: https://hackaday.io/project/162059-street-sense/log/170825-measuring-audible-noise-in-real-time for a simple method to compare values with 'real' SLM.

@MU-STAGE
Copy link

Hi,
I also have the MSM261S4030H0 microphone and I am a beginner using the I2S microphone with the stm32 b-l072z-lrwan card, so I have trouble understanding how to use the filters and calculate the coefficients. can you please give help how can i calculate db spl?

Best Regards.

@ikostoski
Copy link
Owner

Hi @MU-STAGE, you can certainly try to port the code to STM32. You will likely need need STM32 that has FPU (i.e M4) and support for i.e. CMSIS DSP library (for IIR biquad functions).
As discussed above, there is not enough data for 'proper' equalizer filter for MSM261S4030H0, so you might as well skip that step. You can try to use coefficients for the weighting filters form the .m files (output of tf2sos function), but the format you need will depend on the DSP library.
Unfortunately, i do not know enough about STM32 to help you more.

@MU-STAGE
Copy link

OK,
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants