Difference between revisions of "Turbidity Sensor"

From BoSL Wiki
Jump to navigation Jump to search
Line 232: Line 232:
  
 
We thought that the problem may be the PT is too deep in the box, so it can detect little light from the LED, next step we need to print another sensor box to make the PT more close to the surface.
 
We thought that the problem may be the PT is too deep in the box, so it can detect little light from the LED, next step we need to print another sensor box to make the PT more close to the surface.
 +
 +
To be continued……
 +
 +
 +
== 5th December 2019==
 +
 +
The sensor box we used yesterday is a black box with 20mm distance between two holes(centre to centre). Now we use a new sensor box with 14.3mm distance between two holes. We use 14.3mm as the distance because the LED and the PT in the black sensor(we tested on 28th November) is 14.3mm. So we test this distance to see the performance. The new case can be seen as the following photo:
 +
 +
[[File:New sensor box with plastic tube.jpg|300px]]            [[File:New sensor box with plastic tube back.jpg|300px]]
 +
 +
And the LED and the PT fit the two holes, the edge of the LED and the phototransistor is on the surface of the sensor box.
 +
 +
[[File:New sensor box with led and pt.jpg|400px]]
 +
 +
And we also connect LED and the phototransistor to the Arduino and found the analogue reading is 0 in air, and when we put the transparent epoxy on the surface, the reading number is also 0. That shows the sensor works well. Next step, we are going to print more sensor boxes with different distance between the holes, 12mm, 10mm and 8.5mm, and then test if the distance between LED and the PT will affect the performance, and then we will choose the best one and test in solution.
  
 
To be continued……
 
To be continued……

Revision as of 11:55, 5 December 2019

12th November 2019

So we finally made some nice progress with the Turbidity Sensor design.

First step was to print our case using our 3D printer. Here it is:

TurbBoxV0.1.png

Next step was to test out some hardware for the little guy. We bought two main things: (1) a LED that puts out 850nm wavelength and (2) a phototransistor. The details of the connection we used is here:

TurbV0.1Circuitdiagram.png

We also needed some resistors in the circuit, a 5v power supply and something to read the output (obviously, we used an Arduino)


Next step, put it all together and see if it works! So, we used some epoxy and wired this all up to make this sensor:

TurbProbeOn.png

Next step, test the little bugger. We did this using turbidity solutions and a deep cylinder (at least 100mm deep). We tested five turbidity solutions ranging from 500 NTU to 1NTU (tap water). Here are the results we got:

TurbV01Graph.png

So, in conclusion, we are rather happy with the workings of this cheap turbidity sensor. It costs less than $5 AUD in components, and a little time to put together. The only issue is that the range of the sensor is really limited to just 0 to 500NTU; anything higher and we think we will need to include a photo-diode alongside the phototransistor to get those big NTU values. Also, we are concerned with the energy use that this little puppy dog may take up - the resistors are even heating up (NOT A GOOD SIGN!). The last thing we want to fix is to make this all run on 3.3v instead of 5v...our BoSL board is a 3.3 volt machine, so we want to keep that consistent. Finally (I know, I said the last thing was the final, but this will be) we need to continue to develop our turbidity wiping mechanism...turbidity probes need to be cleaned a lot, so a good wiper is essential or readings are lets just say poor...

Over and out for today.

13th November 2019

So, today we began making our circuitry for the new turbidity sensor. It is looking good, but when we tried to print the board on our new PCB printer, the ink was all dried up! Come on Voltera, please send us the new ink so we can start printing our boards again! Here is an image of the circuit we made today in an easy to use program called EasyEDA.

BoSL Turb V.01.png

17th November 2019

We have begun designing our wiping device, but to do so we needed to revamp our circuit to allow for some motors to drive the wiping action. We began printing many different versions of the above board on our Voltera printer (thanks Voltera for finally giving us our consumables), but there were a hole bunch of issues...including that the holes and pads were not optimised for our Voltera. So, we spent the day designing a new circuit that now looks like...

