Skip to Content

Fermion MEMS Multi-Gas Sensor MiCS-5524 with Arduino

Fermion MEMS Multi-Gas Sensor MiCS-5524 with Arduino

The Fermion MEMS Multi-Gas Sensor is a compact gas concentration sensor module built around the MiCS-5524 gas sensor, designed for integration with microcontrollers like Arduino and ESP32.

It employs MEMS (Micro-Electro-Mechanical Systems) sensing technology to detect multiple common gases, including carbon monoxide (CO), methane (CH₄), ethanol (C₂H₅OH), propane (C₃H₈), butane (C₄H₁₀), hydrogen (H₂), hydrogen sulfide (H₂S) and ammonia (NH₃).

In this tutorial you will learn how to connect the Fermion MEMS Multi-Gas Sensor to an Arduino UNO to measure these gases.

Required Parts

You will need a Fermion Multi-Gas Sensor by DFRobot. As for the microcontroller, I used an Arduino Uno for this project, but any other Arduino or ESP32 will work as well.

Fermion MEMS Multi-Gas Sensor

Arduino

Arduino Uno

USB Data Sync cable Arduino

USB Cable for Arduino UNO

Dupont wire set

Dupont Wire Set

Half_breadboard56a

Breadboard

Makerguides is a participant in affiliate advertising programs designed to provide a means for sites to earn advertising fees by linking to Amazon, AliExpress, Elecrow, and other sites. As an Affiliate we may earn from qualifying purchases.

Hardware of Fermion MEMS Multi-Gas Sensor MiCS-5524

The Fermion MEMS Multi-Gas Sensor breakout board for the MiCS-5524 measures approximately 12 mm by 16 mm and includes a four-pad connector footprint for power and signal lines.

Pinout of Fermion MEMS Multi-Gas Sensor MiCS-5524
Pinout of Fermion MEMS Multi-Gas Sensor MiCS-5524

The pads for a 5 V supply input, ground reference (GND) and the analog output voltage (A0) corresponding to gas concentration. The enable (EN) pin can be used to switch the sensor’s internal power on or off. This can be used to put it into a low-power state when continuous sensing is not required.

The picture below shows the schematics of the Fermion MEMS Multi-Gas Sensor breakout board:

Schematics of Fermion Multi-Gas Sensor MiCS-5524 (source)

Electrical and Power Characteristics

Electrically, the SEN0440 is designed to operate from a regulated 5 V DC supply with a nominal power dissipation around 0.45 W.

Although the sensor’s logic interface outputs an analog voltage in the 0–5 V range, it is compatible with microcontrollers and development boards whose input pins tolerate 3.3 V to 5.5 V levels, such as many Arduino and ESP32 variants.

The primary output is an analog voltage proportional to the target gas concentration, and that voltage must be read with an analog-to-digital converter on the host controller for further processing or conversion to parts-per-million units.

Gas Sensing Mechanism and Target Range

At its core, the SEN0440 uses the MiCS-5524 MEMS resistive gas sensor. This sensing element contains a metal-oxide semiconductor layer whose resistance varies in the presence of certain reducing gases.

The module is calibrated and tuned such that changes in this resistance are translated into an analog voltage output, which the accompanying sample code can convert to approximate concentrations of common gases.

The sensor supports detection of carbon monoxide (CO) from about 1 ppm up to 1000 ppm, hydrogen (H₂) in a similar range, ethanol (C₂H₅OH) from about 10 ppm to 500 ppm, and ammonia (NH₃) from about 1 ppm to 500 ppm. Methane (CH₄) and other light hydrocarbons such as propane and butane at concentrations from about 3000 ppm to 15000 ppm. The following graph shows the gas sensitivity characteristics of the MiCS‑5524 Sensor for the different gases:

Gas sensitivity characteristics of the MiCS‑5524 Sensor (source)

Sensor Performance and Environmental Limits

The sensing element in the SEN0440 requires a warm-up period before meaningful measurements can be obtained.

The module is specified for operation across a wide ambient temperature range from about −30 °C up to 85 °C, and it can tolerate relative humidity levels from roughly 5 % to 95 % non-condensing.

Technical Specification

The following table summarizes the technical specification of the Fermion MEMS Multi-Gas Sensor MiCS-5524:

