Welcome to ScapeCrunch

We are ScapeCrunch, the place where planted aquarium hobbyists come to build relationships and support each other. When you're tired of doom scrolling, you've found your home here.

Co2 detector

Got the sensor assembled. My goal is to keep the footprint as small as possible as this would be breaking my rule about wires/sensors being in the display tank. If I put it in my sump, I'd have to make it much larger to accommodate fluctuating water levels (would dull the response time) or overengineer a floating sensor. With the small air pocket, I'd expect a very small delay of ~20 mins for the read.

For anyone that wants to try, here is my process. Will make the cad file available on request.

I coated the sensor board with epoxy (similar to my TOF sensor in my journal) since it will be the most exposed to humidity.

20261120_103648.webp
I also put a ptfe membrane in the sensor cavity, and the inverted bell. This is to help protect the sensor from inadvertently getting splashed or hopefully from dying if condensation forms if the board is off during say a power outage.

20261120_130913.webp

20261120_130923.webp

Next I soldered the sensor to a Xiao Esp32 c6, in an effort to keep the footprint as small as possible.

20261120_134142.webp

To keep it airtight, I filled between sensor and the Esp with neutral cure silicone, then pressed the Esp in, and topped off the the silicone there too. Decided with silicone instead of epoxy or potting compound because if push comes to shove, I can dig it out and recover the sensor, the downside is that silicone can allow gas to permeate slowly but shouldn't affect our purpose too much. With the sensor, esp32, and silicone potting, it sits at a steady 38C which should be plenty to keep condensation off the sensor.

20261120_211155.webp

For size comparison to one of my drop checkers:

20261120_175036.webp

20261120_175029.webp

I have to let the silicone cure for at least a day, then will seal the cap on with a other layer of silicone as a second seal. So will be a few impatient days before I can install and see if it works well enough to be something.

For now, it's recording the air just above the display tank, but working okay and transmitting reads.

Screenshot_20261121_201559_Home Assistant.webp

If anyone has any ideas how to calibrate it, would love to hear your thoughts. These sensors are factory for a 0-5000ppm (±40 ppm + 5% of reading) range, but can read up to 40,000ppm at an unknown error. 30ppm in water would be equivalent to ~20,000ppm in air.

The low end can be done in outdoor air. I'm thinking some sort of fixed volume container filled with co2 then pressure equalized. I've ordered a few luer fittings and valves from aliexpress to try to build something of that sort.
 
How nice to see you've taken the small form factor for this concept to another level! (y) I'm not going there, I don't like soldering.

If anyone has any ideas how to calibrate it, would love to hear your thoughts.
I don't calibrate the sensor, as it it factory calibrated. But I've planned to see someone who ownes the $3.5k co2 sensor we all know exists out there and compare the result. I bet is comes close, but more importantly: the absolute value doens't matter, but the relative trend/differences do!
When I use PETG filament and I want to know sure it's water and air proof, I use epoxy resin ass an additional layer.

If I follow the rationale of physics I like your pyramid shaped gas chamber. I'm happy to hear how much lag time you have without using a fan in the gas chamber. What do you think about the aspect that CO2 is heavier than N2 and O2? Do you think the gasses might now be fully are mixed so it might misread the actual CO2?

Do let us know when you've put it in use and what you think of it.

Cheers!
 
How nice to see you've taken the small form factor for this concept to another level! (y) I'm not going there, I don't like soldering.


I don't calibrate the sensor, as it it factory calibrated. But I've planned to see someone who ownes the $3.5k co2 sensor we all know exists out there and compare the result. I bet is comes close, but more importantly: the absolute value doens't matter, but the relative trend/differences do!
When I use PETG filament and I want to know sure it's water and air proof, I use epoxy resin ass an additional layer.

If I follow the rationale of physics I like your pyramid shaped gas chamber. I'm happy to hear how much lag time you have without using a fan in the gas chamber. What do you think about the aspect that CO2 is heavier than N2 and O2? Do you think the gasses might now be fully are mixed so it might misread the actual CO2?

