Skip to content

ESPEasy_BME680_TVOC without need of proprietary BSEC static lib stuff

License

Notifications You must be signed in to change notification settings

juergs/ESPEasy_BME680_TVOC

Repository files navigation

ESPEasy_BME680_TVOC

ESPEasy_BME680_TVOC without need of proprietary BSEC static lib.

Special adapted ESPEasy-Version for BME680-Measurement of TVOC as CO2 equivalent.
Using a modified _P119_BME680.ino-Version as replacement. (source: Playground)
Added UDP SLINK send feature. (BME680 TVOC-reading not resitance!)

For FHEM slink transmission feature via UDP, some additional Perl modules are needed. Grab them: here

Or use MQTT for transmission. InfluxDB, Grafana ...

HowTo in FHEM-Forum (German language)

https://github.com/Nilhcem/home-monitoring-grafana/

https://github.com/Nilhcem/home-monitoring-grafana/blob/master/02-bridge/main.py

Objective

Available BME680-Libraies use only Gas-Resistance as output of IAQ. This is not usable. Therefore we use our own calculation of tVoc with output in ppm units. Many thanks to Jörg, having done the basic work.
See him @ https://github.com/herrmannj .
Initial work is done within the FHEM (german home automation forum) in
https://forum.fhem.de/index.php/topic,78619.msg972248.html#msg972248
or here:
https://forum.fhem.de/index.php?topic=96241.285

Hardware

Use I2C Interface D1 and D2 of ESP8266. Set SD0 to Low for 0x76 address.

ESP12E ----------- BME680 @ 0x76 (SDO = GND)
GND ------------> GND
3.3V ------------> 3.3V
D2 ------------> SDA
D1 ------------> SCL

Libraries

These additional bold libraries are needed for using BME680-Sensor in ESPEasy \lib-folder.:

Adafruit_BME680_Library
Adafruit_Unified_Sensor
js_BME680_prod
Adafruit_Sensor

Requirements

Breakout-Board @I2C-address 0x76 Regular ESP8266-Board as nodeMCU or Wemos D1+D2 mini Download of an actual ESPEasy-Version. Copy original \src-Ffolder to \ESPEasy and use this Folder for an Arduino-compile.

Hints and errror fixing

* the file _P119_BME680.ino is chosen for replace playground version for bm680. * overwrite eventually existing file from playgound with "Arduino: add file: _P119_BME680.ino"
* overwrite ESPEasy\EspEasy.ino file with the Version of this project.
* in case of having trouble with Arduino public libraries:
⇒ Change default Arduino libraries-folder in i.e. C:\Users\js\Documents\Arduino\libraries to i.e. D:\Temp\ESPEasy-mega.org\lib. (Setting Arduino-configuration of libraries exclusively to ESPEasy-Lib-Folder!)
* in order to achieve this (as admin): mklink /D libraries D:\Temp\ESPEasy-mega.org\lib with command prompt in default Arduino-project-folder
* SPIFFS settings -> from "none" to minimal "1M"
* reset ESP two times.

Pictures


Comparison between BSEC and TVOC. TVOC's baseline correction is at the moment not so effective as BSEC.

Filtering smoothes measured values, but reacting some with delay on fast value changes. (May be switched off in ESPEasy, if needed.)


(1) Offset-drift-compensation aka baseline-correction is not implemented yet. Term (3) shows behavior after reset. Impressive, how near the TVOC-curve fits to BSEC-algorithm. (Even with Kalmanfilter/Lowpass-filtering!)









Upload-Tools

Are found in \dist-folder of EspEasy.

EspEasy

1. Download firmware as binary including flash tool

2. Connect the ESP to Windows PC
Using either USB/UART of board or separate USB/TTL adapter

3. Write firmware using flash tool
Note necessity for GPIO to be LOW to enter flashmode

4. Restart ESP. WiFi AP "ESP_Easy_0" will appear, password: configesp
(prior to 2.0 the AP was named ESP_0)
If you're not automatically taken to the log-in page, browse to 192.168.4.1

5. Search for you routers WiFi and connect
(if you have multiple AP they will all show up with the same SSID name multiple times)

6. Reconnect to your WiFi and enter IP adress shown on previous screen

Contribution

Every Contribution to this repository will be highly appreciated!
Don't fear to create pull requests which enhance or fix the library as ultimatly you are going to help everybody.

About

ESPEasy_BME680_TVOC without need of proprietary BSEC static lib stuff

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published