finitespace / BME280

Provides an Arduino library for reading and interpreting Bosch BME280 data over I2C, SPI or Sw SPI.
GNU General Public License v3.0
212 stars 105 forks source link

Absolute humidity measurement #25

Closed milan-de closed 7 years ago

milan-de commented 7 years ago

Hi all,

as I am new to arduino and BME280 world I am not sure if my question I should ask under "Issues" or somwhere else, but in case I am on right place my question would be how to retrieve absolute humidity using this BME280 ? In library "finitespace/BME280" is mention only relative humidity, right ? Thanks!

cheers, Milan

coelner commented 7 years ago

IMHO that is not a functionality of this sensor so it should not be part of the library either. There are thoughts about another library, maybe this code snippets helps you `#include

double calculationAbsHum(float t, float h) { double temp; temp = pow(2.718281828, (17.67 t) / (t + 243.5)); return (6.112 temp h 2.1674) / (273.15 + t); } String(calculationAbsHum(temperature, humidity)) + " g/m3");`

milan-de commented 7 years ago

Thanks, is there any scientific reference on the Internet where this approximation is listed ?

coelner commented 7 years ago

I'm not sure, but I guess here: https://carnotcycle.wordpress.com/2012/08/04/how-to-convert-relative-humidity-to-absolute-humidity/ Otherwise: http://www.vaisala.com/Vaisala%20Documents/Application%20notes/Humidity_Conversion_Formulas_B210973EN-F.pdf

milan-de commented 7 years ago

Thanks!