fbpx Placeholder canvas

Procedure

Schematic:

Steps to perform the experiment:

  • Connect Analog pin of Turbidity Sensor to A0 of the Arduino Uno.

  • Connect Vcc to 5V and Gnd to Gnd of Arduino Uno respectively.

Program :

void setup()
{
Serial.begin(9600);
}
void loop()
{
int sensorValue = analogRead(A0);// read the input on analog pin A0:
float voltage = sensorValue * (5.0 / 1024.0);
// Convert the analog reading (which goes from 0 – 1023) to a voltage (0 – 5V):
Serial.println(voltage); // print out the value you read:
delay(500);
}

After uploading the above program. Simply open the Serial monitor, select the desired baud rate 9600. You should be able to see the voltage. If you can read the voltage then congrats you have successfully done it. Now you can continue with the testing. Go ahead select different liquids or you can fetch clean water dip the turbidity sensor and start adding mud or sand and you will see change in the voltage.