Learning Objective
Detect invisible hazards using gas sensors.
Gas & Air Quality (MQ-2)


Hardware: MQ-2 Gas & Smoke Sensor Module


Dashboard: MQ-2 Gas Level Reading Card
See How the MQ-2 Gas Sensor Works
Read the picture from left to right: the change in the world → the sensor signal → a useful action.

1 · What it notices
A change in the air from smoke or some burnable gases.
2 · How it works
A heater warms a sensing layer. Some gases change how well it carries current, so the reading moves away from its clean-air baseline.
3 · Why it matters
An early change can trigger a warning or a fan before things get worse.
Where might we use it?
- Learning about kitchen warnings
- Workshop fan models
- Smoke experiments
Student sentence: An MQ-2 turns a chemical change at its heated layer into a relative reading.
Teacher/parent prompt: Ask, “What changes on the left, what does the sensor turn it into, and what could happen next?”
Theory: Semiconductor Gas Sensors
Detecting the Invisible
A gas sensor warns you early about dangerous gases and smoke. The MQ-2 sensor is a semiconductor sensor that reacts to smoke and to gases that burn (combustible gases).
How the MQ-2 Works: Tin Dioxide and Conductivity
Inside the MQ-2, a tiny heater keeps a tin dioxide (SnO₂) sensing layer much hotter than boiling water, because the reaction needs heat. The heater is on whenever the board has power. A combustible gas touching the hot layer changes its electrical conductivity (how easily current flows). Clean air lets little current through. LPG, methane or smoke let much more through. The ESP32 reads this as an analog voltage.
Understanding the 0–100 Reading and Warm-Up Process
MakerBuddy shows the MQ-2 as a relative level from 0 to 100, not a laboratory PPM measurement (parts per million of one gas). First record your room's clean-air baseline: the normal reading. Then set alert levels clearly above it, so they only trigger on a real change. Let the sensor warm up for a few minutes before you compare readings.
Real-World Applications
Kitchen gas leak detectors shut off the gas when they sense LPG or natural gas. Mining operations detect methane before it can explode.
For Teachers
This lesson introduces metal-oxide gas sensing. Let students watch the reading settle during warm-up, and keep hands off the hot metal cover. Readings are relative, not PPM; test only with hand sanitizer vapor, NOT open flames.
For Parents
Your child is learning about gas sensors, like the ones inside many gas leak alarms at home. They sense chemical changes in the air that people cannot notice.
Try It: Find the Clean-Air Baseline
Interactive demo · no kit needed
Play with a pretend MakerBuddy board and its web page, right here.
Follow the steps one at a time. Got the kit? You can switch to the real board inside.
Hands-On Activity: Gas Detection
Activity Duration: 25-30 minutes
Warm up the MQ-2, record a baseline, then safely test it with vapor.
Step-by-Step Instructions:
- Connect the MQ-2 Sensor: Unplug the USB cable. Plug the gas sensor (a small metal can with a mesh cover) into the connector marked 33 on the right-hand edge of the board. The plug fits only one way, so never force it. Plug the USB cable back in.
- Power On and Observe Warm-Up: Open the dashboard and find the Gas Level (MQ-2) card. Watch the reading change as the heater warms up. Don't touch the metal cover: it gets hot.
- Wait for Stabilization: Watch for at least 3 minutes (longer for a brand-new sensor). Early readings change a lot while it heats up. Note the first value and how it changes.
- Establish Baseline: When the reading changes by less than 5 points over 30 seconds, record it as your "clean air baseline".
- Observe Environmental Readings: Breathe near the sensor, not on it. Your breath is warm and moist, so it may nudge the reading a little.
- Safe Vapor Test (Teacher Demo): Teacher only, in a ventilated room: put a few drops of hand sanitizer on a tissue and hold it 10–15 cm from the sensor. Never let liquid touch the sensor. Sanitizer burns easily: keep it away from heaters and flames, and put the tissue in a closed bin straight afterwards. Watch the reading jump. If it reaches 100, it has hit the top of the scale: move the tissue further away and try again.
- Observe Recovery Time: Take the tissue away and time how long the reading takes to return to baseline.
- Document Observations: Make a table: baseline, highest spike, time to peak and recovery time.
What Students Should Observe:
- Big swings in the first few minutes of warm-up (longer for a brand-new sensor)
- A steady baseline once the sensor is hot
- A sharp jump when vapor arrives; the closer the source, the higher the reading
- A slow return to baseline once the vapor is gone (recovery time: 30-60 seconds)
Safety Note
NEVER use open flames, lighters or any burnable gas near the MQ-2. Only a teacher does the vapor test, with hand sanitizer, in a ventilated room. Keep liquids off the sensor. It gets hot: don't touch its metal cover or block its vent holes. This classroom module is not a certified smoke, gas or carbon-monoxide alarm and must never replace one.
Challenge
Your Mission: Build an Air Quality Safety System
Design and test safety systems that warn people about invisible dangers in the air!
Challenge 1: Calibration Experiment
Calibrate your MQ-2:
- Record the clean air baseline in your classroom
- Have your teacher hold the vapor source (hand sanitizer on a tissue) at 5cm, 10cm, 15cm and 20cm from the sensor
- Record the peak at each distance (100 means it hit the top of the scale)
- Graph how the reading drops with distance
- Find the "detection radius": the farthest distance that still reliably detects vapor
- Work out how far each peak rose: Peak − Baseline (in points). If your baseline is 10 or more, also work out the percentage change: (Peak − Baseline) ÷ Baseline × 100 %.
Challenge 2: Plan a Gas Alarm (you will build it in Week 28)
Using your clean-air baseline B, choose three alert levels that all stay below 100. For example:
- Level 1 (B + 10): RGB LED yellow
- Level 2 (B + 20): RGB LED red and a beeping buzzer (Buzzer On, then Buzzer Off, repeating)
- Level 3 (B + 30): Relay on (in a real building this would start an exhaust fan)
Which levels did your Challenge 1 peaks reach?
Challenge 3: Research Real Safety Standards
Look up the answers:
- What PPM of carbon monoxide is dangerous? (Check OSHA standards)
- Why do home gas sensors need replacing every 5-7 years?
- Should CO detectors go near the ceiling, the floor or mid-wall? Why?
- What is the "LEL" (Lower Explosive Limit) of natural gas, and why does early detection matter?
- How does a combustible gas sensor (MQ-2) differ from a carbon monoxide sensor (MQ-7)?
Discussion Questions:
- Why can't we just smell gas leaks? (Many dangerous gases have no smell, and added smells can fail)
- What if a gas sensor skipped its warm-up? (Unsteady, inaccurate readings)
- Why do real gas alarms use PPM, while our MakerBuddy shows a 0–100 level? (A real alarm is calibrated in PPM for one gas, because tiny amounts such as 0.1 % carbon monoxide can be deadly. Ours is only relative: fine for learning, not for protecting people.)
- How could gas sensors prevent accidents at home? (Catching furnace leaks, faulty appliances, incomplete burning)
Bonus Challenge: Design a "Smart Kitchen Safety System" that watches for gas leaks AND smoke. Choose the sensors, thresholds and actions (shut off gas valve, start a fan, sound an alarm, notify a phone), and draw one flowchart showing what happens at each hazard level. Extra credit: how would you ignore normal cooking smoke but still catch real fires?
Key Takeaways
✓ Gas Detection Technology
The MQ-2 reacts to smoke and burnable gases such as LPG, propane and methane (and to alcohol vapor), while carbon-monoxide alarms use a different kind of sensor.
✓ Tin Dioxide Sensing Mechanism
The MQ-2's tin dioxide (SnO₂) layer is kept hot by an internal heater element. Gas changes how well it conducts. The Gas Level (MQ-2) card shows this as a relative level from 0 to 100. It is not a PPM measurement.
✓ Relative Readings and Thresholds
Real alarms are calibrated in PPM for one gas. We set our alert levels a little above our clean-air baseline: fine for learning, but never a replacement for a real alarm.
✓ Burn-In and Sensor Stabilization
Metal-oxide gas sensors like the MQ-2 need a burn-in period: about a day for a brand-new sensor, and a few minutes at the start of every session. Until then, readings drift.
Coming Up Next Week:
Week 18: Smart Agriculture (Soil Moisture)
Learning Support
Use this quick guide to help every learner understand, practice and explain Gas & Air Quality (MQ-2).
For students
Try it in three steps
- Say it: explain the main idea in one simple sentence.
- Show it: Connect the MQ-2, allow it to warm up, and chart its clean-air baseline.
- Stretch it: Under teacher supervision, compare the baseline with a safe vapor demonstration—never flames, lighters or released fuel gas.
Checkpoint: What was your input, what decision or process happened, and what was the output?
For teachers & parents
Coach without taking over
- Before: ask the learner to predict what will happen and why.
- During: use prompts such as “What changed?” and “What could you test next?” instead of giving the answer.
- After: ask for a 30-second explanation, one piece of evidence and one improvement.
Look for: safe handling, correct vocabulary, a result the learner can demonstrate, and an explanation in their own words.
Did you get it?
Three quick questions. Pick an answer to see whether it is right, and why.
1What does the MakerBuddy Gas Level card show?
2Why does the gas sensor need a few minutes to warm up?
3Why record a clean-air baseline before choosing alert levels?
