Jump to content

Measuring RH and CO2


Recommended Posts

23 hours ago, Ed Davies said:

I've said it before on here but I'm a bit sceptical about those MH-Z19s as they calibrate by assuming that the CO₂ will go down to 400 ppmv at regular intervals. I'm not sure that assumption is sound.

 

I just noticed Home Assistant has an action to trigger a calibration cycle:

  mhz19.calibrate_zero Action

 

My idea is to hook this up to the MVHR so it does a (weekly? monthly?) 20min highest level boost and run the calibration then.  It might also work to do it opportunistically when other events trigger boost, but they tend to involve humidity changes so may not be the best time to do it (per @SteamyTea above) and also needs interlocking to ensure the boost remains on for 20+ mins.

 

In the meantime (i.e. before we have MVHR) it's a case of open all the windows up on a windy day, and press the calibrate button.

 

btw most these sensors seems to have accuracy in the 50+ ppm range, so the gradual rise of global CO2 levels is not going to seriously impact their performance until we have much bigger things to worry about.

 

 

Edited by joth
Link to comment
Share on other sites

On 04/02/2020 at 10:23, joth said:

 

I just noticed Home Assistant has an action to trigger a calibration cycle:

  mhz19.calibrate_zero Action

 

My idea is to hook this up to the MVHR so it does a (weekly? monthly?) 20min highest level boost and run the calibration then.  It might also work to do it opportunistically when other events trigger boost, but they tend to involve humidity changes so may not be the best time to do it (per @SteamyTea above) and also needs interlocking to ensure the boost remains on for 20+ mins.

 

 

Hmmmmmmmm not sure this will be worth all the bother really. I ran the calibration cycle with all windows open yesterday morning, and overnight the numbers were even more whacky post-calibration, over 3600ppm.

Again I'll let this run for a few more days and see if it settles. Also it might well be a duff unit / QC reject I suppose. Eitherway I think I've had a fun mini-project proving @Ed Davies's point.

 

 

image.png.c8a3fda07c36650f6e4c6eb9a6068568.png

  • Like 1
Link to comment
Share on other sites

I've been using some surplus Telaire 6004 NDIR modules that I bought a while ago for some time now.  They need the CO2 concentration to drop to 400ppm once every couple of weeks to do their "intelligent calibration" thing, and realistically the house never gets below about 420ppm, so there is always a small calibration error, but the results are good enough as an indicator of air quality.  I can cross check the fixed sensors with a portable unit I built, that uses the same sensor.  By leaving the portable unit outside when there is a decent breeze I suspect the CO2 concentration drops to as low as it's likely to get.  So far I've never seen more than about a 10ppm difference between the sensors.  Right now the sensor in the hall here is reading 580ppm, which seems  about right.

Link to comment
Share on other sites

Is it possible to suck the CO2 out of the air for calibration purposes by adding something like calcium carbonate (in a container), or maybe just reducing it to a known level by heating up some distilled water and letting that absorb some.

Or maybe just 'burping' a jamjar with nitrogen. 

 

RH sensors can be calibrated in a similar way with a salt, or copper sulphate solution, just wondering if something similar is possible.

Link to comment
Share on other sites

So it seems the calibration loops are purely about finding the zero-offset? So may explain a +/-400 error or so?  They can't possibly explain my error though, I'm assuming 3600ppm in this relatively draughty house can't possibly be possible.

I'm debating whether to buy a second MH-Z19 to run next to the first and see if they're consistently overreading by soe much, or buy (or rent?) an  expensive handheld air quality meter as a reference, or get one of these other less inferior sensors to continue the DIY with (but I2C bus and hand-crafted driver sounds like more investment in time) or just give up :) 

 

Edited by joth
Link to comment
Share on other sites

Buildhub should set up a calibration service.

I always wanted to work in the calibration office where I did my apprenticeship.  It was cleaner and quieter than the toolroom, and women worked in it (I worked for an American company and there was not one female engineer in the whole place, seems odd looking back at it now).

Link to comment
Share on other sites

36 minutes ago, Jeremy Harris said:

@joth  I may have a spare Telaire 6004 somewhere.  They have a serial interface running at 9,600 baud IIRC.  I could try and dig one out if I can remember which box I put them in when we moved. . .

Oh yes, if you do manage to find it I could be very interested to buy it.  I'll need to research drivers for it, but I'm don't mind getting my hands dirty with that (I feel myself being gradually drawn into this world of ESP8266)

