Giter Site home page Giter Site logo

bme680-arduino-library-with_tvoc-'s Introduction

js_BME680_Library without BSEC delivering IAQ (tVOC) by hermannj's TVOC aquiring algoritm

The BME680 precision sensor from Bosch SensorTec can measure humidity with ±3% accuracy, barometric pressure with ±1 hPa absolute accuracy, and temperature with ±1.0°C accuracy. Because pressure changes with altitude, and the pressure measurements are so good, you can also use it as an altimeter with ±1 meter or better accuracy! The BME680 takes those sensors to the next step in that it contains a small MOX sensor. The heated metal oxide changes resistance based on the volatile organic compounds (VOC) in the air, so it can be used to detect gasses & alcohols such as Ethanol, Alcohol and Carbon Monoxide, and perform air quality measurements. Note it will give you one resistance value, with overall VOC content, but it cannot differentiate gasses or alcohols. Based on herrmannj's algorithm IAQ in PPM-Units could be delivered without using proprietary BSEC static libs.

#CO2 Concentration Levels:

effect ppm-value
good < 350 ppm
acceptable < 450 ppm
complaint of stuffiness and odors < 700 ppm
general drowsiness < 1000 ppm
adverse health effects expected < 2500 ppm
serious oxigen deprivation < 5000 ppm

#Exposed JS_BME680-Methods:

            void            do_begin();

            void            do_bme680_measurement(); 
            
            unsigned long   get_bme680Interval(); 

            void            set_bme680_device_address(uint8_t addr) ;
            
            void            set_bme680_offset_temp(float toffset); 

            void            set_bme680_offset_hum(float hoffset); 

            bool            isIAQValid(); 
            
            float           getTemp(void);

            float           getPress(void);

            float           getHum(void);

            float           getAlt(void);   

            float           getCalibAlt();

            float           getGasRes(void);

            float           getSeaLevel();

            float           getTVoc(void);      


Credits and very thanks to Jörg Herrmann @ https://github.com/herrmannj/ and https://forum.fhem.de/index.php/topic,96241.0.html Author: js @ github.com/juergs and https://forum.fhem.de/index.php/topic,78619.0.html


Wiring Sample:



Designed specifically to work with the Adafruit BME680 Breakout * http://www.adafruit.com/products/3660 and libraries.

These sensors use I2C to communicate, up to 4 pins are required to interface

Adafruit BME680 Library Build Status

Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!

Check out the links above for our tutorials and wiring diagrams

On-line documention for the APIs is available, too:

Requires installation of the Adafruit Unified Sensor library:

Written by Limor Fried/Ladyada for Adafruit Industries. BSD license, all text above must be included in any redistribution


Enabled: I2C for Wemos D1 mini SDA:D2 / SCL:D1
Scanning I2C...
I2C<*** Started!
Enabled: I2C for Wemos D1 mini SDA:D2 / SCL:D1
Scanning I2C...
I2C device found at address 0x77  !
done