SpecificationDetails
Sensor ModelMiCS-5524 MEMS Gas Sensor
Sensing PrincipleMetal-oxide semiconductor resistive gas sensing
Detectable GasesCO, H₂, C₂H₅OH, NH₃, CH₄, C₃H₈, C₄H₁₀ (multi-gas, limited selectivity)
Gas Concentration RangeCO: ~1 ppm–1000 ppm; H₂: ~1 ppm–1000 ppm; Ethanol: ~10 ppm–500 ppm; NH₃: ~1 ppm–500 ppm; Hydrocarbons detectable at higher ppm
Output TypeAnalog voltage proportional to concentration
Output Voltage Range0 V–5 V (proportional to gas level)
Supply Voltage5 V DC nominal
Warm-up TimeTens of seconds (typical for stable readings)
Operating Temperature−30 °C to +85 °C
Operating Humidity5 % to 95 % RH (non-condensing)
Typical Power Consumption~0.45 W (at 5 V)
Interface Compatibility3.3 V–5.5 V microcontroller analog input compatible
Lifespan>2 years

And here is a link to the Datasheet for the MiCS-5524 sensor with additional technical data:

Connecting the Fermion MEMS Multi-Gas Sensor to Arduino UNO

Connecting the sensor to an Arduino UNO is simple. Connect VCC to 5V , GND to ground, A0 to the analog input A0, and EN to GPIO 10 as shown below:

Connecting Fermion MEMS Multi-Gas Sensor to Arduino
Connecting Fermion MEMS Multi-Gas Sensor to Arduino

Installing the DFRobot_MICS Library

We are going to use the DFRobot_MICS Library for reading data from the MiCS-5524 sensor. To install it download the DFRobot_MICS Library as ZIP file (DFRobot_MICS-master.zip) to your computer.

Then open a new Sketch, go to Sketch -> Include Library -> Add .ZIP Library … to install the downloaded ZIP library (DFRobot_MICS-master.zip):

Code for reading Gas Concentrations

The code following demonstrates how to use the Fermion MEMS Multi-Gas Sensor MiCS-5524 with an Arduino board.

The sensor detects gases such as carbon monoxide, methane, ethanol, hydrogen, ammonia, and nitrogen dioxide, providing their concentrations in parts per million (PPM).

The program initializes the sensor, performs a warm-up calibration, and then continuously reads and displays the gas concentrations via the serial monitor.

// https://github.com/dfrobot/DFRobot_MICS  V 1.0.0
// www.makerguides.com

#include "DFRobot_MICS.h"

#define CALIBRATION_TIME 3  // mins
#define ADC_PIN A0
#define POWER_PIN 10

DFRobot_MICS_ADC mics(ADC_PIN, POWER_PIN);

void display(const char* text, float value) {
  Serial.print(text);
  Serial.print(value, 1);
  Serial.println(" PPM");
}

void setup() {
  Serial.begin(115200);

  while (!mics.begin()) {
    Serial.println("Can't find Sensor!");
    delay(1000);
  }

  uint8_t mode = mics.getPowerState();
  if (mode == SLEEP_MODE) {
    mics.wakeUpMode();
    Serial.println("Sensor is awake!");
  }

  Serial.print("Warming up, do not touch sensor");
  while (!mics.warmUpTime(CALIBRATION_TIME)) {
    Serial.print(".");
    delay(1000);
  }
  Serial.println("ready!");
}

void loop() {
  Serial.println("\nGas concentrations ----------");
  display("CO (Carbon Monoxide)  : ", mics.getGasData(CO));
  display("CH4 (Methane)         : ", mics.getGasData(CH4));
  display("C2H5OH (Ethanol)      : ", mics.getGasData(C2H5OH));    
  display("H2 (Hydrogen)         : ", mics.getGasData(H2));
  display("NH3 (Ammonia)         : ", mics.getGasData(NH3));
  display("NO2 (Nitrogen Dioxide): ", mics.getGasData(NO2));      

  delay(1000);   
  mics.sleepMode();
}

Let’s break down the code into its main components to understand how it works.

Imports

The code begins by including the DFRobot_MICS.h library, which provides the necessary functions and definitions to interface with the MiCS-5524 sensor.

#include "DFRobot_MICS.h"

Constants

Next, several constants are defined. CALIBRATION_TIME specifies the sensor warm-up duration in minutes, which is essential for accurate readings. ADC_PIN and POWER_PIN define the Arduino analog input pin connected to the sensor output and the digital pin controlling the sensor’s power supply, respectively.

#define CALIBRATION_TIME 3  // mins
#define ADC_PIN A0
#define POWER_PIN 10

Sensor Object

