Go to file
2021-12-22 11:37:14 +00:00
ampel-firmware new version 0_2_2 from stuttgart 2021-11-15 13:45:36 +01:00
.drone.yml Update '.drone.yml' 2021-12-22 11:36:57 +00:00
.gitignore new version 0_2_2 from stuttgart 2021-11-15 13:45:36 +01:00
.gitlab-ci.yml Merge branch 'master' of https://git.makerlab-murnau.de/co2-ampel/software 2021-11-15 14:12:28 +01:00
.gitlab-ci.yml.orig first init of 0_2_2 2021-11-15 14:13:15 +01:00
CHANGELOG.md new version 0_2_2 from stuttgart 2021-11-15 13:45:36 +01:00
LICENSE Initial commit 2021-05-09 20:45:59 +02:00
Makefile Initial commit 2021-05-09 20:45:59 +02:00
platformio.ini Initial commit 2021-05-09 20:45:59 +02:00
README.md Update 'README.md' 2021-12-22 11:37:14 +00:00

CO2 Ampel

Build Status

CO2 Ampel is an open-source project, written in C++ for ESP8266 or ESP32.

It measures the current CO2 concentration (in ppm), and displays it on an LED ring.

The room should be ventilated as soon as one LED turns red.

Features

The CO2 Ampel can:

  • Display CO2 concentration on LED ring.
  • Allow calibration.
  • Get current time over NTP
  • Send data over MQTT.
  • Send data over LoRaWAN.
  • Display measurements and configuration on a small website.
  • Log data to a CSV file, directly on the ESP flash memory.
  • Accept many interactive commands.

Hardware Requirements

See the documentation for more info.

Software Requirements

Installation

  • If config.h does not exist, copy it from config.public.h
  • Modify config.h, e.g. for measurement time-steps, WiFi access, MQTT, NTP and web-server.

PlatformIO

PlatformIO can be run from VSCODE, Eclipse CDT or console:

make upload board=esp8266 && make monitor # For ESP8266
make upload board=esp32 && make monitor # For ESP32

Arduino IDE

  • All the libraries are included in this repository. No need to install anything via Library Manager.

  • Add your board to the board manager. Either ESP8266:

      http://arduino.esp8266.com/stable/package_esp8266com_index.json
    

    or ESP32:

      https://dl.espressif.com/dl/package_esp32_index.json
    
  • Choose the correct board in Tools > Board > ...

  • Choose the correct Flash size (e.g. "Flash Size : 4MB (1MB FS, OTA:~1019kB)" for ESP8266 ESP-12 WIFI)

  • Verify

  • Upload

  • Tools > Serial Monitor

Available commands

In Arduino IDE Serial Monitor or PlatformIO Monitor, type help + Enter in order to list the available commands:

  • auto_calibrate 0/1 (Disables/enables autocalibration).
  • calibrate (Starts calibration process).
  • calibrate 600 (Starts calibration process, to given ppm).
  • calibrate! 600 (Calibrates right now, to given ppm).
  • co2 1500 (Sets co2 level, for debugging purposes).
  • color 0xFF0015 (Shows color, specified as RGB, for debugging).
  • csv 60 (Sets CSV writing interval, in s).
  • format_filesystem (Deletes the whole filesystem).
  • free (Displays available heap space).
  • local_ip (Displays local IP and current SSID).
  • lora 300 (Sets LoRaWAN sending interval, in s).
  • mqtt 60 (Sets MQTT sending interval, in s).
  • night_mode (Toggles night mode on/off).
  • reset (Restarts the ESP).
  • reset_scd (Resets SCD30).
  • send_local_ip (Sends local IP and SSID via MQTT. Can be useful to find sensor).
  • set_time 1618829570 (Sets time to the given UNIX time).
  • show_csv (Displays the complete CSV file on Serial).
  • timer 30 (Sets measurement interval, in s).
  • wifi_scan (Scans available WiFi networks).

The commands can be sent via the Serial interface, from the webpage or via MQTT.

Authors

  • Eric Duminil (HfT Stuttgart)
  • Robert Otto (HfT Stuttgart)
  • Myriam Guedey (HfT Stuttgart)
  • Tobias Gabriel Erhart (HfT Stuttgart)
  • Jonas Stave (HfT Stuttgart)
  • Michael Käppler

Contributing

  • Merge requests are welcome, and should be based on the develop branch.
  • The develop branch gets merged into the master once it has been sufficiently tested.
  • For major changes, please open an issue first to discuss what you would like to change.

License

Copyright © 2021, HfT Stuttgart GPLv3