Coro2sens
Build a simple device that warns if CO₂ concentration in a room becomes a risk for COVID-19 aerosol infections.
Install / Use
/learn @kmetz/Coro2sensREADME
CorO₂Sens
Build a simple device that warns if CO₂ concentration in a room becomes a risk for COVID-19 aerosol infections.
- Measures CO₂ concentration in room air.
- Controls an RGB LED (green, yellow, red, like a traffic light).
- A buzzer can be connected that alarms if levels are critical.
- Also opens a WiFi portal which shows current readings and a graph (not connected to the internet).
- Can be built for ~ $60 / 50€ (parts cost).
This project was heavily inspired by ideas from Umwelt-Campus Birkenfeld.
You can also find a good overview of the topic by Rainer Winkler here: Recommendations for use of CO2 sensors to control room air quality during the COVID-19 pandemic.

Sensors
- The sensor used here is the Sensirion SCD30 (around $50 / 40€) which is optionally augmented by a BME280 pressure sensor to improve accuracy.
- Look here if you want to use MH-Z19B sensors.
Threshold values
| LED color |CO₂ concentration | |:--------------------------|:----------------------------| | Green ("all good") | < 800 ppm | | Yellow ("open windows") | 800 – 1000 ppm | | Red ("leave room") | > 1000 ppm |
Based on a Recommendation from the REHVA (Federation of European Heating, Ventilation and Air Conditioning associations, rehva.eu) for preventing COVID-19 aerosol spread, especially in schools.
Web server
You can read current levels and a simple graph for the last hour by connecting to the WiFi coro2sens that is created.
Most devices will open a captive portal, immediately showing the data. You can also open http://10.0.0.1/ in a browser.
You need
- Any ESP32 or ESP8266 board (like a WEMOS D32 (about $18 / 15€) or WEMOS LOLIN D1 Mini (about $7 / 6€)).
ESP32 has bluetooth, for future expansion. - Sensirion SCD30 I<sup>2</sup>C carbon dioxide sensor module (mouser, digikey) (around $50 / 40€).
- 1 NeoPixel compatible RGB LED (WS2812B, like the V2 Flora RGB Smart NeoPixel LED, you can also remove one from a larger strip which might be cheaper).
- A 3V piezo buzzer or a small speaker.
- Optional: Bosch BME280 I<sup>2</sup>C sensor module (like the GY-BME280 board), for air pressure compensation, improves accuracy (less than $5 / 4€).
- A nice case :) Make shure the sensor has enough air flow.
Wiring
| ESP8266 pin | ESP32 pin | goes to | |:-------------|:--------------|:-------------------------------------------| | 3V3 | 3V3 | SCD30 VIN, BME280 VIN | | 5V | 5V | LED +5V | | GND | GND | SCD30 GND, BME280 GND, LED GND, Buzzer (-) | | SCL / D1 | SCL / GPIO 22 | SCD30 SCL, BME280 SCL | | SDA / D2 | SDA / GPIO 21 | SCD30 SDA, BME280 SDA | | GPIO 0 / D3 | GPIO 16 | LED DIN | | GPIO 14 / D5 | GPIO 19 | Buzzer (+) |
Flashing the ESP using PlatfomIO
- Simply open the project, select your env (
esp12efor ESP8266 /esp32devfor ESP32) and run / upload. - Or via command line:
pio run -t -e esp12e uploadfor ESP8266.pio run -t -e esp32dev uploadfor ESP32.
- Libraries will be installed automatically.
Flash using the Arduino IDE
- Install the latest Arduino IDE.
- Download the latest code and unzip it somewhere.
- Open
coro2sense.inoin thecoro2senssub folder in your Arduino IDE. - Install (or update) your board platform:
(Tools –> Board –> Board Manager...)- Install
esp8266oresp32.
- Install
- Install (or update) the following libraries using the built-in library manager:
(Tools –> Library Manager...)- For ESP8266:
SparkFun BME280FastLED
- For ESP32:
SparkFun SCD30 Arduino LibrarySparkFun BME280FastLED
- For ESP8266:
- Install the following external libraries:
(download .zip file, then import it via Sketch –> Include Library –> Add .ZIP Library...)- For ESP8266:
- For ESP32:
- Run & upload :)
Please let me know of any issues you might encounter (open a GitHub issue or write me on twitter.com/kmetz or k@kjpm.de). Also, I'd be for hire for customizations.
Related Skills
node-connect
342.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.7kCommit, push, and open a PR
