Hello,
I’ve used Arduinos for a while now, and have never run across a problem like this.
I’m using an Arduino Mega 2560, with a probe that reads from 0-40mV. I am amplifying this signal with an INA122 instrumentation amplifier, with a gain of 116. This boosts the range of the signal to around 0-4.64V.
However, when I read the input from the sensor (and do a conversion to voltage) it consistently read 4.96V. I tried changing the gain to 105, and it still reads 4.96V. If I touch the sensor, the signal should drop steadily, and I confirmed this with a voltmeter. The readings when I do this drop quickly to around 1.8V and then goes back to 4.96V, even though I can read the pin with a voltmeter which reads the expected output.
I’ve also tested the pin by connecting it to +5V and GND from the Arduino, which shows correctly.
I’m thoroughly confused, so any help is appreciated. The sketch is trivial but I’ll show it below.
void setup()
{
Serial.begin(9600);
}
void loop()
{
int sensorValue = analogRead(A15);
float voltage = sensorValue*(5.0 / 1023);
Serial.println(voltage);
delay(1000);
}
Thanks