Skip to content
MakerBuddy

Term 3 · Weeks 17–24

Detecting invisible hazards, reporting on visual displays and the core rule-engine loop modes. Each lesson includes its full classroom material, activity and challenge.

Learning Objective

Detect invisible hazards using gas sensors.

Gas & Air Quality (MQ-2)

Week 17 Term 3 45-60 minutes
Hardware

Hardware: MQ-2 Gas & Smoke Sensor Module

Dashboard

Dashboard: MQ-2 Gas Level Reading Card

Theory: Electrochemical Gas Sensors

Detecting the Invisible: Gas Sensor Technology

Many dangerous gases - carbon monoxide, methane, propane, smoke particulates - are completely invisible and odorless. You can't see them, smell them or feel them until it's too late. This is where gas sensors become literal lifesavers. The MQ-2 sensor is a semiconductor-based gas detector that can sense combustible gases and smoke in the air. Unlike previous sensors we've studied that measure light, temperature or humidity, the MQ-2 detects chemical composition - making it essential for safety systems in homes, factories and vehicles.

How the MQ-2 Works: Tin Dioxide and Conductivity

Inside the MQ-2 is a small heater element and a tin dioxide (SnO₂) sensing layer. The heater maintains the sensor at approximately 150°C - this high temperature is necessary for the chemical reaction to occur. When combustible gas molecules contact the heated tin dioxide surface, they react chemically, which changes the material's electrical conductivity. Clean air allows very little current to flow, but the presence of gases like LPG, methane or smoke causes conductivity to increase dramatically. The ESP32 measures this conductivity change as an analog voltage value, detecting even small concentrations of dangerous gases.

Understanding the 0–100 Reading and Warm-Up Process

MakerBuddy displays the MQ-2 as a relative level from 0 to 100, not a laboratory PPM measurement. Start by recording the classroom’s clean-air baseline, then choose alert thresholds that are clearly above it. The sensor needs a few minutes to warm up and settle before students compare readings.

Real-World Applications

Gas sensors save thousands of lives yearly through critical safety applications: Home carbon monoxide detectors alert families to deadly CO leaks from furnaces or water heaters. Kitchen gas leak detectors shut off gas valves automatically when LPG or natural gas is detected. Industrial safety systems monitor factories for combustible gases and trigger ventilation or evacuation. Automotive systems detect exhaust leaks inside vehicles. Smart city air quality monitoring networks track pollution and smoke from fires. Mining operations use gas sensors to detect methane before it reaches explosive concentrations, protecting underground workers.

For Teachers

This lesson introduces electrochemical sensing - a fundamentally different detection mechanism from previous sensors. Emphasize the safety implications: gas sensors prevent tragedies by detecting invisible threats. The burn-in concept teaches patience and proper scientific procedure - sensors need time to stabilize. Demonstrate the warm-up period by having students feel (carefully!) the warmth from the sensor after it's been powered for a few minutes. Discuss calibration: MQ sensors provide relative readings, not absolute PPM values without calibration. For the challenge, use only safe demonstration methods (hand sanitizer vapor, NOT open flames). Connect to chemistry: combustion reactions, oxidation and how temperature affects chemical reactions. This prepares students for understanding catalytic converters, breathalyzers and industrial process control.

For Parents

Your child is learning about gas sensors - the technology that powers carbon monoxide detectors and gas leak alarms in your home. These sensors work by detecting chemical changes in the air that humans cannot sense, providing early warning of invisible dangers. Understanding how gas detection works helps children appreciate the importance of safety devices and the science behind environmental monitoring. This knowledge connects to chemistry (chemical reactions), physics (heat and conductivity) and real-world engineering (building safety systems that save lives). The concepts learned here apply to careers in environmental science, safety engineering and industrial automation.

Hands-On Activity: Gas Detection

Activity Duration: 25-30 minutes

Students will observe the MQ-2 sensor's warm-up process, establish a baseline reading in clean air and safely test gas detection using controlled vapor sources.

Step-by-Step Instructions:

  1. Connect the MQ-2 Sensor: Connect the gas sensor to its matching labelled connector on your MakerBuddy IoT Board. It looks like a small metal can with a mesh protective cover.
  2. Power On and Observe Warm-Up: Open the dashboard and navigate to the MQ-2 sensor card. After powering on, carefully touch the sensor's metal surface (very gently!) - it will become warm within 30-60 seconds as the internal heater activates.
  3. Wait for Stabilization: Watch the sensor reading for 2-3 minutes. Initial readings will fluctuate as the sensor reaches operating temperature. Record the initial value and note how it changes over time.
  4. Establish Baseline: Once the reading stabilizes (changes by less than 5 points over 30 seconds), record this as your "clean air baseline." This is your reference value for normal air quality in the room.
  5. Observe Environmental Readings: Simply breathing near (not directly on) the sensor may cause a small increase - human breath contains moisture and CO₂ which slightly affect conductivity.
  6. Safe Vapor Test (Teacher Supervised): Using hand sanitizer (alcohol-based), place a small amount on a tissue and hold it 10-15cm from the sensor (DO NOT touch the sensor with liquid). Watch the reading spike as the alcohol vapor reaches the sensor.
  7. Observe Recovery Time: Remove the vapor source and watch how long it takes for the sensor to return to baseline readings. This demonstrates the sensor's response and recovery characteristics.
  8. Document Observations: Create a table showing: baseline value, maximum spike value, time to peak and recovery time back to baseline.

