File shared via cloud drive: 16_MQ-2 Smoke Sensor
Link: https://pan.baidu.com/s/17Lq4XlOoGgO2k_HxkZPaZA?pwd=ga9r Extraction code: ga9r

1. Who is it? The “electronic nose” that can detect danger
The MQ-2 smoke sensor module is simply anelectronic device that can “smell” combustible gases and smoke. Its core is a“sensitive” gas-sensitive element (like a mini “electronic nose membrane”), paired with a circuit board, specifically designed to detect dangerous gases such as liquefied gas, natural gas, hydrogen, and smoke, and then send signals to a microcontroller or alarm, letting you know immediately that “there is danger!”
Don’t be fooled by its small size (dimensions 32mm×22mm×27mm, slightly larger than a lighter); it has impressive capabilities, with three major “skills” making it a “star player” in safety protection:
✨ Skill 1: Dual mode output, providing both “alarm” and “data”
It has two “ways of speaking”, functioning as both an “alarm” and a “detector”:
·DO port (digital output): Danger “alarm light”
Just like a smoke alarm at home— you set a “danger concentration threshold” in advance (for example, a gas concentration exceeding 500ppm is considered dangerous), when the gas concentration in the air exceeds this threshold, the DO port outputs a low level (equivalent to sounding the alarm: “Danger! Gas leak!”) and the indicator light on the module will light up, reminding you to take action.
·AO port (analog output): Gas “concentration meter”
Want to know the exact concentration? The AO port can help! It outputs a voltage proportional to the gas concentration (for example, 1V at 300ppm, 3V at 1000ppm), connect it to an ADC module (like Arduino’s A0 port), and you can directly read “current gas concentration 650ppm”—accurate as if you conducted a “toxic gas test” on the air!
✨ Skill 2: Super sensitive nose, can detect various “dangerous odors”
Its “electronic nose membrane” is made oftin dioxide (SnO₂) semiconductor material, which is highly sensitive to various combustible gases and smoke:
·Common householdliquefied gas, natural gas (methane);
·Industrial gasespropane, hydrogen;
·Smoke particles in the early stages of a fire……As long as the concentration of these gases is between 300~10000ppm (ppm is a unit of concentration, 1ppm is equivalent to 1 micro-liter of gas in 1 liter of air), it can “smell” them, equivalent to having a “danger gas radar” installed in your home!
✨ Skill 3: Durable and reliable, can “stand guard” for a long time without “slacking off”
·Long lifespan: Using highly stable gas-sensitive elements and LM393 comparator chips, it can “stand guard” for several years if used properly;
·Fast response: From “smelling” the gas to outputting a signal, it reacts faster than a human (quick response characteristic);
·Easy integration: Operating voltage of 3.3~5V (can be powered by phone chargers or power banks), small size, can easily fit into alarms or smart sockets without taking up space.
2. Working principle: How does it “smell” dangerous gases?
Some may wonder: how does this small module know if there is gas in the air? The principle is somewhat similar to our nose, but it uses“semiconductor magic”:

Step 1: “Electronic nose membrane”—the “transformation” of tin dioxide
The core “olfactory organ” of the module is a ceramic tube coated with tin dioxide (SnO₂). Inclean air, the conductivity of tin dioxide is weak (high resistance, like “insulating tape”); when combustible gases or smoke appear in the air, gas molecules react with the surface of tin dioxide, releasing a large number of electrons, and the conductivity suddenly increases (resistance decreases, like “conductive copper wire”).
In simple terms: the higher the gas concentration, the lower the resistance of tin dioxide—just like the stronger the smell detected by the nose, the stronger the “olfactory signal”!
Step 2: “Signal translator”—the “language conversion” of the LM393 chip
Having a “sense of smell” is not enough; the change in resistance must be converted into a signal we can understand. The LM393 comparator chip on the circuit board acts as the “translator”: it converts the resistance change of tin dioxide into a voltage signal, then compares it with the “danger threshold” you set using a potentiometer (for example, setting “resistance less than 10KΩ = danger”).
·If the gas concentration is not exceeded (high resistance, high voltage), the DO port outputs a high level (“Safe, all normal”);
·If the concentration exceeds the limit (low resistance, low voltage), the DO port outputs a low level (“Danger! Alert!”) and the AO port outputs the corresponding voltage value of the concentration, allowing the microcontroller to calculate the specific “danger level”.
Reminder: “Preheating” is very important—make sure to preheat!
Just like warming up before running, the MQ-2 also needs to be “preheated” before working: the documentation states that before the first use, it should be powered on forat least 48 hours (that is, two days and two nights) to allow the tin dioxide element to reach a stable working temperature. Otherwise, the “sense of smell” will be inaccurate, and it may miss or misreport dangers!
3. Key parameters: When choosing it, know these “hard indicators”
Buying a sensor is like choosing home appliances; you need to pay attention to the key parameters. The “health report” of the MQ-2 is as follows, just refer to it when selecting a module:

