Hi
I'm having trouble reading the 4-20mA signal from a solar radiation sensor. I'm using a 3 wire sensor as shown in the picture
Where R is 250 ohm and E is 12 V. Voltage v is what I'm trying to measure with A0 input of an Arduino UNO, but the read values oscillate between 0.4 to 1.7 v, while the value measured by a voltmeter shows an steady 0.974 v. I've already checked the sensor with other acquisition card and obtained steady readings, and checked the analog read input connecting it to the 3.3 v and 5 v references, obtaining steady values in the Arduino.
The code I'm using for the test is the ReadAnalogVoltage example
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}
// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
float voltage = sensorValue * (5.0 / 1023.0);
// print out the value you read:
Serial.println(voltage);
delay(1000);
}
I Would appreciate any comments or suggestions regarding this issue. Thanks in advance for your help.