Component guide · Intermediate · 3 min read
MQ-136 Hydrogen Sulfide, MQ-137 Ammonia and MQ-138 VOC Gas Sensors

Wiring and Calibration
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
The MQ-136 detects hydrogen sulfide (1 to 200 ppm), the MQ-137 ammonia (5 to 500 ppm) and the MQ-138 organic vapours such as toluene and acetone. They are tin-oxide sensors with a 5 V heater, used in poultry farms, biogas plants, sewage and compost monitoring. Their resistance falls as gas rises, and they need burn-in and calibration.
Key specs at a glance
- Heater
- 5 V, about 150 mA
- MQ-136 range
- About 1 to 200 ppm H2S
- MQ-137 range
- About 5 to 500 ppm NH3
- MQ-138 range
- About 5 to 500 ppm VOC
- Output
- Analog; modules add a digital threshold
- Burn-in
- 24 to 48 hours
Models in this guide
These are alternatives. Pick the one that fits your project; you only need one.
Option 1MQ-136 Hydrogen Sulfide (H2S) Gas Sensor Module – Analog & TTL Output₹1,099
Option 2MQ-136 Hydrogen Sulfide (H₂S) Gas Detection Sensor – SnO₂ Semiconductor₹1,049
Option 3MQ-137 NH3 Ammonia Gas Sensor Module₹1,159
Option 4MQ-137 Ammonia Gas Detection Sensor – 5-500 ppm NH₃₹1,049
Option 5Winsen MQ137 Ammonia Gas Sensor – 5-500 ppm NH₃ Detection, SnO₂ Semiconductor₹2,779
Option 6Winsen MQ138 VOC Gas Sensor – SnO2 Semiconductor, 5-500 ppm Range₹2,749
What the MQ-136 H2S and MQ-137 ammonia sensors is
The MQ136 (hydrogen sulphide) and MQ137 (ammonia) are metal-oxide gas sensors used for sewage, poultry farm, compost and cold-storage monitoring.
These sensors also react to other gases with similar chemistry, so the reading is an estimate. For accurate H2S or NH3 at low ppm, use an electrochemical sensor.
In barns, mount at animal height and protect from dust and splashes.
MQ-136 H2S and MQ-137 ammonia sensors pinout
The pins on the MQ-136 H2S and MQ-137 ammonia sensors and what each one does.
| Pin | Function |
|---|---|
| VCC | 5 V |
| GND | Ground |
| AO | Analog output |
| DO | Threshold output |
- VCC
- 5 V
- GND
- Ground
- AO
- Analog output
- DO
- Threshold output
Wiring the MQ-136 H2S and MQ-137 ammonia sensors
Connect the MQ-136 H2S and MQ-137 ammonia sensors like this.
| MQ-136 H2S and MQ-137 ammonia sensors pin | Arduino Uno | ESP32 |
|---|---|---|
| VCC | 5 V | 5 V (VIN) |
| GND | GND | GND |
| AO | A0 | GPIO 34 via divider |
| DO | D2 | GPIO 27 |
- VCC
- Arduino Uno:
- 5 V
- ESP32:
- 5 V (VIN)
- GND
- Arduino Uno:
- GND
- ESP32:
- GND
- AO
- Arduino Uno:
- A0
- ESP32:
- GPIO 34 via divider
- DO
- Arduino Uno:
- D2
- ESP32:
- GPIO 27
Example code
A minimal sketch to check the part works.
const float RL = 10.0; // load resistor on the module, kilo-ohms (check yours)
float R0 = 10.0; // sensor resistance in clean air, set by calibration
float rs() {
long sum = 0;
for (int i = 0; i < 32; i++) sum += analogRead(A0);
float v = sum / 32.0 * 5.0 / 1023.0;
return RL * (5.0 - v) / v;
}
void setup() {
Serial.begin(115200);
delay(120000); // let the heater warm up (much longer for the first use)
R0 = rs(); // calibrate in clean air
}
void loop() {
float ratio = rs() / R0; // look up ppm from the datasheet curve for your gas
Serial.print("Rs/R0 = "); Serial.println(ratio, 3);
delay(1000);
}Setup and tuning
feed 5 V to the heater from the supply rail; it draws about 150 mA.
read the module's analog output, which rises as gas increases.
burn in for 24 to 48 hours first, then allow a few minutes each start.
record the clean-air resistance (R0) and use the datasheet Rs/R0 curve.
H2S is heavier than air, so mount the MQ136 low; ammonia rises, so mount the MQ137 higher.
What you need
Shop this list10 of 11 found in our store · ₹10,573
MQ-136 Hydrogen Sulfide (H2S) Gas Sensor Module – Analog & TTL Output: the part this guide coversMQ-136 Hydrogen Sulfide (H2S) Gas Sensor Module – Analog & TTL Output₹1,099
MQ-136 Hydrogen Sulfide (H₂S) Gas Detection Sensor – SnO₂ Semiconductor: another version this guide coversMQ-136 Hydrogen Sulfide (H₂S) Gas Detection Sensor – SnO₂ Semiconductor₹1,049
MQ-137 NH3 Ammonia Gas Sensor Module: another version this guide coversMQ-137 NH3 Ammonia Gas Sensor Module₹1,159
MQ-137 Ammonia Gas Detection Sensor – 5-500 ppm NH₃: another version this guide coversMQ-137 Ammonia Gas Detection Sensor – 5-500 ppm NH₃₹1,049
Winsen MQ137 Ammonia Gas Sensor – 5-500 ppm NH₃ Detection, SnO₂ Semiconductor: another version this guide coversWinsen MQ137 Ammonia Gas Sensor – 5-500 ppm NH₃ Detection, SnO₂ Semiconductor₹2,779
Winsen MQ138 VOC Gas Sensor – SnO2 Semiconductor, 5-500 ppm Range: another version this guide coversWinsen MQ138 VOC Gas Sensor – SnO2 Semiconductor, 5-500 ppm Range₹2,749- Uno R3 development board: the controller used in the wiring tableFind this part
ESP32-WROOM-32 38-pin development board: for Wi-Fi logging and dashboardsESP32-WROOM-32 38-Pin Development Board₹389
5 V relay module with optocoupler: to switch a fan or alarm5V Relay Module with Optocoupler₹74
Buzzer module 3.3-5 V: for an audible alarmBuzzer Module 3.3–5V₹27
ADS1115 16-bit 4-channel ADC module: to read small sensor voltages accuratelyADS1115 16-Bit 4-Channel ADC Module₹199
Alternatives and when to choose them
- MQ gas sensors: the family overview.
- Winsen ZE03 modules: accurate H2S and NH3.
- DFRobot Gravity calibrated: ppm over I2C.
Common mistakes to avoid
- Reading before the sensor has warmed up.
- Using the module as the only safety alarm.
- Mounting the H2S sensor near the ceiling.
- Running the heater from a GPIO pin.
Frequently asked questions
Which MQ sensor detects hydrogen sulphide?
The MQ136 is made for H2S, the rotten-egg gas from sewage and drains.
Which MQ sensor detects ammonia?
The MQ137 is made for ammonia, common in poultry farms and cold storage.
Can these sensors give accurate ppm?
Only roughly after calibration; cross-sensitivity to other gases is high.
Where should I mount an H2S sensor?
Low down, because H2S is heavier than air and collects near the floor.
Are they safe-life protection devices?
No. Use certified gas detectors where people could be harmed.
Parts for this guide
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

