CO2 Sensor SKU:SEN0159

Similar documents
SEN Description. Features. Specifications. MQ-2 Gas Sensor Module Lite

SEN Description. Features. Specifications. MQ-8 Gas Sensor Module Lite

TMP36 Temperature Sensor

TMP36 Temperature Sensor

2F. No.25, Industry E. 9 th Rd., Science-Based Industrial Park, Hsinchu, Taiwan

Grove - CO2 Sensor. Introduction

Manual iaq-engine Indoor Air Quality sensor

Triple Axis Accelerometer FXLN83XX Series

TEC 2000 INSTRUCTION MANUAL TEC SERIES

PWR Meter click. PID: MIKROE 3169 Weight: 31 g

FireBeetle ESP8266 IOT Microcontroller SKU: DFR0489

Lab-3: LCDs Serial Communication Analog Inputs Temperature Measurement System

Robotics/Electronics Review for the Final Exam

Adafruit 1-Wire Thermocouple Amplifier - MAX31850K

Light Sensor. Overview. Features

Rev Carbon Dioxide (CO2) Gas Sensor. TG100 User Manual

Adafruit 1-Wire Thermocouple Amplifier - MAX31850K

Thumb Joystick Retail. Tools and parts you'll need. Things you'll want to know. How does it work? Skill Level: Beginner. by MikeGrusin March 22, 2011

LPM355X USB to Serial Converter

Rev Carbon Dioxide (CO2) Gas Sensor. TG100 User Manual

Earthshine Design Arduino Starters Kit Manual - A Complete Beginners Guide to the Arduino. Project 13. Serial Temperature Sensor

Page 1 MRK-D-0011, V2.0 Aeroqual SM50 User Guide

TP3005P EN PROGRAMMABLE DC LAB POWER SUPPLY 0-30V/ USB 2.0

LDD M SERIES INSTRUCTION MANUAL LDD M SERIES

The Diabetic Breathalyzer. Group 13 Jon Brown Christine Sleppy Noah Spenser Edert Geffrard

NSGV Series "90DM3" Carbon Dioxide Detector

PIXI click PID: MIKROE Weight: 28 g

Introduction to Arduino. Wilson Wingston Sharon

Lab 2 - Powering the Fubarino, Intro to Serial, Functions and Variables

This tutorial will show you how to take temperature readings using the Freetronics temperature sensor and an Arduino Uno.

Electronic Brick Starter Kit

Grove - Multichannel Gas Sensor

Application Guide for

ESPino - Specifications

Indoor Air Quality with ESP32 Board # K0068

4 CHANNEL 5V RELAY MODULE

Lab 2 - Powering the Fubarino. Fubarino,, Intro to Serial, Functions and Variables

Trueyes Inc. Carbon Dioxide (CO2) Module

Gravity: I2C BME280 Environmental Sensor (Temperature, Humidity, Barometer) SKU: SEN0236

General. Copyright 2013 EXSEN Company. All Rights Reserved. Rev /5/2013 Page 1 of 6

AirTest Model CN9000 Series Sensor Controller

Lab 01 Arduino 程式設計實驗. Essential Arduino Programming and Digital Signal Process

Thermo 6 click PID: MIKROE-2769

ADC to I 2 C. Data Sheet. 10 Channel Analog to Digital Converter. with output via I 2 C

ARDUINO LEONARDO ETH Code: A000022

Introduction To Arduino

University of Portland EE 271 Electrical Circuits Laboratory. Experiment: Arduino

Installation and Operation Instructions I/CO 2, I/CO 2 -VDC, I/CO 2 -T

VKey Voltage Keypad Hookup Guide

last update December 1, 2010 reference smtirin06n page 1/21 SMARTEC INFRARED INTERFACE BOARD SMTIRIN06

High Power (15W + 15W) Stereo Amplifier

Serial:UART/I2C/SPI Text LCD Display Control Module. LCDSP_TG V1.60 user manual

Grove - I2C Thermocouple Amplifier (MCP9600)

Grove - Luminance Sensor

MP6500 Stepper Motor Driver, Digital Current Control

Page 1 MRK-D-0011, V1.1 Aeroqual SM50 User Guide

Grove - Thumb Joystick

ADC7520 SERIES. 1600W Battery Chargers and Power Supplies

Robotic Systems ECE 401RB Fall 2006

BRC SERIES 20kW High Voltage Power Supply

MH-Z16 Intelligent Infrared Gas Module

1 Making Decisions in Arduino Programs

The unit is designed for connecting to Direct Digital Control (DDC). The linear output functions are pre-programmed as CO 2

Adafruit BME680. Created by lady ada. Last updated on :10:23 AM UTC

Grove - Thumb Joystick

