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

How to Use MQ-138 SENSOR FORMALDEHYDE GAS: Examples, Pinouts, and Specs

Image of MQ-138 SENSOR FORMALDEHYDE GAS
Cirkit Designer LogoDesign with MQ-138 SENSOR FORMALDEHYDE GAS in Cirkit Designer

Introduction

The MQ-138 sensor is an electrochemical gas sensor designed for the detection of formaldehyde (HCHO) in the air. It is widely used in various applications such as indoor air quality monitoring, industrial safety, and environmental protection. The sensor's high sensitivity and fast response time make it an ideal choice for detecting formaldehyde concentrations in real-time.

Explore Projects Built with MQ-138 SENSOR FORMALDEHYDE GAS

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Battery-Powered MQ-2 Gas Sensor with Alert Buzzer
Image of gas detect: A project utilizing MQ-138 SENSOR FORMALDEHYDE GAS in a practical application
This is a simple gas detection alarm system that uses an MQ-2 sensor to detect gas presence and sound a buzzer when gas is detected. It is powered by a rechargeable 18650 battery, with a TP4056 module for battery management and charging. A rocker switch is used to control the power to the system.
Cirkit Designer LogoOpen Project in Cirkit Designer
Multi-Gas Detection System with Arduino and MQ Sensors
Image of Centrala calitate aer: A project utilizing MQ-138 SENSOR FORMALDEHYDE GAS in a practical application
This circuit is designed to monitor various gases using a series of MQ gas sensors (MQ-2, MQ-3, MQ-4, MQ-5, MQ-6, MQ-7, MQ-8, MQ-9, and MQ-135), each providing digital outputs to an Arduino UNO microcontroller. The Arduino is also connected to a piezo speaker for audible alerts and multiple LEDs with resistors, likely for visual status indicators. An Adafruit TCA9548A I2C multiplexer is included, suggesting the potential for I2C sensor expansion or managing multiple I2C devices.
Cirkit Designer LogoOpen Project in Cirkit Designer
Solar-Powered Environmental Monitoring Station with ESP32 and Gas Sensors
Image of AIR QUALITY MONITORING: A project utilizing MQ-138 SENSOR FORMALDEHYDE GAS in a practical application
This circuit is designed to monitor various gas levels and air quality using a set of sensors (MQ-136, MQ-6, MQ-137, MQ-7, and PMS5003) interfaced with an ESP32 microcontroller. The ESP32 collects sensor data and can control a relay module potentially for activating systems like fans or alarms based on the sensor readings. Additional components include a DHT22 for temperature and humidity readings, a power supply with a step-down converter, and safety features like resettable fuses and an LVD (Low Voltage Disconnect) to protect the battery and circuit.
Cirkit Designer LogoOpen Project in Cirkit Designer
Gas Detection System with Relay-Controlled Fan and LED Indicators
Image of gas detector : A project utilizing MQ-138 SENSOR FORMALDEHYDE GAS in a practical application
This circuit is a gas detection system that uses an MQ6 sensor to detect gas levels and control a fan and LEDs through a relay and a transistor. When gas is detected, the relay activates the fan and LEDs to indicate the presence of gas and provide ventilation.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with MQ-138 SENSOR FORMALDEHYDE GAS

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 gas detect: A project utilizing MQ-138 SENSOR FORMALDEHYDE GAS in a practical application
Battery-Powered MQ-2 Gas Sensor with Alert Buzzer
This is a simple gas detection alarm system that uses an MQ-2 sensor to detect gas presence and sound a buzzer when gas is detected. It is powered by a rechargeable 18650 battery, with a TP4056 module for battery management and charging. A rocker switch is used to control the power to the system.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Centrala calitate aer: A project utilizing MQ-138 SENSOR FORMALDEHYDE GAS in a practical application
Multi-Gas Detection System with Arduino and MQ Sensors
This circuit is designed to monitor various gases using a series of MQ gas sensors (MQ-2, MQ-3, MQ-4, MQ-5, MQ-6, MQ-7, MQ-8, MQ-9, and MQ-135), each providing digital outputs to an Arduino UNO microcontroller. The Arduino is also connected to a piezo speaker for audible alerts and multiple LEDs with resistors, likely for visual status indicators. An Adafruit TCA9548A I2C multiplexer is included, suggesting the potential for I2C sensor expansion or managing multiple I2C devices.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of AIR QUALITY MONITORING: A project utilizing MQ-138 SENSOR FORMALDEHYDE GAS in a practical application
Solar-Powered Environmental Monitoring Station with ESP32 and Gas Sensors
This circuit is designed to monitor various gas levels and air quality using a set of sensors (MQ-136, MQ-6, MQ-137, MQ-7, and PMS5003) interfaced with an ESP32 microcontroller. The ESP32 collects sensor data and can control a relay module potentially for activating systems like fans or alarms based on the sensor readings. Additional components include a DHT22 for temperature and humidity readings, a power supply with a step-down converter, and safety features like resettable fuses and an LVD (Low Voltage Disconnect) to protect the battery and circuit.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of gas detector : A project utilizing MQ-138 SENSOR FORMALDEHYDE GAS in a practical application
Gas Detection System with Relay-Controlled Fan and LED Indicators
This circuit is a gas detection system that uses an MQ6 sensor to detect gas levels and control a fan and LEDs through a relay and a transistor. When gas is detected, the relay activates the fan and LEDs to indicate the presence of gas and provide ventilation.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Indoor air quality monitoring
  • Environmental monitoring
  • Industrial safety systems
  • Smart home systems

