Air, heat and humidity sensors lesson plan
The sensors that watch the air, read close to the wire on the Uno: DS18B20 and DHT22 timing, SHT31 and AHT20 by hand, BME680 pressure and gas, SGP30, real CO2 with an SCD41 and particles with a PMS5003, then a space station cabin air monitor.
Objectives and materials
By the end, students can
- Temperature and humidity on a single data pin, with the timing done by hand.
- Humidity, pressure and gas sensors read from their datasheets with plain Wire calls.
- Real CO2 and fine particles, and the health numbers that grade them.
- Every sensor on one bus, keeping a space station module breathable.
Materials for the whole unit
- Air quality sensor, PMS5003
- Air quality sensor, SGP30
- Arduino Uno R3
- Buzzer
- Character LCD with I2C backpack
- CO2 sensor, SCD41
- Gas and weather, BME680
- Humidity sensor, AHT20
- LED
- Resistor x 2
- Temperature and humidity, DHT22
- Temperature and humidity, SHT31
- Temperature sensor, DS18B20 x 2
- Thermistor, 10k NTC
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.
One wire, one pin
Temperature and humidity on a single data pin, with the timing done by hand.
| Lesson | Time | What students do |
|---|---|---|
| DS18B20 vs the thermistorOne room read two ways: two DS18B20 probes sharing one wire, each with its own 64-bit address, and a thermistor on an analog pin. ROM codes, CRCs, resolution against conversion time, and when each part is the right one. | 55 min |
|
| DHT22 timingRead a DHT22 with no library: the start pulse, the sensor’s answer, forty bits told apart by how long they stay high, the checksum and the sign bit, with every pulse width printed. | 55 min |
|
Materials
- Arduino Uno R3
- Resistor x 2
- Temperature and humidity, DHT22
- Temperature sensor, DS18B20 x 2
- Thermistor, 10k NTC
Check for understanding
Each student finishes "DHT22 timing" 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: "Too short to notice".
On the I2C bus
Humidity, pressure and gas sensors read from their datasheets with plain Wire calls.
| Lesson | Time | What students do |
|---|---|---|
| SHT31 and AHT20 on one busTwo modern humidity sensors side by side, read with plain Wire calls: the bus scan, the commands, the raw words, Sensirion’s CRC-8, the AHT20’s packed 20-bit numbers, and a dew point from the Magnus formula. | 55 min |
|
| BME680 and SGP30: pressure and gasAir pressure into altitude with a BME680, then the two metal-oxide gas sensors: the BME680’s hot plate against a clean-air baseline, and the SGP30’s TVOC and CO2eq, its warm-up and its humidity compensation. | 65 min |
|
Materials
- Air quality sensor, SGP30
- Arduino Uno R3
- Gas and weather, BME680
- Humidity sensor, AHT20
- Temperature and humidity, SHT31
Check for understanding
Each student finishes "BME680 and SGP30: pressure and gas" 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: "CO2eq is not CO2".
What you breathe
Real CO2 and fine particles, and the health numbers that grade them.
| Lesson | Time | What students do |
|---|---|---|
| Real CO2 with an SCD41A photoacoustic NDIR sensor that measures CO2 itself, every five seconds: the data-ready flag, the ventilation bands from fresh air to the workplace limit, a warning lamp, and why every CO2 sensor needs calibrating. | 55 min |
|
| Particles with a PMS5003A laser particle counter read byte by byte: the 32-byte frame and its checksum, PM1.0, PM2.5 and PM10, a running average graded on the US AQI bands and the WHO guideline, and sleep on the SET pin. | 55 min |
|
Materials
- Air quality sensor, PMS5003
- Arduino Uno R3
- CO2 sensor, SCD41
- LED
- Resistor
Check for understanding
Each student finishes "Particles with a PMS5003" 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: "Let it sleep".
Boss: the cabin
Every sensor on one bus, keeping a space station module breathable.
| Lesson | Time | What students do |
|---|---|---|
| Boss: a space station cabin air monitorPut it all together: CO2 from an SCD41, temperature and humidity from an SHT31 and particles from a PMS5003, each graded OK, WARN or ALARM, the worst on an LCD, a red lamp and a buzzer, for a module with no window to open. | 65 min |
|
Materials
- Air quality sensor, PMS5003
- Arduino Uno R3
- Buzzer
- Character LCD with I2C backpack
- CO2 sensor, SCD41
- LED
- Resistor
- Temperature and humidity, SHT31
Check for understanding
Each student finishes "Boss: a space station cabin air monitor" 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: "Your own rule".
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.