PowerAmp Design. PowerAmp Design PAD131 FAN CONTROLLER MODULE

Grove - 3 Axis Digital Accelerometer±16g Ultra-low Power (BMA400)

Adafruit HTU21D-F Temperature & Humidity Sensor

Digital Humidity & Temperature Sensor. With Two-Wire Interface

Freeduino USB 1.0. Arduino Compatible Development Board Starter Guide. 1. Overview

Note. The above image and many others are courtesy of - this is a wonderful resource for designing circuits.

2001VT Temp & CO 2. - air quality sensor/controller NOTE!!! Manual for Installation. General. SenseAir AB

Pololu 12V Step-Up/Step-Down Voltage Regulator S10V2F12

IOX-16 User s Manual. Version 1.00 April Overview

Version MICROSTRAIN, INC. Microminiature Sensors. OEM Inertia-Link /3DM-GX2 Modules. Guidelines for Use of OEM Inertia-Link /3DM-GX2 Modules

keyestudio Keyestudio MEGA 2560 R3 Board

Manual iaq-core Indoor Air Quality sensor module

ACU6. Technical Reference Manual. Specifications Interfacing Dimensions. Document topics. ANSARI Controller Unit Type 6 technical reference manual

Switched Mode Power Supply Operating manual PAP800

Lab 4: Determining temperature from a temperature sensor

Gravity: BMI160 6-Axis Inertial Motion Sensor SKU: SEN0250

Grove - 80cm Infrared Proximity Sensor

Dual Digital Pot (100K) SKU: DFR0520

USB PowerControl 0042-USBPC-DSBT / USBPCNE-DSBT

Hardware Overview. Onboard Sensors. Pressure, Humidity, and Temperature. Air Quality and Temperature

Adafruit VL53L0X Time of Flight Micro-LIDAR Distance Sensor Breakout

PAS 9406/AMP ENGINEERING SPECIFICATION

MAXPROLOGIC FPGA DEVELOPMENT SYSTEM Data Sheet

DF BluetoothV3 Bluetooth module (SKU:TEL0026)

EPT-200TMP-TS-U2 TMP102 Temperature Sensor Docking Board Data Sheet

Serial.begin ( ); Serial.println( ); analogread ( ); map ( );

DEV16T. LCD Daughter board

Tactile Amplifier Shield

Model Instruction Manual. Heat Stress Meter. reedinstruments. www. com

UCBB dual port breakout board user's manual

Strain gauge Measuring Amplifier GSV-1A8. Instruction manual GSV-1A8, GSV-1A8USB, GSV-1A16USB

OpenSprinkler v2.1u Build Instructions

IST ULTRASTAB Power Supply for high precision transducers

Rev 1.3, Air-Farm User Manual. CO2 / Temperature / Humidity Transmitter

MP5007 5V, 1A- 5A Programmable Current Limit Switch

Transcription:

Page 1 of 9 CO2 Sensor SKU:SEN0159 Contents 1 Introduction 2 Specification 3 Tutorial 3.1 Connecting Diagram 3.2 Sample code 3.3 Result 4 FAQ Introduction (/wiki/index.php/file:sen0159.jpg) CO2 Sensor (Arduino compatiable) Greenhouse Effect is melting the iceberg every SKU:SEN0159 minute,. By knowing the exact concentration of CO2, we can do something to reduce the CO2 and to protect our earth. For that reason, a HQ CO2 sensor is designed by DFRobot engineer. This is the first CO2 sensor in OSHW market. The output voltage of the module falls as the concentration of the CO2 increases. The potentiometer onboard is designed to set the threshold of voltage. As long as the CO2 concentration is high enough (voltage is lower than threshold), a digital signal (ON/OFF) will be released. Features: It has MG-811 sensor module onboard which is highly sensitive to CO2 and less sensitive to alcohol and CO, Low humidity & temperature dependency. Onboard heating circuit brings the best temperature for sensor to function. 5V power input will be boosted to 6V for heating. This sensor has an onboard conditioning circuit for amplifying output signal. Specification Input Power: 3.3-6V@ >500mA (5V recommended) Operating voltage: 0-5V Interface: Analog One digital output (Once the CO2 concentration is over the set threshold value, it will output digital HIGH, 5V) Onboard heating circuit Heating Current: 200mA Heating Voltage: 6V Heating Power: 1200mW Size: 32x42mm

Page 2 of 9 Tutorial Connecting Diagram (/wiki/index.php/file:sen0159_en_new.png) NOTE: An external power supply 7~12V@>500mA is necessary to feed Arduino card to heat the CO2 Sensor to ensure the CO2 sensor could get enough heating power (3.3V - 6V @ >500mA). Or it won't work properly! The external power is not showed in the diagram. Sample code

