Chemical Forums

Chemistry Forums for Students => Organic Chemistry Forum => Topic started by: JarredAwesome on June 12, 2021, 04:48:52 PM

Title: Henry’s Law
Post by: JarredAwesome on June 12, 2021, 04:48:52 PM
Hey Guys,

 Have been working on this project for a while. I am getting closer. This is just a hobby, it’s not for money or school or anything.

I am trying to calculate the Co2 in an aquarium.

I have a cup upside down in the water, and a sensor that calculates how much co2 is in the air trapped in the cup.

I am using Henry’s law to then calculate the dissolved Co2 in the aquarium.

Here are my issues.

The air in the cup is never really dropping below a certain level of Co2.

When I add Co2 to the water, the level will rise really fast in the cup. but when the Co2 drops, levels in the cup seem to take very long to catch up.


Is there something I can be doing? Would adding a fan in the cup help?
Title: Re: Henry’s Law
Post by: Orcio_87 on June 12, 2021, 05:39:19 PM
@JarredAwesome

Quote
When I add Co2 to the water, the level will rise really fast in the cup. but when the Co2 drops, levels in the cup seem to take very long to catch up.
It looks like you have two sensors, not one. One sensor in the cup and the second in the aquarium water.

Henry's law states that concentration of dissolved gas is proportional to the pressure above the solvent (but still limited by its solubility).

Sensor in the cup will measure concentration of CO2 in the air.

But - solubility of CO2 depends on temperature and pH of solution.

Does the water sensor measure concentration of CO2 or HCO3- ?

And - do both sensors lie in the same distance from source of CO2 ?

pH of water should be slightly basic (7 -8) because fishes excrete ammonia.

I think that maybe cup sensor reacts faster towards adding (bubbling) CO2 than water sensor, because water sensor measure concentration of HCO3- (?) and reaction between CO2 and OH- can take a while in near neutral pH, while air in cup sensor is rapidly saturated with CO2.

In reverse - when CO2 (HCO3-) in water drops, CO2 in the cup drops slower because absorption from air into water is also slow.
Title: Re: Henry’s Law
Post by: JarredAwesome on June 12, 2021, 06:15:59 PM
I am
Only using one sensor in the cup. If an affordable sensor exists do read Co2 in water let me know. That would save me so much effort! I’m using Henry’s law, because it’s the only way I can find to measure Co2 in water using easily obtainable sensors.

The sensor I have only measures CO2, not HCO3. Is that a problem? I didn’t think HC03 was in the air… as I said, I’m a hobbyist, so I’m still learning.

I do account for temperature of the water. I have a thermometer, and I apply the Vann’t Hoff to the Co2 constant. Should I be doing more?

Would a fan in the cup work? I’m assuming agitating the water surface would, but that might be really hard 


