Analog read fluctuating

Hi

i am reading the analog value from my arduino uno

but the read value is fluctuating so much

to illustrate :

1.17
1.17
1.17
1.17
1.30
1.30
1.17
1.17

but the real value which is seen on the sensor screen is 1.17 ;

how can i fix the issue ?

can any filtering circuit do this job ?

my code

void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
  Serial.println("CLEARDATA");
  Serial.println("LABEL,Time,conductivity");
}

// the loop routine runs over and over again forever:
void loop() {
  // read the input on analog pin 0:
  int sensorValue = analogRead(A2);
  int row=0;
  // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
  float voltage = sensorValue * (5/1023.0);
  float current = (1000*voltage)/46.7 ;
  float conductivity = (current-4)*20/16 ;
 
  // print out the value you read: 
  Serial.print("DATA,TIME, ");
  Serial.println(conductivity);
  row ++;
  ms1++;
  
  delay(1000);
}

my wiring diagram is in the attachment.

YOu can smooth the analogRead by making multiple e.g. 16 measurements and average them

float sum = 0;
for (uint8_t i = 0; i< 16; i++) sum += analogRead(A2);
sum /= 16;

(powers of 2 divide faster)

Try printing out the raw value of the A/D read to see the true size of these fluctuations. Then we can see if they are reasonable or not.

The actual read value is only fluctuating 1 count.
A change of 1 count causes your conductivity to change by 0.13.

Yes that is what I was getting at. Any A/D conversion can only be consistant to +/- one binary bit. It is not like the OP said "so much".

Maybe an algorithm that looks for a certain number of identical readings and use it instead of averaging.

something like running-median ?