Some months ago i started researching the TGS 4161 sensor, which is quite affordable (< 30 eur, for single unit), in order to use it to monitor CO2 Levels.
The spec sheets are available here: http://www.netzmafia.de/skripten/hardware/Datenblaetter/Gassensoren/TGS4161Dtl.pdf and here: http://www.sos.sk/a_info/resource/c/figaro/tgs4161.pdf
I think the first one gives more information.
Currently I am evaluating how accurate is the sensor and whether it is possible to make it give consistent results. I've bought a dozen of those sensors and built an evaluation board to check how they work. This is how it looks like:
What you see (from left to right)
- 5v boost regulator to stabilize the input USB voltage to 5.1v
- 4x TGS4161 + TLC271C opamps
- Arduino Nano for the logic
- ESP8266 - to upload the data online for analytics (very rough but i like it :) http://co2meter-vlast3k.appspot.com/testCharts.html?last=60 )
-
K30 CO2 Sensor - to verify the readings
- 2.2" TFT display - to make some readings without going online
So far I've identified few things that i would like to share with other having the same goal.
Accuracy: If used correctly - the sensor is VERY accuarte. I am comparing it to my K30 CO2 (which is rated ~3% accuracy) and I can tell that response times and readings are within 5% difference. Yet this is true only in case the TGS 4161 is correctly calibrated and used.
The following section lists my findings in this area up to now.
- The sensor has a very high impedance, so an Opamp is needed to read it and feed the voltage to arduino. The spec sheet suggests TLC 271. It comes with two varieties B and C. B is a more precise one. I've bought the two kinds but still have not been able to make a difference in their results.
- According to the formula in the spec sheet small changes in voltage, e.g. +/-4mv, result in +/-15% of the value. This is why it is very important to make accurate readings. The ADC of arduino is not very accurate, so what i do is to sample the input for 5000ms, each 100ms, and then take an average reading. (also some sources suggest to discard the first reading, so i do this as well)
- Since both the arduino voltage, and the TGS 4161 output are quite sensitive to the input voltage, it is important to have a stabilized voltage independent of the power supply. For this - i power it using an USB cable (4.5 - 5.2 v), then using a diode, reduce the input voltage to <4.5v, and then using a boost regulator, boost it to 5.10v (this is how much the regulator is giving)
- I had an issue with noise, which gave quite fluctuating readings, so i put two big electrolytic caps on both the USB input, and directly on the Arduino. This seemed to have helped a bit.
- Initial calibration is pretty important. According to the sheet the difference in output between 400 and 500 ppm, is 6 mv. Which on higher ppm equals to 1800-2200 ppm. My research so far shows that the CO2 levels outside are around 400 ppm (~17:00, when the trees have converted most CO2 to O2, and raises to ~430 in the morning). In an occupied house, the value seldom drops below 500ppm, regardless of ventilation. In an occupied office, when left over the weekend, the indoor CO2 Levels reach outside levels over the weekend.
- Temperature dependency - according to the spec sheet - to get an accurate reading the temperature has to be considered as well. Yet up to now i have not yet spent time in monitoring this.
- Warm-up time - According to the spec sheet, the sensor needs 12+h of initial preheat team, and then after cooling and again heating it is usable in less than 30 minutes. Up to now i have not been able to verify this. I tried with 4 sensors, and it took them more than 10 days pre-heat time, during which time their mv@400ppm was rising with ~3ppm per day. Now they seem to be stable. Yet if i cut the power for 30 minutes, then it takes ~12 hours to reach the previous output
It is still work in progress. I will be posting more updates once I find out more details. My ultimate goal is to make it running stable and make a very simple and cheap device so that everybody could monitor the indoor CO2 levels (if desired :) ).
I started Kickstarter campaign for this, so let's hope the trial will be successful.
Comments