Eagleye 530s ADC

Can't find a proper forum to drop the topic, drop here.

Moderator: violet

Post Reply
alan.sanchez.vergara
Pre-kindergarten
Pre-kindergarten
Posts: 2
Joined: Fri Nov 23, 2018 4:55 am

Eagleye 530s ADC

Post by alan.sanchez.vergara » Wed Mar 13, 2019 11:57 pm

Hi,

I'm using Adafruit's electret microphone amplifier (MAX4466) who reads from adc, so i need the resolution for it.
Looking in Adafruit's tutorial, conversion for arduino (10-bits converter) is:

Code: Select all

const int sampleWindow = 50; // Sample window width in mS (50 mS = 20Hz)
unsigned int sample;
 
void setup() 
{
   Serial.begin(9600);
}
 
 
void loop() 
{
   unsigned long startMillis= millis();  // Start of sample window
   unsigned int peakToPeak = 0;   // peak-to-peak level
 
   unsigned int signalMax = 0;
   unsigned int signalMin = 1024;
 
   // collect data for 50 mS
   while (millis() - startMillis < sampleWindow)
   {
      sample = analogRead(0);
      if (sample < 1024)  // toss out spurious readings
      {
         if (sample > signalMax)
         {
            signalMax = sample;  // save just the max levels
         }
         else if (sample < signalMin)
         {
            signalMin = sample;  // save just the min levels
         }
      }
   }
   peakToPeak = signalMax - signalMin;  // max - min = peak-peak amplitude
   double volts = (peakToPeak * 3.3) / 1024;  // convert to volts
 
   Serial.println(volts);
}
How can i implement this in my eagleye530s?

Ps: I know how to read from adc. So, i just need to convert raw measurement to volts and then to dB.

Post Reply