Solution Concentration
JDog12
Posts: 5
So we have these large tubs of Copper Sulfate solution (very blue, for you non chemists) and I would like to be able to determine the concentration of these tubs using the TCS230 and a 2PE board.
I was looking for ideas of the best way to do this, I've tried shining a light through the solution toward the sensor and using the LED's on the sensor itself to obtain the color of reflection also. We have a standard % concentration and we want to be able to compare the values obtained from the standard solution to others and compute a different percent concentration, though this is difficult because the blue output values of these solutions are very close (about 40) and we're looking for a way to make the sensor more sensitive to blue light, making it easier to compare very similar colors. Different, light frequency or wavelength, anything?
Anything will help. Thanks.
I was looking for ideas of the best way to do this, I've tried shining a light through the solution toward the sensor and using the LED's on the sensor itself to obtain the color of reflection also. We have a standard % concentration and we want to be able to compare the values obtained from the standard solution to others and compute a different percent concentration, though this is difficult because the blue output values of these solutions are very close (about 40) and we're looking for a way to make the sensor more sensitive to blue light, making it easier to compare very similar colors. Different, light frequency or wavelength, anything?
Anything will help. Thanks.
Comments
2. For every sample take two readings: one with the illumination on, another with it off. Subtract the second from the first to get your reading. This will cancel any effects from ambient light.
3. And always do a white balance (i.e. with distilled water), and take the ratio of the sample reading to the white balance reading.
4. Try increasing the sample time for blue. That will give you more bits of precision to work with.
BTW, aren't the fumes from a CuSO4 bath rather reactive? Are you taking any steps to protect the electronics from corrosion?
-Phil
just a little bit of opposite thinking out loud here ... The fact that you can 'see' blue means that that wavelength is allowed to pass, meaning that the substance you are measuring 'Copper Sulfate' is blocking all other wave forms. Although the variations of blue may seem very close to one another between different concentrations, looking at another color such as red might show a more dramatic difference. In other words a more measurable difference. Also, assuming that your solution is evenly mixed, you may only need to look at a small portion of the whole solution... <- less 'blue' or less of a 'filter' to look through.
What happens when you shine a red laser (or green laser) through the solution at the sensor?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
For example, quoting wikipedia:
"The colour of metal ion solutions is strongly affected by the presence of other species, such as certain anions or ligands. For instance, the colour of a dilute solution of copper sulfate is a very light blue; adding ammonia intensifies the colour and changes the wavelength of maximum absorption (λmax)."
en.wikipedia.org/wiki/Ultraviolet-visible_spectroscopy
When you·experiment with this, try having different known concentrations to use over the different colors so that you can correlate the result to find the best match. It may turn our that you may need a mix of colours. Beware of RGB LEDs, I've found in the past that·although they produce Red, Blue and Green, these can be at different intensities, thus requiring callibration. One way is to use 3 variable resistors,·and then·adjust all·3 to give a white light (reflect it off a card).·Then measure the resistence·of the·POTs·to determine the actual resistence needed for·driving the intensity, though this is assuming a linear response of the same gradient for all 3 colors (unlikely).·Again experimentation would be required.
If the temperature is likely to change between samples then you may want to factor that too. If you don't require immersing the sensor in the sample then a thermister with RC time may do the job nicely. Again, you should calibrate this in a glass of ice water and then a glass of boiling water to get the upper and lower ranges then assuming it's linear over the range (I don't know, but I'd hope it is over the standard ranges).
Though I would have thought the easiest way to measure the concentration would be a hygrometer. You could place it in a tube to restrict it to just vertical movement as long as you could have a repeatable sample volume. And then measure that. You could do that with a range of different methods, the choice would depend on the amount of movement variation and the desired sensitivity. Some examples: An arm to a POT (measuring the resitance (you could do this with RC time or an A-D), A magnet and one or more hall effect sensors to measure the change in the magnetic field, a metal tube within a tube to measure capacitance. etc.·
Depending on what you are actually trying to achieve (sensitivity, reliability, predictability) you may want to consider using a couple of different sampling techniques and then use the data from each group of sensors for your final outcome.
It certainly sounds like a lot of fun! I'd be really curious as to what you find out.
It would be great if you could post your progress.
That paragraph is the most significant thing to consider. I've been working on some research and development on how to test various parameters in fish tanks. There are two inverse questions:
* How accurate to you NEED to be?
* Mow much money do you have to spend?
Finding where these two lines cross will tell you what sensor(s) you need.
zoopydogsit (and others) also hit on one of the things to help with your search. Think about all the ways to test what you're after (specific gravity, color, conductivity, pH, etc.) and look into how each could be measured. Some are easier/cheaper/more accurate than others.
Based on my work, think carefully "how good is good enough", and conversely, how "bad" can it be before it's "worthless". Just as good as "how accurate can I get", is "I can do this easily, but will the results be worth the effort".
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John R.
Click here to see my Nomad Build Log
We want this to be fairly accurate and produce reproducible results fairly quickly. As we increase the sample time for blue, the sensor puts out higher readings, making the results easier to compare @ close concentrations, though when at these higher levels, the sensor starts out reading off numbers and over time the numbers continue to decrease and decrease making it very difficult to get a good reading at all.
Any thoughts?
www.starnacells.com/
I'm not sure why you're seeing a time-varying response. Could you post your code?
-Phil
'
[noparse][[/noparse] I/O Definitions ]
#DEFINE Socket = "B" 'Define a MoBo socket for the TCS230-DB.
#SELECT Socket
#CASE "A", "a"
S3 PIN 8 '
S2 PIN 9
LED PIN 12
Owio PIN 10
Out PIN 11
#CASE "B", "b"
S3 PIN 0 '
S2 PIN 1
LED PIN 5
Owio PIN 6
Out PIN 7
#CASE #ELSE
#ERROR "Value for 'Socket' must be either 'A' or 'B'."
#ENDSELECT
'
[noparse][[/noparse] Constants ]
pRED CON 50 'Red reading period.
pGREEN CON 8 'Green reading period.
pBLUE CON 50 'Blue reading period.
'
[noparse][[/noparse] Variables ]
RED VAR Word 'Red color reading.
GREEN VAR Word 'Green color reading.
BLUE VAR Word 'Blue color reading.
'
[noparse][[/noparse] Initialization ]
PAUSE 10 'Wait for AVR to reset.
OWOUT Owio, 1, [noparse][[/noparse]$05, $15] 'Maximum output rate.
HIGH LED 'Turn on LED.
'
[noparse][[/noparse] Program Code ]
DO
GOSUB Color 'Get the color data, and output to DEBUG.
DEBUG "R", DEC3 RED
DEBUG " G", DEC3 GREEN
DEBUG " B", DEC3 BLUE
DEBUG CR
PAUSE 1000
LOOP
'
[noparse][[/noparse] Subroutines ]
' Color: Read all three color components.
Color:
LOW S2 'Address the red output.
LOW S3
COUNT OUT, pRED, RED 'Read the red component.
HIGH S3 'Address the blue output.
COUNT OUT, pBLUE, BLUE 'Read the blue component.
HIGH S2 'Address the green output.
COUNT OUT, pGREEN, GREEN 'Read the green component.
RETURN
--Thanks for your help!
-Phil
The sample container is a Sarna Cell, as I pointed out above. The diffusers can be either ground glass or milk-white Plexiglas. The idea is to get as even and diffuse a backlight as possible. Don't skimp on the physical setup and lighting if you want any kind of precision. If you don't get that part right, no amount of clever programming is going to help you.
-Phil