4. Get started in 5 minutes! DIY a “gas alarm” at home
Despite the terms “sensor” and “module”, even beginners can easily handle it. Just follow these three steps to have it “on duty” to protect safety:
Step 1: Wiring—4 wires, don’t connect them incorrectly!
The module has a 4-wire system, as simple as “building blocks”; just recognize these 4 pins:
·VCC: Connect to the positive power supply (3.3~5V, such as Arduino’s 5V port);
·GND: Connect to the negative power supply (common ground with the microcontroller, be careful not to reverse it, or the module will be damaged!);
·DO: Connect to the microcontroller’s I/O port (for example, D2 port, read high or low level to determine “whether it is dangerous”);
·AO: Connect to the microcontroller’s ADC port (for example, A0 port, read voltage to calculate specific concentration).
Step 2: Set threshold—establish the “danger red line”
How much concentration do you want it to alarm at? Just turn the blue potentiometer on the circuit board:
·Turning clockwise: the threshold increases (requires a higher concentration of gas to trigger the alarm, suitable for kitchens or places with slight gas odors);
·Turning counterclockwise: the threshold decreases (alarms at slight gas presence, suitable for bedrooms or enclosed spaces).
While adjusting, you can use a lighter to release a small amount of gas (be careful with safety!) and when the module’s indicator light just lights up, that is the appropriate threshold!
5. Application scenarios: Not just at home, it is needed in these places!
The MQ-2 is not just a “home alarm”; its “business scope” is broad, wherever combustible gas detection is needed, it can be found:
🏠 Home safety: Gas leak alarm
Install it in a smart socket next to the kitchen gas stove— once a gas leak occurs, the DO port outputs a low level, the socket automatically cuts off the gas valve, and the buzzer alarms, sending a message to your phone app, so even if you are not home, you can know about the danger immediately.
🏭 Factory workshop: Industrial gas monitoring
In chemical plants, gas stations, etc., multiple MQ-2 modules can form a “monitoring network”, with the AO port outputting analog signals to a PLC controller, displaying gas concentrations in real-time across various areas, and automatically activating exhaust systems when concentrations exceed limits, eliminating explosion risks.
🧳 Portable detector: A good helper for outdoor work
DIY a mini detector (module + lithium battery + OLED screen) to check for gas leaks in the tent while camping outdoors, or for painters to detect combustible gases from paint evaporation, compact and portable, ensuring safety on the go.
🎓 Student science and technology innovation: Low-cost “safety project”
When participating in electronic competitions, use it to create an “intelligent kitchen safety system”—detecting gas leaks, automatically turning on the range hood, closing the valve, and sending a text message to parents, practical and creative, earning praise from judges!
6. Pitfall guide: Avoid these “taboos”!
Although the MQ-2 is durable, it also has its “quirks”; these usage taboos must be remembered, or it may “stop working”:
·❌ Do not touch silicone: substances containing silicon such as hairspray, silicone rubber, and silicone will “clog” its “nose”, leading to permanent sensitivity reduction;
·❌ Do not get wet or freeze: splashes or freezing can damage the sensitive layer of tin dioxide; ensure waterproofing when used outdoors in rainy weather;
·❌ Do not use in highly corrosive environments: gases like hydrogen sulfide and chlorine can corrode components; when used in chemical plants, keep away from such areas;
·❌ Do not forget to preheat: it must be powered on for more than 48 hours before the first use; otherwise, the “sense of smell” will be inaccurate, and it may miss reporting dangers!
Conclusion: Small module, big safety!
The MQ-2 smoke sensor module is like having a “24-hour vigilant safety sentinel” installed in your home, factory, or laboratory—its palm-sized size and cost of just a few dozen yuan can detect invisible dangers like gas leaks and smoke, transforming safety protection from “passive remediation” to “active warning”.
Whether in the kitchen, balcony, factory workshop, or laboratory, with it, dangerous gases have “nowhere to hide”. Next time you worry about gas safety, consider trying this “gas detective”—though small in technology, it can protect you and your family’s safety!