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?
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:
Delay(500);
}
And the sensor is connected tu Analog1 on the dfrobot lcd shield that is connected on the dfrduino.
This could help you. I am using one of these sensors for teaching purposes, and I considered that:
The output voltage (Vout) of the sensor is inversely proportional to turbidity, so,
The clear water have a 0% turbidity, and
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.
Thanks mate for the tip.
But I need to have the value in mg/L. I have some liquid solutions to test, from 26mg/ to 360mg/l.
But in this moment, I have to find a solution to adjust propoerly the sensor, because when I adjust the screw it shows 4.40v, but when I put the plastic back, this value change.
If you want to calibrate these properly, you need to look up Formazine.
It's a milky solution that mimics cloudy water.
It's the accepted primary standard for turbidity measurements that are often expressed as Formazine Turbidity Units or FTU.
There are some doubts about the carcinogenicity of one of the ingredients, so it might not be possible to do safely outside the lab environment.
If you don't need absolute measurements, a couple of bits of clear and translucent perpex or similar can act as stable standards for checking the instruments' stability.
What you haven't said is what medium you are testing.
You can lash-up a crude turbidity sensor by just using an infrared LED and a matching photodetector.
Professional instruments quite often have several sensor typically straight through and at right angles to the illuminating beam to measure scattered light and compensate for component aging.