Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use MQ-8: Examples, Pinouts, and Specs

Image of MQ-8
Cirkit Designer LogoDesign with MQ-8 in Cirkit Designer

Introduction

The MQ-8 is a hydrogen gas sensor manufactured by Flying Fish, designed to detect hydrogen gas concentrations in the air. It operates on the principle of resistive change, where the sensor's resistance varies in the presence of hydrogen gas. The MQ-8 provides an analog output signal proportional to the detected gas concentration, making it suitable for a wide range of applications.

Explore Projects Built with MQ-8

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino-Based Air Quality Monitoring System with Multiple Gas Sensors and GSM Module
Image of AIRMS: A project utilizing MQ-8 in a practical application
This circuit is an air quality monitoring system that uses an Arduino UNO to read data from various sensors, including the MQ-7 for CO detection, MQ131 for ozone detection, MQ-135 for general air quality, and a DHT11 for temperature and humidity. The Arduino processes the sensor data and can communicate the results via a SIM800L module for remote monitoring.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO and A9G GSM/GPRS GPS-Based Air Quality Monitoring System
Image of A9G Smoke Sensor: A project utilizing MQ-8 in a practical application
This circuit features an Arduino UNO microcontroller interfaced with an A9G GSM/GPRS+GPS module and an MQ2 gas sensor. The Arduino communicates with the A9G module via digital pins D11 and D10 for data transmission, and it reads analog gas concentration levels from the MQ2 sensor through analog pin A5. Both the A9G module and the MQ2 sensor are powered by the Arduino's 5V output, and all components share a common ground.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO Based Air Quality Monitoring and GSM Notification System
Image of Arduino wild: A project utilizing MQ-8 in a practical application
This circuit features an Arduino UNO microcontroller interfaced with an MQ135 air quality sensor, an MPU-6050 accelerometer/gyroscope, a SIM900A GSM communication module, and a buzzer. The Arduino reads analog data from the MQ135 sensor and communicates with the MPU-6050 via I2C, while also controlling the buzzer and handling serial communication with the SIM900A module. The purpose of this circuit is likely to monitor air quality and motion, provide alerts through the buzzer, and enable remote communication via GSM.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Smart Fire and Gas Detection System with GSM and OLED Display
Image of outline robotics: A project utilizing MQ-8 in a practical application
This circuit is a multi-sensor monitoring system using an ESP32 microcontroller. It integrates various sensors including flame sensors, gas sensors (MQ-2 and MQ-7), a temperature and humidity sensor, and an OLED display for real-time data visualization. Additionally, it includes a relay module for controlling external devices and a GSM module for remote communication.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with MQ-8

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of AIRMS: A project utilizing MQ-8 in a practical application
Arduino-Based Air Quality Monitoring System with Multiple Gas Sensors and GSM Module
This circuit is an air quality monitoring system that uses an Arduino UNO to read data from various sensors, including the MQ-7 for CO detection, MQ131 for ozone detection, MQ-135 for general air quality, and a DHT11 for temperature and humidity. The Arduino processes the sensor data and can communicate the results via a SIM800L module for remote monitoring.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of A9G Smoke Sensor: A project utilizing MQ-8 in a practical application
Arduino UNO and A9G GSM/GPRS GPS-Based Air Quality Monitoring System
This circuit features an Arduino UNO microcontroller interfaced with an A9G GSM/GPRS+GPS module and an MQ2 gas sensor. The Arduino communicates with the A9G module via digital pins D11 and D10 for data transmission, and it reads analog gas concentration levels from the MQ2 sensor through analog pin A5. Both the A9G module and the MQ2 sensor are powered by the Arduino's 5V output, and all components share a common ground.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Arduino wild: A project utilizing MQ-8 in a practical application
Arduino UNO Based Air Quality Monitoring and GSM Notification System
This circuit features an Arduino UNO microcontroller interfaced with an MQ135 air quality sensor, an MPU-6050 accelerometer/gyroscope, a SIM900A GSM communication module, and a buzzer. The Arduino reads analog data from the MQ135 sensor and communicates with the MPU-6050 via I2C, while also controlling the buzzer and handling serial communication with the SIM900A module. The purpose of this circuit is likely to monitor air quality and motion, provide alerts through the buzzer, and enable remote communication via GSM.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of outline robotics: A project utilizing MQ-8 in a practical application
ESP32-Based Smart Fire and Gas Detection System with GSM and OLED Display
This circuit is a multi-sensor monitoring system using an ESP32 microcontroller. It integrates various sensors including flame sensors, gas sensors (MQ-2 and MQ-7), a temperature and humidity sensor, and an OLED display for real-time data visualization. Additionally, it includes a relay module for controlling external devices and a GSM module for remote communication.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Hydrogen gas leak detection in industrial environments
  • Monitoring hydrogen levels in fuel cells
  • Safety systems in laboratories and chemical plants
  • Portable gas detection devices
  • Environmental monitoring systems

Technical Specifications

