You are at The Krib ->Plants ->CO2 [E-mail]

Cheap CO2 Controller (under $15)

by gb-at-dixie.cs.unc.edu (Gary Bishop)
Date: 21 Sep 92

I've designed a DIY CO2 controller and probe that costs only a few dollars to make. In fact, my controller and probe cost me much less than the solenoid valve they control. This controller combined with the simple manual CO2 system I described back in June, is maintaining my pH within 0.05pH and has been in continuous operation for 3 weeks.

I'd love to find a few collaborators to reproduce the design in order to be sure it works in other settings as well as it does for me. I only have a single tank, so I don't have much opportunity for experimentation. After some confirmation, I'd like to write it up for publication.

The basic operation of the system is simple though it took me about ten tries to find a workable implementation. The probe looks a little like this schematic view:


             _________________
             |       |       |
             |       |       |<-0.5 inch cpvc L fitting
             |   ____|____   |
             |   |  ___  |   |
             |___|  :a:  |___|
             :air:  :q:  :   :
~~~~~~~~~~~~~:   :~~:u:  :~~~:
 5/8" tube-->:~~~:  :a:  :   :<-glass bottle with reagent
             :   :  :r:  :   :
             -----  :i:  -----
                    :u:
 water              :m:
                    : :
                    :s:
                    :i:
                    :d:
                    :e:
                    : :
                    : :

[Editor's note: here is a better illustration, including dimensions. Also check Gary's diagram of the probe holder.]

CO2 from the aquarium water diffuses through the air trapped inside the probe into the water with pH reagent in the small glass bottle. The color of the reagent varies with the CO2 content of the aquarium water. Many of you will recognize this as the same system used by the Dupla continuous CO2 indicator, which consists of a tiny diving bell with reagent in a water sample that is separated from the aquarium water by an air gap.

The probe hangs over the side of the aquarium with the 5/8 inch open tube below the water surface and the small bottle inserted in a hole in a small box that is attached to the aquarium side with suction cups. The box contains a photoresistor and green LED from Radio Shack. Light from the green LED has to pass through the reagent to get to the photoresistor, which is shielded from exterior light. As the reagent goes from blue at high pH to green at low pH, the amount of green light that passes through and thus the resistance of the photoresistor changes.

We now have a pH probe (actually at CO2 content probe), that can be easily constructed from readily available parts, that should last many years and that requires little maintenance. The only upkeep is to replace the water sample and reagent at water changes. The reagent is the same as used in most pH test kits, bromthymol blue and is very inexpensive. In order to replace the reagent, you just lift off the U-shaped probe assembly and unscrew the little bottle from its cap, which has been glued into the cpvc L-fitting. Dump the old reagent, fill the bottle with aquarium water to which the proper amount of reagent has been added. Now replace the probe so that the bottle is inserted into the sensor box, and the 5/8 inch tube is below the water.

The rest of controller is comparably simple. It consists of a single IC (LM339 quad comparator), a voltage regulator (LM317LZ), 2 transistors (2n2222) to drive the solenoid, a LED status indicator, a potentiometer to set the level, and a few assorted resistors and capacitors. No pH or CO2 content indication is provided by the controller. It just turns the CO2 on when the resistance of the photoresistor in the probe rises above some level (pH is high) and turns it off when it drops below that level (pH is low). Hysteresis is provided by the aquarium water.

This probe is slow. It takes several hours to respond to a dramatic change in CO2 content. But this works fine since changes in CO2 content take several hours to happen in either direction. You could probably get into unstable behavior if your CO2 system drops the pH of your water quickly but you shouldn't do this for the sake of the fish anyway. In my tank the cycle is several hours on and off. My pH as I said earlier stays within 0.05pH of the setting.

With all new parts, I'm guessing that the controller can be built for under $15 (I built mine out of my junkbox). Add a 12 volt, power-cube style supply for about $5 and a solenoid valve for $24 and you've got automatic CO2 regulation for less than $45.

Is there someone out there who would like to collaborate on this design? Some electronics experience would be helpful.

gb

[Editor's note: here is a GIF of the schematic. Parts list follows...]

Parts List

Date: Mon, 9 Nov 92 13:59:09
From: Gary Bishop <gb-at-cs.unc.edu>

30k potentiometer
This is adjusted to give me about 1.9 volts across photoresistor R2 with a pH of 7.0. I did this so that I could make measurements on the 2 volt scale of my 3-1/2 digit multimeter picking up an extra digit. Any value that places the voltage near half the supply voltage would do.
R2 = CdS Photocell
RS 276-196(actually a photoresistor) from Radio Shack. They came 3 in a pack for $1. Just about anything sensitive to green light could be substituted here, include a photodiode or a phototransistor.
10k potentiometer
was something I had. It is 10 turn but that is probably overkill. The 56k and 33k were chosen to restrict the range of the voltage so that you get finer control. You get 5V/(56k+10k+33k)=51uA of current through them so the voltage range out is 1.7 to 2.2 volts.
1000uF capacitor
This filters the voltage across the photoresistor. I chose a big value to get a long time constant. In my implementation the resistance of R2 is about 13k so the equivalent resistance seen looking from C1 is R1||R2=8k. The time constant is (8k)(1000uF)=8s. Anything on the order of a few seconds would do.
1uF cap
Just eliminates some AC coupling into this relatively high impedance point.
LED1
RS276-022 green LED. Non-critical. Anything green that puts out enough light should do the job. Yellow will work also.
LED2
RS276-041 red LED. Non-critical. Just tells you when the solenoid is on.
D1
1N4005. Non-critical. This just stops the reverse kick from the inductance of the solenoid from killing the transistor.
U1
LM339 quad low-voltage comparator.
U2
7805 fixed 5 volt regulator.
Q1
2N2222. Q1 can be just about any NPN.
2 CPVC elbows
for 1/2" CPVC. CPVC is the beige stuff used for plumbing.
5/8 inch diameter clear tubing.
This is used as the intake tube that goes into the aquarium water and to join the 2 elbows. This is a good force fit into the 1/2" CPVC elbows (CPVC goes by inner diameter, the clear stuff goes by outer). I found it at the aquarium store, I have seen it at hobby stores as well.
3/4 inch diameter clear tubing.
This is used to provide mechanical alignment of the small bottle containing the reagent. It is wrapped with black construction paper into which two 1/4 inch holes have been punched. The holes allow light to pass through the reagent. The black paper prevents the light from taking other paths. You could dispense with this and the paper surrounding it by using a short piece of 3/4" inner diameter pipe like PVC. You could drill some holes for the light to pass.
clear bottle.
This was the hardest to find. I found mine at the pharmacy with "Oil of Peppermint" in it. It has a screw on cap. I have seen these very same bottles for sale empty at the sort of places that let you pan for your own gold. I'd love to find a source for these. The bottle is 5/8 outer diameter and about 1.5 inches tall. The cap fits nicely into the CPVC elbow. I glued the cap into the elbow with some GOOP to assure an airtight joint. The little bottle holds maybe 15ml. I drilled a hole in the cap that matches the size of the opening of the bottle.
O-ring.
I bought this at the hardware store. They had a metal box with all sizes. I chose one that fit nicely into the screw-on cap of the little bottle.
2 Suction cups.
I got these from the aquarium store. They are clear plastic. I drilled holes in the plastic box so these would be a force fit.
box.
I used the RS270-230 which is 3.25 x 2.125 x 1.125. I believe the electronics could be put in this box as well.
Up to CO2 <- Plants <- The Krib This page was last updated 29 October 1998