BME280 Temp Sensor Problem - Min Power Up Time? Min Time To Get First Reading?

Hey guys, I created a battery powered circuit that powers up, takes a temperature/humidity/pressure reading from the BME280, then powers down completely. I am having troubles getting good readings with certain delays.

I am trying to make this process as quickly as possible to conserve battery power.

Currently I have a 2 millisecond delay at startup to give the BME280 time to power up. Is this necessary? I can't find any info on what is an appropriate delay for this.

I then initialize the BME280 using these settings:

  • tStandby = 0.5ms
  • filter = off
  • humidity oversampling = *1
  • temperature oversampling = *1
  • pressure oversampling = *1
  • run mode = normal

If I immediately then take temp/humidity/pressure readings I always get good humidity values, and bad temperature and pressure readings (No matter what I get about 72 degrees and 14,000 feet elevation... no matter if I move the sensor to cold, warm, etc. And its always the exact same value, it never changes). I am at 5280 feet by the way.

If I add 10ms delay after initializing, then take readings, I still have the same problem.

If I change it to a 20ms delay, then take readings, I now sometimes get accurate readings for temp/humidity/pressure.

If I do the 20ms delay, take readings, then wait another 20ms delay, then take readings again I always get accurate readings.

I did the calculation in the datasheet for "Typical Measurement Time" and "Maximum Measurement Time" and I get 8ms typical, and 9.3ms max. So I would think the original 10ms delay should be good, but it doesn't seem to be working right?

Is there something I am missing? Any help or advice would be greatly appreciated, thanks!

According to the datasheet it needs 2ms after the Vdd reached about 1.6V and VddIO reached about 0.65V. So depending on how you power the chip I would give it a little more time to reach a functional state but 3ms should be a good value if you power the chip by a DIO of the Arduino. But that's the value to start communication (p.e. do the initialization), you should wait about 10ms to read the first measurement value.

If I immediately then take temp/humidity/pressure readings I always get good humidity values, and bad temperature and pressure readings (No matter what I get about 72 degrees and 14,000 feet elevation... no matter if I move the sensor to cold, warm, etc. And its always the exact same value, it never changes). I am at 5280 feet by the way.

Pressure is never returned in feet or meters, usually you get a Pa value or better hPa. The calculation of the elevation always depends on the current weather situation, so the returned value will almost always be wrong if not calibrated shortly before.

pylon:
According to the datasheet it needs 2ms after the Vdd reached about 1.6V and VddIO reached about 0.65V. So depending on how you power the chip I would give it a little more time to reach a functional state but 3ms should be a good value if you power the chip by a DIO of the Arduino. But that's the value to start communication (p.e. do the initialization), you should wait about 10ms to read the first measurement value.

Pressure is never returned in feet or meters, usually you get a Pa value or better hPa. The calculation of the elevation always depends on the current weather situation, so the returned value will almost always be wrong if not calibrated shortly before.

Thanks for the reply, and for finding that 2ms value. I agree that 10ms should do it... but even with that initial 3ms delay, initialization of BME280, then waiting 10ms, then taking readings, I still get bad readings 100% of the time. If I change 10ms to 20ms, I now sometimes get good readings and sometimes get bad readings. If I do the same thing, but then after wait another 20ms, then take another reading, I 100% of the time get good readings. So this is odd...

I have a function that correctly calculates the altitude and its accurate (when its working).

Something I tried which seems to be working for several hours so far:
Waiting 3ms, initialize BME280, then immediately read temp/humidity/pressure.... then wait 10ms, then take another reading. If I do this I seem to get good values 100% of the time. Seems odd, and seems kind of a hack, but it appears to be working like this.

Have you looked at the math formula to convert pressure and temperature to altitude? Wouldn't doubt it takes several mS. :o

Mahonroy:
...initialize BME280, then immediately read temp/humidity/pressure.... then wait 10ms, then take another reading. If I do this I seem to get good values 100% of the time...

I'm in a similar scenario (everything powered off, sensor powered on just for a quick read), and I noticed the same problem. The first read give me always the same values (default values stored in the sensor?), then the second read is always correct, even without any pause between the two reads.

If I do a long pause after the init (2-3 seconds), the first read is ok. In this case I prefer 2 reads to spare time and battery.