Do let us know when you've put it in use and what you think of it.

Cheers!
Thanks!

Calibration: I already get the relative trend from my pH probe, so the absolute number is really what I'm after. The SCD41 is only specified up to 5,000 ppm, and at 15-30 mg/L the chamber sits around 10,000-20,000 ppm, so I think it needs checking at the higher range at least for a real number.

I'd love to see your result against the reference meter. It's also worth making sure automatic self-calibration is off on your sensor, since it expects regular fresh air and is turned on by default. Outdoors this morning it sat at 280–296 ppm, averaging about 287. Real outdoor air is about 425–430 ppm, so I ran the built in calibration. If it's a fixed offset, then no big deal as it translates to less than 1% at 30ppm in water, but in the unlikely event that it scales, it could be reading as much as 30% low at 30ppm.

CO2 being heavier, I don't think mixed gases settle out by weight at this scale. Without a fan the mixing is diffusion, which takes seconds across 1 cm. The slow step is CO2 crossing the water surface either way.

For the lag, I will post real numbers soon (if my sensor doesn't leak 😁). Epoxy would work well, but I don't have anything thin enough for a skim coat right now, hoping the petg at 100% infill and 1.02x flow rate is enough since its printed upright.

Long term, id love to go even smaller, on a custom pcb, but need to see if the test setup works first. Sensiron also has a new sensor on the way, the SCD53 that is laser based and sealed instead of photo acoustic, so I think it will suit even better and does not need fresh air calibration either. No new info on their release yet, just says Q4 2026, but I'd wait for this before making another version.
 
Calibration: I already get the relative trend from my pH probe, so the absolute number is really what I'm after. The SCD41 is only specified up to 5,000 ppm, and at 15-30 mg/L the chamber sits around 10,000-20,000 ppm, so I think it needs checking at the higher range at least for a real number.
I can imagine you're after an absolute number and want to calibrate against a valid number in higher range. My goal was ditching the pH monitor, as it is way to sensitive including it's calibration.

It's also worth making sure automatic self-calibration is off on your sensor, since it expects regular fresh air and is turned on by default. Outdoors this morning it sat at 280–296 ppm, averaging about 287. Real outdoor air is about 425–430 ppm, so I ran the built in calibration. If it's a fixed offset, then no big deal as it translates to less than 1% at 30ppm in water, but in the unlikely event that it scales, it could be reading as much as 30% low at 30ppm.
Yes, calibration is only user triggered in my setup. As you know calibration is against 420 ppm so yes, we don't know it's effect in higher range.
Long term, id love to go even smaller, on a custom pcb, but need to see if the test setup works first. Sensiron also has a new sensor on the way, the SCD53 that is laser based and sealed instead of photo acoustic, so I think it will suit even better and does not need fresh air calibration either. No new info on their release yet, just says Q4 2026, but I'd wait for this before making another version.
When module of the SCD53 comes out, I would be much interested. I see Adafruit has the SCD43 out as well, but the spec bump doesn't get excited and would only order it when my current ones brake down.
 
Wish I had a better update. I popped the sensor into the tank yesterday evening around 6pm, and it started off very promising - it had a large offset, but the trend line was following the pH/kH method fairly closely - but this morning, it looks like its lagging more and more. Best guess, its water tight, but not co2-tight, and the gas is leaking through the print layers towards equilibrium in the room :cry:.

I did also notice lots of micro-bubbles on the outside of the print surface late last night. Might have needed that epoxy coat after all @PeerUnk .

1795547381945.webp

So while not the best result, it still looks promising. Back to the drawing board for the enclosure though. I'll be back soon with hopefully a better outcome.
 
You Must Star Wars GIF by Regal
 
Okay, new plan.

After tearing down the old sensor - water had filled up the entire pyramid cavity and the holes to the sensor - the ptfe did its job though and kept liquid out of the circuitry so the sensor is fine!

I decided not to take the chance with a 3D printed cup again - so I spent a bit of time designing and milling one out of some scrap 1" acrylic.

1795711061238.webp

I designed an insert that will hold the potted electronics, with the ptfe membrane that will friction fit into the acrylic cup, along with a friction fit sleeve and an adjustable hanger for the tank.

1795711344070.webp1795711196052.webp


Overall size grows a little bit - but still not too bad. Use real potting compound this time too instead of silicone so it flows into the crevices more.

1795711360316.webp1795711398400.webp

Just waiting for the potting to finish curing, assemble, and I'll pop it back in the tank tonight. I think this is the one.
 
Did you mill the acrylic piece on a CNC machine? That doesn't look like something done by hand.
Yes! I have no idea how to hand mill anything 😂

It still took me 3 attempts, and about 35 mins of actual cnc run time per part to get the fitment right, and then another half hour to wet sand out all the mill lines to make fitment smooth.
 
New design is working! Just need to figure out how to calibrate the high range. I'll also rerun the pH probe calibration and a higher sensitivity Kh test to see how far apart the readings truly are, right now about 3-4 ppm on average lower than the pH/Kh method.

The other thing, it seems the sensor response is actually faster than that of the pH method, probably partly due to the pH probe being in the sump, and the sensor being in the display where the co2 water hits first. Still, pretty exciting to see such a quick response vs the pH and of course a drop checker.

Screenshot_20261127_194447_Home Assistant.webp


20261126_174839.webp

20261126_174920.webp
 
New design is working! Just need to figure out how to calibrate the high range. I'll also rerun the pH probe calibration and a higher sensitivity Kh test to see how far apart the readings truly are, right now about 3-4 ppm on average lower than the pH/Kh method.
Clean build! I’m glad for you your hard work paid off. Be aware carbonates (KH) isn’t the only buffering system for pH as phosphates and organic compounds buffer the pH as well.

You might want to use the titration set of Hanna to compare against as well?

 
Will you be putting them on Cyber Monday sale? 😁😁😁

Or do we need to wait for Boxing Day 😅💯💯🎁
Let me figure out calibration first 😅
Clean build! I’m glad for you your hard work paid off. Be aware carbonates (KH) isn’t the only buffering system for pH as phosphates and organic compounds buffer the pH as well.

You might want to use the titration set of Hanna to compare against as well?

Yes, that's why I think high point calibration independent of pH/Kh is so important. I tried recalibrating my pH probe today, with a couple sets of (older) buffers and the readings didn't agree, so have some new buffers coming next week. It's thrown the data off my co2 rise this morning, so no new data to share results on yet.

I have an idea right now, and will see if it works.

I've ordered a large 5L jar, will measure the volume with water, then attach some valves. I'll flush the fill with co2, and release to ambient pressure. With the sensor inside, I should be able to put the reading up against something I can calculate. Will also work on if I can borrow a calibrated co2 analyzer which could work in the same chamber without worrying about volume calculations.
 
So, still waiting on some supplies for the upper range calibration test - but learnt a couple of things since.

The co2 sensor preceding the pH made no sense, so I moved the pH probe out of the stilling well where it was protected by my gorilla hands, and placed it close to the return pump intake. pH is so much more responsive, and I'm not seeing the big pH steps from the Yugang anymore - no wonder tuning the CO2 was such a chore before 🤦‍♂️.

Now, I see about a 24 minute delay from the pH drop to the co2 sensor - which makes a lot more sense. After a few days in, I also noticed that the delay increased to about an hour - so found a biofilm layer built up at the air/water interface of the sensor - not sure if its due to the tank being so new still, or if I need to direct a bit more flow to the sensor area.

1796044517025.webp

Either way - the co2 sensor is reading within about 2ppm of the pH/kH method after clearing the biofilm and moving the probe.

1796044426074.webp

My kH is still a variable target as its dropping 0.1-0.2º per day as my remin. water slowly replaces my tap water - so take this with a grain of salt until I recheck/calibrate the pH probe and try out the upper range gas calibration.

Still - even with those caveats, its looking reallll good.
 
Back
Top