A purely chemical version exists, using a 4dkh liquid and a ph regent
Title: Re: Henry’s Law
Post by: Orcio_87 on June 12, 2021, 06:29:52 PM
Quote
I didn’t think HC03 was in the air
True, there are no HCO3- flying in the air :(
Title: Re: Henry’s Law
Post by: Borek on June 13, 2021, 05:13:44 AM
When I add Co2 to the water, the level will rise really fast in the cup. but when the Co2 drops, levels in the cup seem to take very long to catch up.

How do you know that the CO2 (watch the capitalization) level dropped of? How do you know there is discrepancy between the levels of CO2 in water and the cup? Sounds like you have TWO information, but at the same time you say you have only ONE sensor, so there is something wrong here.
Title: Re: Henry’s Law
Post by: JarredAwesome on June 13, 2021, 07:36:24 AM
I use a drop checker (https://youtu.be/An_A2XnI6IQ) to compare the CO2 levels.

They aren’t super accurate, but they are good enough to let me know of my set up is working.
Title: Re: Henry’s Law
Post by: Borek on June 13, 2021, 08:28:09 AM
So the problem is: whatever you sensor measures, doesn't agree with what the drop checker shows?

What kind of sensor do you use?

I can be wrong, but the drop checker looks like a simple pH indicator with solution changing its pH in response to the partial pressure of CO2.
Title: Re: Henry’s Law
Post by: JarredAwesome on June 13, 2021, 08:37:26 AM
So the problem is: whatever you sensor measures, doesn't agree with what the drop checker shows?

What kind of sensor do you use?

I can be wrong, but the drop checker looks like a simple pH indicator with solution changing its pH in response to the partial pressure of CO2.

Yes to all of it.

When I add CO2 to the water, the sensor shows the increase fairly quickly. When the CO2 is off, it takes hours for the numbers to start registering a drop.

The sensor never drops below a concentration of 39ppm of CO2. Where as the drop checkers shows the levels to be at least 15ppm (that’s below the threshold of what wa drop checker can show)

The reason I think for this, is the CO2 turns back on before the levels are shown on the sensor.


The liquid in a drop checker is distilled water mixed with backing soda until it has a Kh of 4DKh. It then has a ph regent added to it.

The idea is, the partial pressure from the CO2 will change the ph of the liquid and because the Kh is known, ph can be used to roughly measure the CO2 in the water
Title: Re: Henry’s Law
Post by: Orcio_87 on June 13, 2021, 12:47:09 PM
Quote
When I add CO2 to the water, the sensor shows the increase fairly quickly. When the CO2 is off, it takes hours for the numbers to start registering a drop.

The sensor never drops below a concentration of 39ppm of CO2. Where as the drop checkers shows the levels to be at least 15ppm (that’s below the threshold of what wa drop checker can show)

How is this possible if solubility of CO2 at p=0,004 atm (present-day conc.) is about 6 ppm ?

I hope that you made a correction on the pressure inside the cup in the water.

Quote
The idea is, the partial pressure from the CO2 will change the ph of the liquid and because the Kh is known, ph can be used to roughly measure the CO2 in the water
True - carbonate hardness (kH) and pH can be used to calculate concentration of CO2 - but ammonia will false outcome as it will increase kH in aquarium water and even raise pH in drop checker.

After all - kH and pH tests are better, as they give data about all CO2 (CO2 and HCO3-) while your sensor measures only concentration of CO2 in the air above aquarium water.
Title: Re: Henry’s Law
Post by: Borek on June 13, 2021, 02:19:23 PM
What kind of sensor do you use?

Yes to all of it.

?
Title: Re: Henry’s Law
Post by: JarredAwesome on June 13, 2021, 07:02:41 PM

How is this possible if solubility of CO2 at p=0,004 atm (present-day conc.) is about 6 ppm ?

I hope that you made a correction on the pressure inside the cup in the water.

I’m not entirely sure I understand what you’re asking. But if you’re asking why the Concentration of Co2 is so high, it’s because I inject Co2 into the filter so it dissolves.

Quote
Quote
The idea is, the partial pressure from the CO2 will change the ph of the liquid and because the Kh is known, ph can be used to roughly measure the CO2 in the water
True - carbonate hardness (kH) and pH can be used to calculate concentration of CO2 - but ammonia will false outcome as it will increase kH in aquarium water and even raise pH in drop checker.

After all - kH and pH tests are better, as they give data about all CO2 (CO2 and HCO3-) while your sensor measures only concentration of CO2 in the air above aquarium water.

I’m not worried about ammonia. A cycled tank has organisms in it that remove ammonia, and convert it into nitrates.

How would I compensate for the
Pressure in the cup? I have a barometer in the cup, but I don’t think that’s why you’re referring too.

The CO2 Sensor I have in the cup is a Senseair S8. It’s supposedly one of the best you can buy without going into scientific lab quality stuff.

Title: Re: Henry’s Law
Post by: Borek on June 14, 2021, 03:22:48 AM
How would I compensate for the Pressure in the cup? I have a barometer in the cup, but I don’t think that’s why you’re referring too.

Don't worry about that. The cup is submerged so the pressure inside is a bit higher than the atmospheric one, which in turn means a bit higher amount of gases. The error is something like +3% per each foot the cup is below water surface.

39 ppm that you listed as measured in the air in the cup (that's what you measured, right?) is a bit strange. According to the specs the sensor is not capable of measuring the concentration below 0.04% or 400 ppm (that's more or less how much CO2 is in the air these days).
Title: Re: Henry’s Law
Post by: JarredAwesome on June 14, 2021, 09:13:31 AM
Sorry, maybe I wasn’t clear.

39ppm is the concentration of CO2 I calculated in the water after applying Henry’s Law.

The cup was reading at a PP of 26150PPM
Title: Re: Henry’s Law
Post by: Borek on June 14, 2021, 09:47:18 AM
39ppm is the concentration of CO2 I calculated in the water after applying Henry’s Law.

This is tricky, as CO2 not only dissolves, but also reacts with water and dissociates, and the amount dissolved depends on pH. You never mentioned that you already apply the Henry's Law, nor what value/kind of constant you use.
Title: Re: Henry’s Law
Post by: JarredAwesome on June 14, 2021, 11:22:00 AM
Here is the Calculation I have been using

To get the Value in moles:
C = Concentration of CO2 in water
T = Temp of water in Celsius
P = PPM of CO2 in cup

C = (P / 10^6) / (29.42^(-2400/8.314*(1/T+273.15)-1/298.15))

I then convert moles to PPM like this:

   ppm = C*44.1 * 1000

The equation is basically Henrys law, with the CO2 constant. But I used the Van't Hoff equation to adjust the constant for the temp of the water


I'm just trying to digitize the drop checker I talked about about. The 4Dkh liquid reacts to the CO2 off gassed from the aquarium. I should be able to replace the 4dkh liquid with a digital sensor, right?

Maybe there is a better way to measure this?

The other Idea I had was to agitate the water surface in the cup. I figure that would speed up Equilibrium


Title: Re: Henry’s Law
Post by: Borek on June 14, 2021, 02:42:31 PM
Have you tried to get it right first without the Van 't Hoff corrections?

Your formula uses two constants - 29.42 and -2400 - that are not clear to me.

I mean: I could probably attempt to guess where they came from, but it would be better if you explain everything from the very beginning. So far I am guessing my way through things you have never stated, it is a waste of time :(
Title: Re: Henry’s Law
Post by: JarredAwesome on June 14, 2021, 04:44:42 PM
Have you tried to get it right first without the Van 't Hoff corrections?

Your formula uses two constants - 29.42 and -2400 - that are not clear to me.

I mean: I could probably attempt to guess where they came from, but it would be better if you explain everything from the very beginning. So far I am guessing my way through things you have never stated, it is a waste of time :(

Yeah, when I run the numbers without altering the temp (aka, just using Henry's constant as-is), the amounts change slightly, but nothing notable

Sorry, I take for granted that I have figured parts out, and haven't expressly shared the logic I am using
Also, I am reviewing my code, I made some mistakes when I "translated" my code to an equation

The Equation should read like this:

C = (P/10^6) / 29.76 * exp(2400/8.314*(1/(T+273.15)-1/298.15))
C(ppm) = C * 44.1 * 1000

C = Concentration in Water
P = PPM of co2 in cup
C(ppm) = Concentration in PPM
T = Temp in Celsius

Here is where I got the constants from:
29.76 is Henry's constant for CO2 with STP. I can't find the exact resource I used to learn that, but this website (http://www.3rd1000.com/chem101/chem103v.htm) confirms it (I had a slightly different number but this seems to be the correct one)
8.314 is the Molar Gas Constant
2400 is the value given as the constant on the same page I listed above

also, after going over some of the resources, I altered Henry's Constant by using the equation below, opposed to the van't Hoff equation:

kH(T) = k°H exp(d(ln(kH))/d(1/T) ((1/T) - 1/(298.15 K)))


Sorry, I REALLY didn't want to make so many mistakes, but this is a project I have been working on for a while, andI got a little confused
Title: Re: Henry’s Law
Post by: Borek on June 14, 2021, 06:15:20 PM
29.76 is Henry's constant for CO2 with STP.

This is misleading - as we told you, CO2 solubility heavily depends on the solution pH. The higher the pH, the more CO2 will react with bases present, producing HCO3- and CO32- - this is indistinguishable from just increased dissolution. My bet is that the constant as listed is for dissolution in pure water - but that's not your case. What you need is the "effective" constant, one that takes into account changes in solubility caused by the acid/base equilibrium occurring in the solution.

Quote
2400 is the value given as the constant on the same page I listed above

I don't see it on the page. It should be the dissolution enthalpy. But I strongly recommend you leave the temperature dependence for now, it will be easy to add later, once you get the basics right. Temperature corrections will be most likely in single percent range, order(s) of magnitude lower than the error you have now.
Title: Re: Henry’s Law
Post by: JarredAwesome on June 14, 2021, 06:52:43 PM
Ah, I understand.

So is there a way to figure out what a  ‘effective’ constant?

What information would I need?

Also, what do I do about my other problem?

The co2 raises in the cup along side when I start inject co2, but it doesn’t seem to lower at the same rate as the tank.

I’m looking at the raw data of the sensor, and I don’t think that aspect is a mathematical error.
Title: Re: Henry’s Law
Post by: Borek on June 15, 2021, 06:18:58 PM
So is there a way to figure out what a  ‘effective’ constant?

What information would I need?

Sigh, this is tricky and difficult to explain without a long lecture on the acid/base equilibria.

Imagine you start with a pure water and measure Henry's constant for an inert gas - you get some number, that tells you how much gas will dissolved for a given pressure. Simple.

Now we do the same, but we dissolve CO2 in pure water. CO2 is not inert, it reacts with water, producing carbonic acid, which dissociates, acidifying water. When it dissociates it technically "disappears" from the solution, making room for more CO2 to dissolve. So, what we measure is already kind of "effective constant".

Things get even more complicated when the starting pH is not neutral, as then the carbonic acid either can't dissociate (if pH is low) and the amount of gas that can get dissolved gets lowered, or gets neutralized (if pH is high) making room for more gas.

But, the pH itself is still not enough, as solutions with the same pH can be capable of neutralizing/acidifying different amounts of the acid (broadly speaking it depends on the parameter known as a buffer capacity of the solution).

These things can be calculated using methods for acid/base equilibrium. My bet is the result can be easily fit into some reasonably simple and convenient to use approximated form, but the derivation would be tedious.

Quote
Also, what do I do about my other problem?

The co2 raises in the cup along side when I start inject co2, but it doesn’t seem to lower at the same rate as the tank.

I’m looking at the raw data of the sensor, and I don’t think that aspect is a mathematical error.

No idea and yes, it sounds unexpected.