Go Down

Topic: Building a Tubidity meter (Read 2246 times) previous topic - next topic

Grumpy_Mike

#15
Aug 14, 2020, 05:35 am Last Edit: Aug 14, 2020, 05:49 am by Grumpy_Mike
Quote
The pins of receiver are inverted?
The longer is negative and the shorter is positive?
Yes and what of it?

It is a result of having a pull up resistor and the photo transistor pulling down. It makes no odds, you either cope in your code with smaller numbers meaning more light or if you really can't cope with that then subtract your reading from 1023 to invert the values. This sort of thing is normal in embedded systems.

Quote
So you think that the IR receiver and emmiter are more appropriate for this project?
No, this thread has been cleaned up by the moderators due to cross posting. You didn't mention your application in your initial thread.

White light is preferable because turbidity is a visible effect, so it makes no sense at all to use IR to measure it.

Quote
I tried 10k but the output is frozen, and keep showing 14.
That suggests it it too sensitive and the photo transistor has saturated. So reduce the value of the pull up resistor, try 1K.

Quote
I have a IR kit 5mm LED, is it possible to modulate the LED signal?
Yes, but if you modulate it then you must include at the sensor end an amplifier with a frequency response that rejects DC signals and responds only to the modulation frequency. That helps with stray light, but for proper measurements your equipment must be made to measure this in the dark to have any meaning.

Given you are supposed to be a University student then I would have thought that this was blindingly obvious.

You have the arrow pointing in the wrong direction in you block diagram you gave in the first post in the thread. Again not a mistake one would expect from a University student.

6v6gt


Grumpy_Mike

Well in my book that student is a fail, because there is no resistors limiting the currents of the LEDs.

Gustavohbo

#18
Aug 14, 2020, 06:09 pm Last Edit: Aug 15, 2020, 12:31 am by Gustavohbo
White light is preferable because turbidity is a visible effect, so it makes no sense at all to use IR to measure it.
 
But main objective of the sensor is to measure the intesity of the signal that pass through the water.
My thoughts were that the kind of light would not interfere on it. Because in other words what I'm trying to measure is the amount of particles in water that are blocking the light.

So what should I use to measure it?
I already tried a LDR but it was unstable therefore i wasnt suitable for my project
That suggests it it too sensitive and the photo transistor has saturated. So reduce the value of the pull up resistor, try 1K.

That suggests it it too sensitive and the photo transistor has saturated. So reduce the value of the pull up resistor, try 1K.
 
So i tried the 1k and the output still the same, frozen at 14. I burned it? How can i test if it still works?
FIXED: I changed the analogic pin and it worked.

Yes, but if you modulate it then you must include at the sensor end an amplifier with a frequency response that rejects DC signals and responds only to the modulation frequency. That helps with stray light, but for proper measurements your equipment must be made to measure this in the dark to have any meaning.
Given you are supposed to be a University student then I would have thought that this was blindingly obvious.
 
First of all, I am a 20y old chemical engineer student so i dont know much about eletronics and coding Im trying to learn it for my project.
Secondly my equipment is inside a pipe so it already is in the dark.
What is the name of this amplifier that you mentioned? Is it expansive?

You have the arrow pointing in the wrong direction in you block diagram you gave in the first post in the thread. Again not a mistake one would expect from a University student.
 
It is not in the wrong direction.
The yellow portion is Light, so when it hits the hole only the portion that is parallel to the hole passes

Gustavohbo

I guess you have already seen this project:
https://www.academia.edu/8319858/Open_source_mobile_water_quality_testing_platform
I havent seen this one yet. This one was very helpful
If you know about any more projects like this one, please send it to me
Thanks for your attention

TomGeorge

#20
Aug 15, 2020, 09:30 am Last Edit: Aug 15, 2020, 09:38 am by TomGeorge
HI,
I think you are going to keep having problems if you are trying to read very small DC values.

My approach would be to modulate the light source and use a optical semiconductor detector.
The receiver detects the modulated light, you filter and measure its amplitude.

That way you filter out ambient light  and electrical noise that can enter the system.

Most systems use scatter methods;
https://www.fondriest.com/environmental-measurements/measurements/measuring-water-quality/turbidity-sensors-meters-and-methods/

Surely you have resources there at the University that has a chemistry or analysis department that has one of these devices or can supply info about them.

Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

Grumpy_Mike

It is not in the wrong direction.
The yellow portion is Light, so when it hits the hole only the portion that is parallel to the hole passes


So the yellow portion has an arrow on the end, this is pointing to the left. This says to anyone that the light is traveling from right to left.

But on the right you label a box saying LDR or receiver, and on the left the box is labeled LED or IR emitter.

You might not have seen the triangular yellow portion as an arrow, but I assure you the rest of the world does.

Quote
What is the name of this amplifier that you mentioned? Is it expansive?
I thing you mean expensive. It is called a "tuned amplifier" an amplifier with a specific frequency response that peaks at the modulation frequency. This is not the sort of amplifier you buy but one that you make.

Paul__B

It is called a "tuned amplifier" an amplifier with a specific frequency response that peaks at the modulation frequency. This is not the sort of amplifier you buy but one that you make.
Actually, the "tuning" is now digital.  You use the same signal that switches the LED on and off, to control a switch (74HC4066) which swaps the amplifier (op-amp) between inverting and non-inverting, and integrate (low pass filter) the result.

If the ADC is sufficiently fast (or you use a much lower frequency that the 38 kHz I mentioned, such as 700 Hz), you can perform this in the Arduino.

Gustavohbo

HI,
I think you are going to keep having problems if you are trying to read very small DC values.

My approach would be to modulate the light source and use a optical semiconductor detector.
The receiver detects the modulated light, you filter and measure its amplitude.
What do you mean as a optical semiconductor detector?
A LDR or an phototransistor as a infrared receiver?


Surely you have resources there at the University that has a chemistry or analysis department that has one of these devices or can supply info about them.
We have a Turbidity meter at the University but unfortunately due to covid it harder to go there to test or study.
So currently Im trying to do most of my reaserch at home

Gustavohbo



So the yellow portion has an arrow on the end, this is pointing to the left. This says to anyone that the light is traveling from right to left.

But on the right you label a box saying LDR or receiver, and on the left the box is labeled LED or IR emitter.

You might not have seen the triangular yellow portion as an arrow, but I assure you the rest of the world does.
I see what you mean, that was my fault. I did it just as a sketch to post the question

I thing you mean expensive. It is called a "tuned amplifier" an amplifier with a specific frequency response that peaks at the modulation frequency. This is not the sort of amplifier you buy but one that you make.
Ops, another silly mistake but english is not my native language so please take it easy. Anyway thanks for the warning.
Is it possible do this amplifier by software or do i need to buy some kind of hardware?

Gustavohbo

which swaps the amplifier (op-amp) between inverting and non-inverting, and integrate (low pass filter) the result.
I didnt understand what you said here. Can you explain this in a less technical way? What is op-amp?

If the ADC is sufficiently fast (or you use a much lower frequency that the 38 kHz I mentioned, such as 700 Hz), you can perform this in the Arduino.
This one that you mentioned (74HC4066) would be able to amplify the signal to 38 kHz or even 700 Hz?
How do i know that the frequency that i chose will not suffer amy kind of interference?
I want to emmit and read the signal continuously, will the tuning interfere on it?

Grumpy_Mike

Quote
My thoughts were that the kind of light would not interfere on it. Because in other words what I'm trying to measure is the amount of particles in water that are blocking the light.
Yes it would. The longer wavelength IR light "gets round" small partials that white light would be blocked by.

Have a look at photographs of the night sky taken in visible  light and IR light. The visible light is blocked by dust in the milky way where as the IR light is not blocked by dust it goes round it. Go and ask at your Physics department.

Quote
This one that you mentioned (74HC4066) would be able to amplify the signal to 38 kHz or even 700 Hz?
I think this project is too much for you. The phrase "amplify the signal to a frequency" is meaningless. That chip is not an amplifier it is an analogue switch. You use it to swap signals over.

johnerrington

The best way to eliminate external effects is to use a square wave rather than a continuous signal.  Choose a frequency that is not a harmonic of mains frequency.

Drive your LED (white will be fine) from a digital output via a resistor, and use a photodiode or phototransistor to measure the height when its ON.

Then take another measurement when its OFF and subtract the two.

I'd still recommend you exclude ambient light.


My page here shows how to drive an LED.
I'm trying to help. If I find your question interesting I'll give you karma. If you find my input useful please give me karma (I need it)

Paul__B

Drive your LED (white will be fine) from a digital output via a resistor, and use a photodiode or phototransistor to measure the height when its ON.

Then take another measurement when its OFF and subtract the two.
As I was suggesting in #22.  :smiley-lol:  It seems you have explained it better.

The best way to eliminate external effects is to use a square wave rather than a continuous signal.  Choose a frequency that is not a harmonic of mains frequency.
Which is why I suggested 700 Hz.

Gustavohbo

#29
Aug 17, 2020, 09:34 pm Last Edit: Aug 17, 2020, 09:41 pm by Gustavohbo
The best way to eliminate external effects is to use a square wave rather than a continuous signal.  Choose a frequency that is not a harmonic of mains frequency.

Drive your LED (white will be fine) from a digital output via a resistor, and use a photodiode or phototransistor to measure the height when its ON.

Then take another measurement when its OFF and subtract the two.

I'd still recommend you exclude ambient light.


My page here shows how to drive an LED.
How do i filter the light/signal that the phototransistor is reading?
And how do I modulate the frequency of the LED?
Can you indicate me a photodiode that you would use. I have the cheap ones and I dont know if they are very good and the only ones I have are covered with some black filter that filter most of the visible light.

Thanks for your help!

Go Up