1 / 2
SCD40 ESP32C3 OLED — zdjęcie 1
1 / 2

SCD40 ESP32C3 OLED

Zamów wydruk tego modelu

Obliczymy ostateczną cenę na podstawie wybranego pliku. Sprawdzisz ją i zaakceptujesz przed płatnością.

Zapisane na tym urządzeniu.

Compact CO2, temperature and humidity sensor for Home Assistant via ESP Home

Ocena
0 / 5
Polubienia
5
Pobrania
28
Wydruki
0
Wyświetlenia
330
Oceny
0

Aktualizacja u źródła:

Informacje o modelu

Źródło
Printables
Kategoria
Other Gadgets
Licencja
Creative Commons — Attribution

Parts:

ESP32C3 OLED from Aliexpress (£2.50 each) https://www.aliexpress.com/item/1005009534750048.html

SCD40 (£11 each) https://www.aliexpress.com/item/1005006682069916.html

I don't know if my ESP Home code is optimal but it works. So far, working great.

Checks the SCD40 and ESP32 internal SOC temp every 60s and reports to HA.

3D printed case is basic but friction fits together solidly enough.

ESPHome Code:

esphome:
  name: esp32c3oled1
  friendly_name: ESP32C3oled1

esp32: board: esp32-c3-devkitm-1 framework: type: esp-idf

Enable logging

logger:

Enable Home Assistant API

api: encryption: key: "_______________________________"

ota:

  • platform: esphome password: "_______________________________"

wifi: ssid: !secret wifi_ssid password: !secret wifi_password power_save_mode: HIGH

#flash on boot and error #status_led:

pin: GPIO8

i2c: sda: GPIO5 scl: GPIO6 scan: true id: bus_a

sensor:

#Internal ESP32S2 temp for diagnostics

  • platform: internal_temperature name: "SOC Temp" id: soctemp update_interval: 60s

  • platform: scd4x measurement_mode: low_power_periodic temperature_offset: 2.5 update_interval: 60s co2: name: "SCD40_CO2" id: co2 temperature: name: "SCD40_Temperature" id: temperature humidity: name: "SCD40_Humidity" id: humidity

  • platform: absolute_humidity name: Absolute Humidity temperature: temperature humidity: humidity

font:

# gfonts://family[@weight]
  • file: "gfonts://Roboto" id: roboto_12 size: 12

display: platform: ssd1306_i2c model: "SSD1306 72x40" id: ssd1306 address: 0x3C lambda: |- it.printf( 36, 5, id(roboto_12), TextAlign::CENTER, "Temp %.1f",id(temperature).state); it.printf( 36, 20, id(roboto_12), TextAlign::CENTER, "Humi %.1f",id(humidity).state); it.printf( 36, 34, id(roboto_12), TextAlign::CENTER, "CO2 %.0f",id(co2).state);

Tagi