Air quality sensor
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 
Ondřej Hruška 688bff3a6a finalizations and debugging 4 yıl önce
components kinda working now maybe 4 yıl önce
main finalizations and debugging 4 yıl önce
.gitignore Initial template version based of cspemu 4 yıl önce
CMakeLists.txt Initial template version based of cspemu 4 yıl önce
LICENSE.txt license 4 yıl önce
Makefile Initial template version based of cspemu 4 yıl önce
README.md license 4 yıl önce
sdkconfig co2 maybe working better 4 yıl önce

README.md

ESP air quality sensor

Function

  • CO2 ppm
  • air temperature
  • relative humidity
  • gas sensor VOC equivalent PPM
  • gas sensor CO2 equivalent PPM

Data reading

The module prints actual readings to the debug console.

Data is accessible as JSON on a REST endpoint /sample, port 80

Example:

{"temp":22.80,"temp_r":22.86,"hum":45.33,"hum_r":45.15,"pres":98203.7,"gas_r":583406.1,"co2":620.00}

More data is included once BSEC2 (Bosch proprietary BME680 client / fusion library) finishes its calibration. See the websrv.c file for details.

Workarounds & reliability features

The used CO2 sensor has buggy ABC algorithm that sometimes underflows. Further, I2C is very much broken on the sample used, so I use the Modbus interface instead. Automatic restart and calibration restore is implemented for it.

BSEC2 state persistence is implemented, but dubious if functional due to the millisecond timestamp logic. Air quality reports usually start coming after a couple hours of run time with varying ambient gas concentration.

Configuration

Config via console on the serial port (115200-8-N-1), or telnet (port 22).

WiFi can be configured and persisted, including static IP. WiFi scan is not implemented.

Hardware

  • BME680 in I2C mode
  • SenseAir Sunrise (buggy early revision, will need updating for newer sensors)

Pinout

  • I2C_SDA0 16 - i2c for BME680
  • I2C_SCL0 17
  • I2C_SDA1 5 (senseair sunrise uart TX)
  • I2C_SCL1 18 (senseair sunrise uart RX)
  • CO2_NRDY 23
  • CO2_COMSEL 13 (high=uart)
  • CO2_EN 15 sunrise restart pin, works like nReset

Licensing

See the LICENSE file.