Page 3 of 9 /*******************Demo for MG-811 Gas Sensor Module V1.1****************** *********** Author: Tiequan Shao: tiequan.shao@sandboxelectronics.com Peng Wei: peng.wei@sandboxelectronics.com Modified by Leff from DFRobot, leff.wei@dfrobot.com, 2016-4-21, mak e the algorithm clearer to user Lisence: Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0) Note: This piece of source code is supposed to be used as a demostration ONLY. More sophisticated calibration is required for industrial field applicat ion. Sandbox Electron ics 2012-05-31 **************************************************************************** ********/ /************************Hardware Related Macros********* ****************** *********/ #define MG_PIN (0) //define which analog i nput channel you are going to use #define BOOL_PIN (2) //Arduino D2-CO2 sensor digital pinout, labled with "D" on PCB #define DC_GAIN (8.5) //define the DC gain of amplifier /***********************Software Related Macros***************************** *******/ #define READ_SAMPLE_TIMES (10) //define how many samp les you are going to take in normal operation #define READ_SAMPLE_INTERVAL (50) //define the time inter val(in milisecond) between each samples in //normal operation /**********************Application Related Macros*************************** *******/ //These values differ from sensor to sensor. User should derermine this valu e. #define ZERO_POINT_X (2.602) //lg400=2.602, the star t point_on X_axis of the curve #define ZERO_POINT_VOLTAGE (0.324) //define the output of the sensor in volts when the concentration of CO2 is 400PPM #define MAX_POINT_VOLTAGE (0.265) //define the output of the sensor in volts when the concentration of CO2 is 10,000PPM #define REACTION_VOLTGAE (0.059) //define the voltage dr op of the sensor when move the sensor from air into 1000ppm CO2 /*****************************Globals*************************************** ********/

