The MQ-137 Sensor Ammonia Gas V2 is an analog gas sensor module designed for the detection of ammonia (NH3) in the air. It is widely used in industrial and environmental applications to monitor air quality and control systems that require the measurement of NH3 concentration. The sensor's high sensitivity and fast response time make it suitable for safety systems in agricultural, chemical, and manufacturing industries.
Pin Number | Description | Notes |
---|---|---|
1 | VCC | Supply Voltage (5V) |
2 | GND | Ground |
3 | Digital Out (DOUT) | TTL output for threshold alarm |
4 | Analog Out (AOUT) | Analog output voltage |
5 | Heater Control (H) | Heater control (not always used) |
Q: Can the MQ-137 sensor detect other gases? A: While the MQ-137 is designed for ammonia detection, it may show cross-sensitivity to other gases. It is important to calibrate the sensor for NH3 specifically.
Q: How do I adjust the sensitivity of the sensor? A: Sensitivity can be adjusted by turning the onboard potentiometer. Clockwise increases sensitivity, while counterclockwise decreases it.
Q: What is the lifespan of the MQ-137 sensor? A: The typical lifespan of the sensor is about 2 years, depending on the usage and environmental conditions.
// MQ-137 Ammonia Gas Sensor Example Code
const int analogPin = A0; // Analog output from the MQ-137 sensor
const int heaterPin = 2; // Digital pin connected to the heater control (if used)
void setup() {
Serial.begin(9600); // Start serial communication at 9600 baud
pinMode(heaterPin, OUTPUT); // Set heater pin as an output
digitalWrite(heaterPin, HIGH); // Turn on the heater (if used)
}
void loop() {
int sensorValue = analogRead(analogPin); // Read the sensor output
float concentration = sensorValue * (10.0 / 1023.0); // Convert to concentration
Serial.print("Ammonia concentration: ");
Serial.print(concentration);
Serial.println(" ppm");
delay(1000); // Wait for 1 second before the next read
}
Note: The above code is a simple example to read the analog output from the MQ-137 sensor. The conversion from the sensor value to the actual concentration in ppm requires proper calibration with a known concentration of ammonia gas.