BoSL Turb Probe v0.5.png

More to come from Miao in the next few days...

19th November 2019

This is Miao's turn for updating the process.

Based on Dave's experience, we started to do the calibration of the sensor.

Now we don't want to use a deep cylinder for testing, as the glass cylinder is transparent, we designed a black box and printed it by our 3D printer. The box is designed to fit our sensor and it is 100% infill.

Also, Dave printed another sensor case, which is smaller than the previous one and it has bulgy edges, so it is easier to glue epoxy on the surface of the LED and PT.

Small testing sensor.jpg

So now we have two sensors, the big one which Dave used for testing and a small one with bulgy edges.

After we wired the LED and PT for the small sensor, we tested that, it works and the analog read is more than 400 in air. However, when we cover the epoxy piece on the surface, the reading number became 0 or a quite small number(less than 10). That's weird. We need to wait until the glue drys and then we will test it in water to see if it has any difference.

To be continued……

20th November 2019

The glue of the sensors is dry and we put the sensor in water in the black box, the reading number changed to around 920, and when we get it out in the air, the number changed to 12.

Anyway, as it can be used for testing in water, we started dosing the solution for testing.

We use DI water(0.18NTU) and another lab solution(807NTU) to make the solution, we change the testing solution's turbidity by adding more 807NTU solution into DI water and then record the analog reading.

Solution with different turbidity was tested, the range is between 0.18 and 807, from 0.18 to 50 NTU, the step is 5NTU, and the step changes to 10NTU for solution between 50-100NTU, from 100-200NTU, the step is 20 NTU, and from 200-1000NTU solution, the step is 100. Both the big sensor and small sensor are tested.

Testing set up.jpg

The results can be seen in the following diagram.

Small sensor output reading.jpg Large sensor output reading.jpg

From the data, it can be seen the results is different from Dave's result. From 0.17 to 50NTU, the analog readings are floating and do not have too much change, and from 60 to 300NTU, the outputs decrease in a narrow range, after that the reading number suddenly changed to a very small number. We also found, for both sensors, the output fits a straight line most between 60 to 200NTU.

The difference between my results and Dave's maybe the container of the solution is the black box.

To be continued……

21th Novermber 2019

As the results of the small sensor and the large sensor are different, we tested the two sensors to compare them.

We put both sensors in air, the analogue reading of both sensors is about 12. However, when we put the small sensor in a black box(just in the air without touching the water), the reading is also around 12, and after touching water, the number changed to around 926. For the big sensor, when put it in the black box without touching water, the reading is around 800, and if it touches water, it becomes 926.

I think the large sensor's results are more make sense, as the results in air and in DI water do not have a large difference.

But, why the two sensors perform so different when staying in the black box without water? Another question is why readings become different after touching water?

For the first question, we guess the reason may be the distance between the epoxy and the LED and PT, or maybe the bulgy edges? Now we know that base on our setting, LED and PT are very sensitive about the distance between the epoxy cover and their surface. More work needs to do to figure out these problems.

To be continued……


23th Novermber 2019

Today we did two things:

1. We repeated Dave's experiment(use the big sensor to do the experiment in a cylinder), 2. Recalibration(use the big sensor for testing, more accurate as we use the real sensor to test the turbidity of each solution)

Recalibration of the tests.jpg


For the first experiment, we got a similar trend but a different result.

Repeating Dave's experiment.png

I think the reason we got a different result is that we cannot make all the configuration of the environment exactly as same as before, and the sensor is very sensitive to the configuration(the distance between the epoxy and PT) and the surrounding environment, as the epoxy we glued to the sensor case has changed, so it has a different result.

For the second experiment, we use the big sensor for recalibration, and all the solution are tested to double-check their turbidity before testing.

The results are different from previous experiments.

Recalibration.png

The output results are between 860 to 900 for the solution between 0 to 200NTU, and the analogue output keeps floating, it does not have a specific trend. Therefore, it is not easy to calibrate the result with an equation.

