-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Low temperature reading in specific conditions #101
Comments
0.2 up to 0.5 °C is within the range of the sensor. bosch released the datasheet version 1.6, read chapter 1.4. To sum it up.
|
Thx for your reply. It is not random noise of some degree, but a significant deviation on each first measurement of a serie of 6. Devices can deviate but the BME280 is specified to have a Root-Mean-Square (RMS) noise of only 0.005 °C. However, I will try some delay after the initial code and just before each measurement to see whether the code did not shut down the WiFi as I expected.
|
Yeah, I see the problem. With every deep sleep you reset the i2c bus and with it all devices. I'm not sure but I guess the sensor needs a single measurement to do things. Maybe your problem is solved by forcing a single measurement in before. |
That could be an explanation: it reports the last (60 seconds before) measurement combined with unstable voltage during the WiFi operations. 1.000uF should be enough, but I could try adding a smaller ceramic one. @finitespace, hope you can spare some time coming weeks to accept some pulls. I would be glad to help you to adjust any code proposals to your coding standards. Other option to test, is to start the measurement after the WiFi operations, just before deep sleep. Or to pause the start of WiFi with 10ms to allow the measurement to finish. For logging purposes a permanent minimum delay of 60 seconds is acceptable. I don't think the use of the i2c bus terminates any reading of the BME280. I am not killing the power for the BME280 with a transistor. It is powered continously. Waiting for a fresh measurement (with 1 sample) takes about 10ms do you agree? (Appendix B of datasheet BME280). That could also be an option to consider, but I guess it will cost battery juice as the code execution without WiFi is very fast. |
you reset all I2C devices within your setup() because you configure them again. I'm not sure if the state of the sensor gets lost by that. |
Adding a delay(10) before starting WiFi - but after polling the BME280 - did the trick. I will keep looking for other solutions, but at least I got a base-solution. Thx @coelner. |
@coelner. delay(10) is not enough. Now my humidity reading got the fever. Looking at figure 4 of paragraph 3.3.3 of the Bosch pdf, I need to add a little more. (Or use some kind of interrupt.) I calculated 8,075 ms for the reading, of which 2,575 ms for humidity. I will add 5 and see what happens. |
I operate a BME280 with a ESP8266 on a bare board, with a 1000uF capacitator connected between VCC and ground and a LiFePo4 battery of currently 3,4V. The BME280 is also connected to the same LiFePo4 battery.
The code is optimised for low energy shutting off WiFi, doing one measure each minute, storing them in RTC memory and applying deep sleep. After some measurements (6 currently) it connects to WiFi and sends all data. Now my problem: Each first measurement (60 seconds after the last measurement and sending all data using WiFi) is 0,2 to 0,5 degree too low compared to the others, and also influencing the pressure measurement calculations.
I intend to use the "Weather monitoring" settings: Sensor mode: forced mode, 1 sample/minute. Oversamplings settings: 1x, IIR filter off.
BME280I2C::Settings settings(
BME280::OSR_X1,
BME280::OSR_X1,
BME280::OSR_X1,
BME280::Mode_Forced,
BME280::StandbyTime_1000ms,
BME280::Filter_Off,
BME280::SpiEnable_False,
BME280I2C::I2CAddr_0x76 // I2C address. I2C specific.
);
Anyone an idea how this behaviour occur?
The text was updated successfully, but these errors were encountered: