# Affordable CO2 sensor?



## mistergreen (Dec 9, 2006)

So I stumbled upon this CO2 sensor manufacturer by googling.
I wrote to them explaining our hobby and we could use a sensitive sensor to turn on and off our CO2. I got a reply from them. See if this could work out. My main concern is the error range.

It uses infrared to read CO2 in the atmosphere unlike the less reliable chemical reaction sensors we're used too. 



> Thanks for the interest and inquiry.
> We measure the concentration of CO2 in water for example by measure the head space gas.
> This make use of Henrys gas law regarding concentration in air and liquid.
> The measurement are made via a space cup or a gas permeable membrane.
> ...


----------



## h4n (Jan 4, 2006)

very interesting!


----------



## Hoppy (Dec 24, 2005)

There must be a relationship between ppm in the water, and ppm in the air trapped above the water. I assume the partial pressures of the CO2 would be equal, but what would the relationship be between the two ppm's?


----------



## Darkblade48 (Jan 4, 2008)

Hoppy said:


> There must be a relationship between ppm in the water, and ppm in the air trapped above the water. I assume the partial pressures of the CO2 would be equal, but what would the relationship be between the two ppm's?


Given this diagram, I would imagine the CO2 levels would be the same as in the water.

For example, in the case of CO2 injection, the levels of CO2 in the water are higher. CO2 will off gas from the water into the atmosphere and into the bell shaped jar. When the levels of CO2 in the jar reaches the same level as the water, then it will not increase anymore.

Of course, CO2 will be diffusing from the water into the atmosphere as well as into the jar.


----------



## mistergreen (Dec 9, 2006)

Oh, there is a difference between ppm in air and in water. Read the text below the calculator.
http://www.lenntech.com/calculators/ppm/converter-parts-per-million.htm

I'll have to study it to get the math. That was my confusion when I wrote to the manufacturer. 

So I can hook this sensor to an arduino (in side a drop checker or breather bag) and have the arduino do the math for water (by weight) and control the solenoid to get the proper co2 concentration.


----------



## kevmo911 (Sep 24, 2010)

Darkblade48 said:


> Given this diagram, I would imagine the CO2 levels would be the same as in the water.
> 
> For example, in the case of CO2 injection, the levels of CO2 in the water are higher. CO2 will off gas from the water into the atmosphere and into the bell shaped jar. When the levels of CO2 in the jar reaches the same level as the water, then it will not increase anymore.
> 
> Of course, CO2 will be diffusing from the water into the atmosphere as well as into the jar.


As I understand it, we use the term "ppm", but, really, that's technically totally inaccurate - we do *NOT* aim for 30 parts per million. And the CO2 solubility of water is far less than that of air.

And that's as much as I know about water chemistry, and I'm sure I explained it badly. But there are some posts on it, written by people how actually know what they're talking about.


----------



## Sotty (Aug 31, 2012)

I am intrigued by this. Would be nice to finely have a better handle on what the actual CO2 concentration was in the water.


----------



## mistergreen (Dec 9, 2006)

The 30 ppm stems from the kh ph chart that been passed around aquarists  

I'll have to find the exact definition somehow. Well either way I'll just read atmospheric co2 inside a permeable container and not worry about math co2 in the water.


----------



## PlantedRich (Jul 21, 2010)

This is an interesting gizmo that can be used for lots of things but for me it is not going to be an affordable option. It is not a stand alone item to plug in. It needs several other things before we can stick it in to measure the CO2 in tanks. Those other items will run the price way beyond the level most will pay. With mounts, power supply and connections, I see at least $200. With equipment to read concentrations in water rather than air as this is designed it will be out of my range for sure.


----------



## mistergreen (Dec 9, 2006)

PlantedRich said:


> This is an interesting gizmo that can be used for lots of things but for me it is not going to be an affordable option. It is not a stand alone item to plug in. It needs several other things before we can stick it in to measure the CO2 in tanks. Those other items will run the price way beyond the level most will pay. With mounts, power supply and connections, I see at least $200. With equipment to read concentrations in water rather than air as this is designed it will be out of my range for sure.


Yeah but compared to ph controller ( not accurate) or a scientific water co2 sensor, it's a steal.

The price is closer to $130 I think.


----------



## Darkblade48 (Jan 4, 2008)

I am curious as to why a pH controller would not be accurate (I assume due to probe calibrations, etc)?


----------



## Hoppy (Dec 24, 2005)

Darkblade48 said:


> Given this diagram, I would imagine the CO2 levels would be the same as in the water.
> 
> For example, in the case of CO2 injection, the levels of CO2 in the water are higher. CO2 will off gas from the water into the atmosphere and into the bell shaped jar. When the levels of CO2 in the jar reaches the same level as the water, then it will not increase anymore.
> 
> Of course, CO2 will be diffusing from the water into the atmosphere as well as into the jar.


But, 30 ppm of CO2 dissolved in water isn't in equilibrium with 30 ppm of CO2 in air. My education is lacking in this field, so I have no idea how to even start to solve this.

Air can have a varying amount of CO2 in it. If it is .03% CO2, it is 300 ppm, but water exposed to that air will contain more like 3 ppm of CO2. If the ppm in the water in equilibrium with the air above the water is a near constant percentage of the ppm in the air, this is an easy problem, but Murphy's Law seems to dictate that it isn't anywhere near a constant percentage.


----------



## mistergreen (Dec 9, 2006)

Darkblade48 said:


> I am curious as to why a pH controller would not be accurate (I assume due to probe calibrations, etc)?


Same reason not to to use tank water in a drop checker. The ph will be affected by other things besides co2 throughout the day like rocks, substrate, driftwood. We're not dealing with an empty tank of water.


----------



## Wasserpest (Jun 12, 2003)

Very intriguing M!



Hoppy said:


> If the ppm in the water in equilibrium with the air above the water is a near constant percentage of the ppm in the air, this is an easy problem, but Murphy's Law seems to dictate that it isn't anywhere near a constant percentage.


Let's hope it's Henry's law, not Murphy's law that applies here!

My concern would be the speed of response... if the CO2 rises in the water, how fast will it equalize in the (non-moving) air space and turn off the solenoid?


----------



## Darkblade48 (Jan 4, 2008)

Hoppy said:


> But, 30 ppm of CO2 dissolved in water isn't in equilibrium with 30 ppm of CO2 in air. My education is lacking in this field, so I have no idea how to even start to solve this.
> 
> Air can have a varying amount of CO2 in it. If it is .03% CO2, it is 300 ppm, but water exposed to that air will contain more like 3 ppm of CO2. If the ppm in the water in equilibrium with the air above the water is a near constant percentage of the ppm in the air, this is an easy problem, but Murphy's Law seems to dictate that it isn't anywhere near a constant percentage.


So it is an issue with the rate of diffusion, but also the solubility of CO2 in the water? 

I'm a microbiologist, not a chemist (though I have a minor, haha). Perhaps we need to get a chemist on this 



mistergreen said:


> Same reason not to to use tank water in a drop checker. The ph will be affected by other things besides co2 throughout the day like rocks, substrate, driftwood. We're not dealing with an empty tank of water.


Aha, I don't know why I missed this. :icon_roll


----------



## Hoppy (Dec 24, 2005)

As always, the biggest problem with trying to measure the concentration of CO2 in a planted tank is that it varies a lot from spot to spot in the tank. Near fast growing plants it will be low, compared to near the input of CO2 enriched water. Near the surface it will be less than in the middle of the tank. I once saw this demonstrated, when Plantbrain first played around with his $2000+ CO2 probe.

If this device can measure the concentration of CO2 in the air in a .03 thick sheet of air on top of the water, it should not take more than seconds to reach an equilibrium with that in the water, just below the surface. But, if that volume of air is a cube 6 inches on a side, it will take a lot longer. Or, if it is a large volume with a small interface with the water it will take even longer.

I still like the idea - and Murphy's Law, like Einstein's Relativity Theory, has yet to be found incorrect :icon_roll (Henry and I aren't acquainted.)


----------



## mistergreen (Dec 9, 2006)

I'll stuff it in a breather bag to test things out. I'll think about the design of the enclosure later.

Here's a link on how to interface it with the arduino
http://www.co2meters.com/Documentation/AppNotes/AN126-K3x-sensor-arduino-uart.pdf

I'll have to make a bunch of Close enough par sensors first before I get to this.


----------



## mountaindew (Dec 10, 2008)

This looks like it has potential.
Worthy of more r&d.
Keep the inovation flowing  mg
mD


----------



## mistergreen (Dec 9, 2006)

The sensor arrived.








Cost: $75 shipped

Will have to get some breather bags.


----------



## plantbrain (Dec 15, 2003)

I think you'd need close to 2000 ppm or so in the head space to get 25-30ppm in solution. I did the calculation back in 1998 for a class for CO2 rise and the impacts in freshwater. This assumes that the 2 systems are in equilibrium, but that is rarely the case. 

The issue is that the sensor will be slow, just like those Drop checkers. 
A pH meter and relative change in degassed vs enriched would work much better and be more responsive. 

In other words, a 90-100 pH meter would likely fit the bill much better.

Worth a shot though.

Since lag time is a factor, a pH/CO2 standard could be done using this at different times through the day for checking the pH meter vs the pH/KH/CO2 chart. But the lag time and stability of the system need accounted for.


----------



## mistergreen (Dec 9, 2006)

Thanks for the input.

Is a pH meter practical? You'd have to constantly calibrate your readings.


----------



## plantbrain (Dec 15, 2003)

mistergreen said:


> Thanks for the input.
> 
> Is a pH meter practical? You'd have to constantly calibrate your readings.


pH meter is, we have successfully used them quite well in the hobby for nearly 25 years.

For the $, I think you'd be better off with a good pH meter. You calibrate the probe maybe 1x a month or if you want to be very certain. Good general care for the tip etc.


----------



## Sotty (Aug 31, 2012)

If the sensor life expectancy lasts even half of the predicted >15 years quoted on the supplier site that could be an interesting pro for the new CO2 sensor vs pH probe systems as well. 

Assuming 1 year life span on double junction probes. (8 -14 months has been my personal experience) @ 35 bucks a probe. This obviously adds up.

And please tell me if I should be using better probes. that give me better longevity. Ive been going with the Milwaukee's and been happy with them since I usually get a year out of them with monthly calibration and gentle cleaning.

Tom, while I understand what you are saying about lag time and the sensor not being all that responsive, i think there is still one major advantage here. 

While the pH meter obviously has served us well and can tell us the maximum amount of CO2 that could be dissolved in our water for a given KH. This could finally help the hobbyist with more money than sense, that won't listen to me that the number on the chart is a maximum and continues to insist that his pH/KH chart tells him that he has 100ppm CO2 so his lackluster plant growth could not possibly be from lack of CO2 :icon_roll

But seriously Mistergreen I am excited about this. As a group I don't think aquarists accept change well. Its nice to see someone pushing the limits with new tech.


----------



## O2surplus (Jan 31, 2010)

Hey MisterGreen- This sounds like another really cool project. If the science involved can be sorted out and a fairly accurate prototype built, maybe we can build a "Close enough Ph Controller" too.


----------



## mistergreen (Dec 9, 2006)

Yeah, hopefully with this gizmo we can eliminate over gassing your fish and BBA.

In terms of response time, it should be a good as the $2000 CO2 sensor but not as accurate obviously


----------



## mistergreen (Dec 9, 2006)

I had a chance to play with it. It's reading ambient air with ~2000ppm of CO2 and as soon as I dunk it in water inside a breather bag it shot up to ~8000ppm - 10,000pmm (maxed out)... I contacted the manufacturer to see what's up. I though air was only suppose to have ~360ppm and CO2 in water is suppose to be less than air.


----------



## Hoppy (Dec 24, 2005)

How can a sensor like this ever be calibrated?


----------



## mistergreen (Dec 9, 2006)

There's a manual on calibration. I read briefly that it needed to warm up a little. I left it alone for 10 minute and it went down to ~800 ppm. The sensor was around a fan. I wonder if air movement or water movement shoots up the readings.


----------



## mistergreen (Dec 9, 2006)

Oh interesting. CO2 level is high in the room. I stuck it out the window and it went down to 400-500. That seems right. Time to dunk it in water again.


----------



## Hoppy (Dec 24, 2005)

Does this work by shining a beam of IR light through a length of air gap, and measuring the absorption in the wave length band that CO2 absorbs? If so, it must require a flow of air through the air gap. And, if that's the case there would be a minimum volume of air around the sensor that would be needed to refresh the air in the gap so it can follow the fluctuations in CO2 content. Or, am I off on a tangent here? :icon_roll


----------



## O2surplus (Jan 31, 2010)

Hoppy said:


> Does this work by shining a beam of IR light through a length of air gap, and measuring the absorption in the wave length band that CO2 absorbs? If so, it must require a flow of air through the air gap. And, if that's the case there would be a minimum volume of air around the sensor that would be needed to refresh the air in the gap so it can follow the fluctuations in CO2 content. Or, am I off on a tangent here? :icon_roll


Since reading that the sensor has to "warm up" a little while before it produces reliable readings- I'd bet your description of how the sensor works is accurate. Providing for gas flow through the sensor will be an important step to keep it working accurately. I'm wondering if the sensor and a very small fan or other air moving device, could be mounted remotely in a sampling tube. The sampling tube would connected at both ends to a chamber that has a open end submerged in tank water. The air trapped in the tube would be constantly recirculated through the sensor, while the Co2 concentration would be allowed to diffuse freely in and out of the chamber, Similar to how a ph drop checker functions.


----------



## mistergreen (Dec 9, 2006)

Yes,
it uses IR (non-dispersive infrared (NDIR)) to read the CO2 spectrum. It lights up when plugged in. It has 2 air ports for air movement. I think the issue when I dunked it in water, the breather bag collapsed to plug up the air ports. I'm building a proper plastic box for it now with a breather bag membrane. I'll use rubber bands to hold the bag on. I'll have to find something heavy to glue to the box so it would sink.










From looking at the ppm in the air, it shifts from 400ppm - 500ppm. I'm thinking it'll shift back and forth as well in water. So I'll plan to take the average reading within a certain time frame like 10 seconds or so.


----------



## mistergreen (Dec 9, 2006)

I made the box for this and threw in a bunch of washers to see how much weight it takes to sink the thing. It'll need a lot. Looks like this route is not a good one. I'm thinking suction cup is the way to go.

My only concern is there is quite a bit of air in the box but the membrane surface area is quite big so the gas exchange will be ok.


----------



## mistergreen (Dec 9, 2006)

Things look good for a bit!









1701ppm outside water










I didn't see any noticeable leak so I went ahead with the experiment









It took a few minutes but the ppm started dropping. It dropped 1 ppm every 2-3 seconds. This is totally responsive in an aquarium where we're looking at 9ppm - 50ppm max. The ppm is a lot more stable in the container compared to air. There was a 2-3 ppm deviation sometimes.

I wanted to see where it would wind up but the readings stopped and notice there was a little water. The experiment ended at 1648ppm. I'm drying things out now. Hopefully there's no permanent damage. I'll need more silicone and thicker band next time.


----------



## mistergreen (Dec 9, 2006)

whew, no permanent damage.


----------



## O2surplus (Jan 31, 2010)

Nice work so far! How are you getting the ppm readings? Is the sensor connected to an Arduino? If you've already written a sketch to do the math, have you thought about adapting it to run on one of the "close enough" PAR meters, just for fun? One from the latest batch could be re-flashed without to much trouble and your arduino would be freed up again for other uses.


----------



## mistergreen (Dec 9, 2006)

yup, it's connected through the arduino. It's outputting to the serial window for now.
Ultimately this application would work better as part of the DIY controller yes?
http://www.plantedtank.net/forums/showthread.php?t=192436

It'll be more efficient as a group of devices with a single controller. You can tell the solenoid to turn off at a certain ppm and on at etc....
The settings would be unique to each tank I think.
But for now I'm building as a single app for testing purposes.

I'll have to find a way to build a better casing. I'm worried the drop in ppm is due to air leaking.


----------



## O2surplus (Jan 31, 2010)

I like the idea of an aquarium "controller" per se, but I don't like the idea of tying in too many controls to one micro-controller. I would rather have a system that is comprised of "slave control modules"( each w/ it's own programming, that run stand alone and merely report their status to a main display), than a system of centralized control. Having all your functions tied in to a central controller sounds great until something malfunctions. Then your forced to take the entire system offline for repairs. The module based approach gets around this potential pit fall, because each module operates independent of a centralized controller, and can be repaired without having to take the entire system offline to do so. You could incorporate the CO2 sensor into a "stand alone- Ph control module" that reports it's status and receives commands from a central controller via the I2C communication protocol. Software could be written to allow the module to operate independently but with certain fail safes included to prevent unwanted malfunction.