Another problem is when we get the analogue reading for each solution, the reading numbers always have a floating vibration, I think it is a problem of the circuit.

Now the setting of our sensor reports different results in the same configuration, so it is difficult to duplicate the past experiment. We are thinking to change the setting of our sensor(change the resistor or change the sensor case or add some parts)…………

Need to search for more information for our development……


27th November 2019

As we still cannot get satisfactory results, we want to start to repeat the experiment on the paper and see if we can get the similar result, then we will find the difference between their settings and our design, then figure out the problem.

We did not get the exact same Acrylic tube, so we use the Vinyl tube with inner diameter 19mm to instead, and then we use our 3D printer to print a house of the sensor. The house can hold the tube in the center and set LED on the top of the house and the PT on the side, LED and the PT is perpendicular to each other.

New sensor box and tube.jpg

After that, we use the Clear Liquid Epoxy to glue the tube, LED and the phototransistor to the case, the Liquid Epoxy is fully waterproofed and 100% transparent. Now waiting for it dry and test it tomorrow……

Glued case for repeating test.jpg


28th November 2019

We do use the new sensor box for testing, the circuit is showed as following:

Paper circuit.jpg

However, the resistor we use has changed, R1 is changed to 500ohm and R2 is 330k ohm. The results do not change too much as the solution changes. We have to change the circuit.

The first thing we want to change is connecting the base to the ground. We think the base may perform as an amplifier, and it may affect the analogue reading of our sensor. To compare with the previous test, we increase the resistance of the base, so the resistor is changed to 6M ohm. Another thing is that we want to make the LED brighter, so we change the resistor connecting to the LED as 50ohm. Therefore, the circuit is like:

New right circuit.jpg

We put the new black sensor in the glass cylinder for testing, for accuracy, we test the turbidity of each solution before the test.

Testing process of black sensor.jpg

Then we got the result, it looks pretty much better than before:

New sensor output reading with 6m ohm.jpg

Now we sure that the resistor on the base has the critical effects, and we changed the resistor even larger(10M ohm), but the result is not as good as 6M ohm, as the reading in 1000NTU solution is about 1000, that's good, but the reading in air and in DI water is not 0, that's not what we want, so we need to try to find an optimal resistor later.

New sensor output reading with 10m ohm.jpg

As we think we have found the critical factor, we just use the 6M ohm resistor on the base and then use the circuit to test the previous sensor(red one with a piece of epoxy on the surface), we still put the red sensor in the black box, just as same as before, see the result:

Old sensor output reading with 6m ohm.jpg

Although the result is better than before, some results are still unreasonable, this means we still got some problem with our design, now we are thinking about how to change our sensor case and design. Also, the floating vibration problem still exists, we are planning to use our PCB printer to get a better board to get rid of this problem.

To be continued……


29th November 2019

As we still want to use the wiper, so the black sensor case we used yesterday should be changed. We are wondering if half of the case can still work. Therefore, we use our 3D printer to print half of our case which is a triangular case. We also use the Liquid Epoxy to glue tube on the case, both the whole tube and half tube are used for testing. The settings are shown as the picture below. Also, our new board is printed out by our PCB printer, just waiting for the sensor ready and then test them.

Half case sensor settings.jpg PCB printed board.jpg

Just waiting for the Epoxy dry.


2nd December 2019

Now we have two new sensors, one is a triangular case with half tube and another one is a triangular case with a whole tube, now we are going to use these two sensors for testing. Another thing we need to be aware of is that for the following test, we use 3.3v instead of 5v because our board is eventually supported by 3.3v.

Firstly, we still use the same circuit for testing, and when we found the analogue reading is small, we changed the resistor which connected to the base. From the past experience, we found the analogue reading is getting larger as the resistor connected to the base increases, so we used 20M ohm instead of 6M ohm on the base.

The results can be seen as the following:

For the case with the half tube:

Half case with half tube 6M ohm.jpg Half case with half tube 20M ohm.jpg

