Ribbit-Network / ribbit-network-frog-hardware

The sensor for the world's largest crowdsourced network of open-source, low-cost, GHG Gas Detection Sensors.
https://www.ribbitnetwork.org/
MIT License
94 stars 26 forks source link

Design CO2 Sensor Calibration Process for Sensor V1 #23

Closed keenanjohnson closed 2 years ago

keenanjohnson commented 3 years ago

The current CO2 sensor, SCD30, has two calibration modes: Auto Calibration (ASC) and Forced Recalibration (FRC).

After chatting with the sensor manufacturer, it seems like the ASC mode won't be effective given that the sensor assumes an ambient base CO2 PPM of 400.

From Vendor:

" Yes, the 400ppm ASC is assuming as CO2 background concentration is lower than the current global background CO2 concentration, but the same as the all other sensors on the market having a ASC functionality. The new SCD4x offers the possibility to set a different baseline value then 400ppm by the user."

Given this, we will likely need to do a forced calibration when the sensor is manufactured. The process for this needs to be designed and documented.

Attached are some background documents on the sensor: CD_AN_SCD30_Interface_Description_V1_D1.pdf CD_AN_SCD30_Field_Calibration_D1.pdf

keenanjohnson commented 3 years ago

This company seems like a good supplier of calibration gas if we go that route: https://www.calgasdirect.com/carbon-dioxide-calibration-gas-in-air/?sort=priceasc.

keenanjohnson commented 2 years ago

The other option would be to find a known calibrated sensor and calibrate to that sensors readings, but so far pre calibrated sensors seem more expensive than the calibration gas. I'm told Draeger sensors are the brand of choice and they tend to be ~$800 ish

keenanjohnson commented 2 years ago

Just to recap the discussion points above, there are two decisions to be made. First, should we utilize the Automatic Self Calibration mode or the Forced Calibration Mode

If we choose to go the FRC route, we would either:

Initially, I had thought that the FRC route made the most sense, but after talking it through with several others, I'm now convinced that the ASC method is the best compromise for now. Here's why:

PS I had to develop a better solution for this soon by working with a sensor vendor.

daveb377 commented 2 years ago

Are you also planning on rolling in altitude compensation from the Barometer?

eren-rudy commented 2 years ago

I'm on the same page with you regarding FRC calibration. The drift of the current affordable sensor technology just seems too high to be acceptable. Obviously the ASC isn't perfect either, but like you mention, if the true background CO2 -- as opposed to the depressingly-ever-more-inaccurate 'baseline' CO2 of 400 ppm -- is just 10 ppm higher than baseline after 2 years, for example, we are still in a better spot than potentially 160 ppm drift afforded by FRC.

This being said, it would be great if there was a way to improve upon the ASC method.

I like the idea of leveraging a smaller number of higher-quality sensors to increase accuracy. Perhaps someday we could have these maintained within our community, but in the nearer term it might be cool if we could somehow strategically target the East Bay in order to leverage the pre-existing BEACO2N network.

Another idea I had regarding ASC, which hopefully you could comment on since you've talked with the vendors in more detail: The 400 ppm baseline limitation seems fairly trivial from a sensor firmware perspective, you mentioned something about how the next generation (SCD40?) may have a way around this, is that true? My thinking is that if there was just a way to change the value of the 400 ppm calibration point year-by-year, that could theoretically offset the errors that it introduces.

keenanjohnson commented 2 years ago

@daveb377 yes altitude compensation is in! Check it out here.

daveb377 commented 2 years ago

I think the ASC calibration is the way to go. Providing a calibrated gas for a FRC seems relatively complicated for a consumer item, especially with a +/- 30ppm +3%. accuracy. It's concerning that the ASC approach assumes 400ppm is the floor. I'd have to think about the errors in general, I suspect you could do some ensemble averaging. I wonder what the EPA has to say. They've got a website here https://www.epa.gov/air-sensor-toolbox that I'll look through.

The Barometric pressure calibration is useful, but is another error source to look at, I'm not sure how the pressure effects the Sensiron reading, but I'm sure it's a factor.

keenanjohnson commented 2 years ago

Thanks for that feedback @eren-rudy and @daveb377. I think the answer is clear that the best path in the very short term is to enable the ASC algorithm. In the longer term, we should definitely continue to strive to come up with more interesting ways to achieve the best accuracy through the types of ideas you've mentioned above!

Since this issue is for version 1, I've created a new discussion here to keep this great conversation rolling and I continue to appreciate both of your thoughts are you continue to research the best path here!