📘 CodingMarble Learn

Interdisciplinary Project: A Micro Air-Quality Station

A micro air-quality station is a small box that measures the air. A dust sensor counts tiny particles (PM2.5) by watching how they scatter a light beam. Gas and temperature sensors measure other things. A small computer (microcontroller) reads each sensor, turns the signal into numbers, shows them on a screen with a colour band and sounds an alarm when a threshold is crossed. Good stations are placed carefully, calibrated and averaged over time.

🎬 Step-by-step story

  1. An empty box. Air flows in and carries tiny dust particles, the brown dots. We want to measure them.
  2. Add the sensors. Dust sensor: counts particles. Gas sensor: reacts to certain gases. Temperature sensor: measures heat. One sensor, one measurement.
  3. Wires carry each sensor’s signal to the brain. The glowing dots show the messages moving. The brain is a small computer called a microcontroller.
  4. The brain turns the signal into a number and shows it on the screen. The screen colour tells you quickly: green good, yellow moderate, orange poor, red very poor.
  5. Now the alarm. When the number crosses our limit of 75, the alarm light flashes and a buzzer can sound. A limit like this is called a threshold.
  6. Free play: slide the dust level up and down. Watch the particles, the number, the colour and the alarm all answer together.

Tip: drag the 3D scene to turn it. Use two fingers to zoom.

🤔 Common doubts, cleared

Where do the dust particles come from?

Smoke, vehicles, construction, dry soil and many other sources. They are so small that they float in the air for hours.

Why does each sensor measure only one thing?

A sensor reacts to one physical effect, such as scattered light, a chemical change or heat. To measure many things we use many sensors.

How does the signal get to the brain?

As a tiny electric voltage along the wire. An ADC turns it into a number the program can use.

Why does the screen use colours?

Colours tell the story faster than numbers. Green is fine, red means act. You can see it at a glance without reading.

Why use a threshold for the alarm?

A threshold is a clear rule: above it we warn. Without it the alarm would be on all the time or never.

What happens when I add more dust in free play?

The number rises, the colour moves from green to red, and when it goes above 75 the alarm flashes. Try it with the slider.

Sensors for air quality

A sensor turns something in the world (light, heat, gas) into an electric signal. For air quality we use:

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:

  1. Reads the sensors.
  2. Averages several readings to smooth out noise.
  3. Picks a colour band for the number.
  4. 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

  1. Plan: decide what you will measure and where. Draw a block diagram: sensors → brain → screen/alarm.
  2. Power: connect the board to a safe power source (USB or a battery pack) with an adult’s help.
  3. Connect sensors to the right pins. Keep wires short and tidy.
  4. Box: put everything in a box with air holes. Keep the dust sensor’s inlet clear.
  5. 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).
  6. 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

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

Practice quiz

1. What does a PM2.5 dust sensor measure?
2. Which part turns an analogue signal into a number?
3. Why do we average several readings?
4. 1 mg/m³ equals:
5. What happens when the reading is above the threshold?

Practice: answer these yourself

Type or choose your answer, then press Check. Use a hint if you are stuck; the full solution appears after you answer.

Frequently asked questions

What is PM2.5?

Very tiny floating particles smaller than 2.5 micrometres. They can go deep into lungs, so they matter for health.

Is a home-made station as accurate as an official one?

Not usually. Low-cost sensors need calibration and can be affected by humidity. They are good for learning and for seeing trends.

Where should I place the station?

At breathing height, with free air flow, away from cooking smoke, fans and walls.

Where this is taught

China九年级(初三)U2 Air and oxygen

Learn first

Related lessons

All Chemistry lessons