Electrical – Fluctuating ADC reading for 4-20mA pressure transducer input

4-20maadcarduinosensor

I am working on a project of water pressure measurement, in which I used a pressure transducer which gives me output between 4-20mA current form.

I am using a 250 ohm resistor to convert current into voltage, and then I give this voltage to ADC of an Arduino Uno channel 0 (A0).

The ADC reading is continuously fluctuating up to 10 decimal numbers (ADC value varies + – 5 counts.)

I have also checked by connecting a multi-meter and measuring the sensor current reading for a particular pressure. The current reading is stable (does not even fluctuate 1 or 2 points.)

Also I have checked voltage value after 250 ohms +Ve and ground. The coonverted voltage is also showing very stable.

Why is the ADC reading fluctuating?

I am using an Arduino Uno, it doesn't have any changes in AREF, AVCC etc.

Please suggest effective solution.

My code is as follow..


const int analogInPin = A0;  // Analog input pin that the potentiometer is attached to

int sensorValue = 0;        // value read from the pot

void setup() 
{
  // initialize serial communications at 9600 bps:
  Serial.begin(9600);
}



void loop() 
{
  
  // read the analog in value:
  sensorValue = analogRead(analogInPin);
 
 
  // print the results to the Serial Monitor:
  Serial.print("Reading: ");
  Serial.println(sensorValue);  
 
  delay(1000);
}

Best Answer

A variation of 10 counts out of a maximum 1023 is about 1% of full scale, not bad for an Arduino. This is equivalent to about 50 mV and you probably have that much noise on the input signal and AREF.

If the problem is noise and the noise is a random fluctuation then you should be able to improve the readings by averaging. Try summing 16 or 32 values and then dividing the result by 16 or 32. (I proposed 16 and 32 because they are integer powers of 2 so performing unsigned integer division with these values is easy and fast...shifting.)

Related Topic