Pages: [1]   Go Down
Author Topic: CO2 ppmv & ppmw math  (Read 2562 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Sr. Member
****
Karma: 8
Posts: 291
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi folks.
Anybody here knows CO2 atmospheric math?
I'm using this sensor to measure CO2.
http://www.co2meter.com/collections/co2-sensors/products/k-30-3-co2-sensor
It measures CO2 in ppm by volume aka atmosphere.
What I'm using it for is to measure CO2 concentration in water which is measured in ppm by weight.

This is what I have so far.
Code:
double co2 = K_30.getCO2('p') * 3; //returns co2 value in ppm ('p') or percent ('%')
 
  //there's a glitch sometimes with the sensor output
  if(co2 >= 0 && co2 <= 30000) {
      co2 = co2 * 0.8317 * 44.01 / 10000;
      //  quicker than co2/1000000 * 0.8317 * 44.01 / 1000000
      //  0.8317 accounts for Henry's Law
      // max ppmw will be 36.6 with 10,000 ppmv
  }


The sensor floats on the waterline detecting any CO2 bouncing out of the water. Do I even need to account for Henry's law?
Is the math right?
Logged

Offline Offline
Edison Member
*
Karma: 43
Posts: 1559
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't see how you can relate the concentration of CO2 in air to the concentration of CO2 in water. In particular, I don't see how you can differentiate between the "CO2 bouncing out of the water" and the CO2 already in the air.

Pete
Logged

Where are the Nick Gammons of yesteryear?

0
Offline Offline
Sr. Member
****
Karma: 8
Posts: 291
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Co2 is co2. I'm trying to convert ppmv to ppmw like how to convert Celsius to Fahrenheit . Just measurements.
« Last Edit: March 24, 2014, 07:48:07 am by mistergreen » Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can you explain what your code does ?
And what is Henry's law?
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

0
Offline Offline
Sr. Member
****
Karma: 8
Posts: 291
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Henry's law has some to do with finding the concentration of a gas in water based on the amount of the gas bouncing out of the water i.e. gas concentration above the water.
The math for it is super complicated.

But In my wiki search I thought I found the constant 0.8317 is good enough for CO2, assuming normal water density (not salt water etc) and temp of 70F.
http://en.wikipedia.org/wiki/Henry's_law
-------------------------------------------------------

ppm is parts per million or
ppm(volume) = mg/L
ppm(weight) = molar weight/1000 kg/m^3

1000 kg/m^3 is the density of water and can be substituted with 1000000 mg/L to get the formula simplified.

for my thought to get the weight of it would be
co2_weight = co2_volume/1000000 * .8317 (henry's) * 44.01 (mole weight of CO2) / 1000000
 
« Last Edit: March 25, 2014, 04:36:37 pm by mistergreen » Logged

Offline Offline
Edison Member
*
Karma: 43
Posts: 1559
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The wiki page on Henry's Law says that the law does not apply when the gas reacts chemically with the solvent and gives the specific example of carbon dioxide and water which form carbonic acid. So you can't use Henry's Law.

Pete
Logged

Where are the Nick Gammons of yesteryear?

0
Offline Offline
Sr. Member
****
Karma: 8
Posts: 291
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The wiki page on Henry's Law says that the law does not apply when the gas reacts chemically with the solvent and gives the specific example of carbon dioxide and water which form carbonic acid. So you can't use Henry's Law.

Pete

Thanks!
Logged

0
Offline Offline
Sr. Member
****
Karma: 3
Posts: 455
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

From Wikipedia
http://en.wikipedia.org/wiki/Carbonic_acid
Quote
When carbon dioxide dissolves in water it exists in chemical equilibrium producing carbonic acid:[2]
CO2 + H2O is in equilibrium with H2CO3
The hydration equilibrium constant at 25°C is called Kh, which in the case of carbonic acid is [H2CO3]/[CO2] ≈ 1.7×10−3 in pure water[3] and ≈ 1.2×10−3 in seawater.[4] Hence, the majority of the carbon dioxide is not converted into carbonic acid, remaining as CO2


I believe that you can still use Henry Law.
Logged

Offline Offline
Faraday Member
**
Karma: 61
Posts: 2898
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The ability of the dissolved carbon dioxide to leave the water,  depends on a lot of things,  including the temperature,  the pH,  the amount of CO2 in the water,  how much you shake the bottle,   what other gases are present in the water and above it,   and how quickly the carbon dioxide that leaves the water can disperse into the atmosphere.
I am unconvinced that measuring the atmospheric concentration above the water,   can actually tell you very much that is meaningful about the concentration in the water, at all.
Logged

0
Offline Offline
Sr. Member
****
Karma: 3
Posts: 455
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I believe that mistergreen wants to measure dissolved CO2 in a fish tank.
Logged

Offline Offline
God Member
*****
Karma: 17
Posts: 723
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you want to measure the CO2 concentration in a fish tank that's way easy.  You don't measure it directly.  You measure carbonate alkalinity and pH and the CO2 concentration can be had from there via a very simple set of equations.   

Logged

0
Offline Offline
Sr. Member
****
Karma: 3
Posts: 455
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Measuring pH in a continuous mode is not a simple task. Usually sensors degrade with time because the liquid junction between the electrode and the liquid to measure and you need to recalibrate the meter very often because of the sensor drift.

I believe that mistergreen wants to measure dissolved CO2 in a fish tank in continuous mode.
Logged

Offline Offline
Faraday Member
**
Karma: 61
Posts: 2898
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Assuming you had a stable setup where the amount of air circulation in the room,   and other such factors were controlled,  then you might be able to observe some variations in the atmospheric concentration of CO2 just above the water surface.   But I don't think you will see much variation.  Gases diffuse pretty fast.

But anyway, supposing you can detect variations,  you would need to make a series of measurements of the water concentration using the carbonate method,   and the atmospheric test,    and observe whatever correlation there might be,  or not.  If you actual get a useable correlation,  then use that for your process control.  Good luck.
Logged

Pages: [1]   Go Up
Jump to: