CO₂ Logger for Respiration Studies
Building an NDIR sensor logger for plant/yeast investigations with SD-card logging
If you’ve ever tried to teach respiration with anything more exciting than “here’s a diagram of mitochondria”, you’ll know the pain: students understand the theory… but they don’t feel the science.
A simple CO₂ logger changes that instantly. Put a plant in the dark, watch CO₂ creep up. Shine a lamp, see it flatten (or fall). Add yeast + sugar, and the graph climbs like it’s late for the bus.
This post is a practical guide to building a classroom-friendly CO₂ logger using an NDIR sensor and SD-card logging — rugged enough for repeated lessons, cheap enough to build more than one, and accurate enough to generate genuinely useful data.
Why NDIR?
NDIR (Non-Dispersive Infrared) CO₂ sensors measure how much infrared light is absorbed at a wavelength CO₂ strongly absorbs. In plain English: it’s a direct physical measurement, not a “gas smell guess”.
Why that matters in education:
-
Stable and repeatable (great for comparisons between groups)
-
Readable ranges (400 ppm outdoors; 800–2000 ppm in a room; fermentation can go much higher in enclosed setups)
-
Produces proper time-series graphs students can interpret like real scientists
What you can investigate (and what students learn)
1) Plant respiration vs photosynthesis
Setup: sealed container + plant + CO₂ logger
-
In darkness: CO₂ rises (respiration dominates)
-
In light: CO₂ stabilises or falls (photosynthesis offsets respiration)
Skills: variables, controls, rate calculations, graph interpretation, evaluation.
2) Yeast fermentation rate
Setup: yeast + sugar solution in a container, with headspace CO₂ measured
-
Compare sugar concentration, temperature, yeast mass, type of sugar
-
Extension: add a temperature probe and do rate vs temperature properly
Skills: fair testing, kinetics ideas, limiting factors, repeatability.
3) Classroom air & ventilation (bonus “real life” enquiry)
Measure CO₂ in a classroom over time:
-
Doors closed vs opened
-
Window cracked vs shut
-
Breaktime recovery
It turns into a brilliant discussion on air quality, concentration units, and evidence-based decision making.
Hardware build (robust, SD-logging, classroom-proof)
Recommended core components
Microcontroller (choose one):
-
Arduino Uno/Nano (simple, familiar)
-
ESP32 (more power + built-in time sync if you later add Wi-Fi)
CO₂ sensor (NDIR):
-
Mid-range/very tidy: Sensirion SCD30 / SCD41 (often CO₂ + T/RH, excellent stability)
-
Industrial style: Senseair S8 (reliable, common in HVAC)
Logging:
-
Optional but highly recommended: RTC module (DS3231) for proper timestamps
Power:
-
USB power bank (portable lessons)
-
Or 5 V mains USB adapter (fixed bench station)
Nice-to-haves:
-
Small OLED display (shows live ppm so students get instant feedback)
-
Temperature probe (DS18B20) to link rate to temperature properly
Container setup (the part that makes or breaks the lesson)
Your sensor can only measure what reaches it. The container matters.
Best practice for classroom investigations:
-
Use a rigid clear storage box (with a reasonably airtight lid)
-
Add a small grommeted cable pass-through (or a drilled hole sealed with hot glue/silicone)
-
Put a small fan inside (optional) to mix air and avoid local pockets of CO₂
Important: Don’t fully seal anything that might generate a lot of gas pressure (fermentation can surprise you). Leave a controlled vent or use a larger headspace.
Wiring overview (typical)
This will vary by sensor, but the pattern is consistent:
-
CO₂ sensor → microcontroller via UART (TX/RX) or I²C
-
SD module → SPI (CS, SCK, MOSI, MISO)
-
RTC → I²C
-
Display → I²C
Example Arduino sketch (UART NDIR + SD + RTC)
Below is a template-style sketch that logs a CSV line every few seconds:
-
Timestamp
-
CO₂ ppm
-
(Optional) temperature if your sensor provides it
You’ll need the right library calls for your exact CO₂ sensor (each model differs). This example shows the SD/RTC pattern and a placeholder
readCO2ppm().
Teacher tip: logging every 2–10 seconds is plenty. Faster than that just creates noise (and huge CSV files) without improving understanding.
Calibration & sanity checks (don’t skip this)
Even good CO₂ sensors benefit from sensible classroom checks.
Quick sanity check
-
Take the logger outside: you should see something near ~400–500 ppm (varies by location/wind).
-
Breathe gently near (not into) the sensor: ppm should climb quickly.
About “auto calibration”
Many NDIR sensors have an ABC mode (automatic baseline calibration) that assumes the lowest reading in a long period is fresh air. That’s fine for a device living in a ventilated building — but can mess up if your sensor lives in sealed-box experiments.
For teaching experiments:
-
Consider turning ABC off (depends on sensor)
-
Or ensure the sensor regularly sees fresh air between runs
Practical investigations (ready to run)
Practical A: Plant in dark vs light
-
Put plant + sensor in container (with some headspace)
-
Log for 10 minutes in normal light
-
Switch to dark (cover the box) for 10 minutes
-
Switch to bright lamp for 10 minutes
Expected: CO₂ rises in dark; stabilises/falls in light.
Practical B: Yeast + sugar, effect of temperature
-
3 identical bottles: yeast + sugar + warm water
-
Put each bottle in water baths (e.g., 15°C / 25°C / 35°C)
-
Measure headspace CO₂
Expected: rate increases with temperature (until it doesn’t… a great evaluation discussion).
Data analysis ideas (simple but “proper science”)
-
Plot CO₂ vs time
-
Calculate rate using gradient (Δppm / Δt)
-
Compare rates between conditions
-
Discuss uncertainty:
-
sensor response time
-
container leaks
-
mixing (fan or no fan)
-
temperature effects on gas behaviour and biological rate
-
Safety notes (classroom reality)
-
Don’t build pressure vessels: fermentation can pressurise.
-
Avoid glass for sealed fermentation unless you’re experienced and protected.
-
Use food-grade containers, and keep liquids away from electronics.
-
Remind students: CO₂ is not “poison gas at these levels”, but high CO₂ in closed spaces is a real ventilation topic.
Optional upgrades (if you want it “lab-grade”)
-
Add temperature + humidity logging (helps explain variation)
-
Add a simple pump + tube to sample from different containers
-
Add an OLED so students can see live ppm without a computer
-
Use ESP32 and log to SD and stream to a dashboard later

No comments:
Post a Comment