Skip to main content
DElec.1
Associate II
May 23, 2022
Question

How can I interface an electret microphone (condenser) to STM32F4?

  • May 23, 2022
  • 24 replies
  • 6246 views

I want to interface two electret microphones (stereo sound) to STM32F446 chip. I don't know how to connect it or what protocol or pins I have to use. I have found a lot of information about digital microphones but nothing on this topic.

Thanks.

This topic has been closed for replies.

24 replies

gregstm
Senior II
May 23, 2022

Any special frequencies you want to detect? eg. very low frequencies? - ultra high frequencies? If so, I would go digital microphones. With electret microphones you will either have to create your own analog amplifier circuit - or go with a chip that does most of the work for you eg. the MAX4465/MAX4466 (you can even get a little Adafruit board based on the MAX446 that has most of the things you need on it) - and then use the ADC to input the signal. I used to use electret microphones but now have been using digital microphones (first the I2S type, and now the PDM types) - I have been very impressed with their performance (except that I have destroyed a few with my experiments - when you pull them apart you find that they have very delicate structures inside them). The PDM microphones have been difficult to get right from the digital aspect (setting up the DFSDM, DC blocking, decimating filter) but the hardware simplicity and audio sensitivity has been worth the development pain for me.

Andrew Neil
Super User
May 23, 2022

@Community member​ "use the ADC to input the signal"

Does the STM32F446 have two ADCs? If not, it'll mean switching the one ADC between the two sources - so @DElec.1​ won't have "proper" stereo ...

So might be better using an external dual ADC?

I'm sure stereo analogue front-ends with ADC must be available...

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Javier1
Principal
May 23, 2022

STM32F446 has Maaaaaaany ADC channels distributed into 3 different ADC periprherals.0693W00000NqTlbQAF.png

hit me up in https://www.linkedin.com/in/javiermuñoz/
DElec.1
DElec.1Author
Associate II
May 24, 2022

Thanks @MasterT​ I need to design my own hardware.

gregstm
Senior II
May 24, 2022

Hint: if you are serious about recording stuff. Get yourself a high-quality commercial audio recorder (eg. Olympus). I only realised my multiple electret elements I tried were crap when I compared the output I was getting with the downloaded recording from the commercial recorder. My electrets could barely pick up the lowest bass notes, whereas the digital recorder picked them up easily and cleanly.

Andrew Neil
Super User
May 25, 2022

"if you are serious about recording stuff. Get yourself a high-quality commercial audio recorder"

Even a low-cost commercial recorder will give better results than anything using cheap electrets...

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.