Technical Specifications

Key Technical Details

  • Target Gas: Formaldehyde (HCHO)
  • Detection Range: 5 to 500 ppm
  • Preheat Duration: 24 hours for initial use
  • Response Time: ≤ 90 seconds
  • Recovery Time: ≤ 90 seconds
  • Working Voltage: 5V ± 0.1
  • Heater Voltage: 5V ± 0.1
  • Heater Power: Approx. 800mW
  • Operating Temperature: -10°C to 50°C
  • Relative Humidity: 95% RH non-condensing

Pin Configuration and Descriptions

Pin Number Pin Name Description
1 VCC Power supply (5V)
2 GND Ground
3 DOUT Digital output (TTL logic level)
4 AOUT Analog output (proportional to HCHO)

Usage Instructions

How to Use the Component in a Circuit

  1. Powering the Sensor: Connect the VCC pin to a 5V power supply and the GND pin to the ground.
  2. Reading the Sensor:
    • Analog Output: Connect the AOUT pin to an analog input on your microcontroller to read the concentration of formaldehyde.
    • Digital Output: Connect the DOUT pin to a digital input on your microcontroller. The digital output can be used to detect if the gas concentration exceeds a certain threshold.
  3. Calibration: Before using the sensor for accurate measurements, it should be calibrated in an environment with a known concentration of formaldehyde.

Important Considerations and Best Practices

  • Ensure the sensor is preheated for the recommended duration before initial use.
  • Avoid exposure to high concentrations of organic solvents, silicon compounds, and sulfur compounds as they may affect the sensor's performance.
  • The sensor's readings can be affected by temperature and humidity; compensate for these factors in your application.
  • Regularly calibrate the sensor to maintain accuracy.

Troubleshooting and FAQs

Common Issues Users Might Face

  • Inaccurate Readings: Ensure the sensor is properly calibrated and not exposed to interfering gases.
  • No Response: Check the power supply and connections to the sensor.

Solutions and Tips for Troubleshooting

  • If the sensor is not responding, verify that the power supply is 5V and the connections are secure.
  • For inaccurate readings, recalibrate the sensor and ensure it is used within the specified temperature and humidity range.

FAQs

Q: How often should the MQ-138 sensor be calibrated? A: The sensor should be calibrated periodically, depending on the usage and the environmental conditions.

Q: Can the MQ-138 sensor detect other gases? A: While the sensor is designed for formaldehyde, it may respond to other gases. It is important to use the sensor in an environment where the target gas is the primary concern.

Q: Is the MQ-138 sensor suitable for outdoor use? A: The sensor is designed for indoor use and may not perform reliably outdoors due to environmental factors.

Example Arduino Code

// MQ-138 Formaldehyde Sensor Example Code
int analogPin = A0; // Analog input pin connected to AOUT on the sensor
int sensorValue = 0; // Variable to store the sensor value

void setup() {
  Serial.begin(9600); // Initialize serial communication at 9600 baud rate
}

void loop() {
  sensorValue = analogRead(analogPin); // Read the sensor value
  Serial.print("Formaldehyde concentration: ");
  Serial.println(sensorValue); // Print the sensor value to the serial monitor
  delay(1000); // Wait for 1 second before reading again
}

Note: This example code provides a simple way to read the analog output from the MQ-138 sensor. The raw sensor value needs to be converted to an actual concentration value using a calibration curve specific to the MQ-138 sensor. Calibration involves comparing the sensor's output to known formaldehyde concentrations under controlled conditions.