Code Monkey home page Code Monkey logo

mg811's Introduction

MG811

In Indoor Air Quality (IAQ) measurement unit, the MG811 could be used to evaluate the amount of C02 in the air. The aim of this project is to provide a library for simple usage of these modules.

How does the sensor work

Checkout the docs directory to found intterresting documents about this sensor and the way it operate.

Electricial requirement

While it is useful to checkout the documents on the sensor, it is important to accentuated that the sensor require 140mA ± 20mA for is heater. So, when using this sensor with multiple others on the Arduino board, make sure to have enought current or it.

Characteristics Value
Model MG811
Sensor type Solid Electrolyte
Target gas CO2
Detection range 350ppm - 10000ppm
Heater resistance 35Ω ± 3Ω
Heater current 140 ± 20mA
Heater voltage 6.0V ± 0.1V AC or DC
Heater consumption 850mW ± 120mW
Standard working condition 20 ~ 50°C, under 95%RH
Zero point EMF 200mV - 600mV
DEMF output signal ≧ 25mV/1000ppm CO2

Usage

This library is quite straightforward.

    MG811 mySensor = MG811(A0) // Analog pin A0

For the sensor's calibration follow the steps describe below:

Power on the sensor

  • First step

    • Put the sensor outdoor or indoor with good ventilation
    • Wait at least two (02) hours - for warming up
    • Read it's measurement - You get 400ppm reference voltage
  • Second step

    • Put the sensor in a bag filled with exhaled air
    • Wait a couple of minutes
    • Read it's measurement - You get 40000ppm reference voltage

The reference value measured by this function should be used with the begin method in order to use tthe sensor. The methods calibrate help you out with the calibration process.

    mySensor.calibrate()

Note: The sensor must be first calibrated to get some reference value.

After calibration, you can keep going with the following:

    float v400 = 4.535;     // should be set after calibration
    float v40000 = 3.206;   // should be set after calibration
    
    mySensor.begin(v400, v40000); // set the reference value in the library

The sensor could be used then by read raw voltage value or CO2 concentration in ppm

    mySensor.raw();     // read raw value
    mySensor.read();    // read CO2 concentration in ppm

mg811's People

Contributors

azinke avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.