Building a Tubidity meter

Does the temperature can interfere the reading of signal?

Not in the way you are experiencing. Temperature changes would affect the signal level but only on the time scale of the temperature changes.

There are many reasons why the signal was not stabilising, one might be if the sample fluid was in motion.

Grumpy_Mike: There are many reasons why the signal was not stabilising, one might be if the sample fluid was in motion.

That would be the very first thing to consider! :roll_eyes:

Fascinating project. Can you give us some more detail about your experimental set-up? (eg a diagram or sketch?) and also on the characteristics of the liquid you are using, as if its homogeneous this may not work?

In turbulent flow the speed of the fluid at a point is continuously undergoing changes in both magnitude and direction.

So you should not expect a smooth signal. Perhaps you could do a statistical analysis of the variations you are seeing; in any case, the fact you ARE seeing variation is a good sign your messurement system is working.

Are you measuring transmitted or 90 degree scattered light? or both? and how are you collimating the light from the LED? https://publiclab.org/questions/warren/12-18-2017/can-a-diy-spectrometer-be-used-to-measure-water-turbidity

I've used scientific turbidity meters in the field, and even the ones with 2ml cuvettes don't fully stabilise within a minute or so. The meters just look at the readings and lock them when they're relatively stable.

Grumpy_Mike: There are many reasons why the signal was not stabilising, one might be if the sample fluid was in motion.

I am aware of this, for now I am testing it in small scale prototype that I put and take out the water. If the prototype works fine I will install it on my home plumbing and with it a flow sensor so I the turbidity sensor will only measure the turbidity when there is no flow.

johnerrington: Fascinating project. Can you give us some more detail about your experimental set-up? (eg a diagram or sketch?) and also on the characteristics of the liquid you are using, as if its homogeneous this may not work?

I dont have a sketch of the actual prototype but I have of the old one with and LED and a LDR and the idea is the the same. The only difference is that the actual has a infrared LED and a fototransistor. OBS: I dont know how to attach an Image here so I atacched it at the end.

So the main objective is to measure if the water that Im receiving at home is always clear, for now I dont want to measure the turbidity in any scale (NTU, FTU, ...).

Im trying to make three equal sensors, so now I am analyzing their behavior with the same liquid and observating if they suffer the same variation from one sample to another. To make some tests with the sensor I am soiling (I dont know if it the correct word I used google translator for this one) the water with some dirt, coffee, milk.

johnerrington: So you should not expect a smooth signal. Perhaps you could do a statistical analysis of the variations you are seeing; in any case, the fact you ARE seeing variation is a good sign your messurement system is working.

In the future I will try to make some statics analizing.

johnerrington: Are you measuring transmitted or 90 degree scattered light? or both? and how are you collimating the light from the LED?

Currently I am using a 180º sensor but i think that i will make another prototype with the 90º and compare them.

I am not collimating the light, i didnt even think about it. I will make some research about it

skecth.png|736x455

Im using a 10k ohm pull up resistor what would happen with the reading if I reduce or increase it?

I want to know if there is some whey to make the sensor a bit more sensitive? In the scale 0-1023 if there is nothing in the pipe (Air) the output is near 30 and if I put clear water the output goes to near 60.

If you know about any more projects like this one, please send it to me Thanks for your attention

These might be interesting to you:

A low cost continuous turbidity meter

and

An Affordable Open-Source Turbidimeter

Both use light-to-frequency sensors to measure the light from LEDs reflected off particles. The codes use the FreqCounter library.

Gustavohbo: Im using a 10k ohm pull up resistor what would happen with the reading if I reduce or increase it?

I think I answered this before. Increasing it will make it more sensitive. As a transistor is a current operated device the voltage changes more across a higher value resistor than a lower one for any given current through it. Its called ohms law.

Grumpy_Mike: I think I answered this before. Increasing it will make it more sensitive. As a transistor is a current operated device the voltage changes more across a higher value resistor than a lower one for any given current through it. Its called ohms law.

If I increase it a lot is there any chance of burning something? or something bad happpen?

Increasing the resistor only reduces the current. It is decreasing the resistor you have to be careful with. Don’t go below about 300R.

Gustavo, this is the kind of diagram I had in mind:

the collimators are there to control the illumination angle and prevent light leaking from the source directly to the detector(s).

Ideally you want a narrow beam from the source, so choose an LED with a narrow beam angle.

Turbidity.png|280x225

Grumpy_Mike:
You should aim to get the un - illuminated photo transistor to give very roughly a reading of 512, you can change this by altering the 10K value.

I stopped trying to measure the turbidity with these pair of infrared sensor, but now i need to make some new tests so I came back to this topic and read I all once again and I this part called my atention.
Why I should aim to measure 512 with an un-iliminated photo transistor?
And what you mean with a un-iluminated sensor?

Potential dividers work best when the two legs are about the same because any change in the sensor’s value. Sensor and photo transistor are the same thing.

Grumpy_Mike: Potential dividers work best when the two legs are about the same because any change in the sensor’s value.

So i tried many resistors to reach readings near 512 while the sensor is un-ilumininated but i think something is weird. I tried a wide range of resistor but still the reading are high. 1k -> Un-iluminated Sensor = 995 2.2k -> Un-iluminated Sensor = 994/995 3.3k -> Un-iluminated Sensor = 994/995 10k -> Un-iluminated Sensor = 992/993 22k -> Un-iluminated Sensor = 990 100k -> Un-iluminated Sensor = 983 1M -> Un-iluminated Sensor = 824

My schematic:

Schematic (1).png|400x328

I didn’t read the entire thread, but it seems to me, your reference value of 512 should be when illuminated using a calibration solution - i.e. distilled water in the actual test fixture if you are measuring turbidity in water. Not when un-illuminated.

Gustavohbo: So i tried many resistors to reach readings near 512 while the sensor is un-ilumininated but i think something is weird. I tried a wide range of resistor but still the reading are high. 1k -> Un-iluminated Sensor = 995 2.2k -> Un-iluminated Sensor = 994/995 3.3k -> Un-iluminated Sensor = 994/995 10k -> Un-iluminated Sensor = 992/993 22k -> Un-iluminated Sensor = 990 100k -> Un-iluminated Sensor = 983 1M -> Un-iluminated Sensor = 824

My schematic:

Clearly you need more like 3M3 or 4M7.

Just adding some info at this point as I had to trawl through the whole thread to find it;

the actual has a infrared LED and a fototransistor.

Gustav, you need to get the sensor part working first. You also need to understand the behaviour of the devices you are using.

When un-illuminated a good (ideal) phototransistor should have infinite resistance -as no carriers are being generated at the junction.

Hence there is NO POINT in making measurements with it unlit. Its no surprise your readings are high. Really it would be better to

measure the current through the phototransistor, so connect it to +5 and your resistor to ground.

Try a 10k resistor.

Then point the LED at the phototransistor.

Check how the value changes with LED on & LED off.

Come back to us with ..

1: DETAIL what are the device part numbers?

2: REVISED SCHEMATIC - so we can see what you have done

3: ANSWERS - what results did you get?

Meanwhile read this

https://johnloomis.org/ece445/topics/egginc/pt_char.html

Hi, Can you please post a picture of your phototransistor please? You are sure you are connected to the correct legs? What is the part number off the phototransistor?

Thanks... Tom... :)

So i tried many resistors to reach readings near 512 while the sensor is un-ilumininated

Is the sensor in the dark or is it exposed somehow to daylight?