Source: https://mokxi.com/teachers/plans/gas-sensors-honestly
Updated: 2026-11-19

Lesson plan

# MQ gas sensors, honestly lesson plan

Heaters, Rs/R0, calibration, cross sensitivity and alarms on the cheap MQ sensors, and why a hobby build never replaces a listed detector.

4 chapters, 7 lessons, about 6 hours, on the Arduino Uno R3. Every lesson runs in the browser, with nothing to install.

Start a class from this course

The unit

## Objectives and materials

### By the end, students can

- A heated tin dioxide film, its warm-up, and the ratio its chart is drawn in.
- Measure R0, and learn which gas a reading can and cannot name.
- Hysteresis, exposure over time, test buttons and faults, and what a listing means.
- A garage fume alarm that knows what it is not.

### Materials for the whole unit

- Air quality sensor, MQ-135
- Arduino Uno R3
- Buzzer
- Carbon monoxide sensor, MQ-7
- Gas sensor, MQ-2
- LED
- Pushbutton
- Resistor

Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.

Chapter 1. About 1 h 30 min

## How the sensor works

A heated tin dioxide film, its warm-up, and the ratio its chart is drawn in.

Lesson | Time | What students do

The heater and burn-in Inside an MQ sensor is a heater and a film of tin dioxide. Watch a cold one read as gas, then settle, and learn why every gas sketch waits. | 45 min

- Power the sensor
- A cold sensor cries gas
- The DO pin agrees
- Watch it settle
- Arm the alarm later
- Burn-in, power and heat

Rs/R0 ratios Turn AO into the element's resistance, then into the ratio the datasheet's chart is drawn in, then into parts per million. | 45 min

- Run the ratio sketch
- From volts to ohms
- Eleven counts is not much
- Let some gas in
- Read the chart
- Use this sensor's R0

### Materials

- Arduino Uno R3
- Gas sensor, MQ-2

### Check for understanding

Each student finishes "Rs/R0 ratios" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Use this sensor's R0".

Chapter 2. About 1 h 30 min

## Readings that mean something

Measure R0, and learn which gas a reading can and cannot name.

Lesson | Time | What students do

Calibration in clean air R0 varies by a factor of two or more between sensors. Measure it in clean air, and see what trusting the datasheet's typical value costs. | 45 min

- A different sensor
- Measure R0
- Why the 10 k load
- Same gas, two answers
- Clean air is a judgment
- More samples

Cross sensitivity Every MQ sensor answers to many gases and cannot say which one it smells. Fool all three sensors on the bench. | 45 min

- Three sensors, three guesses
- The real CO line
- A drink near the MQ-2
- Hydrogen on the CO sensor
- Hand sanitizer is CO2
- What a reading means

### Materials

- Air quality sensor, MQ-135
- Arduino Uno R3
- Carbon monoxide sensor, MQ-7
- Gas sensor, MQ-2

### Check for understanding

Each student finishes "Cross sensitivity" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "What a reading means".

Chapter 3. About 1 h 50 min

## Alarms, honestly

Hysteresis, exposure over time, test buttons and faults, and what a listing means.

Lesson | Time | What students do

Alarms with hysteresis A reading that hovers near a threshold turns a simple alarm on and off all day. Two thresholds fix it. | 55 min

- One alarm, two rules
- A reading that hovers
- Two thresholds hold
- The buzzer follows
- Clear the air
- Take the gap away
- Hysteresis everywhere

What a listed detector does A CO alarm listed to UL 2034 decides by exposure over time, sounds a set pattern, tests itself and reports faults. Sketch the ideas, and learn why a sketch is never the alarm. | 55 min

- Read this first
- Run the sketch
- Press TEST
- Count the beeps
- Dose, not a reading
- No alarm at 30 ppm
- A fault is not silence

### Materials

- Arduino Uno R3
- Buzzer
- Carbon monoxide sensor, MQ-7
- Pushbutton

### Check for understanding

Each student finishes "What a listed detector does" on their own, without opening the hints. The simulator checks 7 of its 7 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "A fault is not silence".

Chapter 4. About 1 h 5 min

## Boss

A garage fume alarm that knows what it is not.

Lesson | Time | What students do

Boss: a garage fume alarm Put it together: warm-up lockout, calibration at boot, a fan on CO, a dose alarm, a fuel vapor alarm and a test button. A project that sits beside listed alarms, never in their place. | 65 min

- Locked out while warming
- Calibrated at boot
- Car idling: run the fan
- Running too long: CO alarm
- Spilled fuel: vapor alarm
- Test button
- Make it yours
- Where it sits

### Materials

- Arduino Uno R3
- Buzzer
- Carbon monoxide sensor, MQ-7
- Gas sensor, MQ-2
- LED
- Pushbutton
- Resistor

### Check for understanding

Each student finishes "Boss: a garage fume alarm" on their own, without opening the hints. The simulator checks 8 of its 8 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Where it sits".

Your class

## Teach this unit as a class

Start a class from this course and its 7 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.

The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.

Start a class from this course See the demo class

More units

## Other lesson plans

Electronics basics 20 lessons, about 10 h. Embedded on the Arduino Uno 16 lessons, about 12 h. Embedded on the ESP32-C3 13 lessons, about 11 h. Embedded on the Raspberry Pi Pico 7 lessons, about 6 h. Build your own fight stick 5 lessons, about 4 h. Embedded on the STM32F411 6 lessons, about 6 h. C++ on a board 13 lessons, about 10 h. Digital logic and memory 4 lessons, about 4 h. Interactive devices on the Uno 9 lessons, about 8 h. From gates to a computer 23 lessons, about 16 h. Build a claw machine 8 lessons, about 6 h. Every unit All the courses as ready-made units, on the teachers page.
