
Connect the combustible leak detector module through a 5V supply and a load resistor between the sensing element output and ground. This configuration produces a voltage level that varies with propane, methane, hydrogen, and smoke concentration. A resistor value between 5 kΩ and 20 kΩ is widely used; 10 kΩ provides stable readings for many microcontroller projects.
The detection unit contains a heated tin-dioxide element whose resistance changes when flammable vapors are present. Inside the package a small heater coil keeps the material near 300–350 °C. Two pins power this heater, while the remaining terminals connect the variable resistance element to the external load resistor. The voltage measured across that resistor becomes the analog signal sent to an ADC input.
Allow the module to warm up for 20–30 minutes after power-up. During this period the sensing material stabilizes and resistance drift decreases. After stabilization, the output voltage usually ranges from 0.1 V to about 4 V, depending on vapor concentration and resistor selection.
Many breakout boards add a comparator chip and potentiometer. The adjustable trimmer sets a threshold that switches a digital output pin when the measured voltage crosses the chosen level. This approach supports alarm triggers, ventilation control, or logging through development boards such as Arduino, ESP8266, or STM32.
MQ2 Gas Sensor Circuit Diagram with Pinout Wiring Example and Arduino Connection

Connect the detection module to a 5V supply, attach the heater terminals directly to the power rail, and place a 10 kΩ load resistor between the sensing element output and ground. This arrangement forms a voltage divider where the output level changes according to combustible vapor concentration. Route this output node to an analog input on an Arduino board such as A0.
The device contains six pins. Two terminals power the internal heater coil, two connect to one side of the sensitive element, and the remaining pair connects to the opposite side. In many breakout boards these pairs are already linked, leaving four usable pins: VCC, GND, AO, and DO. The analog line carries a variable voltage, while the digital line switches when a comparator threshold is crossed.
Use short wires between the module and the microcontroller to reduce noise pickup. Typical heater consumption is 150–180 mA at 5V, which exceeds the current limit of many development board regulator pins. Power the module from the 5V rail rather than a microcontroller I/O line.
The analog voltage range usually sits between 0.1 V and 4.5 V. Higher concentrations of combustible vapors reduce the resistance of the sensing layer, raising the voltage measured across the load resistor. Arduino code can read this level through the analogRead() function, producing values from 0 to 1023 on a standard 10-bit ADC.
Allow the heater element to stabilize for about 20–30 minutes after power is applied. During this period the metal-oxide surface reaches operating temperature and resistance drift decreases. Measurements taken before this warm-up stage vary widely and may produce unreliable readings.
If the module includes a comparator with a small potentiometer, adjust that trimmer while monitoring the digital output LED. Turning the screw changes the reference voltage that defines the alarm point. This hardware threshold enables direct activation of a buzzer, relay module, or microcontroller interrupt pin.
MQ2 Gas Sensor Pin Configuration and Heater Circuit Connections

Supply the internal heater with a stable 5V source and connect its two terminals directly across the power rail. This heating element raises the metal-oxide layer to roughly 300–350 °C, which allows the material to react to combustible vapors and smoke particles.
The device uses a six-pin layout. Two pins belong to the heater coil and are labeled H1 and H2. The remaining four pins form two duplicated pairs, commonly marked A1, A2 and B1, B2. Pins within each pair are internally connected, so designers often treat them as two main nodes of a variable resistance element.
Attach one pair of the sensing terminals to the supply rail and route the opposite pair to a load resistor that returns to ground. The node between the variable resistance and the resistor becomes the measurement point for analog acquisition through an ADC input.
Heater current typically ranges from 150 mA to 180 mA. Thin traces or long jumper wires can produce voltage drop and reduce heating temperature. Use short connections and a power source capable of delivering at least 200 mA without noticeable sag.
Continuous heating maintains stable operation. Rapid power cycling causes temperature swings that shift the resistance of the sensitive layer. For development boards, leave the module powered during measurement sessions rather than switching it on and off between readings.
After applying power, allow a warm-up phase of about 20 minutes. During this period the resistance of the detection material gradually stabilizes. Calibration or threshold adjustment should occur only after this stage, otherwise measured voltage levels drift significantly.