Page 4 of 9 float CO2Curve[3] = {ZERO_POINT_X, ZERO_POINT_VOLTAGE, (REACTION _VOLTGAE / (2.602-4)); //Two points are taken from the curve.with these two points, a line is forme d which is //"approximately equivalent" to the original curve. You could use other meth ods to get more accurate slope //CO2 Curve format:{ x, y, slope;point1: (lg400=2.602, 0.324), point2: (lg1 0000=4, 0.265) //slope = (y1-y2)(i.e.reaction voltage)/ x1-x2 = (0.324-0.265)/(log400 - log 10000) void setup() { Serial.begin(9600); //UART setup, baudrate = 9600bps pinmode(bool_pin, INPUT); //set pin to input digitalwrite(bool_pin, HIGH); //turn on pullup resistor s Serial.print("MG-811 Demostration\n"); void loop() { int percentage; float volts; volts = MGRead(MG_PIN); Serial.print( "SEN0159:" ); Serial.print(volts); Serial.print( "V " ); percentage = MGGetPercentage(volts, CO2Curve); Serial.print("CO2:"); if (percentage == -1) { Serial.print("Under heating/beyond range(400~10,000)"); else { Serial.print(percentage); Serial.print( "ppm" ); Serial.print( " Time point:" ); Serial.print(millis()); Serial.print("\n"); if (digitalread(bool_pin) ) { Serial.print( "=====BOOL is HIGH======" ); else { Serial.print( "=====BOOL is LOW======" ); Serial.print("\n"); delay(1000);

Page 5 of 9 /***************************** MGRead ************************************* ******** Input: mg_pin - analog channel Output: output of SEN-000007 Remarks: This function reads the output of SEN-000007 **************************************************************************** ********/ float MGRead(int mg_pin) { int i; float v = 0; for (i = 0; i < READ_SAMPLE_TIMES; i++) { v += analogread(mg_pin); delay(read_sample_interval); v = (v / READ_SAMPLE_TIMES) * 5 / 1024 ; return v; /***************************** MQGetPercentage **************************** ****** Input: volts - SEN-000007 output measured in volts pcurve - pointer to the curve of the target gas Output: ppm of the target gas Remarks: By using the slope and a point of the line. The x(logarithmic value of ppm) of the line could be derived if y(mg-811 output) is provided. As it is a logarithmic coordinate, power of 10 is used to convert the result t o non-logarithmic value. **************************************************************************** ********/ int MGGetPercentage(float volts, float *pcurve) { volts = volts / DC_GAIN; if (volts > ZERO_POINT_VOLTAGE volts < MAX_POINT_VOLTAGE ) { return -1; else { return pow(10, (volts - pcurve[1]) / pcurve[2] + pcurve[0]); volts = 0; Result After about one hour heating process, open Arduino IDE Serial monitor, you could get the stable readings about ambient CO2 density. Breathe to the sensor you could see the data changing. Read more in FAQ>Q5 below.

Page 6 of 9 (/wiki/index.php/file:result_co2_density.png) FAQ Q1. I pretend a sensor capable of measuring concentrations between 0%-10% (0-100.000 ppm) of CO2. What is the measurement range of your device? A. Its detect range is: 400 10000 ppm. You could find its sensitivity and more info in its datasheet (http://www.dfrobot.com/image/data/sen0159/co2b%20mg811%20datasheet.pdf). Q2. How to calibrate the sensor to get the correct CO2 density? A. To calibrate the sensor, you needs a CO2 meter which can tell the CO2 density first, like this one (http://www.ebay.com/itm/extech-desktop-indoor-air-quality-co2-monitor-co100-iaq- Health-Temp-Humidity-/391113945766?hash=item5b103532a6:g:4TQAAOSw5VFWQ1z2). Once you got it, you can calibrate the sensor in its sample code, that is clarified in sample code. The adjustable resistance on CO2 module is not for calibration but for digital alarm signal output. If you don't have relevant equipment to help you to define the two values of the ZERO_POINT_VOLTAGE and REACTION_VOLTGAE, you could just simply use the sample code to get some reference readings. Sample code:

Page 7 of 9 //These two values differ from sensor to sensor. user should derermine this value. #define ZERO_POINT_VOLTAGE (0.324) //define the output of the sensor in volts when the concentration of CO2 is 400PPM #define REACTION_VOLTGAE (0.020) //define the voltage dr op of the sensor when move the sensor from air into 1000ppm CO2 One of our customers adjusted his sensor like this to get his expected readings. #define ZERO_POINT_VOLTAGE (0.535) //define the output of the sensor in volts when the concentration of CO2 is 400PPM (output was 4.6V ) #define REACTION_VOLTGAE (0.039) //define the voltage dr op of the sensor when move the sensor from air into 1000ppm CO2 (output was 4.21 tuned to.039) Q3. How to know the voltage of the output of the sensor in volts when the concentration of CO2 is *ppm? A. You can use a Voltage Metre to test the module's output voltage from PH2.0-3P connector. Or you could also use Arduino to read its voltage. After you got the voltage, you can divide it by the module's gain, that is 8.5 in the example2. (/wiki/index.php/file:co2_senso For Q3. sensor connector e.g. if you got 2.754V, then ZERO_POINT_VOLTAGE = 2.754/8.5 = 0.324. NOTE: It is not a good idea to use a Voltage Meter on pin 1 and pin 2 on the back of the sensor. It seems working, but actually, since CO2 sensor has a large built-in resistance, generic voltage metre can not work well in this case. Pin Definition 1. GND 2. Vout 3. Vin: 6V When the sensor is in heating process, please wait untill it can output stable readings and test. (/wiki/index.php/file:co2_senso For Q3. note sensor pins on back

Page 8 of 9 Q4. Why I can't get an reasonable reading using sample code, I mean the readings are too large, negatives, and not stable at all? A. Please use a Voltage Meter on pin 1 and pin 3 on the back of the sensor (see picture > "For Q3. note sensor pins on back") to test if the heating voltage is 6V. If not, please go to Connecting Diagram (http://www.dfrobot.com/wiki/index.php? title=co2_sensor_sku:sen0159#connecting_diagram) to check the notice. If you have used a valid external power, but even after 48 hours heating process, no valid data was displayed at all no matter how you breathed to the sensor. Then it proves that yours should be defective. Q5. Why I waited over an hour, but still can't get an reasonable reading using sample sketch? A. After the sensor was stored in Oxidizing condition for some time, the core part would be oxidized in different extent. So it would need some time for the sensor to go through the "heating process" to get real CO2 readings. The "heating process" may cost 0.5~48hrs. (/wiki/index.php/file:co2_sensor_sen0159_diag.png) For A6. the exponent of the pow function

https://www.dfrobot.com/wiki/index.php/co2_sensor_sku:sen0159 Page 9 of 9 1/19/2017 Q6. What is the logic of the code below, from the sample code? Why need the exponent of the pow function? **************************** MQGetPercentage ********************************** int MGGetPercentage(float volts, float *pcurve) { if ((volts/dc_gain )>=ZERO_POINT_VOLTAGE) { return -1; else { return pow(10, ((volts/dc_gain)-pcurve[1])/pcurve[2]+pcurve[0]); A. In the sensor's datasheet (http://www.dfrobot.com/image/data/sen0159/co2b%20mg811% 20datasheet.pdf), you could found its map describing the relationship between Voltage and CO2 density. And by comparing the two notes (1 & 2) located on X-Aixs, you could easily tell they are not in the same length, that's to say, the PPM was describing as exponent. And that's why in the code, it has to use the function pow to calculate the real CO2 density. For any questions/advice/cool ideas to share, please visit DFRobot Forum (http://www.dfrobot.com/forum/).