Introduction: Water Turbidity Sensor
This is a turbidity sensor made for the TU Delft course "Meten aan Water". We'll explain how to build your own sensor for measuring the turbidity of a liquid in this instructable. The main components that we used are a Particle Photon, an LDR and a hall effect sensor. This sensor combines the measurement techniques of a UV-Vis spectrometer and a Secchi disk. By lowering a mirror into a body of water, the amount of light that is reflected back to the surface is being measured using an LDR.
The mirror that will be lowered is attached to some strings which are attached to a PVC pipe functioning as an axis. By measuring the the rotations this pipe has made, we can derive the depth of the mirror.
The amount of light reflected and the depth of the mirror combined are compared to the data of clear water to provide the relative turbidity.
Here's a list of all things needed for the sensor:
- Particle Photon
- Hall effect sensor
- 4.7k and 10k Ohm resistors
- thin wooden plank
- Duct tape
- 10x10 cm lead slab
- 2 flat metal strips
- 15mm diameter, 50 cm PVC pipe
- small mirror that can be mounted on the lead slab
- a large, preferably black, bucket
- a clear plastic box, must be able to fit in the bucket.
- Soldering iron
- Wire cutters and strippers
- 20mm Wood drill
- Hammer or cordless drill
- Cross-cut saw
Step 1: The Electronics
The first thing to start with, is working on the electronics. Before putting it all together, make sure to solder some extra wires to the Hall effect sensor and the LDR, before plugging it all onto the breadboard.
When connecting the Hall effect sensor, the flat side (with the text on it) is considered the front of the sensor. So make sure to get the orientation right, just like in the scheme.
Step 2: The Code
The code that can be used for the sensor can be found in the .txt attachment. It continuously measures the light intensity on the LDR. When the light intensity hits a certain threshold, the LED on the breadboard will light up. The acquired data will be printed to both the particle console and a terminal.
Upon hitting the reset button, the light intensity at that point will also be published, allowing for light intensity measurements without having to use the mirror-lift.
The hall sensor will measure how often the magnets will pass by, and will multiply it accordingly to convert it to the proper length. It isn't super accurate however, since it will only measure every half cycle.
Step 3: Frame
The frame basically exists out of wooden "U" shape made out of thin planks, held together by nailing them to small blocks. A 20mm hole has been drilled at the top of the two vertical ends to hold the PVC rod.
4 equally long sized pieces of rope are being tied/taped to this rod. the other ends of the rope hold the lead slab, where the mirror is glued/taped on. Pay close attention to keep the center of gravity in the center of the mirrored platform and that the ropes are of equal size, else the platform will go up at an angle.
Tape a small strip of wood to the ends of the pvc rod, make sure that both sides of this strip protrude equally from the rod. The magnets are connected to the ends of the strip. The Hall effect sensor can be taped to the frame in such a way that the magnets pass right in front of it.
Tape the metal strip to the bottom of the plastic box, and then bend so it could be hung from the side of the bucket. A short piece of PVC pipe has to be taped to the center of the box, in which the LDR can be placed.