----------



## mistergreen (Dec 9, 2006)

Ah, makes sense. This sensor can communicate through i2c. I'm using uart at the moment.


----------



## Hoppy (Dec 24, 2005)

When I tried one of those breather bags as a membrane for a drop checker I was disappointed in how slow it worked. The breather bag is designed to pass a very small amount of air per minute. If you used a membrane made for an oxygen sensor, which you can get at Perkin-Elmer (?), it should work a lot faster, but the membranes are extremely thin and easy to break. Avoiding small water or air leaks is a very difficult thing. You need a brainstorm session to come up with some kind of breakthrough for that. (And very good manual dexterity)


----------



## mistergreen (Dec 9, 2006)

I read silicone rubber is a good gas permeable substance. Will have to test that out.

I can literally mold a membrane to a case but I'd be worry of the fumes affecting the electronics.


----------



## Hoppy (Dec 24, 2005)

I think I read that most thin plastic films are gas permeable to some extent. But, to get much gas through them the film has to be very thin. Silicone would seem to be a good candidate, since it is one of the most "leaky" plastics used for hoses.


----------



## mistergreen (Dec 9, 2006)

I'm running the sensor again. No leaks so far. I put a lid with large holes on thinking the membrane will need a little protection in the future like from rasping algae eaters. That's one thing I have to think about is designing something that you can easily replace the membrane. I can see it clog up overtime with algae etc...

Ok, So the ppm is dropping at a rate of 2.7 ppm per minute. Still pretty good in terms of responsiveness.


I'll run it till the ppm bottoms out.


----------



## mistergreen (Dec 9, 2006)

The tub of tap water bottoms out at 970 ppmv <- per volume.

I just stuck it in a non-co2 aquarium and I'm watching the co2 rise as I write.... seem to be at 1009+ ppmv now.
So there is EXTRA CO2 in a low tech tank after all.


----------



## mistergreen (Dec 9, 2006)

The reading in the 10G low tech tank kept rising to 2700+ppm! Somethings wrong. 
I deduced that the membrane is facing the outflow of the filter. I suppose CO2 kept going through but can get out through normal diffusion.

So I placed the membrane face down. PPMs are falling. Interesting. This will help in the design.


----------



## Hoppy (Dec 24, 2005)

Have you figured out the relationship between the ppm in the air volume vs. ppm in the adjacent water? If the room air is at 500 ppm, and conventional wisdom isn't way off, that would correspond to around 3 ppm in the water. But, without that relationship the ppm in the air volume doesn't tell us much. I'm sorry my knowledge isn't sufficient for me to figure out the relationship.


----------



## mistergreen (Dec 9, 2006)

Not yet. I think I just need to convert the ppmv to ppmw <- by weight. That's what is used to measure co2 in water.


----------



## mistergreen (Dec 9, 2006)

Hoppy said:


> Have you figured out the relationship between the ppm in the air volume vs. ppm in the adjacent water? If the room air is at 500 ppm, and conventional wisdom isn't way off, that would correspond to around 3 ppm in the water. But, without that relationship the ppm in the air volume doesn't tell us much. I'm sorry my knowledge isn't sufficient for me to figure out the relationship.


is it as easy as this?

500ppmv = .0005 mole (500/1000000)
.0005 X 44.01 (molar weight of CO2) = .022005 / 1000000 = 2.2005 ppmw

(molar weight/1000 kg/m^3 = ppmw)
1000 kg/m^3 (density of water) = 1000000 mg/l


There are lots of assumptions of course like water density and temperature. If you want absolute accuracy, you have to take those into account.


So if this is right, the tub of tap water has 4.26ppmw of CO2

and my low tech tank this morning has 20.18 ppm of CO2


----------



## Hoppy (Dec 24, 2005)

