Support for MAX4466

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
EddyG
Normal user
Posts: 19
Joined: 05 Sep 2018, 16:03

Support for MAX4466

#1 Post by EddyG » 10 Oct 2018, 09:43

Is anyone already busy with support for the MAX4466, or is anyone willing to implement the code for it?
I would like to have some sort of measument for environmental noise/sound.
The MAX4466 is cheap and proberbly easy to implement.
https://www.aliexpress.com/item/GY-MAX4 ... 72453.html

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Support for MAX4466

#2 Post by TD-er » 10 Oct 2018, 12:08

What code should there be for this opamp?
It is just an analog amplifier? It doesn't have any digital interface to it.

EddyG
Normal user
Posts: 19
Joined: 05 Sep 2018, 16:03

Re: Support for MAX4466

#3 Post by EddyG » 10 Oct 2018, 15:34

I thought that the ESP8266 has analog input.

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Support for MAX4466

#4 Post by Shardan » 10 Oct 2018, 16:31

The ESP8266 has an analog input, yep.
But "analog" and "analog" isn't always same.

First: The breakoutboard MAX4466 you mentioned has nothing special over any other electret microphone with PreAmp.
It gives an analog audio signal that can be used to connect the microphone module to an audio amplifier for example.
That signal will not work with an ADC like the analog input of an ESP8266 or other ADCs like ADS1115.
The ADCs must get a DC voltage from 0...x volt. This DC voltage is translated into a binary value. Thats all.
It is "analog" in a way that it does not have logical "1" or "0" but a number analog to the input voltage is given.
It is NOT an analog input as with audio type analog to digital converters.

Further infos about the ADC inside ESP8266 and the widespread ADS1115 can be found in our Wiki:
https://letscontrolit.com/wiki/index.ph ... Converters

In general it is possible to use such microphones for noise level meters, but that will need some more
electronics around. At least it needs a second OpAmp building a precision rectifier to get a DC voltage
the analog input of ESP or ADS1115 can handle.
For developing such electronics it needs far more data then the add inside your post shows. At least the
output voltage of the breakout is necessary to dimension the rectifier part correctly.
I'd prefer to develop the whole circuit in one, using a bare microphone (electret or dynamic type as choice if possible)
and adding the rectifier part into the circuit.

Another point is calibrating such a device. First: Is the output of the microphone module really linear
to noise, so double output says double noise? Does it need switchable measuring ranges or does one
wide range do the job?
For reliable calibration it needs a really good noise level meter to compare..
Regards
Shardan

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Support for MAX4466

#5 Post by Shardan » 10 Oct 2018, 19:01

Hello again,

I did a quick shot for an idea of a circuit for a sound level meter.

Beware:
it is not tested, all values are guessed by experience.
It may work, work partly or not at all!
It is just an idea to start from.

SoundLevel_Schematics.jpg
SoundLevel_Schematics.jpg (388.26 KiB) Viewed 7060 times
Regards
Shardan

EddyG
Normal user
Posts: 19
Joined: 05 Sep 2018, 16:03

Re: Support for MAX4466

#6 Post by EddyG » 12 Oct 2018, 09:16

Tnx.
This might also be a good start: https://blog.yavilevich.com/2016/08/ard ... -analyzer/
And I found this one: https://circuitdigest.com/microcontroll ... easurement
B.t.w. does not have a AC voltage have an amplitude and if you rectify that you get an DC voltage with a level?
Calibration is not a real issue, it is about relative audio levels.

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Support for MAX4466

#7 Post by Shardan » 12 Oct 2018, 10:32

EddyG wrote: 12 Oct 2018, 09:16 Tnx.
This might also be a good start: https://blog.yavilevich.com/2016/08/ard ... -analyzer/
And I found this one: https://circuitdigest.com/microcontroll ... easurement
B.t.w. does not have a AC voltage have an amplitude and if you rectify that you get an DC voltage with a level?
Calibration is not a real issue, it is about relative audio levels.
I won't recommend the circuit shown with the arduino. The amplifier chip is forced into a fully non-linear mode
to save a few parts for a real rectifier. In consequence the results won't be reliable, low noise levels will be
very unreliable as the non-linear mode is badly calculatable at low levels. The more the circuit gives an AC signal
to the arduino ADC which isn't a good idea either.

Yep, AC voltage has an amplitude that can (and should) be rectified - do not use just a standard diode for that.
A 1N4148 diode has a forward voltage of 0,7V making low sound levels unreadable. Even a schottky diode has a
(lower) forward voltage of 0.14 ... 0.2 V. In my idea of a circuit I used a schottky diode with a second operational
amplifier to compensate the forward voltage and give defined raise and decay times to adapt the relatively slow
ADC inside the ESP.
Regards
Shardan

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests