Using the small LOLIN D1 mini, a Oled shield and a sensor breakout board, its possible to get a sense of CO2 in the air.
Sends both eCO2 ans TVOC.
For example to use with Hass.io
[link]
The Oled screen is optional and can be disabled in the settings.
front:
back:
- ESP8266 (Wemos/LOLIN D1 mini)
- SGP30 eCO2 sensor
- Basic soldering and wiring skills
- OLED Shield (Wemos/LOLIN 64x48 I2C)
- Oled library [link]
- SGP library [link]
- Arduino IDE / VS Code
- (For Wemos d1 mini) CH340G driver [link]
The oled shield fits exactly on the ESP, so no other connections are required.
ESP8266 | SGP30 |
---|---|
3.3v | VCC |
GND | GND |
D1 | SCL |
D2 | SDA |
Copy Settings.example.h
to Settings.h
and fill in the correct data.
Setting | default | Description |
---|---|---|
WIFI_HOSTNAME | C02Logger | device name on network |
WIFI_SSID | - | Wifi name to connect to |
WIFI_PASSWORD | - | Wifi password |
MQTT_HOST_NAME | - | MQTT broker address |
MQTT_PORT | 1833 | MQTT broker port |
MQTT_USER_NAME | - | MQTT user name |
MQTT_PASS | - | MQTT password |
MQTT_TOPIC | co2meter | MQTT topic prefix |
MQTT_UPDATE_INTERVAL | 30000 | Send interval (ms) |
SENSOR_MEASUREMENT_FREQUENCY | 5000 | Sensor update interval (ms) |
USE_SCREEN | true | Enable or disable screen |
SHOW_CONNECTION_STATUS | true | Show wifi and MQTT status |
DEBUGE_MODE | true | Debug mode |
Subscribe to co2meter/<topic>
in your MQTT client. prefix can be changes in the settings.
Topic | Description | Unit |
---|---|---|
eco2 | eCO2 value | ppm |
tvoc | TVOC value | PPB |