Microphone to microcontroller

Hi,

Im looking for microphone to microcontroller. It is important that the microphone should have automatic gain. Im looking for microphone similar to Gravity__Analog_Sound_Level_Meter_SKU_SEN0232-DFRobot but more cheaper.

I found only max9814 and sen-12642 but that microphones has no automating changed ranges.
Have you any suggestions?

This says adjustable gain in the description...

The device you linked to has neither AGC (automatic gain control), nor adjustable gain. What are you actually doing, what do you actually need? What sounds are you measuring, what accuracy do you need, and what aspects of the sound do you need to measure, specifically?

Why do you think you need, "automating changed ranges"?

Some boards have digital MICs (as MEMS), e.g. the Portenta H7 VisionShield.
But a MIC itself does not have any gain control. The gain is always on a following amplifier.
So,

  • you can have your gain in MCU FW when using onboard digital MICs, as part of the SW
  • or you use an active MIC, e.g. via USB, which has a command to set the gain (for the integrated amplifier)

And AGC is a control loopback: somebody, e.g. your FW/SW, has to tell the amplifier to reduce the gain. The MIC itself cannot do (w/o a sound processing MCU).

MICs are sensors: the gain is in amplifier or MCU FW behind it.
Even your ears do not have AGC: if too loud - you have to turn your head or cover your ears.

BTW: when using AGC (or a noise gate): they have disadvantages: the "regulation" can result in an "oscillation", it sounds like "breathing": you feedback the AGC control to the generated sound signal.
So, my suggestion is: try to avoid AGC, adjust the MIC for the volume range you need. The range where MIC will provide reasonable signal (not too quiet, not too loud) is not really large. But AGC (and noise gating) does not solve the issue, it adds more 'artefacts' to the sound.
Solve the "sound" issue first (e.g. where to place the MIC? how strong can the signal be?, how to dampen if too loud?).

Bear in mind: the MIC has a sensitive "graph": if quiet signal = nothing, of loud signal = distortion. It comes from the mechanical parameters of MIC, the diaphragm. And AGC will not solve it: it will just amplify when too quiet - with adding noise or "clip" when too loud (but already distorted).
The AGC will work only in the range where the MIC will work. If your volume level saturates already the mechanic - AGC does not solve it.

Select the right MIC for your application (sound levels) and do the AGC in FW on MCU (within the parameter range of the MIC). And for AGC algorithm: be careful if it ends up in "artificially" added sound (a nice PID controller with a huge delay to avoid audible oscillation).

I've made a few sound-activated lighting effects and I essentially do AGC in software. I don't actually adjust the gain but I adjust the threshold(s) or reference level based on the peaks or a moving average depending on the particular effect. It's more like automatic sensitivity control.

If you want to adjust the "gain", that's a multiplication factor. You can multiply by a factor greater than 1 for amplification and less than 1 for attenuation.

Since the Arduino ADC can't read negative voltages, analog microphone boards are usually biased and the bias needs to be subtracted-out before multiplying.

I'm not using a microphone. I'm using line-level audio signals and they are often volume-controlled so I need a wide range.

In addition to adjusting the threshold I switch automatically between the 5V and 1.1V ADC references depending on the current signal levels.

For my purposes, I use an array to get a 20-second moving average to keep track of the peak over the last 20-seconds.

I would like to build a sound level measuring device, something like this

this allows you to measure ambient noise. I simply mean that I would like to get the dB level from the environment as a result. And I found that i don't need AGC. In my electronic collection found sen 12642. Is possible to use it to solution such this?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.