In this tutorial, we’ll learn how to measure the turbidity in water by using a sensor with Arduino. Turbidity refers to the relative clarity of a liquid. It’s a measure of the suspension of heavy particles, dust, and other matters (liquid/solid) that may leave water cloudy, unclear, or dense.
For example, a heavy concentration of salt, clay, magnesium, or other substances can lead to increased turbidity in a body or sample of water.
Scientifically, turbidity is typically expressed as total suspended solids or TSS in water. TSS are particles bigger than 10 microns that are dissolved in water. Particles smaller than the TSS size are known as suspended solids. Both contribute to the turbidity in water.
How to measure turbidity?
Both TSS and suspended solid particles reflect light. So, it’s possible to use the reflected light from a light source to calculate the turbidity of a sample of water. The greater the reflection of light, the greater the turbidity in the water and vice versa.
A simple LED and LDR (light-dependent resistor) are adequate for this project. The sensors and measuring principle are depicted in this image…
Using an LED and LDR might sound ideal for building a do-it-yourself (DIY) sensor. However, adjusting the required parameters and values of each of these components can be challenging since their sensitivity level is significant. It should not change, regardless of the conditions.
This sensor kit pinout and operation is similar to many of Arduino’s kits. For example, the digital and analog signal the output. The analog output corresponds to the actual quantity and the digital output is only available after the quantity surpasses a certain threshold.
The relationship between the turbidity and voltage for the DFRobots sensor is depicted below. At 2.5 volt, the turbidity is 3000 NTU. It decreases as the voltage output increases. When it hits approximately 4.25 volts, it becomes 0.
The graph’s polynomial function is also given in the data sheet. Representing this polynomial in Arduino’s code, however, is complex.
First, the serial monitor of Arduino is initialized at 9600bps. In the main loop, the Arduino ADC pin #0 reads the analog value that’s output by the sensor, converting it to Arduino’s 0-5v operating range. The next few statements are else/if checks that reflect the range of potential turbidity.
You’ll note that a half-second delay is inserted at the end, which serves to stabilize the sensor.
The circuit diagram of the sensor is fairly straightforward. The sensor is powered by 5v of Arduino’s regulator output. Arduino’s analog pin #0 captures the sensor output.
Where to purchase the parts?
You may also like:
Filed Under: Microcontroller Projects