MICS 4514 showing 0.00ppm for every parameter

userHead Tugeendharnadh.Bokka 2024-05-08 18:04:37 74 Views0 Replies

I am using the sensor MICS-4514, which gives the same code without any changes. I checked connections and addresses by the I2C scanner, but the sensor still shows 0.00ppm for every parameter like C2H50H, NH3, NO2, and CO. What do I have to do now? Can you please help me with this problem?
but I am getting adc value very perfectly means red_data and ox_data but coming to here separate parameters like no2,nh3,co and c2h50h it is showing only 0.00ppm in serial monitor , iam using mics-4514 I2C sensor module with Arduino uno controller with 5v of power supply, can you please resolve this problem what is wrong here

here the program I am using


  * @file  getGasPPM.ino

  * @brief Reading Gas concentration, A concentration of one part per million (PPM).

  * @n When using IIC device, select I2C address, set the dialing switch A0, A1 (Address_0 is [0 0]), (Address_1 is [1 0]), (Address_2 is [0 1]), (Address_3 is [1 1]).

  * @n When using the Breakout version, connect the adcPin and PowerPin

  * @copyright   Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)

  * @licence     The MIT License (MIT)

  * @author      ZhixinLiu([email protected])

  * @version     V1.1

  * @date        2021-04-19

  * @get         from https://www.dfrobot.com

  * @url         https://github.com/dfrobot/DFRobot_MICS


#include "DFRobot_MICS.h"


#define CALIBRATION_TIME   3                      // Default calibration time is three minutes


// When using I2C communication, use the following program to construct an object by DFRobot_MICS_I2C


    iic slave Address, The default is ADDRESS_3

       ADDRESS_0               0x75             // i2c device address

       ADDRESS_1               0x76

       ADDRESS_2               0x77

       ADDRESS_3               0x78


#define Mics_I2C_ADDRESS ADDRESS_3

DFRobot_MICS_I2C mics(&Wire, Mics_I2C_ADDRESS);


// When using the Breakout version, use the following program to construct an object from DFRobot_MICS_ADC


  adcPin is A0~A5

  powerPin is General IO


#define ADC_PIN   A0

#define POWER_PIN 10

//DFRobot_MICS_ADC mics(/*adcPin*/ADC_PIN, /*powerPin*/POWER_PIN);


void setup()





    Serial.println("NO Deivces !");


  } Serial.println("Device connected successfully !");



    Gets the power mode of the sensor

    The sensor is in sleep mode when power is on,so it needs to wake up the sensor.

    The data obtained in sleep mode is wrong


  uint8_t mode = mics.getPowerState();

  if(mode == SLEEP_MODE){


    Serial.println("wake up sensor success!");


    Serial.println("The sensor is wake up mode");




     Do not touch the sensor probe when preheating the sensor.

     Place the sensor in clean air.

     The default calibration time is 3 minutes.



    Serial.println("Please wait until the warm-up time is over!");





void loop()



    Gas type:

    MICS-4514 You can get all gas concentration

    MICS-5524 You can get the concentration of CH4, C2H5OH, H2, NH3, CO

    MICS-2714 You can get the concentration of NO2

      Methane          (CH4)    (1000 - 25000)PPM

      Ethanol          (C2H5OH) (10   - 500)PPM

      Hydrogen         (H2)     (1    - 1000)PPM

      Ammonia          (NH3)    (1    - 500)PPM

      Carbon Monoxide  (CO)     (1    - 1000)PPM

      Nitrogen Dioxide (NO2)    (0.1  - 10)PPM


  float gasdata_c2h50h = mics.getGasData(C2H5OH);

  Serial.print("C2H5OH Concentration: ");


  Serial.println(" PPM");


  float gasdata_co = mics.getGasData(CO);

  Serial.print("CO Concentration: ");


  Serial.println(" PPM");


  float gasdata_nh3 = mics.getGasData(NH3);

  Serial.print("NH3 Concentration: ");


  Serial.println(" PPM");


  float gasdata_no2 = mics.getGasData(NO2);

  Serial.print("NO2 Concentration: ");


  Serial.println(" PPM");