Sensors for air quality
A sensor turns something in the world (light, heat, gas) into an electric signal. For air quality we use:
- Dust sensor (PM2.5/PM10): a small fan pulls air past a light beam. Particles scatter the light and a detector counts the flashes. PM2.5 means particles smaller than 2.5 micrometres, thinner than a hair, which can get deep into lungs. Reading is in µg/m³ (micrograms per cubic metre).
- Gas sensors: metal-oxide or electrochemical types change their electric signal when gases such as carbon monoxide or nitrogen dioxide touch them. Carbon dioxide is measured with an infrared sensor.
- Temperature and humidity sensor: these also correct the other readings, since damp air can make dust look larger.
No sensor is perfect, so we calibrate it: compare with a trusted reference and adjust.
The brain, screen and alarm
The microcontroller (a tiny computer chip on a board) reads each sensor many times per second. An analogue signal is changed into a number by an ADC (analogue-to-digital converter). The program then:
- Reads the sensors.
- Averages several readings to smooth out noise.
- Picks a colour band for the number.
- Shows it on the screen and, if it is above the threshold, switches on the LED and buzzer.
Example bands for PM2.5 in µg/m³: below 35 = good, 35 to 75 = moderate, 75 to 150 = poor, above 150 = very poor. (Official bands differ from country to country.)
Assembling the station step by step
- Plan: decide what you will measure and where. Draw a block diagram: sensors → brain → screen/alarm.
- Power: connect the board to a safe power source (USB or a battery pack) with an adult’s help.
- Connect sensors to the right pins. Keep wires short and tidy.
- Box: put everything in a box with air holes. Keep the dust sensor’s inlet clear.
- Program and test: upload the code, check each reading, then test with a safe change (for example, a short puff of chalk dust away from your face).
- Place it: at breathing height, away from walls, fans and cooking smoke.
Using the station and reading data
Take readings at the same times every day for a week. Write them in a table and draw a graph. Look for patterns: higher in the morning traffic? lower after rain? Use averages, not single readings. Compare with a trusted app or an official station to see how close you are.
Limits: a low-cost sensor can be wrong by a lot in very damp or very hot air, and it only measures the spot where it stands. Use the numbers as a guide and not as a medical tool.
Try it
Measure indoors and outdoors for 3 days. Which is cleaner? Why?
Key formulas and definitions
- PM2.5 = particles smaller than 2.5 µm (reading in µg/m³)
- 1 mg/m³ = 1000 µg/m³
- Average = (sum of readings) ÷ (number of readings)
- Dose (µg) = concentration (µg/m³) × air breathed (m³)
- Alarm rule: reading > threshold
Worked examples
1. Five dust readings (µg/m³): 30, 34, 40, 36, 30. Find the average and the colour band (good below 35, moderate 35 to 75).
Sum = 170. Average = 170 ÷ 5 = 34 µg/m³. This is below 35, so the band is good (green).
2. A reading is 0.12 mg/m³. Express it in µg/m³. Does it cross a threshold of 75?
0.12 × 1000 = 120 µg/m³. 120 > 75 so the alarm turns on.
3. A student breathes about 0.5 m³ of air per hour. How much PM2.5 reaches the lungs in 2 hours at 60 µg/m³ (if all were inhaled)?
Air = 0.5 × 2 = 1 m³. Dose = 60 × 1 = 60 µg.
Common mistakes
- Trusting one single reading. Average several.
- Putting the station near cooking smoke or a fan and thinking it shows the whole city.
- Mixing units: mg/m³ and µg/m³ differ by 1000.
- Thinking a gas sensor can tell exactly which gas it is. Most react to groups of gases.