Borate and rosocyanine

I am busy with a DIY project for my home pool. I have assembled an RGB LED and a color sensor to read the color of water in a test tube. Firstly I am using this to better read the color of the DPD 1 tablet color in the water that gives me a better free chlorine reading. Very happy with the results so far.

Next I am working on pH reading, and also want to add reading color for borates.

This is the bit where I am stuck - the borates.

Here's where I am at so far :

I have created a 'known control solution' of 5000ml water, 44 g Borax power and 22ml hydrochloric acid.
My research tells me that this should create a 1000 ppm borate solution, so :
= 1000 parts per 1000ml
= 1 part per 1 ml.

As a reagent to create different colors in the water, I should be able to use curcumin, an extract from the spice turmeric.
I have created a reagent solution with 30 ml acetone + 1 curcumin extract capsule dissolved in the acetone.

I read that curcumin reacts with borate ions in an acidic solution to create rosocyanine. The pH of samples b1 and b2 is around 6.7

So far, I have not been able to find a reliable way to get the curcumin to react with the borates. Only happened when I added some dissolved caustic soda flakes ( drain cleaner ) to the control solutions b1 and b2.
But the volume needed to create the rosocyanine reaction was around 50%, and at that point I discovered that even plain water + caustic soda solution ( without borates ) would create the rosocyanine reaction, so am wondering if I am totally off track here.

My suspicion, ( although I have no chemical background and very little understanding ) is that I am missing a step that would convert the boric acid in the control solution ( and then later also in the sample being tested ) from boric acid to borate ions, that would then react with the curcumin.

On top of this, we live in an area where resources are limited, so I am trying to set up this test using basic components that are available easily.

Staff: Mentor

My research tells me that this should create a 1000 ppm borate solution, so :
= 1000 parts per 1000ml
= 1 part per 1 ml.

is wrong. Unless you mean something else than you wrote. Concentration is an intensive property and it doesn't depend on the volume. If your solution is 1000 ppm it will be 1000 ppm regardless whether you have 1000 ml or 1 ml. Amount of substance dissolved will be different, but concentration no.

My thinking was that if this creates a 1000ppm solution, and I then take 1ml of that 1000ppm solution and add it to 250ml water ( b1 ), then b1 will contain 4ppm. ( in my mind it is 1ml or the 1000ppm into 250 ml, so 1 part in 1ml in 250ml water = 4 parts in 1000ml = 4ppm )

Is this logic incorrect ? I used a similar approach when creating a control solution for measuring free chlorine levels and the results have, as far as I can tell, been correct and reasonably accurate so far.

Staff: Mentor

Looks like your thinking is correct, just the way you name things goes against the standard. ppm mens parts per million, but no chemist will treat "part" as an amount - ppm is meant to be a fraction. Your 1000 ppm solution contains 1000/1000000 of substance in the sample (weight of the substance per weight of sample, or w/w). You can't say "I took 10 parts of 1000/1000000". You can say "I took 1 mL of 1000 ppm solution, and it contained 1000/1000000*1g of the substance" (assuming solution density was that of water - 1 g/mL).

OK. So looks like my control solution and b1 and b2 dilutions ( ? ) are as I calculated ( 1000ppm, 8ppm, 40ppm respectively ) even though I should learn the correct way to get to the right answer, do you have any advice on the core of the problem that I have - that of getting the curcumin to react with the boric acid to form rosocyanine, or do I first need to convert the boric acid to borate ions ? And if this is the case, any suggestions how to achieve this ?

OK. I have managed to get a reaction, but the results are nowhere near what I was expecting.

Background : I have a color sensor and RGB LED attached to an Arduino board and the results displayed on an LCD.
The test tube is positioned between the LED and the color sensor in a light tight container.

My results when measuring the green light transmitted through a test tube of pool water using a DPD 1 tablet, are just about spot-on, so I believe that the color sensor is working correctly.

The results of the readings from the water containing borates are not consistant.

So I assume from this that the acidic solution, with borates, reacts to the curcumin, and that the curcumin reagent solution does contain curcumin.

Next I started with 250 ml distilled water ( lets call this : s1 ), and added 2 ml of the 1000 ppm borate solution.
My calculation says this should now contain 8 ppm.
From this I extracted 13 ml to my test tube, added 1 ml caustic soda solution to acidify, mixed, and added 2 drops of curcumin reagent.
Result was a nice reddish colour ( almost like blood water - RGB 171:43:16 ).
Took readings with the color sensor.

The readings are all Green LED color readings, and to account for any possible particles or air bubbles in the solution, each reading is the average of 90 separate individual readings ( 3 sets of 30, each reading 100 ms apart, with a 5 second pause between each set of 30 readings ).

So as you can see, although I am getting the rosocyanine reaction, there is no consistency or gradual change in the color readings.

Does the caustic soda need some amount of time to acidify the 13 ml in the test tube ?
Is it possible that the curcumin extract solution is just too strong ?
What other factors could be causing inconsistent results ?

ok. the light bulb just came on -- now I think it is starting to make sense !!

