I have noticed that my BME680 is about 0.8 degrees higher than my purchased weather station, and about 7% lower humidity. The temperature isn't a big issue, it would be nice if it was closer, but not a big deal. The humidity however, is a little too far off for my liking. Is there a way to calibrate it, or do I just add an offset to my code?
@b707 I am not complaining about the library at all, I am looking for any calibration techniques that anyone else has found anywhere. How would I go about doing a multi point curve calibration for example?
Assuming that you have a waterproof sensor then write a simple sketch that displays the temperature and note the values when the sensor is in ice cold water and in boiling water to give the values of rawLow and rawHigh then use the values as follows
#include <OneWire.h>
#include <DallasTemperature.h>
#include "BluetoothSerial.h"
BluetoothSerial SerialBT;
#define ONE_WIRE_BUS 17
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
float rawHigh = 97.5;
float rawLow = -0.50;
float refHigh = 100.00;
float refLow = 0.00;
float rawRange = rawHigh - rawLow;
float refRange = refHigh - refLow;
void setup(void)
{
Serial.begin(115200);
while (!Serial);
sensors.begin();
SerialBT.begin("Thermometer");
}
void loop(void)
{
Serial.print("Requesting temperatures...");
sensors.requestTemperatures();
Serial.println("DONE");
float tempC = sensors.getTempCByIndex(0);
if (tempC != DEVICE_DISCONNECTED_C)
{
float tempCorrected = (((tempC - rawLow) * refRange) / rawRange) + refLow;
Serial.printf("(%2.2f) %2.2f\n", tempC, tempCorrected);
SerialBT.printf("(%2.2f) %2.2f\n", tempC, tempCorrected);
}
else
{
Serial.println("Error: Could not read temperature data");
}
delay(5000);
}
NOTE this sketch was written for a DS18B20 sensor but the calculation used to derive tempCorrected should be the same
By the way, how do you know that your weather station is showing the correct values ?
@UKHeliBob
I have three weather stations and each one is more or less the same.
I haven't ever seen a waterproof BME680. Neither has google. I also have two DS18B20, but as I said, I'm more worried about the humidity than the temperature.