From the result, it can be seen that the sensor with 6M ohm connecting base performs perfectly, and the results show a linear relationship between the output voltage and the turbidity. However, for the 20ohm sensor, it does not perform as good as the first one, so we won't use such a big resistor for our design.

For the case with the whole tube:

Half case with whole tube 6M ohm.jpg Half case with whole tube 20M ohm.jpg

The sensor with a whole tube shows a similar result, as the 6M resistor is better than the 20M ohm resistor.

Another thing is that the sensor does work with 3.3v input voltage, however, we need to do change our design to optimize the circuit performance.


Although the sensor with half tube works not bad, we still want to use the flat surface, more tests need to be done to find a better way for a flat surface.


3rd December 2019

Today we tested the performance of LED and the phototransistor with the different distance between a piece of epoxy and the parts. We use tape to make the LED and the phototransistor in a fix location, and then change the position of the epoxy. From the photo below, each unit is 5mm, when we made the LED and phototransistor face to face, the analogue reading is around 760 which is the largest number. Then we start to fix them in a specific location, then change the epoxy's location. Firstly, we make the epoxy touch the LED and the PT, the analogue is 0, and then we slowly make the epoxy far away from the two parts, in a certain distance the reading number became larger, and kept increasing until the intersection point, at that point, the reading number is 760 which is the largest number. After that, as the distance kept increasing, the number became decreasing and then became 0. Those results mean that: 1. If the epoxy is as close as touching LED and the PT, the sensor does work; 2. If the solution is within a certain distance away from the surface of LED and the PT, the turbidity of the solution can be detected by the sensor

Distance test setting


4th December 2019

Today we are planning to test the sensor with a flat surface, and the epoxy need to be glued on the surface of the sensor box.

At first, we use 100% infill white box for testing, however, we found that when we put LED and the PT in the holes, the analogue reading is not 0, even they are perpendicular to each other. When we used the black box to hide the LED, the analogue reading is still not 0. We found that two problems cause this result, one is the light source of LED is not from the edge of the LED but the inner part, another problem is that the white box is not light-proof, so the light from the LED can be transmitted from the white box and it can be detected by the phototransistor. Then we used the 100% infill black box to test if the light will transmit through, and we found that the light cannot be transmitted through the black box.

Therefore, to solve the problems, we determine to use our 3D printer to print the 100% infill black sensor box, and to get rid of the light transmitting from the inner part, the cases of LED and the PT are extended to cover the body of the two parts, the sensor box can be seen as the following photo;

After we set up the sensor box, we glue the epoxy cover on the sensor box surface, and then start our test. The tested sensor is shown in the following photo:

New tested sensor box 3.3v.jpg


In our test, when the sensor is exposed in air, the analogue reading is 0, and in DI water, it is also 0. It is a good result as it matches our hypothesis. However, when we put it in the solution with 200NTU, the analogue reading is about 10, and when we use 1000NTU solution for testing, the reading number is about 76, so the problem is that the reading number is too small for calibration.

We thought that the problem may be the PT is too deep in the box, so it can detect little light from the LED, next step we need to print another sensor box to make the PT more close to the surface.

To be continued……


5th December 2019

The sensor box we used yesterday is a black box with 20mm distance between two holes(centre to centre). Now we use a new sensor box with 14.3mm distance between two holes. We use 14.3mm as the distance because the LED and the PT in the black sensor(we tested on 28th November) is 14.3mm. So we test this distance to see the performance. The new case can be seen as the following photo:

New sensor box with plastic tube.jpg New sensor box with plastic tube back.jpg

And the LED and the PT fit the two holes, the edge of the LED and the phototransistor is on the surface of the sensor box.

New sensor box with led and pt.jpg

And we also connect LED and the phototransistor to the Arduino and found the analogue reading is 0 in air, and when we put the transparent epoxy on the surface, the reading number is also 0. That shows the sensor works well. Next step, we are going to print more sensor boxes with different distance between the holes, 12mm, 10mm and 8.5mm, and then test if the distance between LED and the PT will affect the performance, and then we will choose the best one and test in solution.

To be continued……