What Students Should Observe:

  • Sensor becomes physically warm to the touch (150°C internal temperature)
  • Initial readings fluctuate for 2-5 minutes during warm-up
  • Baseline value stabilizes once sensor reaches operating temperature
  • Sharp increase in reading when vapor source is introduced
  • Gradual return to baseline when vapor source is removed (recovery time: 30-60 seconds)
  • Sensitivity varies with distance - closer vapor source = higher reading

Safety Note

NEVER use open flames, lighters or combustible gas sources near the MQ-2 sensor in classroom settings. Use only safe vapor sources like hand sanitizer under teacher supervision. Do not touch the sensor directly with liquids. Ensure proper ventilation when testing. The sensor gets hot during operation - touch only briefly and gently. Never obstruct the sensor's ventilation holes.

Challenge

Your Mission: Build an Air Quality Safety System

Design and test automated safety systems that protect people from invisible atmospheric hazards!

Challenge 1: Calibration Experiment

Conduct a scientific calibration study of your MQ-2 sensor:

  1. Record the clean air baseline value in your classroom
  2. Test different distances: hold a vapor source (hand sanitizer) at 5cm, 10cm, 15cm and 20cm from the sensor
  3. Record the peak reading at each distance
  4. Create a graph showing how reading intensity decreases with distance
  5. Determine the "detection radius" - maximum distance at which the sensor can reliably detect vapor
  6. Calculate the percentage change from baseline for each test: (Peak - Baseline) / Baseline × 100%

Challenge 2: Gas Leak Alarm System

Create an automated gas alarm using automation rules:

  • Rule 1 - Visual Alert: IF MQ-2 > [baseline + 50] THEN RGB LED = Red
  • Rule 2 - Audible Alert: IF MQ-2 > [baseline + 100] THEN Buzzer = ON (beeping alarm)
  • Rule 3 - Ventilation Response: IF MQ-2 > [baseline + 150] THEN Relay = ON (would activate exhaust fan in real system)

Test your multi-level alarm system and verify each threshold triggers correctly!

Challenge 3: Research Real Safety Standards

Research and answer these real-world safety questions:

  • What PPM level of carbon monoxide is considered dangerous? (Look up OSHA standards)
  • Why do gas sensors in homes need to be replaced every 5-7 years?
  • Where should CO detectors be installed in a house? (Near ceiling, floor or mid-wall? Why?)
  • Research the "explosive range" or "LEL" (Lower Explosive Limit) for natural gas. Why is early detection critical?
  • What's the difference between a combustible gas sensor (MQ-2) and a carbon monoxide sensor (MQ-7)?

Discussion Questions:

  • Why can't we simply use smell to detect gas leaks? (Many dangerous gases are odorless; added odorants can fail)
  • What would happen if a gas sensor didn't have the warm-up period? (Unstable, inaccurate readings)
  • Why measure in PPM instead of percentage? (Small concentrations are deadly - 0.1% CO can be fatal)
  • How could gas sensors help prevent household tragedies? (Detect furnace leaks, appliance malfunctions, incomplete combustion)

Bonus Challenge: Design a "Smart Kitchen Safety System" that monitors for gas leaks AND smoke. Specify the complete system: which sensors to use, what threshold values to set, what actions to take (shut off gas valve, activate fan, sound alarm, send notification to smartphone). Include a flowchart showing the decision logic for different hazard levels. Extra credit: How would you prevent false alarms from normal cooking smoke while still detecting real fires?

Key Takeaways

✓ Gas Detection Technology

Gas sensors detect invisible, odorless dangers that human senses cannot perceive, including carbon monoxide, methane, propane and smoke particulates. The MQ-2 uses semiconductor technology to sense chemical composition changes in the air, converting dangerous gas presence into measurable electrical signals. This detection capability is essential for safety systems that prevent poisoning, explosions and fire hazards in homes, vehicles and industrial facilities.

✓ Tin Dioxide Sensing Mechanism

The MQ-2 sensor contains a heated tin dioxide (SnO₂) layer maintained at approximately 150°C by an internal heater element. When combustible gas molecules contact this heated surface, chemical reactions occur that dramatically change the material's electrical conductivity. The ESP32 measures this conductivity change as an analog voltage, detecting gas concentrations as low as 200-10,000 PPM depending on the specific gas type.

✓ PPM Measurement and Thresholds

Gas concentration is measured in PPM (Parts Per Million) - the ratio of gas molecules to air molecules. Even tiny concentrations like 200 PPM of carbon monoxide can be deadly, making precise measurement critical for safety. Understanding PPM helps set appropriate alarm thresholds: low-level alerts for early warning, medium-level alerts for evacuation and high-level alerts for emergency shutdown. Professional safety systems use carefully calibrated PPM thresholds based on toxicology and explosion risk data.

✓ Burn-In and Sensor Stabilization

Electrochemical gas sensors require a burn-in period (24-48 hours for new sensors, 2-5 minutes for each session) to reach stable operating conditions. During burn-in, the tin dioxide layer stabilizes chemically and reaches proper operating temperature, allowing accurate baseline readings. Without adequate warm-up, sensors provide drifting, unreliable measurements. This burn-in requirement teaches important lessons about sensor preparation, calibration procedures and the difference between sensor response time and accuracy.

Coming Up Next Week:

Week 18: Smart Agriculture (Soil Moisture)