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!