Tech Note 103 - CCS811 Air Quality Monitor for Ardunio, ESP8266 or ESP32

  Переглядів 23,155

G6EJD - David

G6EJD - David

5 років тому

The CCS811 Air Quality Monitor is an easy to I2C device than can be added to your weather station or used as an indoor air quality monitor there are no complicated algorithms. It measures CO2 and Volatile Organic Compound levels, measurements that indicate poor air quality if they climb.
Code Example: github.com/G6EJD/CCS811-CO2-a...
Product: www.banggood.com/Wholesale-Ar...

КОМЕНТАРІ: 85
@ChunkySteveo
@ChunkySteveo 5 років тому
Very informative video!
@JohnDuthie
@JohnDuthie 2 роки тому
Thanks David!
@jedandecko5585
@jedandecko5585 5 років тому
Nice one again :) great tutorial, simple and easy. 1 mistake, if you check datasheet for ccs811 you will see that it is ONLY VOC sensor and it calculate CO2 depending on VOC levels. Made same mistake when i bought them. So its pretty useless for outdoor CO2 measurement but its great for indoor use, controlling air flow inside and checking your storage rooms... I store cleaning stuff in toalet, bad idea, use couple of times per day and breathe in all that stuff.
@bonnome2
@bonnome2 5 років тому
The official description of the ccs811 "Ultra-low power digital gas sensor for monitoring indoor air quality". Something not all sellers put in their description
@G6EJD
@G6EJD 5 років тому
Yes the CO2 reading is an estimate or relative to VOC reading nonetheless still a useful indication and it’s better in my opinion than the BME680. Other than the SHT35 with a permeable filter there are currently no sensors suitable for outside use. Humidity and atmospheric components will destroy most devices given time.
@kevinang301
@kevinang301 3 роки тому
Thank you for the tutorial! I noticed that you used the Adafruit library for the CCS811. Can we use this library even though the sensor is not from Adafruit? I noticed that the Adafruit one is more expensive.
@G6EJD
@G6EJD 3 роки тому
Yes Adafruit release their libraries for general use, I have never used Adafruit products, but sometimes like the bme280 sensors they use a different device address and so the library needs different settings to get things working, but this rare. Some really low cost devices maybe out of specification from China, that’s the risk, but generally if they are the difference is marginal for most applications.
@kevinang301
@kevinang301 3 роки тому
@@G6EJD I see, thank you for the clarification!
@sonnguyenminh7714
@sonnguyenminh7714 4 роки тому
Thank you very much for the tutorial, so how do we calculate the ratio of oxygen concentration in the air? Or just help me for reference
@G6EJD
@G6EJD 4 роки тому
Sơn Nguyễn Minh, the device is calibrated at the factory. The only way you can calibrate by varying the reading value is to use an external reference like any other calibration method. It’s more of a qualitative measurement giving degrees of concentration
@dogastus
@dogastus 5 років тому
The temperature readings seemed a bit all over the place. I got quite stable results when I tried the dedicated DS18S20 chip.
@G6EJD
@G6EJD 5 років тому
Yes, it's actually the device temperature reading when the sample was taken, it has to heat up the internal sensor to take a reading and in that regard is not that useful, it's certainly not room temperature.
@dogastus
@dogastus 5 років тому
Ah that explains it, thanks.
@socar-pl
@socar-pl 3 роки тому
Good video. Any idea how acurate the co2 readings are? does sensor need any calibration over time ?
@G6EJD
@G6EJD 3 роки тому
None are very accurate more a relative reading, if you want a reliable high accuracy and repeatable sensor they start at around £50/$75 and they all take some time to read. The sensor featured here is an estimated CO2 reading based on the readings of other gases, a mix that would probably occur in most situations.
@LatinDanceVideos
@LatinDanceVideos 5 років тому
BTW: thanks for posting. Really appreciate this.
@ipodmaurits
@ipodmaurits 5 років тому
Where did you get ut that cheap? Lowest price i can find on aliexpress is around 8/9 euros
@G6EJD
@G6EJD 5 років тому
There's a sort of spot-price on AliExpress, I got mine from WorldChips and paid £4.13 including postage, but I see today it is £6.35. For the more expensive one, I paid £11.97, but now £11.54 but it does have an on-board NTC which gives a slightly more accurate temperature response.
@thedude5756
@thedude5756 3 роки тому
Is it good to use a single sensor or can I use the DHT11,22 to compensate for the errors?
@G6EJD
@G6EJD 3 роки тому
You could, but you have to adjust the registers to do that and as they don’t publish an error graph by how much? No idea so maybe what’s the point, just use as is.
@Kartoffelsnack
@Kartoffelsnack 5 років тому
I'll try to hook the breakoutboard up to a wemos d1 mini, like in your wiring-diagram, but I got one question about your .ino-sketch: In the Code the only pin-reference i can see is "A1". Should i change it to 'D1' or 'D2', since you're wiring the sensor to these pins ? Thank you in advance :)
@G6EJD
@G6EJD 5 років тому
Which pins you use depends on the board type, are you using an ESP32 or ESP8266 and what is the board name? If an ESP8266 nodemcu type then the correct pins are 4 and 5, let me know
@Kartoffelsnack
@Kartoffelsnack 5 років тому
@@G6EJD a "Wemos D1 Mini" like i wrote above, an ESP8266. The Sensor breakoutboard also looks exactly like your purple one. In your picture at 3:20, the middle-one is exactly my setup.
@G6EJD
@G6EJD 5 років тому
Kartoffelsnack, so what is not happening are you getting any values on the serial port? Most problems will be wiring based assuming the sensor is ok.
@Kartoffelsnack
@Kartoffelsnack 5 років тому
I haven't tried it yet, because i don't know how to change the code to fit the pins on the 'd1 mini'.
@G6EJD
@G6EJD 5 років тому
If your using the Wemos D1 Mini then connect the sensor to D1 and D1 as labelled and shown in the centre diagram.
@lazyvideos9525
@lazyvideos9525 3 роки тому
i bought cjmcu 524 nh3 gas sensor ​it​ includes stm328003f inbuilt on it and it has i2c pin, but i cant able to scan the i2c addres.pls help me out of this
@G6EJD
@G6EJD 3 роки тому
Have you go the right I2C connections, have you tried an I2C scanner, check the data sheet for it's I2C address it should be found. You probably do not have the correct i2C pins connected.
@Danial-kg7rl
@Danial-kg7rl 2 роки тому
I want to ask. Can CCS811 measure CO2 and TVOC from human exhale?
@G6EJD
@G6EJD 2 роки тому
Check the data sheet it says: CCS811 measurements to output a TVOC value or equivalent CO2 (eCO2) levels, where the main cause of VOCs is from humans. So yes.
@genrihkutz
@genrihkutz 3 роки тому
i have fiolet CCS811 sensor, but this sensor has not temperature and humidity
@G6EJD
@G6EJD 3 роки тому
No that’s right, this is why the bme680 is better as it adds temperature, pressure a f humidity to VOC detection. The CCS811 requires a burn-in time of 48 hours and a run-in of 20 minutes (you must allow 20 minutes for the sensor to warm up and output valid data). Note: Temperature compensation from an attached NTC Thermistor is no longer supported on the CCS811.
@genrihkutz
@genrihkutz 3 роки тому
@@G6EJD thanks
@Mortenmo
@Mortenmo 4 роки тому
do I have to use a little fan that blows air to the sensor?
@G6EJD
@G6EJD 4 роки тому
Morten mo, using a fan will give you false results due to wind chill etc.
@Mortenmo
@Mortenmo 4 роки тому
@@G6EJD but when there is no air movement near sensor ... are co2 results ok then?
@G6EJD
@G6EJD 4 роки тому
Morten mo, you will always have natural air movement to give you a reading and the gases don’t tend to be in pockets of air and are naturally dispersed. You can use a fan but don’t expect accurate results
@RedBull77881
@RedBull77881 5 років тому
Good day. How to display information in lcd1602?
@G6EJD
@G6EJD 5 років тому
The LCD library is inbuilt so I suggest trying out one of the examples then adding the driver and lcd.print statements to my code.
@RedBull77881
@RedBull77881 5 років тому
@@G6EJD Do I just need to substitute an serial.print for an lcd.print?
@G6EJD
@G6EJD 5 років тому
Михаил the other way around. Every time you want to display on the LCD do a lcd.print
@redreska6311
@redreska6311 3 роки тому
Hello mate I need your help ! I want to mesure Oxygen or Nitrogen in the air at the outlet of an oxygen generator ! is this sensor useful ?
@G6EJD
@G6EJD 3 роки тому
Does not measure O2, use something like this: www.seeedstudio.com/Grove-Oxygen-Sensor-ME2-O2-f20.html
@redreska6311
@redreska6311 3 роки тому
@@G6EJD thanks ! that's what I fear too expensive and not available in my country :(
@G6EJD
@G6EJD 3 роки тому
Check out: Grove O2 sensor LuminOx sensor R17/R21/R22 sensor Figaro (such as K50) UK City/Citicel sensor (4OXV/7OXV) SenSore sensors Possibly even a car lambda sensor such as Bosch LSU 4.9
@G6EJD
@G6EJD 3 роки тому
Car lambda sensor might the be lowest cost sensor if you can get a data sheet for one.
@G6EJD
@G6EJD 3 роки тому
I can’t find any low cost, easy to use sensors for O2
@shahmeertahir2473
@shahmeertahir2473 3 роки тому
the value of Rs/Ro for No2 in fresh air of Mics 6814 sensor??..kindly reply me
@G6EJD
@G6EJD 3 роки тому
12K in clean air
@shahmeertahir2473
@shahmeertahir2473 3 роки тому
@@G6EJD is this confirm or not??
@shahmeertahir2473
@shahmeertahir2473 3 роки тому
Actually I am searching a lot on Google but couldn't find any value of Ro/Rs for the Mics 6814 sensor for finding the No2 ??..I am stuck at this point..
@G6EJD
@G6EJD 3 роки тому
You can look up the data sheet and it gives the ranges there down to 0ppm, I just did and that’s the value it says.
@shahmeertahir2473
@shahmeertahir2473 3 роки тому
@@G6EJD 12 K is for which sensor??
@grahamwise5719
@grahamwise5719 5 років тому
I have CCS811 running for weeks on an ESP but it drifts so much that it is useless for CO2 trend logging. It is a VOC sensor and just has a multiply factor for CO2 so if have VOCs for solvents say then CO2 is just wrong. I changed to an optical sensor EE893 but $90 in cost, so not far to compare. It is stable and not sensitive to VOCs.
@mtarquinio
@mtarquinio 5 років тому
I had the same experience as Graham Wise. I tried two different CCS811 sensors with an ESP8266 and even moved to an Arduino. After a couple of days the VOC / CO2 readings were completed useless. One reset and it start working again.... What about you David Bird, have you run it for some days? Did you experiment any drift? BTW, thanks for all the great videos!
@G6EJD
@G6EJD 5 років тому
I think by the time VOC rises above the background / normal values CO2 levels becomes largely irrelevant as the toxic air is driven by the VOC content. So-far I've found it tracks the CO2 levels quite well.
@G6EJD
@G6EJD 5 років тому
Well I have only been running it after being woke up from sleep then I take 4-readings as the first 2 are usually 0’s as the sensor heats then I get a stable and sensible reading so I take the fourth. I could use the nINT output to wait for a valid reading too, but I find the simple approach is working ok for me. I have also noted that it’s very sensitive to power supply variations and takes quite a lot of power. I’m not aware of any endemic issues with the sensor either, so I suspect it’s down to application.
@jasonmhite
@jasonmhite 5 років тому
These things can't distinguish CO2 from VOCs, they're sensitive to a wide range of gasses with different sensitivity levels. The eCO2 reading they provide is only valid if there is ONLY CO2 present. CO2 is typically one of the gasses that metal oxides sensors are *least* sensitive to, so basically the presence of any VOCs makes the eCO2 reading totally invalid, because it will appear much higher since the sensor is more sensitive to VOCs. @Graham Wise is correct, these things are not useful for measuring CO2 indoors. You really consider the eVOC reading to be accurate either, it's really only good for deviations from baseline. Actual CO2 sensors are kind of expensive because of how they work, even the cheapest ones on Aliexpress are $25 or more.
@G6EJD
@G6EJD 5 років тому
There are a number of issues here, first I believe most implementations do not apply the device data sheet instructions for use such as modes and for establishing and updating the baseline and to be fair to the manufacturer they do clearly state the CO2 reading is ‘equivalent’ not actual and they don’t quote any accuracy figures so we have to determine that the device is a relative reading only, but for most most applications the device can be used successfully to determine if the atmosphere contains gases that are higher than the device baseline, it’s most definitely not an absolute measurement device. If the air is good the readings will be low if bad high, that’s probably all we need to know.
@zaprodk
@zaprodk 5 років тому
I-squared-cee :)
@G6EJD
@G6EJD 5 років тому
Yes and no, how would you say Command Control Communication and Information C3I in my world that’s C 3 I not C Cube I 😀
@viisteist1363
@viisteist1363 5 років тому
it does not measure CO2, only CO
@G6EJD
@G6EJD 5 років тому
I think you should read the data sheet again, your wrong it measures Volatile Organic Compounds and estimates the Carbon-dioxide level NOT Carbon-monoxide. If you don’t agree please write and complain to the manufacturer that the lowest cost and power sensor on the market isn’t good enough and doesn’t measure CO2 and ask them what they are going to do about it.
@Kartoffelsnack
@Kartoffelsnack 5 років тому
He's somehow right, it seems that there are two versions sold: CO2: www.ebay.de/itm/CCS811-HDC1080-CO2-Carbon-Dioxide-VOCs-Air-Quality-Temperature-Humidity-Sensor-F/232747057091?hash=item3630ce3fc3:g:cv0AAOSw7I5a4Xqv:rk:9:pf:0 CO: www.ebay.de/itm/CJMCU-CCS811-811-Carbon-Monoxide-CO-Cov-Gas-Sensors-Air-Quality-Numerical/263548924643?hash=item3d5cbd72e3:g:R8sAAOSwlJlaqOA-:rk:8:pf:0
#300 How to measure CO2 and VOC with Arduino. Which one is better?
21:13
Andreas Spiess
Переглядів 98 тис.
ESP8266 in 5 minutes
5:50
MrDIY
Переглядів 112 тис.
Повістки у Києві: «Яке право вони мають забирати всіх мужиків?» #війна #мобілізація #військові
00:41
Слідство.Інфо | Розслідування, репортажі, викриття
Переглядів 1,6 млн
skibidi toilet 73 (part 2)
04:15
DaFuq!?Boom!
Переглядів 20 млн
DIY Air Quality Monitor - PM2.5, CO2, VOC, Ozone, Temp & Hum Arduino Meter
16:15
How To Mechatronics
Переглядів 361 тис.
Measuring Air Quality with ESP32 & Arduino
1:01:13
DroneBot Workshop
Переглядів 103 тис.
SuperHouse #38: DIY air quality sensor part 1 - "Basic" version
22:04
SuperHouseTV
Переглядів 58 тис.
Aggressively Low Power with the ESP8266
10:18
CNLohr
Переглядів 77 тис.
Episode 1   What's Inside BME680 Gas Sensor
9:56
IC Inside
Переглядів 930
How to Run Linux on an ESP32
18:53
element14 presents
Переглядів 143 тис.
CO2 & TVOC Measurement using CCS811 Air Quality Gas Sensor & Arduino
6:01
How To Electronics
Переглядів 20 тис.
Arduino DIY CO2 PPM Meter
8:36
learnelectronics
Переглядів 131 тис.
6 Horribly Common PCB Design Mistakes
10:40
Predictable Designs
Переглядів 160 тис.
План хакера 🤯 #shorts #фильмы
0:59
BruuHub
Переглядів 1 млн
План хакера 🤯 #shorts #фильмы
0:59
BruuHub
Переглядів 1 млн
Клавиатура vs геймпад vs руль
0:47
Balance
Переглядів 550 тис.
ИГРОВОЙ ПК от DEXP за 37 тысяч рублей из DNS
27:53
Ремонтяш
Переглядів 378 тис.