30-09-2017, 20:19
Air Quality Monitor - How to upload data to ThingSpeak.
30-09-2017, 20:30
(30-09-2017, 11:27)JT118 Wrote: It seems as if 327199 has the most realistic diurnal range of 390ppm to 490ppm. Why is this so different to the rest of us is worth asking. Hornychz??
I'm sure that Hornychz will reply as soon as he can. I believe that he is still using the first type of CO2 sensor that we used when the AQM project was started.
I have abandoned the development for it... mainly because I prefer to use only sensors with a digital output, instead of analog output. The experience with the Sharp was been quite "traumatic"
30-09-2017, 20:40
http://www.yoctopuce.com/EN/article/how-...co2-sensor
I know this article does not refer to the MH-Z19, nonetheless it is interesting to see how the ABC function works. It seems as if mine is the "B" version and therefore has the ABC function built in. This does not seem to be a good idea if we are trying to measure atmospheric CO2. The ABC function works on the premise that the sensor will at some stage in the day sit in an atmosphere of 400ppm. It assumes air which has been drawn in from outside to be at this level. It is this "normal" that the calibration is done against.
I think these sensors are really designed for HVAC systems in for example schools where concentrations of humans can significantly increase CO2 levels in a room. The sensor picks this increase up and triggers the ventilation system to let in fresh air. At night (for example) the sensor recalibrates itself on the assumption that the air in an empty room is at 400ppm.
If our sensor is left outside it will recalibrate itself to an assumed 400ppm at regular intervals irrespective of the actual CO2 ppm levels.
Having said all this, this does still not explain the large ranges we are experiencing. If our sensors do have the ABC function we should see more normal ranges even if the air has fooled the sensor into calibrating 400 ppm in an atmosphere that is actually at for example 420 ppm.
If the sensor does not have ABC one would think it would have been calibrated at factory in a controlled environment, and that the sensor would drift off that calibration, for the reasons outlined in the link above over time, but not day to day.
My thought is that the sensor is sensing as a proportion of the 0-2000 range and reporting it as a proportion of the 0-5000 range, ie multiplying the range by 2.5. This is real stab in the dark and I am not sure if this is even possible.
I know this article does not refer to the MH-Z19, nonetheless it is interesting to see how the ABC function works. It seems as if mine is the "B" version and therefore has the ABC function built in. This does not seem to be a good idea if we are trying to measure atmospheric CO2. The ABC function works on the premise that the sensor will at some stage in the day sit in an atmosphere of 400ppm. It assumes air which has been drawn in from outside to be at this level. It is this "normal" that the calibration is done against.
I think these sensors are really designed for HVAC systems in for example schools where concentrations of humans can significantly increase CO2 levels in a room. The sensor picks this increase up and triggers the ventilation system to let in fresh air. At night (for example) the sensor recalibrates itself on the assumption that the air in an empty room is at 400ppm.
If our sensor is left outside it will recalibrate itself to an assumed 400ppm at regular intervals irrespective of the actual CO2 ppm levels.
Having said all this, this does still not explain the large ranges we are experiencing. If our sensors do have the ABC function we should see more normal ranges even if the air has fooled the sensor into calibrating 400 ppm in an atmosphere that is actually at for example 420 ppm.
If the sensor does not have ABC one would think it would have been calibrated at factory in a controlled environment, and that the sensor would drift off that calibration, for the reasons outlined in the link above over time, but not day to day.
My thought is that the sensor is sensing as a proportion of the 0-2000 range and reporting it as a proportion of the 0-5000 range, ie multiplying the range by 2.5. This is real stab in the dark and I am not sure if this is even possible.
01-10-2017, 01:58
(30-09-2017, 22:27)JT118 Wrote: I think these sensors are really designed for HVAC ...
That seems right and coincides with what the manufacturer says:
"MH-Z19 NDIR infrared gas module is widely used in the HVAC refrigeration and indoor air quality monitoring."
Despite there is no reference to the ABC function on the MH-Z19 datasheet, as happens in the MH-Z19B datasheet, its possible that the MH-Z19 also have the ABC function, we just don't know if it is enabled or disabled by default.
In any case, at least for the B version there is a command to disable the ABC function. I have no idea if that command works with the non "B" version.
This site have some interesting info about the MH-Z19:
https://revspace.nl/MHZ19
01-10-2017, 08:45
I'm happy to say that I now have my AQI Monitor working (indoors right now) and data is going to Thingspeak:
https://thingspeak.com/channels/339087
I had a problem uploading though which took me some time to identify. I'm using the latest Pro2 PLUS RX software of course, dated 19 September, and eventually found an error in Air Quality Monitor section of the "config_RX" tab:
// ---- Air Quality Monitor - Upload to ThingSpeak Settings ----
#define Enable_AQMtoThinkSpeak 0 // 1= Enable, 0= Disable
#define TS_WriteAPIkey "xxxxxxxxxxxx" // Put her your ThingSpeak WRITE key
Changing the "k" to "g" solved the problem and data began to flow about 10 hours ago, although I did accidentally reboot the AQI Monitor board this morning. I have too many devices using plug-in power supplies and will have to start labelling them to make sure I don't switch off the wrong one again!!
Allan.
https://thingspeak.com/channels/339087
I had a problem uploading though which took me some time to identify. I'm using the latest Pro2 PLUS RX software of course, dated 19 September, and eventually found an error in Air Quality Monitor section of the "config_RX" tab:
// ---- Air Quality Monitor - Upload to ThingSpeak Settings ----
#define Enable_AQMtoThinkSpeak 0 // 1= Enable, 0= Disable
#define TS_WriteAPIkey "xxxxxxxxxxxx" // Put her your ThingSpeak WRITE key
Changing the "k" to "g" solved the problem and data began to flow about 10 hours ago, although I did accidentally reboot the AQI Monitor board this morning. I have too many devices using plug-in power supplies and will have to start labelling them to make sure I don't switch off the wrong one again!!
Allan.
01-10-2017, 14:54
Wow!
Man is gone for a few days and there's such a shout of posts!
I did not even read it ...
In addition, 1 my camera has stopped working and my sensor PMS7003 is probably definitely dead ...
But to our point, my CO2 sensor is version B:
![[Image: DSC_8329-upr-sm.jpg]](https://brandys.my-meteo.net/MyDocs/Forum/DSC_8329-upr-sm.jpg)
(My old AQM is still outside in the garden, but turned off - it means that it is possible to turn it on!
But there is a collision with my new AQM.)
Man is gone for a few days and there's such a shout of posts!
I did not even read it ...In addition, 1 my camera has stopped working and my sensor PMS7003 is probably definitely dead ...

But to our point, my CO2 sensor is version B:
![[Image: DSC_8329-upr-sm.jpg]](https://brandys.my-meteo.net/MyDocs/Forum/DSC_8329-upr-sm.jpg)
(My old AQM is still outside in the garden, but turned off - it means that it is possible to turn it on!
But there is a collision with my new AQM.)
01-10-2017, 21:58
01-10-2017, 22:14
I think mine is a "B" but it has no label but PCB is same pattern as yours, other Z19 seem to have a different PCB. Not sure though. See earlier post with pictures.
01-10-2017, 23:42
(01-10-2017, 08:45)AllanG Wrote: I had a problem uploading though which took me some time to identify. I'm using the latest Pro2 PLUS RX software of course, dated 19 September, and eventually found an error in Air Quality Monitor section of the "config_RX" tab:
// ---- Air Quality Monitor - Upload to ThingSpeak Settings ----
#define Enable_AQMtoThinkSpeak 0 // 1= Enable, 0= Disable
#define TS_WriteAPIkey "xxxxxxxxxxxx" // Put her your ThingSpeak WRITE key
Changing the "k" to "g" solved the problem and data began to flow about 10 hours ago, although I did accidentally reboot the AQI Monitor board this morning. I have too many devices using plug-in power supplies and will have to start labelling them to make sure I don't switch off the wrong one again!!
Hi Allan,
Thank you for having noted this error. I already fixed it and updated the published software, however I haven't changed the version number.
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)


![[Image: MH-Z19B-MH-Z19B-0-5000PPM.jpg_640x640.jpg]](https://ae01.alicdn.com/kf/HTB1gjEDOpXXXXX7XpXXq6xXFXXX9/MH-Z19B-MH-Z19B-0-5000PPM.jpg_640x640.jpg)
![[Image: DSC_8329-upr-sm.jpg]](http://meteo.brandysnl.cz/MyDocs/Forum/DSC_8329-upr-sm.jpg)
![[Image: 01-10-10.jpg]](https://i11.servimg.com/u/f11/18/78/82/62/01-10-10.jpg)