Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By mstoer
#40455 I have been trying to make some small temperature/humidity/pressure monitoring modules using ESP-01 boards and noticed the temperature was a bit higher than expected (by about 2-3C). I ran the same code on an Arduino Uno and it came out closer to the actual value (measured with a mercury thermometer).

The code for the BME280 was taken from Adafruit's site and is virtually unmodified. I use the Arduino IDE 1.6.5. I tested it on two different makes of Unos, one Nano, two ESP-01 and one ESP-12. The ESP8266 based boards all read high temperature and low humidity. The pressure reading is fine. Here is an example:

ESP-01 & similar with ESP-12
Temperature = 23.49 *C
Pressure = 1004.99 hPa
Approx. Altitude = 69.00 m
Humidity = 44.80 %

Arduino Uno and similar with Nano
Temperature = 21.15 *C
Pressure = 1005.03 hPa
Approx. Altitude = 68.66 m
Humidity = 52.31 %

Nexus 5 (uses BME 280, but does not display Temp. or RH)
Pressure: 1005.3 hPa

Mercury Thermometer: 20.5C

I tried an SI7021 and had similar problems. The temperature is too high and the humidity low on the ESP boards. While I cannot verify the humidity readings independently, I am sure the mercury thermometer (placed next to the sensor) is correct.

Has anyone else run into this or have any suggestions?
User avatar
By RKieboom
#40473 I noticed exactly the same problem. Could it be the 3.3 voltage? The BME breakout has level converters, so it works for both 3.3V and 5V, but maybe the voltage infuences the readings? All unos and nanos run on 5V, so that is a difference I can think of.
User avatar
By mstoer
#40518 The BME280 accepts only 1.7-3.6V and I have it connected to 3.3V on the Arduino. The ESP boards run at 3.3V as well. I do not expect the supply voltage to be an issue with the BME280. However, the Arduino has a 16 MHz clock, while the ESP modules are 80 MHz. I was wondering of the I2C communications are being affected (missing bits, etc), but I don't understand why the pressure reading is not affected. I have a Digilent WF32 board that runs at 80 MHz and I'll give it a try next.

The humidity is temperature corrected, so the discrepancy there might also be temperature related.

The only other thing I can think of is how the compensation arithmetic is done. That the Arduino and ESP8266 might process these statements differently?
User avatar
By Chipteck
#40534 Do you know the chip ID?
I am running a system with an Atmega2560 and using a number of sensors on the I2C bus so far I have issues with this chip because for some reason I have chip IDs 0x60 and 0x58
The 0x58 does not respond with humidity values and is consistently 3-4 deg C higher than real temp.
The 0x60 gives humidity and it is also 2.5-3.5 deg C higher than real.
If you use Sainsmart's library and their example code, you will see the chip ID when it gets initilized.
I found no difference between the arduino ide or atmel studio environment for the way this chip behaves.