My plan B would be to buy a ZyAura as the built in display on that maybe convenient and it has an ESPHome driver already. If I'm careful with the soldering I maybe even able to squeeze the D1 mini into the case with it

 

 

53 minutes ago, SteamyTea said:

Buy one, then I can calibrate the cheap ones I have bought.

You know you want to.

Hint taken! Well, I think this has dropped down to  my"plan C" now, but having a reference device for this in the buildhub library could be useful  I agree. If I do end up on this path I'll certainly be open to  making it available on loan.

Edited by joth
Link to comment
Share on other sites

4 minutes ago, joth said:

I feel myself being gradually drawn into this world of ESP8266

Are you using MicroPython on them.

@TerryE knows a lot about them but he uses a different language, and I don't really want to learn too much as I struggle with programming.  As soon as I see a {} I get nervous.

  • Like 1
Link to comment
Share on other sites

6 minutes ago, joth said:

Oh yes, if you do manage to find it I could be very interested to buy it.  I'll need to research drivers for it, but I'm don't mind getting my hands dirty with that (I feel myself being gradually drawn into this world of ESP8266)

My plan B would be to buy a ZyAura as the built in display on that maybe convenient and it has an ESPHome driver already. If I'm careful with the soldering I maybe even able to squeeze the D1 mini into the case with it

 

 

Shouldn't need any sort of driver, as it has a standard UART serial interface, running at 9600 baud.  Might need level shifting, though, as it's a 5V device.  Here are the data sheets I have for it:

 

6890478_T6004_Application%20Note.pdf

 

UART_SPI_6004_X04_Protocol_02.pdf

 

Looking at my code, it just spits out the following 8 bytes at 9600 baud to the Telaire module to ask it to send data: $FF $FF $FE $02 $02 $03 $76 $05

and then receives back 6 bytes of data (also at 9600 baud) from the module.  I've just ignored the first 4 bytes and concatenated the last two bytes into a 16 bit word that is the CO2 ppm value.  I went on and converted this to five ASCII bytes, as both the data storage and display uses ASCII.

 

I'll have a dig around and see if I can find one.

  • Thanks 1
Link to comment
Share on other sites

2 hours ago, SteamyTea said:

Are you using MicroPython on them.

@TerryE knows a lot about them but he uses a different language, and I don't really want to learn too much as I struggle with programming.  As soon as I see a {} I get nervous.

 

ESPHome is C++  (wrapped in YAML), but it looks pretty clean really, { and } aside,  I can now even cope with these new fangled C++11 keywords.

 

1 hour ago, Jeremy Harris said:

Shouldn't need any sort of driver, as it has a standard UART serial interface, running at 9600 baud. Might need level shifting, though, as it's a 5V device

 

Ah sorry by "driver" I meant SW driver, a few lines of code to read off the UART. (So far I've done everything through YAML config only).

 

But yes, good point the ESP8266 is only rater to take 3.3V on the GPIOs (datasheet, page 17) , but it looks like over voltage protection only kicks in a about 6V so people generally get away with 5V input.

I also see the Telaire 6004 has a 0-4V analog output, so that would be another very easy way to grab continuous readings. 

 

 

Link to comment
Share on other sites

Small update:

Last night I managed to retrofit an ESP-01 into a ZyAura ZGm053U sensor, and that's been running overnight. The initial numbers show it is pleasingly close to the MH-Z19B, which is good as if they were wildly out I'd really be needing to buy that third CO2 meter from @Jeremy Harris to cast the deciding vote between them! I t definitely helps that after a week (and 2 calibration cycles) the MH-Z19  has settled down to far more convincing readings. Not just in terms of zero offset, but the max readings are generally half what they were (1000-1500 overnight, rather than 3000+)

Interestingly it does confirm what I already know - that it's actually the Temperature reading that's much further out of  whack with the MH-Z19 -- consistently over-reading by 5°C. (The MH-Z19 is only reporting to 0 decimal places anyway, so not a very useful or pleasing graph at the best of times)

 

image.thumb.png.831dd24244d79fcc487faf4b5bfa5dc5.png

(aside: at 6.30am I got up and rode the stationary trainer bike in the room next door -- you can actually make out a dip and then peak of CO2 from that excursion on both sensors.) 

 

The hack to get an ESP-01 into the ZyAura is a work of art in its own right; I'll post a photo and details when I've tidied it up a bit.  Also, I'm finding ESPHome a continuing delight to tinker with like this.

 

Edited by joth
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...