DIY Turbidity Sensor
This instructables is for a diy turbidity sensor. This turbidity sensor works with a laser and a LDR (light dependent resistor).
Overview Turbidity Sensor
The sensor works on the principle of a laser that shines light through water on a sensor. The Arduino can read the values of the sensor. If the Medium has a high turbidity, less light will arrive at the sensor and vice versa.
List of items used:
- Arduino Uno
- wires
- breadboard
- laserdiode (5V)
- LDR sensor
- Resistors: 220 Ohm and 10.000 Ohm.
- Black box (or something that blocks background light)
- Ductape
- battery pack (optional)
- switch (optional)
- seven segment display (optional)
Setting Up the Sensor
Connect everything as shown in the picture above. We used a seven segment 4 digit display to show the measurement of the LDR sensor in percentages and levels LOW, AVG, HIGH. We used a switch to switch between the percentages and the levels. This is optional and could be done via the serial monitor in the Arduino IDE.
Programming the Code
The code is shown above. When everything is set-up correctly, you need to calibrate your sensor. This is because of the background light. We used tap-water for our null-point and tap-water with coffee creamer powder as the highest level of turbidity possible.
Also, the seven segment 4 digit display is optional. For the display to work, we used the library SevSeg. For more info, visit https://www.arduino.cc/reference/en/libraries/sevseg/
Final Set Up
Now that everything is connected and the code is programmed, it is time to build the case around the sensor. For this step, it is important for two reasons. Firstly, the sensor needs to be waterproof. We used a plastic container in a box (For example, a shoe box). Secondly, the box needs to be painted. This is so there is no background light that would disturb your measurements.