The Physics: How a MOS Smoke Sensor Circuit Works
At the heart of a standard hobbyist smoke sensor circuit is a Metal Oxide Semiconductor (MOS) element, typically a tin dioxide (SnO2) layer sintered onto a ceramic tube. Inside this tube sits a micro-heater coil that raises the SnO2 surface temperature to roughly 300°C. In clean air, oxygen molecules adsorb onto the hot SnO2 surface, capturing free electrons and creating a potential barrier that keeps the material's electrical resistance high. This baseline high-resistance state is your clean-air reference point.
When smoke particles or combustible gases enter the sensor mesh, they react with the adsorbed oxygen, releasing the trapped electrons back into the conduction band of the tin dioxide. This chemical reaction drastically lowers the potential barrier, causing the sensor's internal resistance to drop in direct proportion to the concentration of the smoke or gas. By placing this variable resistor inside a simple voltage divider circuit, we can measure the resistance drop as a changing voltage, translating a chemical reaction into a readable electrical signal.
Wiring the MQ-2 Module: Pinout and Power Requirements
Most maker-friendly smoke sensor circuits use a breakout board (like the generic MQ-2 or Hanwei modules) that includes the sensor, a 1kΩ load resistor (Rl), and an LM393 comparator. These modules require a solid 5V supply to drive the internal heater coil. Attempting to run the heater at 3.3V will result in insufficient surface temperature, leading to wildly inaccurate readings and failure to detect smoke.
| Pin Label | Function | Voltage / Signal Range | Microcontroller Connection |
|---|---|---|---|
| VCC | Heater and Circuit Power | 4.8V to 5.2V DC | Arduino 5V pin (or external 5V supply) |
| GND | Common Ground | 0V | Arduino GND |
| A0 (Analog Out) | Raw Voltage Divider Output | 0V to VCC (Decreases as smoke increases) | Arduino Analog Pin (e.g., A0) |
| D0 (Digital Out) | TTL Comparator Output | 0V (LOW) or VCC (HIGH) | Arduino Digital Pin |
Translating Voltage to PPM: The Raw-to-Unit Math
A common mistake in embedded sensor projects is conflating the digital (D0) and analog (A0) outputs. The D0 pin simply outputs a HIGH or LOW based on a threshold set by the blue potentiometer on the board. It is useless for measuring concentration. To get actual Parts Per Million (PPM) or a relative smoke density metric, you must read the A0 pin and apply the raw-to-unit math.
Step 1: Convert ADC to Voltage
Read the analog pin and convert the raw 10-bit integer (0-1023) to voltage. Assuming a 5V reference:
V_RL = ADC_reading * (5.0 / 1023.0)
Step 2: Calculate Sensor Resistance (Rs)
The breakout board forms a voltage divider where VCC (5V) is applied across the sensor (Rs) and the onboard load resistor (Rl, typically 1000Ω). Using Ohm's law, we solve for Rs:
R_s = ((V_CC / V_RL) - 1) * R_L
If V_CC is 5.0V, V_RL is 1.6V, and R_L is 1000Ω, then R_s = ((5.0 / 1.6) - 1) * 1000 = 2125Ω.
Step 3: Scale to PPM using the Log-Log Curve
MQ sensors do not have a linear response; they follow a logarithmic curve defined by the equation ppm = a * (Rs/R0)^b. Here, R0 is the sensor's resistance in clean air (typically Rs / 9.8 for the MQ-2). The constants a and b are derived from the slope and intercept of the specific gas curve in the Hanwei MQ-2 Datasheet. For standard smoke/combustible gas approximations, a ≈ 3.3 and b ≈ -0.42.
Real-World Interference and Calibration Drift
If you deploy a smoke sensor circuit without accounting for environmental variables, you will experience false alarms. MOS sensors are notoriously cross-sensitive. The MQ-2 will trigger on smoke, but it will also react heavily to LPG, butane, methane, alcohol vapor, and even high concentrations of carbon monoxide. If your circuit is placed near a kitchen where cooking wine (alcohol) is used, the sensor will register a spike indistinguishable from smoke.
Temperature and humidity also cause significant baseline drift. The standard MOS sensor characterization shows that as ambient humidity rises above 60% RH, the baseline resistance shifts, altering your clean-air R0 value. To mitigate this in a production environment, you must pair the smoke sensor with a digital temperature/humidity sensor (like a BME280) and apply a software compensation matrix to adjust R0 dynamically based on the current ambient conditions.
Finally, never skip the burn-in period. A brand-new MQ-2 sensor has chemical impurities from the manufacturing process. You must power the heater continuously for 24 to 48 hours before taking your first clean-air R0 calibration reading. On subsequent power-ups, allow a 2-to-3-minute preheat delay in your code before polling the ADC.
Smoke Sensor Circuit FAQ
How do I calibrate a smoke sensor circuit for clean air?
To find your specific R0 value, power the sensor and let it burn in for 24 hours in a well-ventilated area free of smoke, gas, or alcohol fumes. Upload a sketch that calculates Rs using the math in Step 2 above. Once the Rs value stabilizes (usually after 30 minutes of continuous reading), divide that stable Rs value by 9.8. That result is your R0. Hardcode this R0 value into your final PPM calculation script.
Why is my smoke sensor circuit getting extremely hot?
It is entirely normal for the metal mesh cap of the MQ-2 to reach temperatures between 50°C and 70°C (122°F - 158°F) during operation. The internal heater coil requires this thermal energy to drive the chemical adsorption process. However, if the sensor is too hot to touch for more than a fraction of a second, or if you smell melting plastic from the breakout board, immediately disconnect power. This indicates a short circuit in the module's voltage regulator or a counterfeit sensor with a defective heater coil drawing excessive current.
Can an MQ-2 smoke sensor circuit reliably detect carbon monoxide?
While the MQ-2 has some cross-sensitivity to carbon monoxide (CO), it is not reliable for life-safety CO detection. The MQ-2's sensitivity to CO is vastly overshadowed by its reaction to hydrogen, LPG, and smoke. If your project specifically requires carbon monoxide monitoring, you must use a dedicated sensor like the MQ-7 or an electrochemical CO cell (such as the Sensirion SCD4x series), which are specifically tuned to the oxidation potential of CO molecules.
What size load resistor (Rl) should I use for better smoke resolution?
Most commercial breakout boards ship with a 1kΩ surface-mount load resistor. This is a compromise value optimized for LPG detection. If you are tuning your smoke sensor circuit strictly for smoke and methane, swapping the 1kΩ resistor for a 2kΩ or 5kΩ resistor will shift the voltage divider's sweet spot, giving you a wider, more granular ADC voltage swing in the lower-PPM smoke ranges. Just remember to update the Rl variable in your code to match your new physical resistor.






