Dual Sensors have different readings
vangalvin opened this issue · 1 comments
I have two sensors set up on the i2c interface and they are both sitting right next to each other but the readings I am getting from them are considerably different even thought the settings for them both are the same.
gTemp: 17.69 <--- This is a Dallas 1 wire sensor I am using as a reference
iTemp: 17.66 oTemp: 19.26
iPress: 70562.03 oPress: 101665.53
iHum: 59.30 oHum: 73.39
the sensors are set up as i and o (one will eventually be outside a box and the other inside)
The settings I used to set these up are as follows.
[code]
SensorI.beginI2C();
SensorI.settings.commInterface = I2C_MODE;
SensorI.settings.I2CAddress = 0x76;
SensorI.setFilter(0); //0 to 4 is valid. Filter coefficient. See 3.4.4
SensorI.setStandbyTime(0); //0 to 7 valid. Time between readings. See table 27.
SensorI.setTempOverSample(1); //0 to 16 are valid. 0 disables temp sensing. See table 24.
SensorI.setPressureOverSample(1); //0 to 16 are valid. 0 disables pressure sensing. See table 23.
SensorI.setHumidityOverSample(1); //0 to 16 are valid. 0 disables humidity sensing. See table 19.
SensorI.setMode(MODE_FORCED); //MODE_SLEEP, MODE_FORCED, MODE_NORMAL is valid. See 3.3
SensorO.beginI2C();
SensorO.settings.commInterface = I2C_MODE;
SensorO.settings.I2CAddress = 0x77;
SensorO.setFilter(0); //0 to 4 is valid. Filter coefficient. See 3.4.4
SensorO.setStandbyTime(0); //0 to 7 valid. Time between readings. See table 27.
SensorO.setTempOverSample(1); //0 to 16 are valid. 0 disables temp sensing. See table 24.
SensorO.setPressureOverSample(1); //0 to 16 are valid. 0 disables pressure sensing. See table 23.
SensorO.setHumidityOverSample(1); //0 to 16 are valid. 0 disables humidity sensing. See table 19.
SensorO.setMode(MODE_FORCED); //MODE_SLEEP, MODE_FORCED, MODE_NORMAL is valid. See 3.3
[/code]
Am i missing something?
In looking at the datasheet for the BME280 on page 10 the specification gives the accuracy at ±1.0 °C. The average of iTemp and oTemp in your example is within the tolerance of the average temperature, however the reference sensor you cited might indicate that oTemp might be misbehaving (depending on the tolerance of the reference sensor). If you are able to test the two sensors in a variety of conditions, it might reveal that the two sensors have a consistent difference in temperature which you could potentially correct for in your code. As there will always be slight variations between any two sensors, this will likely be necessary anyway. If you find that one of the sensors is behaving unpredictably across a wide range of temperatures it might be an issue with that sensor. If that's the case, please contact our Technical Support Team and they can help determine if it is faulty and help you with getting a functional replacement.