Turbidity Meter
For the subject of measuring water, we had to make our own sensor. We were allowed to choose which phenomena to measure. We chose to make a turbidity sensor. By following this instructable you will be able to make this sensor yourself!
Supplies
Materials
- Arduino Uno
- Breadboard
- Cables
- Light sensor
- Resistor ( 5k ohm)
- LCD
- Item profile (+/- 45 cm)
- Laser
- Straws
- Sensor holder (laser printed)
- Laser holder (laser printed)
- Sample holder (laser printed)
- Jar (see-trough)
Arduino Set-up
- Connect the laser to 3V and GND
- Connect the sensor as in the picture
- The LCD screen can be connected as follows:
- GND to GND, VCC to 5V, SDA to A4 and SCL to A5
- Use a 5K-ohm resistor (You can measure the variable resistor using a Volt meter)
Make Sure the Variabele Resistor Is at 5k Ohm
Use a volt meter to measure the resistants through the variable resistor.
Print the Holders
Laser print the holders for the laser, sample, and LDR sensor. Use the template below, print on wood preferably on 6 mm plywood.
Downloads
Place the Holders in the Ibrium Profile
Place the holders in the ibrium profile so the setup looks like the image above.
Place a Black Straw in the Houlder for the LDR
Place the LDR in the straw and place the straw in the holder. The black straw prevents background light. If the light shines through the straw, make it dark by adding thick black paper around it.
Place the Laser in the Holder
You can turn the laser so the light falls directly on the LDR.
Setup the Display
Use our code to read off the Volt and NTU values at the display.
We put the display in a box, which is not necessary but it makes the display easier to read.
Downloads
Align the Laser and Sensor
Use paper to make sure the laser points directly at the LDR. You can check the intensity with the Volt output (5 V is 100%).
Do Your First Measurments
Put your sample in a see-through jar, and read the NTU and Volt values of the display. Write the values down for the calibration. We found the following values:
Water = 0.8 NTU (4.64 volt)
Coca Cola = 2.2 NTU (2.74 volt)
Coca Cola zero = 10.5 NTU. (1.8 volt)
Use Your Python Code to Find the Formula
Use the following Python code to calibrate the sensor and display:
import numpy as np
from scipy.stats import linregress
def poly(fitted, obser):
err = obser - fitted
S = np.sum(err**2)
E = np.sqrt(1 / (len(obser)) * S)
return E
y = np.array([0.8, 2.2, 10.5]) #NTU
x = np.array([4.64,2.74,1.75]) #volt
pol2 = np.polyfit(x, y, deg=2)
c = pol2[0]
d = pol2[1]
e = pol2[2]
g = c * x**2 + d * x + e
print(f'c = {c:.2f},d = {d:.2f},e = {e:.2f}'
Mount on a Wooden Plank
This step is optional. But it makes the device more presentable and easier to carry around.