Monthly Archives: July 2014

A look at Adafruit’s Electret Microphone Amplifier – MAX4466 with Adjustable Gain (1063)

I purchased Adafruit’s Electret Microphone Amplifier – MAX4466 with Adjustable Gain (1063) and wanted to incorporate the circuit into a board that I am making to make a sound responsive decorative light. I saw a post from Adafruit that stated that the schematic was taken directly from the datasheet however looking at the component values on the board, it was obvious that some values had been changed. After a bit of reverse engineering of the board, it was confirmed that the schematic is indeed Figure 2 from the datasheet.

Figure2

Board Layout

Component Listing (Note Capacitor Values taken from Datasheet Schematic and not verified)

      • IC1 – MAX4466
      • R1 – 1KΩ
      • R2 – 1KΩ
      • R3 – 1MΩ
      • R4 – 1MΩ
      • R5 – 1KΩ
      • R6a – 500KΩ
      • R6b – 22KΩ
      • C1 – 0.1µF
      • C2 – 0.01µF
      • C3 – 1µF
      • C4 – 100pF
      • L1 – Ferrite Bead
      • L2 – Ferrite Bead

I wrote a simple program on the Arduino to capture 100 points of data per second for one minute and write the results to the serial output.

// Based on the Adafruit Trinket Sound-Reactive LED Color Organ
// http://learn.adafruit.com/trinket-sound-reactive-led-color-organ/code

#define MIC0_PIN 0 // Microphone is attached to Trinket GPIO #2/Gemma D2 (A1)
#define MIC1_PIN 1 // Microphone is attached to Trinket GPIO #2/Gemma D2 (A1)
#define DC_OFFSET 0 // DC offset in mic signal - if unusure, leave 0
#define NOISE 30 // Noise/hum/interference in mic signal
#define SAMPLES 60 // Length of buffer for dynamic level adjustment

int pointsPerSecond=100;
int captureMinutes = 1;
int delayMS = 1000/pointsPerSecond;
int datapoints=pointsPerSecond * captureMinutes * 60;
int curIdx=0;

void setup() {
 // put your setup code here, to run once:
 Serial.begin(57600);
 while (!Serial) {
 ; // wait for serial port to connect. Needed for Leonardo only
 }
 Serial.println(F("Idx\tAdaFruit\tMAX4466"));
}

void loop() {
 
 if(curIdx < datapoints)
 {
 // put your main code here, to run repeatedly:
 int adaFruitMic = analogRead(MIC0_PIN); // Raw reading from mic
 int max4466Mic = analogRead(MIC1_PIN); // Raw reading from mic
 
 Serial.print(curIdx);
 Serial.print(F("\t"));
 Serial.print(adaFruitMic);
 Serial.print(F("\t"));
 Serial.println(max4466Mic);
 
 curIdx++;
 delay(delayMS);
 if(curIdx >= datapoints)
 Serial.println("End of Sample");
 }
}

Here is the circuit diagram for the first test with values from the datasheet.

TestSchematic01

Test Schematic 1 – Values from datasheet

At first, I tried to use the values from the datasheet and noticed that the gain was not as high as the Adafruit module.

Test01_Chart01

Adafruit (ID: 1063) and MAX4466 Typical Schematic

Test01_Chart02

Adafruit (ID: 1063) Capture

Test01_Chart03

MAX4466 Schematic from Datasheet

Modified values to be close to the values used by the Adafruit 1063 module. The results showed that the gain was much better so these values will be good enough for my application, If you need to use this for a different application where you need better performance, you may want to look into the RC values. By modifying the capacitor values, it may be possible to achieve a cleaner output.

TestSchematic02

Modified resistor values to match Adafruit 1063 module

Test02_Chart01

Adafruit (ID: 1063) and MAX4466 Typical Schematic modified values

Test02_Chart02

Adafruit (ID: 1063)

Test02_Chart03

MAX4466 Typical Schematic modified values

This is not a thorough analysis of the performance of these two circuits but as stated above, it was good enough to give me the performance that I needed. (Test with Datasheet Figure 2)

BTW: The values read by the Arduino ADC are between 0 and 1023. The signal is centered around 511 and  has a noise level of ±50.

FYI: The gain for the circuit may be calculated as:

Gain = Rf/Rin = R6/R5 = 100KΩ/10KΩ = 10 (Dtasheet Circuit)

Gain = Rf/Rin = R6/R5 = 120KΩ/1KΩ = 120 (Modified Circuit)

You can also see from the graphs that the amplifier is driven to saturation. For my application that is acceptable but it may not be acceptable for your application particularly if you are creating a purely audio application.