MQ-137 NH3 Gas Sensor Module for Ammonia, Carbon monoxide Detector Module
MQ-137 NH3 Gas Sensor Module for Ammonia, Carbon monoxide Detector Module
The MQ-137 NH3 Gas Sensor Module is a sensitive and reliable detector module designed to detect ammonia (NH3) and carbon monoxide (CO) gases. This module is ideal for various IoT applications, such as air quality monitoring, industrial process control, and safety systems.
The MQ-137 NH3 Gas Sensor Module is based on a metal oxide semiconductor (MOS) type sensor, which detects the presence of ammonia and carbon monoxide gases in the air. When the sensor detects the target gas, it changes its electrical resistance, which is then measured by an onboard circuit. The module provides an analog output signal that corresponds to the gas concentration, allowing for easy integration with microcontrollers, Arduino, or Raspberry Pi boards.
Metal Oxide Semiconductor (MOS)
Resistance change due to gas presence
Analog voltage (0-5V)
5V
<20mA
-20C to 50C
5-90% RH (non-condensing)
24mm x 20mm x 10mm (L x W x H)
Air quality monitoring systems
Industrial process control and safety systems
Environmental monitoring
IoT applications for smart homes and buildings
Medical and healthcare applications
When using the MQ-137 NH3 Gas Sensor Module, it is essential to follow proper safety precautions, such as |
Handling the module with care to avoid damage or contamination
Using the module in well-ventilated areas to prevent gas accumulation
Avoiding exposure to high temperatures, humidity, or corrosive substances
Following proper calibration and maintenance procedures to ensure accurate readings
MQ-137 NH3 Gas Sensor Module for Ammonia, Carbon Monoxide Detector Module Documentation
Overview
The MQ-137 NH3 Gas Sensor Module is a highly sensitive detector module designed to detect ammonia (NH3) and carbon monoxide (CO) gases. It is based on the MQ-137 gas sensor, which is a metal oxide semiconductor (MOS) type sensor. This module is widely used in various applications, including industrial automation, environmental monitoring, and safety systems.
Technical Specifications
Sensor Type: Metal Oxide Semiconductor (MOS)
Detectable Gases: Ammonia (NH3), Carbon Monoxide (CO)
Detection Range:
+ Ammonia (NH3): 1-500 ppm
+ Carbon Monoxide (CO): 1-1000 ppm
Operating Voltage: 5V
Operating Current: 150mA
Output Signal: Analog Voltage (0-5V)
Response Time: <10 seconds
Dimensions: 32 x 22 x 18 mm
Pinout
VCC: 5V Power Supply
GND: Ground
OUT: Analog Output Signal
Code Examples
### Example 1: Basic Analog Readout using Arduino
This example demonstrates how to use the MQ-137 NH3 Gas Sensor Module with an Arduino board to read the analog output signal and detect the presence of ammonia or carbon monoxide gases.
```c
const int sensorPin = A0; // Analog input pin for sensor output
void setup() {
Serial.begin(9600);
}
void loop() {
int sensorValue = analogRead(sensorPin);
float voltage = sensorValue (5.0 / 1023.0);
Serial.print("Gas Concentration: ");
Serial.print(voltage);
Serial.println(" V");
// Example threshold values for gas detection
if (voltage > 2.5) {
Serial.println("Ammonia or Carbon Monoxide detected!");
} else {
Serial.println("No gas detected.");
}
delay(1000);
}
```
### Example 2: Digital Output using Raspberry Pi and Python
This example demonstrates how to use the MQ-137 NH3 Gas Sensor Module with a Raspberry Pi to read the analog output signal and detect the presence of ammonia or carbon monoxide gases. The example uses the RPi.GPIO library to read the analog signal and convert it to a digital output.
```python
import RPi.GPIO as GPIO
import time
# Set up GPIO mode
GPIO.setmode(GPIO.BCM)
# Define the sensor pin
sensor_pin = 17
# Set up the sensor pin as an input
GPIO.setup(sensor_pin, GPIO.IN)
while True:
# Read the analog signal
sensor_value = GPIO.input(sensor_pin)
# Example threshold values for gas detection
if sensor_value > 0.5:
print("Ammonia or Carbon Monoxide detected!")
else:
print("No gas detected.")
time.sleep(1)
```
### Example 3: IC Interface using ESP32 and MicroPython
This example demonstrates how to use the MQ-137 NH3 Gas Sensor Module with an ESP32 board and MicroPython to read the analog output signal and detect the presence of ammonia or carbon monoxide gases. The example uses the machine library to read the analog signal and convert it to a digital output.
```python
import machine
import time
# Set up the IC interface
i2c = machine.I2C(scl=machine.Pin(22), sda=machine.Pin(21))
# Define the sensor address
sensor_addr = 0x04
while True:
# Read the analog signal
sensor_value = i2c.readfrom(sensor_addr, 1)[0]
# Example threshold values for gas detection
if sensor_value > 128:
print("Ammonia or Carbon Monoxide detected!")
else:
print("No gas detected.")
time.sleep(1)
```
Note: The above code examples assume a basic understanding of the programming languages and platforms used. You may need to modify the code to suit your specific requirements and hardware configurations.