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.