Turbidity Meter

by inezbernard in Workshop > Lighting

461 Views, 0 Favorites, 0 Comments

Turbidity Meter

WhatsApp Image 2023-09-22 at 14.27.40 (1).jpeg
WhatsApp Image 2023-09-22 at 14.27.40 (3).jpeg

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

WhatsApp Image 2023-09-15 at 09.32.57 (1).jpeg
WhatsApp Image 2023-09-15 at 09.32.57.jpeg
WhatsApp Image 2023-09-15 at 09.33.15.jpeg
WhatsApp Image 2023-09-15 at 09.32.58.jpeg

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

WhatsApp Image 2023-09-15 at 09.48.45 (1).jpeg
WhatsApp Image 2023-09-22 at 14.27.39.jpeg
  • 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

VariabeleResistor.jpg
WhatsApp Image 2023-09-22 at 14.56.52.jpeg

Use a volt meter to measure the resistants through the variable resistor.

Print the Holders

WhatsApp Image 2023-09-22 at 14.11.04.jpeg

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

WhatsApp Image 2023-09-22 at 14.18.07.jpeg

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

WhatsApp Image 2023-09-22 at 14.17.34.jpeg

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

WhatsApp Image 2023-09-22 at 14.27.41.jpeg

You can turn the laser so the light falls directly on the LDR.

Setup the Display

WhatsApp Image 2023-09-22 at 14.27.40.jpeg

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.

Align the Laser and Sensor

WhatsApp Image 2023-09-22 at 14.17.35 (1).jpeg

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

WhatsApp Image 2023-09-22 at 14.27.40 (2).jpeg
WhatsApp Image 2023-09-22 at 14.27.40 (3).jpeg

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

WhatsApp Image 2023-09-22 at 14.27.40 (5).jpeg
WhatsApp Image 2023-09-22 at 14.27.40 (4).jpeg

This step is optional. But it makes the device more presentable and easier to carry around.