That gives the right order of magnitude for ppm of CO2 in water. So, it can't be way off in theory, but it could be ignoring other factors that would alter the ppm. As long as we don't have unusual conditions, like very cold or very hot atmospheric air, very high or very low atmospheric pressure, etc. that should work. (I can't think of any other parameters that might affect it.)

From http://www.350.org/en/node/26 "Since the beginning of human civilization up until about 200 years ago, our atmosphere contained about 275 parts per million of carbon dioxide. *Parts per million is simply a way of measuring the concentration of different gases, and means the ratio of the number of carbon dioxide molecules to all of the molecules in the atmosphere.*"

http://www.xylenepower.com/Carbon Dioxide.htm is a very thorough discussion of CO2 in the atmosphere and in water, but it will take me many days to understand much of it.


----------



## mistergreen (Dec 9, 2006)

From looking at the formula, I know for sure the density of water affects the calculation. My simple formula accounts for pure water I believe. SO saltwater or very hard water will be off but hopefully by not too much.

You'd need a combo CO2 sensor and density sensor to figure out true concentrations in water. I wonder if the $2000 CO2 sensor is off as well  ... Then why pay $2000!?


----------



## Hoppy (Dec 24, 2005)

From Wikipedia: "The density of surface seawater ranges from about 1,020 to 1,029 kg·m−3, depending on the temperature and salinity. Deep in the ocean, under high pressure, seawater can reach a density of 1,050 kg·m−3 or higher." So, if the ppm of CO2 is directly proportional in some way to water density, even seawater would only introduce a 5% error, which would be a spectacular accuracy.

Over the range of 10C to 30C the density of water varies less than 1%.

I'm inclined to believe that we can ignore water density variations in measuring ppm of CO2 in water.

Plantbrain has long been advocating measuring CO2 with the plants. In other words the absolute value of the concentration of CO2 isn't important, as long as we have determined that we have as much as the plants need at the light intensity we have. Where a sensor like this would be valuable is for monitoring changes in concentration, and even a moderately accurate sensor would work for that as long as it is sensitive enough.


----------



## mistergreen (Dec 9, 2006)

I think I figured out a way to make the sensor more reactive. I placed the air ports right next to the membrane. It'll get co2 directly from the membrane instead instead of ambient co2 in the container. The readings will probably be more erratic. We'll see.


----------



## mistergreen (Dec 9, 2006)

dang it! sprang another leak. Will have to find another case.


----------



## Hoppy (Dec 24, 2005)

Is it possible to fill much of the volume of the air chamber with something like plastic beads? This would greatly reduce the air volume, making it inherently faster responding. Or, perhaps uncooked rice? Or, fit a saran wrap shroud around the sensor, then fill most of the volume with epoxy, making it a fitted case, with reduced air volume.

Just brainstorming!


----------



## mistergreen (Dec 9, 2006)

yup!, I built a simple laminated carboard base for the sensor. I can seal the base with silicone or I can build a smaller container that'll fit over the sensor. Seal that off from the bigger container.


----------



## mistergreen (Dec 9, 2006)

So I was wondering since I've been playing with measuring CO2. There's way more moles of CO2 in water than in air. 

So why do aquatic plants need more of it?


----------



## mistergreen (Dec 9, 2006)

Well, things look good. 

I found a little box with clasps at Michael's.








I built a little container within it out of acrylic sheets and silicon glue. The lip has silicon on it so it'll make a good seal with the membrane.

The top is the lid with a home made gasket make out of silicone.









Everything assembled with silicone for extra measure.









It is leak free.

So then it got dunked into my high tech tank.

It rose at about 1ppmw per minute. Final reading was 44.01 ppmw in my tank. It took 30 minutes to get there from 6 ppmw.

All in all a successful experiment. I have ideas on making it even more responsive. Adding more holes in the lid might help and I made a thin sheet of silicone I will replace the breather bag.

So now the next step if to hook this up to a relay to control the solenoid.


----------



## hedge_fund (Jan 1, 2006)

This is way over my head but it's cool seeing someone experimenting. That's how you further a hobby.


----------



## mistergreen (Dec 9, 2006)

hedge_fund said:


> This is way over my head but it's cool seeing someone experimenting. That's how you further a hobby.


It should be pretty simple once i work everything out. It reads co2 to control the solenoid to the co2 tank instead of the guessing game of bubbles per second, timer, or ph meters.

I really do hope this gizmo will wipe out killing your fish and the dreaded BBa. No more co2 swings. That was the primary motivation for working on this.


----------



## Hoppy (Dec 24, 2005)

Here are some silicone membranes: http://www.sspinc.com/ssp_store/Thin_Silicone_membranes_from_002_thick_to_040_21.htm
Tyvek, which is gas permeable - http://www.amazon.com/E-I-DuPont-Tyvek-Kitemaking-Material/dp/B001TO4QVA

Both of these should greatly improve the response time.


----------



## mistergreen (Dec 9, 2006)

hmm. have to check out the tyvek material. Wow, silicone membrane is expensive.It's probably the best for this purpose. I can probably make it for now. Silicone peels off wax paper pretty well.


----------



## Wasserpest (Jun 12, 2003)

Have you been able to confirm real world things, like CO2 fluctuations between day and night in your low tech tank?


----------



## mistergreen (Dec 9, 2006)

Wasserpest said:


> Have you been able to confirm real world things, like CO2 fluctuations between day and night in your low tech tank?


I'd have to write an app to log the data which wouldn't be hard. I wouldn't be interested looking at numbers all day long 
Actually, I just finished up a project and will have time to write up an app.

I have confirmed different CO2 levels in different tanks.

1. tub of tap water - 4.6 ppm
2. low tech in the morning - 20.18 ppm
3. hi-tech at peak levels (afternoon) - 44.01 ppm


----------



## mistergreen (Dec 9, 2006)

ok, just finished the app. I modified an app I wrote for the PAR sensor. I will run it tomorrow morning. I'll have it log every hour to a text file instead of every second which the CO2 sensor sends to the output pins.


----------



## mistergreen (Dec 9, 2006)

For fun, I ran the app. The lights are off in my low-tech.

There's a time stamp (h:m:s) with the co2 ppm.

log.txt


> 19:7:47 -
> 
> Serial Up!
> 
> ...


Looks like the trend is the CO2 builds up till the lights turn on. Who knew there was a natural CO2 generator in my tank .... Actually, I knew.


----------



## mistergreen (Dec 9, 2006)

I let the log app running all day. Here are the results.
Lights on at 9:35:0
Lights off at 17:35:0



> 9:24:59 -
> Co2 ppm = 18.70
> 
> 10:0:0 -
> ...


CO2 fluctuates with the lights. Pretty interesting. The swing is minimal so I'll use that as a model for the hi-tech tank. CO2 turns off at say 40ppm and back on at 35ppm. I'll probably wear out the solenoid with the constant switching. Peak CO2 should be when the lights are on also like the low tech, maybe that's the secret to BBA.


----------



## mistergreen (Dec 9, 2006)

I made my own silicone membrane between 2 pieces of wax paper. 









It's 1 mm in thickness about 3x as thick as the breather bag. It's also twice as reactive allowing about 2ppm per minute.

I also finished building the relay connections and will hook it up later today. I'll run for a month and observe fish reaction and BBa.

** oh, I just figured there's a mathematical limit to this sensor. You can only read 0 - 44.01 ppmw (this is what we want) and 0 -10,000 ppmv. It's good for growing plants. I probably had higher CO2 levels in my tank. I thought it looked suspicious that it stopped at 44.01ppm every time. I knew there's a reason why my fishes were so skittish.


----------



## Hoppy (Dec 24, 2005)

mistergreen said:


> I made my own silicone membrane between 2 pieces of wax paper.
> 
> 
> 
> ...


Wow, that is really carrying DIY to an extreme! Could you make a membrane about a tenth as thick? A mm seems much too thick to get fast response. Could you provide some details about how you made the membrane?

I don't think 44 ppm is high enough as an upper limit. I know Tom Barr has used higher levels of CO2 for some of his tanks, without sacrificing fish as a result. I think about 60 ppm would be the minimum desired max limit.


----------



## mistergreen (Dec 9, 2006)

I tried making it thinner but it was impossible remove in one piece. Well at least it's better than the breather bag. I also have a big sheet of vytek. I'll try that later. Making the silicone membrane was easy. A glob of silicone between wax paper and a rolling pin or in my case a wine bottle. Let cure for a few days and peel slowly of one piece and then let it cure completely.

I just did some equipment check and was trying to figure out why the relay wouldn't trigger the solenoid. It turned out the water still had 44+ppm of co2 in it. This is 6 hours after lights out.

I'm going to stay with ranges of 35- 40 ppm. My fishes just aren't happy with the amount I've been pumping in and BBa isn't completely eliminated. I've put the sensor farthest from the outtake so some area will be more than 40 ppm I'm sure.

Can you imagine the amount of co2 we're pumping into these tanks? Over 33x the amount in air.

I'll check the co2 sensor manufacturer if they make something higher than 10,000 ppmv. 
**** they do make a 30,000ppm and a 300,0000 ppm model but they're $250.

The 30,000 module should work. The maximum value is 132 ppmw.


----------



## mistergreen (Dec 9, 2006)

I just point my spray bar straight up. That should allow more o2 into the water.


----------



## mistergreen (Dec 9, 2006)

Darn it. I need a rigid screen under the membrane. The water pressure pushed the membrane against the air ports and skews the readings. That's why it was at maximum the whole time. 

I didn't have this problem in the 10g because the water pressure wasn't as great.


----------



## mistergreen (Dec 9, 2006)

tyvek fabric is not water proof 
Under pressure, water goes through the pores.


----------



## Darkblade48 (Jan 4, 2008)

mistergreen said:


> tyvek fabric is not water proof
> Under pressure, water goes through the pores.


:icon_eek: The electronics were not damaged, I hope?


----------



## mistergreen (Dec 9, 2006)

Well, this sensor is pretty rugged. It had been wet a few times. As long as I pull the power before any burning, it's fine.

Back to using the breather bag.


----------



## mistergreen (Dec 9, 2006)

Ok, everything is hooked up. The relay is hooked up to the arduino. It's on a timer as well.
In the future the timer would be integrated with the arduino.

The current reading is 11.57ppm.

I'll try to make another, thinner silicone membrane. I'll throw it in the oven this time (150F). I hear silicone cures faster in heat. The wax might melt on the silicone but I can remove it with a paper towel and an iron.


----------



## mistergreen (Dec 9, 2006)

I set the co2 to turn on an hour a head of the lights. It's 2 hours in and it's reading 30 ppm. My target is 40 ppm. I'll set it for 2 hours before the lights.

I could bump up the bubble rate but it's safer and the ph swing is gentler if I leave it be.


----------



## Hoppy (Dec 24, 2005)

I suspect that the sensor time lag is the reason for the still low ppm reading after one hour. Unless the sensor can reach the equilibrium reading in just a few minutes, its time lag will keep you from seeing the actual ppm of CO2 as it rises. That is why I think you need a "faster" membrane. I also think that the actual ppm in the water will reach equilibrium in less than an hour, probably a lot less, unless you have really poor water circulation in the tank. (Too bad I can't prove this!)


----------



## mistergreen (Dec 9, 2006)

Or too much surface agitation. I've pointed my outtake straight up which is fine.

The lag is a possibility as well since I had to put in a rigid screen under the membrane which further reduce the membrane surface area.


----------



## mistergreen (Dec 9, 2006)

Ok, I bit the bullet and bought .010" silicone from http://www.sspinc.com/ssp_store/Thin_Silicone_membranes_from_002_thick_to_040_21.htm

I could have gone thinner but I'm afraid it might be too fragile.
We'll see.


----------



## mistergreen (Dec 9, 2006)

Hoppy said:


> unless you have really poor water circulation in the tank. (Too bad I can't prove this!)


I think you're on to something with the poor water circulation. I stuck it in the corner behind plants to get it out of sight. It's more reactive out in the open by water movement. It's ugly but it works better.


----------



## UDGags (Sep 13, 2009)

Non-porous Teflon lets gas pass through but not liquids. It's used for this application when you bag and autoclave a composite.

The math at the beginning brought me back to Transport Phenomena class from undergrad. We always had to do those stupid gas diffusion problems.


----------



## audioaficionado (Apr 19, 2011)

mistergreen said:


> I think you're on to something with the poor water circulation. I stuck it in the corner behind plants to get it out of sight. It's more reactive out in the open by water movement. It's ugly but it works better.


Maybe a small powerhead or recirc pump blowing on it would help.


----------



## mistergreen (Dec 9, 2006)

From reading on the web, silicone seems to be the best material for gas permeability. I decided to take out the sensor and wait for my silicone membrane to arrive.

While inspecting the sensor, I noticed a nice slimy feel to the membrane. Bio-film had formed. I can see that building up and blocking gas exchange. If you were to design a housing, it's best to keep in mind that you'll need to wipe the membrane clean periodically. A weekly routine should work.


----------



## UDGags (Sep 13, 2009)

Yeah, I was suggesting something that's fairly common that could work. Other than having rolls of it at work, I know some came with my food dehydrator so figured I'd throw it out there. I agree the silicon is probably the best long term.


----------



## mistergreen (Dec 9, 2006)

I'll test out the Teflon sheet. I saw some Teflon heat transfer sheet on amazon for cheap. I'm going to use it to make silicone membrane  

It should be non-stick too so it's good making the membrane.


----------



## Hoppy (Dec 24, 2005)

The .010 thick silicone membrane will be very interesting! My bet is that the response will be about 10X faster with it, which makes the sensor very useful.


----------



## mistergreen (Dec 9, 2006)

Yeah, hopefully the new membrane will work great.

Hey, I just started a forum focusing on these tech tank projects. I'll be finishing up the rest of the experiment over there. Tpt is too large to learn technical stuff and it focuses on plants. It's a place for beginners to learn and for advanced people to innovate.

http://aquatictechtank.net

There's a lot of work still to fill up the knowledge base. Come join.


----------



## mistergreen (Dec 9, 2006)

The silicone membrane arrived! I just glued it to the box and waiting for things to cure.
I could have gone thinner with the silicone. It's pretty sturdy material.


----------



## mistergreen (Dec 9, 2006)

The co2 controller is a lot more responsive. I set the solenoid to turn off if greater than 42 ppm and turn back on at 40 ppm. I wish I have a clearer log of what's going on but it seems to be on initially for 2 hours, then off an hour then on for .5 hour and off .5 hour subsequent hours.

The fishes are a lot happier. [strike]No more late pearling but that's ok as long as the plants get their CO2[/strike]. 
There is slight pearling so the plants are happy too.


----------



## Hoppy (Dec 24, 2005)

Is the sensor noticeably faster in response with the new silicone membrane? A .001 thick membrane should make it respond about 10x faster, right?


----------



## mistergreen (Dec 9, 2006)

Yeah, it's noticeably faster than the breather bag. I'm not sure what the relationship is but .001 would be faster in theory.

Gas flow in and out easier. The breather bag seems to let co2 in but very slow in letting it out.


----------



## mistergreen (Dec 9, 2006)

Oh, if you're interested how the relay is connected to arduino, check out here
http://aquatictechtank.net/viewtopic.php?f=11&t=9&sid=cee8a2b6784a8de8e30c6cbc39805dc8&start=10#p19


----------



## coonass (Dec 11, 2012)

I'm not a chemist and this is only my second post around here, but I'm curious about this. Why are you bothering with membranes? Couldn't you mount the sensor in a container above the water's surface but open to the water. The concentration of CO2 in the air space should reach equilibrium with the concentration in the tank water. Then you could use Henry's Law to calculate the concentration of CO2 in solution.

_C_aq/_C_gas = 0.8317 for CO2 @ 25 C


----------



## mistergreen (Dec 9, 2006)

******* said:


> I'm not a chemist and this is only my second post around here, but I'm curious about this. Why are you bothering with membranes? Couldn't you mount the sensor in a container above the water's surface but open to the water. The concentration of CO2 in the air space should reach equilibrium with the concentration in the tank water. Then you could use Henry's Law to calculate the concentration of CO2 in solution.
> 
> _C_aq/_C_gas = 0.8317 for CO2 @ 25 C


Yup that's an option as well. If water floods the electronics, we have an issue. The membrane is a safer solution and responsive solution.

It's worth a try though.... Maybe the sensor can hang from the tank. Depending the the design, it could be affected by ambient co2 or slow in response. It's pretty amazing how much co2 increases when there are people around the sensor. You can use it to detect people.

I'll give it a try down the road.


----------



## mistergreen (Dec 9, 2006)

I did a quick sketch what do you think?









If the top is closed, it doesn't follow Henry's law any more since it's an enclosed atmosphere? It's like a drop checker at that point.


----------



## coonass (Dec 11, 2012)

mistergreen said:


> I did a quick sketch what do you think?
> 
> 
> 
> ...


Exactly! It is just like a drop checker but you are measuring CO2 directly rather than inferring it from a change in pH. Why do you say Henry's law wouldn't apply? With a drop checker, you have two aqueous solutions connected by an air passage, so the concentration of CO2 in the tank water equals the concentration in the test solution since they are both aqueous. If you measure the CO2 concentration in the head space, you have to calculate the concentration in the water using Henry's law. As long as bubbles of CO2 (or any other gas) aren't constantly rising directly into the test chamber and the pressure within is equal to ambient air pressure, the concentrations of gasses in the head space should reach equilibrium with the concentrations of gasses dissolved in the water at the ratios described by the Henry's law constants for the given temperature and pressure. You can't have the head space open to the atmosphere because the concentration of CO2 in the tank water is greater than what you would have at normal equilibrium. The tank is constantly outgassing CO2 into the atmosphere trying to reach that equilibrium like a big glass of carbonated water fizzing its CO2 into the air. The room will never reach equilibrium with the tank unless it is sealed because CO2 is constantly diffusing away. The head space must be sealed to reflect the concentrations of gas in the water below it. 

I would not clamp the test chamber to the side of the tank but rather build a floating platform so the pressure in the head space does not change as water level rises and falls. This could be as simple as an up side down plastic cup pushed through a piece of Styrofoam. In my opinion the use of a membrane of any type will only slow the response of the sensor (which will always have some lag as is).

This is a really cool idea. I just think it can be executed more simply without the dry box and silicone membrane.


----------



## coonass (Dec 11, 2012)

Hoppy said:


> There must be a relationship between ppm in the water, and ppm in the air trapped above the water. I assume the partial pressures of the CO2 would be equal, but what would the relationship be between the two ppm's?


Hoppy had it right from the beginning. Do this!


----------



## mistergreen (Dec 9, 2006)

Ok, this is worth a try out.
So what's the math here?

Say the sensor reads, 5000 ppmv in this drop checker.

I have to do 5000 x 0.8317 = 4158.5 ppmv? Then do the math to convert to ppmv to ppmw if I want. If that's the case I might have to do this to my current set up since it's a drop checker as well.

This design solves the ugly box in the tank problem 


The benefit with the membrane solution is you can place it different parts of the tank and measure the difference in 3D. I guess with this design it's the overall concentration of the liquid or in 2D (the surface of the water line).


----------



## mistergreen (Dec 9, 2006)

I went ahead and modify my existing sensor. I pulled the membrane out and put in a styrofoam raft. I'll test out the responsiveness of the sensor. There is probably .75" of head space all together with space behind the sensor as well.


----------



## coonass (Dec 11, 2012)

I went back through this thread and I didn't see that you calibrated this thing. What does it output? A mV reading? Are you applying an offset or multiplier to get the numbers you posted in ppm?

I would flow a pure gas other than CO2 through the sensor to set a zero point or derive an offset. Once you know that, whatever it reads in ambient air outside away from any local CO2 sources should equal approximately 0.00034 atm CO2 (don't know what that's supposed to be in ppm). What it reads in the head space of your test chamber should be the partial pressure (P) of CO2 above your tank. The solubility in air multiplied by 0.8317 should give you the solubility in aqueous solution. I've only ever done it in mol/L. Don't know anything about converting to ppm. 

Another thing to consider is that it looks like you are supposed to flow the gas through this sensor.


----------



## mistergreen (Dec 9, 2006)

The output is ppmv. It's pretty convenient. All the info is in the datasheet.

The sensor is sent out calibrated to atmospheric CO2 at 400ppmv or something like that.... They also suggest to use Nitrogen and that should give me a 0ppm... I'm not looking for absolute values so what came out of the factory to me is fine.


----------



## mistergreen (Dec 9, 2006)

******* said:


> The solubility in air multiplied by 0.8317 should give you the solubility in aqueous solution.


Yeah, that's what I thought. I should fix my code to do that. So with the new math, the maximum ppmw from the sensor will be 36.6ppmw.

I'm thinking about buying the 30,000ppm CO2 sensor :O


----------



## mistergreen (Dec 9, 2006)

The floating design seems to be as responsive as the membrane design.

I wonder how the humidity will affect the electronics in the long run though.


----------



## UDGags (Sep 13, 2009)

Can always pot the electronics in a polymer if you are worried about humidity. The water should act as a large thermal mass so I doubt it would get super hot.


----------



## mistergreen (Dec 9, 2006)

If you're interested in these projects, you can check them out on my forum.


----------