An instance of the DFRobot_MICS_ADC class named mics is created, passing the ADC pin and power pin to its constructor. This object manages communication with the sensor and controls its operation.

DFRobot_MICS_ADC mics(ADC_PIN, POWER_PIN);

Display Function

The display() function is a helper that takes a descriptive text and a floating-point gas concentration value. It prints the text followed by the value formatted to one decimal place and appends the unit “PPM” to the serial monitor. This function simplifies output formatting in the main loop.

void display(const char* text, float value) {
  Serial.print(text);
  Serial.print(value, 1);
  Serial.println(" PPM");
}

Setup Function

In the setup() function, serial communication is initialized at 115200 baud to enable data output to the serial monitor. The program then attempts to initialize the sensor by calling mics.begin() in a loop until it succeeds, printing an error message every second if the sensor is not found.

After successful initialization, the sensor’s power state is checked. If the sensor is in sleep mode, it is awakened using wakeUpMode(), and a confirmation message is printed.

The sensor requires a warm-up period for calibration to ensure accurate gas measurements. The code prints a message and waits until the warm-up time specified by CALIBRATION_TIME minutes has elapsed, printing dots every second to indicate progress. Once ready, it prints a confirmation.

void setup() {
  Serial.begin(115200);

  while (!mics.begin()) {
    Serial.println("Can't find Sensor!");
    delay(1000);
  }

  uint8_t mode = mics.getPowerState();
  if (mode == SLEEP_MODE) {
    mics.wakeUpMode();
    Serial.println("Sensor is awake!");
  }

  Serial.print("Warming up, do not touch sensor");
  while (!mics.warmUpTime(CALIBRATION_TIME)) {
    Serial.print(".");
    delay(1000);
  }
  Serial.println("ready!");
}

Loop Function

The loop() function runs repeatedly after setup. It starts by printing a header to the serial monitor to indicate the beginning of gas concentration readings. Then, it calls the display() function for each gas type supported by the sensor: carbon monoxide (CO), methane (CH4), ethanol (C2H5OH), hydrogen (H2), ammonia (NH3), and nitrogen dioxide (NO2). For each gas, it retrieves the concentration in PPM using mics.getGasData() with the corresponding gas identifier.

After printing all gas concentrations, the program waits for one second. You can put the sensor into sleep mode using mics.sleepMode() to conserve power until the next reading cycle.

void loop() {
  Serial.println("\nGas concentrations ----------");
  display("CO (Carbon Monoxide)  : ", mics.getGasData(CO));
  display("CH4 (Methane)         : ", mics.getGasData(CH4));
  display("C2H5OH (Ethanol)      : ", mics.getGasData(C2H5OH));    
  display("H2 (Hydrogen)         : ", mics.getGasData(H2));
  display("NH3 (Ammonia)         : ", mics.getGasData(NH3));
  display("NO2 (Nitrogen Dioxide): ", mics.getGasData(NO2));      

  delay(1000);   
  // mics.sleepMode();
}

Output Example

The following example shows the output on the Serial Monitor. After warming up the code prints the gas concentrations for a first sample, which are all 0.

During the second sampling period, I sprayed some glass cleaner close to the sensor and you can see the increased values for Methane and Ammonia in the sensor data.

Sensor is awake!
Warming up, do not touch sensor.....................ready!

Gas concentrations ----------
CO (Carbon Monoxide)  : 0.0 PPM
CH4 (Methane)         : 0.0 PPM
C2H5OH (Ethanol)      : 0.0 PPM
H2 (Hydrogen)         : 0.0 PPM
NH3 (Ammonia)         : 0.0 PPM
NO2 (Nitrogen Dioxide): 0.0 PPM

Gas concentrations ----------
CO (Carbon Monoxide)  : 0.0 PPM
CH4 (Methane)         : 5402.4 PPM
C2H5OH (Ethanol)      : 0.0 PPM
H2 (Hydrogen)         : 0.0 PPM
NH3 (Ammonia)         : 87.7 PPM
NO2 (Nitrogen Dioxide): 0.0 PPM

Conclusion

In this tutorial you learned how to use the Fermion MEMS Multi-Gas Sensor with an Arduino UNO to detect various gases. The sensor can be easily used with other microcontrollers such as an ESP32 as well.

Note that there is an entire series of different MEMS sensors available. For an overview see the Review of the DFRobot Fermion MEMS Gas Sensor Series article and for specifics our dedicated posts:

If you have any questions feel free to leave them in the comment section.

Happy Tinkering 😉