Help with SGM58031 ADC Edgebox-ESP-100

Thanks for the tip.
Gain 2x when to saturation over16 mA on channel 0,2 in my case. Gain 1 work for me for all channels. See below my calibration table, channel 0 and 3 are 30% more counts than 1 and 2. The results are very consistence, that is a big plus, so each channel should use their own engineering units / count factor.
#include <Adafruit_ADS1X15.h>
Adafruit_ADS1115 AI; // analog inputs
void setup(void) {
Serial.begin(115200);
AI.setGain(GAIN_ONE); // set gain to all channels
if (!AI.begin()) {
Serial.println(“Failed to initialize AIs.”);
while (1);
}
}
void loop(void) {
Serial.print("Analog Input Ch0 counts ");
Serial.println( AI.readADC_SingleEnded(0));
Serial.print("Analog Input Ch1 counts ");
Serial.println(AI.readADC_SingleEnded(1));
Serial.print("Analog Input Ch2 counts ");
Serial.println(AI.readADC_SingleEnded(2));
Serial.print("Analog Input Ch3 counts ");
Serial.println(AI.readADC_SingleEnded(3));
delay(2000) ;
}

1 Like