I2C: ok BME680 sensor found! :-)
[10.37]   Temperature = 27.32 *C  Pressure = 999.40 hPa  Humidity = 51.94 %  Gas = 0.00 KOhms  Approx. Altitude = 115.79 m 
[20.37]   Temperature = 27.41 *C  Pressure = 999.38 hPa  Humidity = 51.92 %  Gas = 87.76 KOhms  Approx. Altitude = 115.79 m 
[30.37]   Temperature = 27.53 *C  Pressure = 999.40 hPa  Humidity = 51.85 %  Gas = 95.60 KOhms  Approx. Altitude = 116.12 m 
[40.37]   Temperature = 27.59 *C  Pressure = 999.40 hPa  Humidity = 51.88 %  Gas = 100.18 KOhms  Approx. Altitude = 115.95 m 
[50.37]   Temperature = 27.63 *C  Pressure = 999.40 hPa  Humidity = 51.94 %  Gas = 102.70 KOhms  Approx. Altitude = 115.79 m 
[60.37]   Temperature = 27.64 *C  Pressure = 999.40 hPa  Humidity = 51.99 %  Gas = 104.36 KOhms  Approx. Altitude = 115.95 m 
[70.37]   Temperature = 27.65 *C  Pressure = 999.38 hPa  Humidity = 51.99 %  Gas = 105.15 KOhms  Approx. Altitude = 115.95 m 
[80.38]   Temperature = 27.66 *C  Pressure = 999.38 hPa  Humidity = 52.02 %  Gas = 106.08 KOhms  Approx. Altitude = 115.95 m 
[90.38]   Temperature = 27.66 *C  Pressure = 999.38 hPa  Humidity = 52.02 %  Gas = 106.21 KOhms  Approx. Altitude = 115.95 m 
[100.38]   Temperature = 27.66 *C  Pressure = 999.40 hPa  Humidity = 51.98 %  Gas = 107.30 KOhms  Approx. Altitude = 116.12 m 
[110.38]   Temperature = 27.66 *C  Pressure = 999.38 hPa  Humidity = 51.93 %  Gas = 108.13 KOhms  Approx. Altitude = 116.12 m 
[120.38]   Temperature = 27.67 *C  Pressure = 999.36 hPa  Humidity = 51.83 %  Gas = 108.48 KOhms  Approx. Altitude = 116.29 m 
[130.38]   Temperature = 27.68 *C  Pressure = 999.36 hPa  Humidity = 51.78 %  Gas = 108.41 KOhms  Approx. Altitude = 116.12 m 
[140.38]   Temperature = 27.68 *C  Pressure = 999.36 hPa  Humidity = 51.83 %  Gas = 108.84 KOhms  Approx. Altitude = 116.12 m 
[150.38]   Temperature = 27.68 *C  Pressure = 999.38 hPa  Humidity = 51.89 %  Gas = 108.62 KOhms  Approx. Altitude = 116.29 m 
[160.38]   Temperature = 27.69 *C  Pressure = 999.36 hPa  Humidity = 51.86 %  Gas = 108.70 KOhms  Approx. Altitude = 116.46 m 
[170.38]   Temperature = 27.69 *C  Pressure = 999.34 hPa  Humidity = 51.84 %  Gas = 109.48 KOhms  Approx. Altitude = 116.46 m 
[180.39]   Temperature = 27.70 *C  Pressure = 999.36 hPa  Humidity = 51.83 %  Gas = 109.26 KOhms  Approx. Altitude = 116.12 m 
[190.39]   Temperature = 27.69 *C  Pressure = 999.36 hPa  Humidity = 51.85 %  Gas = 109.41 KOhms  Approx. Altitude = 116.29 m 
[200.39]   Temperature = 27.69 *C  Pressure = 999.36 hPa  Humidity = 51.83 %  Gas = 109.33 KOhms  Approx. Altitude = 116.29 m 
[210.39]   Temperature = 27.68 *C  Pressure = 999.36 hPa  Humidity = 51.83 %  Gas = 109.48 KOhms  Approx. Altitude = 116.29 m 
[220.39]   Temperature = 27.68 *C  Pressure = 999.32 hPa  Humidity = 51.84 %  Gas = 110.05 KOhms  Approx. Altitude = 116.46 m 
[230.39]   Temperature = 27.68 *C  Pressure = 999.32 hPa  Humidity = 51.82 %  Gas = 110.34 KOhms  Approx. Altitude = 116.29 m 
[240.39]   Temperature = 27.68 *C  Pressure = 999.32 hPa  Humidity = 51.80 %  Gas = 111.00 KOhms  Approx. Altitude = 116.29 m 
[250.39]   Temperature = 27.68 *C  Pressure = 999.32 hPa  Humidity = 51.78 %  Gas = 110.93 KOhms  Approx. Altitude = 116.12 m 
[260.39]   Temperature = 27.68 *C  Pressure = 999.34 hPa  Humidity = 51.81 %  Gas = 110.93 KOhms  Approx. Altitude = 116.29 m 
[270.39]   Temperature = 27.68 *C  Pressure = 999.32 hPa  Humidity = 51.80 %  Gas = 110.63 KOhms  Approx. Altitude = 116.46 m 
[280.40]   Temperature = 27.68 *C  Pressure = 999.34 hPa  Humidity = 51.75 %  Gas = 111.52 KOhms  Approx. Altitude = 116.46 m 
[290.40]   Temperature = 27.68 *C  Pressure = 999.34 hPa  Humidity = 51.80 %  Gas = 110.78 KOhms  Approx. Altitude = 116.46 m 
[300.40]   Temperature = 27.69 *C  Pressure = 999.34 hPa  Humidity = 51.77 %  Gas = 111.37 KOhms  Approx. Altitude = 116.63 m 
[300.77] Taupunkt: 17.00  tVOC: 125
BME680-Reading done.
[310.40]   Temperature = 27.69 *C  Pressure = 999.32 hPa  Humidity = 51.78 %  Gas = 111.37 KOhms  Approx. Altitude = 116.46 m 
[310.77] Taupunkt: 17.01  tVOC: 125
BME680-Reading done.
[320.40]   Temperature = 27.70 *C  Pressure = 999.30 hPa  Humidity = 51.76 %  Gas = 111.96 KOhms  Approx. Altitude = 116.63 m 
[320.77] Taupunkt: 17.00  tVOC: 125
BME680-Reading done.
[330.40]   Temperature = 27.70 *C  Pressure = 999.30 hPa  Humidity = 51.78 %  Gas = 111.07 KOhms  Approx. Altitude = 116.46 m 
[330.77] Taupunkt: 17.00  tVOC: 125
BME680-Reading done.
[340.40]   Temperature = 27.70 *C  Pressure = 999.34 hPa  Humidity = 51.77 %  Gas = 111.82 KOhms  Approx. Altitude = 116.46 m 
[340.77] Taupunkt: 17.00  tVOC: 125
BME680-Reading done.
[350.40]   Temperature = 27.70 *C  Pressure = 999.34 hPa  Humidity = 51.79 %  Gas = 111.44 KOhms  Approx. Altitude = 116.46 m 
[350.78] Taupunkt: 17.02  tVOC: 126
BME680-Reading done.

bme680-arduino-library-with_tvoc-'s People

Contributors

juergs avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

bme680-arduino-library-with_tvoc-'s Issues

Wrong results ?

I tried this library with my BME680 and I am 100% sure it gives wrong results in warmer rooms. The formula used to calculate tvoc is definitely not properly accounting for temperature. In a room with 28/29 °C the library gave a reading of 150-180 ppm in contrast to fresh (cold) air where it immediately went up to 240 before I closed the window.

Bottom line: Do not rely on the values produced here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.