REXYGEN Community Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Login

    Contributed Driver: MH-Z16 I2C NDIR CO2 Sensor

    General
    mh-z16 driver i2c carbon dioxide co2
    2
    2
    632
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      enovikoff
      last edited by jaroslav_sobota

      The MH-Z16 CO2 sensor from Sandbox Electronics is visible at https://sandboxelectronics.com/?product=mh-z16-ndir-co2-sensor-with-i2cuart-5v3-3v-interface-for-arduinoraspeberry-pi It offers rapid response and good accuracy. The part is similar to and based on the one sold by Winsen Electronics, but has been modified by Sandbox to be more easily calibrated, among other enhancements. I am using it to control ventilation in a greenhouse to make sure that there is enough fresh air supplied. It can also be used to enable CO2 supplementation. In the process of testing it, I found that my indoor CO2 was reaching unhealthy levels in my house!

      Sandbox offers an Arduino C++ driver which I converted to C-like REXLANG and tested extensively. The unit is very usable inside Rexygen on a Raspberry Pi, and includes a triggerable self-calibration function that coupled with Rexygen's live start from flash allows you to carry the unit outside for unattended calibration. myproject_exec.mdl - REXYGEN Studio - [io_task _] .png Block properties 2020-05-05 00.29.43.png

      Source files for download: MH-Z16_example.zip

      1 Reply Last reply Reply Quote 0
      • jaroslav_sobotaJ
        jaroslav_sobota
        last edited by

        Hello,
        thanks for another contribution!

        Why not use the MP block for starting the calibration procedure?

        Minor note: We always recommend keeping the block name for clarity and "readability" of the algorithm. I'd go for "REXLANG_MHZ16" in this case.

        Thanks again,
        Jaroslav

        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        This is a community forum for REXYGEN users and fans. Detailed information can be found at REXYGEN homepage.

        There is also an outdated REXYGEN community forum.

        Powered by NodeBB.