Go to file
2023-05-30 21:57:22 +02:00
img Initial SCD4x release 2023-05-30 02:41:08 +02:00
include Initial SCD4x release 2023-05-30 02:41:08 +02:00
lib Initial SCD4x release 2023-05-30 02:41:08 +02:00
src Fix degree symbol 2023-05-30 21:57:22 +02:00
test Initial SCD4x release 2023-05-30 02:41:08 +02:00
.gitignore Initial SCD4x release 2023-05-30 02:41:08 +02:00
.uncrustify.cfg Initial SCD4x release 2023-05-30 02:41:08 +02:00
platformio.ini Fix compile, add pressure placeholder text 2023-05-30 21:42:30 +02:00
README.md Update README 2023-05-30 02:43:53 +02:00

esp32-co2-scd4x

This project displays the current co2 levels, along with temperature and humidity information, on a HD44780 16x2 display. All of this is powered by an ESP32 devkit and a SCD40/41 photoacoustic NDIR CO2 sensor.

Wiring

Wiring diagram

The main components here are wired up like this:

  • The green, yellow and red LEDs are connected to ground and pins 25, 33 and 32 respectively
  • The HD44780 16x2 display is connected to an I2C daughterboard, which itself is connected to +5V, ground, as well as the I2C bus pins of the ESP32, 22 for clock and 21 for data
  • The SCD40/41 photoacoustic NDIR CO2 sensor is connected to +5V and ground for power and to pins 22 and 21 (ESP32 I2C_bus1; MH-Z19B side pins SCL and SDA respectively)
  • A button to toggle the backlight is connected between pin 23 and ground

Setup

The device will open a WiFi hotspot on first boot, connecting to which reveals a setup dialog for WiFi information, OpenWeatherMap API key & coordinates (this is for collecting pressure information to feed to the SCD4x sensor)