Go Down

Topic: Need Help with a turbidity sensor (Read 192 times) previous topic - next topic


Hello Guys.

I'm new to Arduino but have some knowledge in programming.

I have a turbidity sensor from DFRobot, but I'm not able to get the informations from the sensor.
Can anyone Help to calibrate or initialise correctly the sensor?

Thanks so much


Give us a link to the device, a circuit showing how you it connected, and, a program.

Also what it is and is not doing now.



Sep 26, 2016, 01:41 pm Last Edit: Sep 26, 2016, 11:25 pm by p1k4mp3
The code:

Code: [Select]
void setup() {
Serial.begin(9600); //Baud rate: 9600
void loop() {
int sensorValue = analogRead(A0);// read the input on analog pin 0:
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:

And the sensor is connected tu Analog1 on the dfrobot lcd shield that is connected on the dfrduino.

I just get une value: 0.04v


the sensor is connected tu Analog1
Your program reads Analog 0.


Your program reads Analog 0.
But the code was copy-paste. Sorry ma bad.
I'm reading the correct analog. but no way to get it working


Please read "How to use this forum" and post your code correctly, using code tags.



This could help you. I am using one of these sensors for teaching purposes, and  I considered that:

1. The output voltage (Vout) of the sensor is inversely proportional to turbidity, so,
2. The clear water have a 0% turbidity, and
3. Turbidity of 100% means a fully opaque object,

So, I the equation for turbidity (in relative percent units) can be as follows:

Turbidity = 100 - (Vout/Vclear)*100

You can get Vclear when you put the sensor in clear tap water.

Best regards.


Consider various dilutions of strong coffee for test samples.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131