The MQ-8 sensor is designed for reliable and accurate hydrogen gas detection. Below are its key technical details:

Parameter Value
Manufacturer Flying Fish
Part ID MQ-8
Target Gas Hydrogen (H₂)
Operating Voltage 5V DC
Load Resistance (RL) Adjustable (typically 10 kΩ)
Heater Voltage (VH) 5V ± 0.2V
Heater Power Consumption ≤ 800 mW
Detection Range 100 ppm to 10,000 ppm
Preheat Time ≥ 24 hours (for stable readings)
Analog Output 0V to 5V (proportional to gas concentration)
Operating Temperature -20°C to 50°C
Humidity Range ≤ 95% RH
Dimensions 32mm x 20mm x 22mm

Pin Configuration and Descriptions

The MQ-8 sensor module typically comes with a 4-pin interface. Below is the pin configuration:

Pin Name Description
1 VCC Power supply pin (5V DC)
2 GND Ground pin
3 AOUT Analog output pin (provides voltage proportional to gas concentration)
4 DOUT Digital output pin (high/low signal based on threshold)

Usage Instructions

How to Use the MQ-8 in a Circuit

  1. Power Supply: Connect the VCC pin to a 5V DC power source and the GND pin to ground.
  2. Analog Output: Connect the AOUT pin to an analog input pin of a microcontroller (e.g., Arduino) to read the gas concentration as a voltage.
  3. Digital Output: Optionally, connect the DOUT pin to a digital input pin of a microcontroller. The DOUT pin provides a high or low signal based on the gas concentration exceeding a preset threshold, which can be adjusted using the onboard potentiometer.
  4. Preheating: Allow the sensor to preheat for at least 24 hours before taking stable readings.
  5. Load Resistor: Ensure the load resistor (RL) is properly configured. A typical value is 10 kΩ, but it can be adjusted based on the application.

Important Considerations and Best Practices

  • Preheat Time: The sensor requires a preheat time of at least 24 hours for accurate and stable readings.
  • Ventilation: Ensure proper ventilation in the testing environment to avoid false readings caused by stagnant air.
  • Calibration: Calibrate the sensor in a known hydrogen gas concentration environment for precise measurements.
  • Avoid Contaminants: Keep the sensor away from water, oil, and other contaminants that may damage the sensing element.
  • Power Supply Stability: Use a stable 5V DC power supply to avoid fluctuations in the sensor's output.

Example Code for Arduino UNO

Below is an example of how to interface the MQ-8 sensor with an Arduino UNO to read the analog output:

// MQ-8 Hydrogen Gas Sensor Example Code
// Connect AOUT to Arduino analog pin A0
// Connect VCC to 5V and GND to GND

const int analogPin = A0;  // Analog pin connected to AOUT
int sensorValue = 0;       // Variable to store sensor reading

void setup() {
  Serial.begin(9600);  // Initialize serial communication at 9600 baud
  Serial.println("MQ-8 Hydrogen Gas Sensor Test");
}

void loop() {
  // Read the analog value from the sensor
  sensorValue = analogRead(analogPin);

  // Convert the analog value to voltage (assuming 5V reference)
  float voltage = sensorValue * (5.0 / 1023.0);

  // Print the sensor value and voltage to the Serial Monitor
  Serial.print("Sensor Value: ");
  Serial.print(sensorValue);
  Serial.print(" | Voltage: ");
  Serial.print(voltage);
  Serial.println(" V");

  delay(1000);  // Wait for 1 second before the next reading
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Output Signal:

    • Cause: Incorrect wiring or power supply.
    • Solution: Verify all connections and ensure the sensor is powered with 5V DC.
  2. Unstable Readings:

    • Cause: Insufficient preheat time or fluctuating power supply.
    • Solution: Allow the sensor to preheat for at least 24 hours and use a stable power source.
  3. False Alarms:

    • Cause: Presence of other gases or contaminants.
    • Solution: Ensure the sensor is used in a clean environment and calibrate it for hydrogen gas.
  4. Low Sensitivity:

    • Cause: Incorrect load resistor value.
    • Solution: Adjust the load resistor (RL) to optimize sensitivity.

FAQs

Q1: Can the MQ-8 detect gases other than hydrogen?
A1: While the MQ-8 is optimized for hydrogen gas, it may respond to other gases. However, its sensitivity and accuracy for non-hydrogen gases are not guaranteed.

Q2: How do I calibrate the MQ-8 sensor?
A2: Expose the sensor to a known concentration of hydrogen gas and adjust the load resistor or threshold potentiometer to match the expected output.

Q3: Can I use the MQ-8 with a 3.3V microcontroller?
A3: The MQ-8 requires a 5V power supply for the heater. However, you can use a voltage divider or level shifter to interface the analog output with a 3.3V microcontroller.

Q4: How long does the MQ-8 sensor last?
A4: The sensor's lifespan depends on usage and environmental conditions. Under normal conditions, it can last several years.