I am having trouble with a circuit I am trying to build. It consists of a LM324 non inverting op amp which takes the signal from an osemi 1mm SiPM which has a bias of 28V. The LM324 has a gain of 2 and the output either goes thru a 100ohm resistor or is directly connected to analog input A0 on an arduino nano.
The strange thing is that if I measure the A0 pin on the nano with a multimeter, the op amp output voltage is correct. But when I try to measure the same voltage with the arduino and the basic analog input read program below, the voltage is random. It will jump from 0 to 1023 then anywhere in between.
I have been working on this for the past couple of weeks with no solution. Hoping someone else has a solution to this.
/////////////////
void setup() {
Serial.begin(9600);
}
void loop() {
int sensorValue = analogRead(A3);
float voltage = sensorValue * (5.0 / 1023.0);
Serial.println(voltage);
delay(500);
}
///////////////////////