Overview
In this tutorial, we will be interfacing the MiCS-5524 CO, Alcohol, and VOC Gas Sensor Module with Arduino. The MiCS-5524 sensor uses MEMS technology to detect Gas concentration or gas leakage of CO, CH4, C2H5OH, C3H8, C4H10, H2, H2S, NH3, etc.
Earlier we used gas sensors like CCS811, SGP30, BME680, MQ-135, and PMS5003, etc to measure different gas concentrations, Volatile organic compounds & particulate matter concentrations. However one of the advantages of MiCS-5524 is that it can detect and measure the concentrations of potentially hazardous gases. Using the data, you can create a safety system.
Bill of Materials
Following are the components required for this tutorial.
| S.N. | Components | Quantity | Purchase Link |
|---|---|---|---|
| 1 | Arduino Nano Board | 1 | Amazon | AliExpress |
| 2 | MiCS-5524 Sensor Module | 1 | Amazon | AliExpress |
| 3 | Jumper Wires | 10 | Amazon | AliExpress |
| 4 | Breadboard | 1 | Amazon | AliExpress |
MiCS5524 CO, Alcohol and VOC Gas Sensor Module
The MiCS-5524 Gas Sensor Module is an advanced sensing device engineered to detect a range of gaseous substances in various environments.
At the core of this module is a highly sensitive metal oxide semiconductor (MOS) layer that is specifically designed to respond to gases such as carbon monoxide, alcohol, acetone, formaldehyde, and hydrogen. This sensitivity makes the MiCS-5524 a versatile tool in numerous safety-related and air quality monitoring applications.
The module’s compact size facilitates easy integration into different hardware configurations, making it ideal for both residential and industrial setups. Its low power requirements are an additional benefit, promoting prolonged operation which is crucial for continuous monitoring tasks.
Whether integrated into home safety alarms, incorporated into smart home systems, or used in industrial air quality management, the MiCS-5524 delivers reliable and accurate gas detection, making it an essential component in any project aimed at enhancing safety and monitoring air quality. Check MiCS-5524 Datasheet for more information.
Features & Specifications of MiCS5524
- Operating Voltage: 4.9 to 5.1V DC
- Power Dissipation: 0.45W
- Output Type: Analog signal
- Measuring Ranges:
- Carbon Monoxide (CO): 1 – 1000 ppm
- Ethanol (C2H5OH): 10 – 500 ppm
- Hydrogen (H2): 1 – 1000 ppm
- Ammonia (NH3): 1 – 500 ppm
- Methane (CH4): Above 1000 ppm
- Operating Conditions:
- Temperature: -30 to 85°C
- Humidity: 5 to 95% RH (non-condensing)
- Storage Conditions:
- Temperature: -40 to 85°C
- Lifespan: Over 2 years in air
- Physical Dimensions:
- Circuit Board: 12mm x 16mm
- Mounting Holes: Inner diameter 2mm, outer diameter 4mm
- Weight: 7 grams
Pinout of MiCS5524
Here’s the pinout for the MiCS-5524 MEMS Gas Sensor Module.
| Pin Name | Description |
|---|---|
| 5V | Power supply input; connect to a 5V supply. |
| GND | Ground pin; connect to the system ground. |
| A0 | Analog Output; outputs a voltage proportional to detected gas concentrations. |
| EN | Enable pin; use to activate (high) or deactivate (low) the sensor. |
Interfacing MiCS-5524 MEMS Gas Sensor Module with Arduino
Now let us interface the MiCS-5524 CO, Alcohol & VOC Gas Sensor with Arduino Board. The following diagram shows how to interface the MiCS-5524 Gas Sensor Module with an Arduino.
- Connect the 5V pin on the Arduino to the 5V pin on the MiCS-5524.
- Connect from the GND (Ground) pin on the Arduino to the GND pin on the MiCS-5524.
- Connect the MiCS-5524’s A0 pin to one of the Arduino’s analog input pins (A0).
- Connect the EN (Enable) pin on the MiCS-5524 to a digital pin on the Arduino (D2).
This setup allows the Arduino to power the MiCS-5524 sensor, read its analog output, and control its operation via the EN pin.
Source Code/Program
The sensor uses MEMS technology to support gas concentration detection of CO, CH4, C2H5OH, C3H8, C4H10, H2, H2S and NH3. To read all these values, DFRobot has developed a library. First download the library and add it to the Arduino IDE.
Copy the following code and past it on your Arduino IDE.
This Arduino code uses the DFRobot_MICS library to manage and read data from a MICS gas sensor module. It initializes the sensor, checks its power state, and waits for it to warm up. Once initialized, the code continuously measures and displays concentrations of various gases such as carbon monoxide, methane, ethanol, hydrogen, ammonia, and nitrogen dioxide on the serial monitor.
It also includes an option to put the sensor into sleep mode to conserve power after readings, though this feature is commented out by default.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
#include "DFRobot_MICS.h" #define CALIBRATION_TIME 2 // Default calibration time is three minutes #define ADC_PIN A0 // Analog pin connected to the sensor's analog output #define POWER_PIN 2 // Digital pin to power the sensor DFRobot_MICS_ADC mics(ADC_PIN, POWER_PIN); void setup() { Serial.begin(115200); while (!Serial); // Wait for serial communication to initialize // Attempt to initialize the sensor while (!mics.begin()) { Serial.println("No devices found! Please check the connections."); delay(1000); } Serial.println("Device connected successfully!"); // Check the current power state of the sensor uint8_t mode = mics.getPowerState(); if (mode == SLEEP_MODE) { mics.wakeUpMode(); Serial.println("Sensor woken up successfully!"); } else { Serial.println("Sensor is already in wake-up mode."); } // Wait for the sensor to complete its warm-up time while (!mics.warmUpTime(CALIBRATION_TIME)) { Serial.println("Please wait until the warm-up time is over!"); delay(1000); } Serial.println("Sensor is ready for use."); } void loop() { // Read gas data from the sensor float coConcentration = mics.getGasData(CO); float ch4Concentration = mics.getGasData(CH4); float c2h5ohConcentration = mics.getGasData(C2H5OH); float h2Concentration = mics.getGasData(H2); float nh3Concentration = mics.getGasData(NH3); float no2Concentration = mics.getGasData(NO2); // Print the gas concentrations to the serial monitor Serial.print("CO (Carbon Monoxide): "); Serial.print(coConcentration, 1); Serial.println(" PPM"); Serial.print("CH4 (Methane): "); Serial.print(ch4Concentration, 1); Serial.println(" PPM"); Serial.print("C2H5OH (Ethanol): "); Serial.print(c2h5ohConcentration, 1); Serial.println(" PPM"); Serial.print("H2 (Hydrogen): "); Serial.print(h2Concentration, 1); Serial.println(" PPM"); Serial.print("NH3 (Ammonia): "); Serial.print(nh3Concentration, 1); Serial.println(" PPM"); Serial.print("NO2 (Nitrogen Dioxide): "); Serial.print(no2Concentration, 1); Serial.println(" PPM"); Serial.println(); delay(1000); // Wait for 1 second before the next reading // Uncomment the line below to put the sensor to sleep mode after each reading // mics.sleepMode(); } |
Upload the above code to your Arduino Board.
Testing the MiCS-5524 Sensor Readings
Typically, the sensor requires a warm-up period (often around 24-48 hours after first powered up) and specific calibration to environmental conditions to ensure accuracy.
Once calibrated, place the sensor in different environmental conditions to see how it responds. This could include areas with no known gas exposure to test the baseline stability and areas where you expect gas presence.
I used perfumes to test the sensor and get some readings.
As shown above, the reading changes continuously based on the availability of different gases.
You can check out the MiCS-5524 datasheet for more information on how to calibrate the mics5524 sensor before using it.













