I want to add CO2 measuring feature to my room weather station. Can someone please recommend a CO2 sensor easy to integrate with Arduino?

  • you can try this co2 sensor ... – user1431 May 14 '14 at 9:32

You could try the K30 CO2 sensor. There is also a guide using it to make an arduino CO2 detector here.

I've also seen people use the MG-811 module, you can buy them from dfrobot.com . There is also good documentation for how to use the MG-811 with arduino here.

  • Are these sensors good for external environment, not only to inside building? – Lobo Sep 13 '14 at 9:47

Based on hands-on time with CCS811 CO2 sensors, I would recommend against them. They tend to drift high, sometimes way high, and then come back to their senses and provide reasonable readings when reset.

I've tried two batches of CJMCU-811 sensors, purchased months apart (hoping to get a different manufacturing lot), and they were all rubbish.


This worked well for me on a colour screen. A small delay for the sensor and a long burn (24hrs) required. But easy KIWI

#include <XTronical_ST7735.h> // Hardware-specific library
#include <SPI.h>
#include <Adafruit_GFX.h>    // Core graphics library
#include <sSense-CCS811.h>
#include <dht.h>

#define SERIAL_SPEED  9600

#define TFT_SCLK 13         // SPI clock
#define TFT_MOSI 11         // SPI Data
#define TFT_CS   10         // Display enable (Chip select), if not enabled will not talk on SPI bus
#define TFT_RST   9         // Display reset pin, you can also connect this to the Arduino reset
                            // in which case, set this #define pin to -1!
#define TFT_DC     8 
CCS811 ssenseCCS811;
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS,  TFT_DC, TFT_RST);  
dht DHT;

#define DHT11_PIN 7

void setup()
  Serial.println("s-Sense CCS811 I2C sensor.");
  if(!ssenseCCS811.begin(uint8_t(I2C_CCS811_ADDRESS), uint8_t(CCS811_WAKE_PIN), driveMode_1sec))
    DebugPort.println("Initialization failed.");
  tft.init();   // initialize a ST7735S chip,
  tft.setCursor(0, 30); 

void loop()
  ssenseCCS811.setEnvironmentalData((float)(21.102), (float)(57.73));  // replace with temperature and humidity values from HDC2010 sensor
  int chk = DHT.read11(DHT11_PIN);
  if (ssenseCCS811.checkDataAndUpdate())
    tft.print("CO2 ppm  ");
    tft.print("tVOC ppb ");
    tft.print("Temp C   ");
    tft.print("Humid %  ");

  else if (ssenseCCS811.checkForError())


How about this one? http://cgi.ebay.de/ws/eBayISAPI.dll?ViewItem&item=380915024016&ssPageName=STRK:MESE:IT The MG-811 is highly sensitive to CO2 and less sensitive to alcohol and CO.


This one: http://sandboxelectronics.com/?product=mg-811-co2-gas-sensor-module

They also got a nice demo code there. Here is a wiring scheme if you use the demo without modification:

  1. Red - 5V
  2. Black - GND
  3. Yellow - Analog input 0
  4. Green - Digital I/O 2

The easeir integration ever


I can recommend these sensors. They are small and offer great value for the money.

  • 1
    It would be helpful if you could include some additional information in your answer, e.g. manufacturer and part numbers. That way, people can still find the items you're suggesting even if the link you posted changes. Thanks! – Peter Bloomfield Oct 20 '14 at 8:49
  • Not to mention that those are humidity sensors which simply don't measure CO2. – Dmitry Grigoryev Oct 19 '20 at 14:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.