When I first tested, and added curcumin reagent to water with borate solution ( no castic soda ), I saw a flash of red ( assuming rosocyanine ) which disappeared within about half a second. Google told me that rosocyanine would behave like this in an alkaline solution. So I needed to acidify the water.

I thought I was doing that with the caustic soda. In reality it was going in the other direction, but adding the caustic soda must have added something / or a reaction to the water that caused the curcumin reagent to turn dark red, making me think that I was on the right track and getting the rosocyanine reaction because of the borates.

So what you are saying is that if I replace the caustic soda in my process with an acid ( I have hydrochloric pool acid 30% strength ? ) then I might start getting some predictable / expected results ?

Based on this, does the process that I have described seem to be logical, or is there a great big red warning sign that I can't see ?

and lastly, a huge big thank you for pointing out the one thing that was not obviously staring me in the face.

and about 60 seconds into the video, the author adds curcumin to both an acid and a base ( both with no borates ).
The acid remains the yellow curcumin color, but the base turns a dark red - same as I had.

Now I can go start experimenting with using HCl to acidify the water and see if the curcumin reacts with the borates and forms rosocyanine.

Staff: Mentor

Most organic dyes that are weak acids/bases change their color depending on the pH, so it is quite possible that's what you were observing.

Can you share a word or two about the color sensor you are using? Chemistry is where I feel comfortable, but I happen to have an Arduino lying on the shelf behind my back and waiting for a better times - sounds like what you are doing (or something similar) could be a nice project to finally start me using the device.

The vertical pipe sticks out the top of the box, so the test tube can be inserted. Test tube sticks out 15 mm so I cover that with a rubber cap ( like form the bottom of a table leg ) to make it light tight.

The horizontal PVC pipe has the LED at one end, covered by a cap, and the color sensor at the other end also covered by a cap.

Arduino is in a second 4 x 4 box next to the first box, and an LCD screen and buttons on a 2 x 4 box above that.

So the test tube is inserted, the Arduino code controls the LED and shines light thru the tube to the color sensor.

I usually calibrate with a tube of sample water, and then add the reagents and do the readings.

Results are shown on the LCD. I am using an Adruino Uno 3, and 16 x 2 LCD and a few buttons for menu control, some DS18B20 temperature sensors in the pool pipes, etc. for temperature readings

and I would be only too happy to share the code I have if you want it.

So I have to assume that one of the following is affecting the reading :

After 10 drops, then pH of B ( now more than 0.5ml in 13ml of CS ) is affecting the pH of the 13ml CS in the tube, or
The drops of B are not an accurate enough system of measurement.

I think the next steps would be :

1. to add acid to the B solution so that both the CS and the B solutions are at the same level.

2. to use a 250ml container of CS and add a larger volume of B ( to reach the same ppm for each stage of the test ) and to decant from that to the test tube before adding the 2 drops of CU and taking the reading.

Staff: Mentor

How concentrated is your hydrochloric acid? 30%? If so, you may assume your pH doesn't change with added drops of other solutions. Your diluted solution is around 3M, things you add are orders of magnitude less concentrated.

I wonder how realistic it is to assume linear response from the sensor. After all, it is not following a single wavelength as it is should be done.

Remember Lamber-Beer's law is linear only for a limited range of concentrations (but it shouldn't mean signal drifting back, it should mean signal saturation at some point). I don't think it should matter fro ppm levels, but who knows.

Very odd that. At the time I wasn't convinced by the pool test strip so I also did a test with the liquid pool test. 5 drops of some purple-ish reagent ( I think it is called phenol red ) and it turned a mid to dark orange color which matched the bottom of the printed color chart of 7.2 pH.

I am reasonably sure that the distilled water is just that, as I bought it sealed a few weeks ago. And the hydrochloric pool acid, labelled 30% strength, has a really bad smell just from slightly down-wind and I can see vapors coming out the container if I leave it open.

Possibly both the test strips and the liquid reagent drops have a limit to the pH they can detect, and everything from 7.2 to 0 is displayed as the color for 7.2 ?

OK. So lets assume that the components that I am working with are correct ( high probability ), and as you point out, a very low ( lower than 1 ) pH would not be affected by the addition of 0.5ml high pH solution into the 13ml acidic carrier solution, and my limited testing method for pH is incorrect.

And based on the above, the only other variable that could be affecting the readings would be the size of the drops from the pipette.

But I am not convinced of this either, as the drops from 2 to 10 from the same pipette were producing excellent results with a reasonably constant rate of change in the readings.

There must be another factor I have not yet considered.

<addition>
Just had a thought.

Also possible that the reagent that I am using does not contain any active curcumin that can react with the borate. Perhaps the color readings I am seeing is the orange color of the 2 drops intense turmeric color diluted in the 13ml, 13.1ml, 13.2ml, 13.3ml, etc.
So it is possible that the curcumin extract of turmeric capsules that I have ( a health supplement ) have been treated / irradiated or something in some manner that prevents the acetone from dissolving usable curcumin.

Or the curcumin is not extracted from the powder by the acetone and needs some other liquid.

Not sure if anyone still cares about this, but for some reason my phenol red always seemed to indicate a basic pH even in 10M hydrochloric acid. It may have something to do with dissolved chlorine, but phenol red isn't going to work in that case.