ESP32 and MAX9814

Hi,
I have an ESP32 with a MAX9814.
Im getting data from it but without sound I get a constant output of 1.60 (mv I think) sound detection makes the value drop.
My question is this the normal behavior I should expect to see ?

I expect you have some module with MAX9814.
If you have ~1.6V output without “sound”, it’s expected as the module has dc bias.
VCC/2 makes 1,65V.

You didn’t tell how you measured this but the max9814 has an balanced output that is not measured against gnd.

Why you think so?

Sorry i made a type error … its 1.06 not 1.6

I connected the MAX9814 to GND to GND on the ESP32 dev board, MAX9814 VDD to 3.3v on the ESP32 dev board and MAX9814 OUT to Pin 32 on the ESP32 dev board.

ESPHome code is

Blockquote
sensor:

  • platform: adc
    pin: 32
    name: “MAX9814 Sound Sensor Analog”
    unit_of_measurement: “mv”
    update_interval: 2ms

Blockquote

I just imagined it would be 0 and go positive output with more noise.

Then the bias is probably 1.2V.
Output is AC form, so the minimum is about 1V below and max about 1V above that. You need to measure peak to peak. Your actual adc configuration is not going to work anyhow.
What are you actually trying to accomplish?

Well it obviously does detect sound as the signal changes but as my original question, is it normal to see the signal/voltage reduced on sound detection.
I had expected to see it start low and rise on sound detection, I assumed an increase in noise would cause a increase in signal, not for it to decrease but I had found no examples of output, so had reason to expect that really.
Just wanted to check if its normal behaviour, if it is then that’s fine.
All good.

The output of mic is like this:


Red line is your bias voltage. So if you randomly take samples, they can be above or below.
Also, ADC measures only up to 1.1V if you don’t adjust attenuation.

this is what im getting

add:
attenuation: 12dB

Oops, sorry my bad
I mixed things up and thought it was about a max98357 i2s amplifier