Comments (6)
Hmmm... Could you print contents of dev->calib_data (bme680_calib_data_t)
for esp32?
from esp-idf-lib.
Interesting idea. My code from the esp8266 and the esp32 only differ by the pins.
Not sure it there need to be more. But you are right.
BME680 Sensor: 0.00 °C, 0.00 %, 0.00 hPa, 14696.00 Ohm
sensor.calib_data.par_t1: 0
sensor.calib_data.par_t2: 0
sensor.calib_data.par_t3: 0
sensor.calib_data.par_p1: 0
sensor.calib_data.par_p2: 0
sensor.calib_data.par_p3: 0
sensor.calib_data.par_p4: 0
sensor.calib_data.par_p5: 0
sensor.calib_data.par_p7: 0
sensor.calib_data.par_p6: 0
sensor.calib_data.par_p8: 0
sensor.calib_data.par_p9: 0
sensor.calib_data.par_p10: 0
sensor.calib_data.par_h1: 0
sensor.calib_data.par_h2: 0
sensor.calib_data.par_h3: 0
sensor.calib_data.par_h4: 0
sensor.calib_data.par_h5: 0
sensor.calib_data.par_h6: 0
sensor.calib_data.par_h7: 0
sensor.calib_data.par_gh1: 0
sensor.calib_data.par_gh2: 0
sensor.calib_data.par_gh3: 0
sensor.calib_data.t_fine: 0
sensor.calib_data.res_heat_range: 1
sensor.calib_data.res_heat_val: 40
sensor.calib_data.range_sw_err: 1
On the ESP8266 it looks like this:
BME680 Sensor: 26.27 °C, 53.63 %, 0.00 hPa, 7098.00 Ohm
sensor.calib_data.par_t1: 26046
sensor.calib_data.par_t2: 26464
sensor.calib_data.par_t3: 3
sensor.calib_data.par_p1: 36756
sensor.calib_data.par_p2: -10489
sensor.calib_data.par_p3: 88
sensor.calib_data.par_p4: 7111
sensor.calib_data.par_p5: -73
sensor.calib_data.par_p7: 52
sensor.calib_data.par_p6: 30
sensor.calib_data.par_p8: -3839
sensor.calib_data.par_p9: -2109
sensor.calib_data.par_p10: 30
sensor.calib_data.par_h1: 685
sensor.calib_data.par_h2: 1027
sensor.calib_data.par_h3: 0
sensor.calib_data.par_h4: 45
sensor.calib_data.par_h5: 20
sensor.calib_data.par_h6: 120
sensor.calib_data.par_h7: -100
sensor.calib_data.par_gh1: -50
sensor.calib_data.par_gh2: -6339
sensor.calib_data.par_gh3: 18
sensor.calib_data.t_fine: 134478
sensor.calib_data.res_heat_range: 1
sensor.calib_data.res_heat_val: 41
sensor.calib_data.range_sw_err: 15
So what can this mean?
from esp-idf-lib.
Calibration data seems to be read or interpreted incorrectly.
Could you dump contents of uint8_t buf[BME680_CDM_SIZE]
(bme680_init_sensor()) after reading it at line 580 in bme680.c?
from esp-idf-lib.
Interesting. It seems like the dumping between the i2c readings solves the problem. See the screenshot. As soon as I remove the buffer dumping, the problem appears again.
Here the interim result. I will investigate this later today.
ESP32 result:
#0 dump uint8_t buf[BME680_CDM_SIZE]
0x30 0x0d 0x80 0x30 0x7f 0xfb 0x3f 0x60 0x7f 0xfb 0x3f 0x40 0x42 0x0f 0x00 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xd2 0x8a 0x08 0x80 0x10 0x57 0xfb 0x3f 0xa8 0x23 0xfb 0x3f 0x4c 0x64 0xfb 0x3f 0x50 0x58
48 13 128 48 127 251 63 96 127 251 63 64 66 15 0 165 165 165 165 165 165 165 165 165 165 165 165 165 165 165 165 210 138 8 128 16 87 251 63 168 35 251 63 76 100 251 63 80 88
#1 dump uint8_t buf[BME680_CDM_SIZE]
0x80 0x60 0x67 0x03 0x0f 0x94 0x8f 0x07 0xd7 0x58 0xff 0xc7 0x1b 0xb7 0xff 0x34 0x1e 0x00 0x00 0x01 0xf1 0xc3 0xf7 0x1e 0x01 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xd2 0x8a 0x08 0x80 0x10 0x57 0xfb 0x3f 0xa8 0x23 0xfb 0x3f 0x4c 0x64 0xfb 0x3f 0x50 0x58
128 96 103 3 15 148 143 7 215 88 255 199 27 183 255 52 30 0 0 1 241 195 247 30 1 165 165 165 165 165 165 210 138 8 128 16 87 251 63 168 35 251 63 76 100 251 63 80 88
#2 dump uint8_t buf[BME680_CDM_SIZE]
0x80 0x60 0x67 0x03 0x0f 0x94 0x8f 0x07 0xd7 0x58 0xff 0xc7 0x1b 0xb7 0xff 0x34 0x1e 0x00 0x00 0x01 0xf1 0xc3 0xf7 0x1e 0x01 0x40 0x3d 0x2a 0x00 0x2d 0x14 0x78 0x9c 0xbe 0x65 0x3d 0xe7 0xce 0x12 0x5b 0x00 0xfb 0x3f 0x4c 0x64 0xfb 0x3f 0x50 0x58
128 96 103 3 15 148 143 7 215 88 255 199 27 183 255 52 30 0 0 1 241 195 247 30 1 64 61 42 0 45 20 120 156 190 101 61 231 206 18 91 0 251 63 76 100 251 63 80 88
#3 dump uint8_t buf[BME680_CDM_SIZE]
0x80 0x60 0x67 0x03 0x0f 0x94 0x8f 0x07 0xd7 0x58 0xff 0xc7 0x1b 0xb7 0xff 0x34 0x1e 0x00 0x00 0x01 0xf1 0xc3 0xf7 0x1e 0x01 0x40 0x3d 0x2a 0x00 0x2d 0x14 0x78 0x9c 0xbe 0x65 0x3d 0xe7 0xce 0x12 0x5b 0x00 0x29 0xaa 0x16 0xcb 0xf3 0xfc 0x62 0x67
128 96 103 3 15 148 143 7 215 88 255 199 27 183 255 52 30 0 0 1 241 195 247 30 1 64 61 42 0 45 20 120 156 190 101 61 231 206 18 91 0 41 170 22 203 243 252 98 103
W (330) BME680: Heater is not stable
ESP8266:
#0 dump uint8_t buf[BME680_CDM_SIZE]
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x50 0xcd 0xfe 0x3f 0x6d 0x24 0x21 0x40 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xf0 0xcb 0xfe 0x3f 0x8c 0x24 0x21 0x40 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xf0 0xcb 0xfe 0x3f 0x84 0xdc 0x21 0x40 0xa5 0xa5
0 0 0 0 0 0 0 80 205 254 63 109 36 33 64 0 0 0 0 0 0 0 0 240 203 254 63 140 36 33 64 165 165 165 165 165 165 165 165 240 203 254 63 132 220 33 64 165 165
#1 dump uint8_t buf[BME680_CDM_SIZE]
0x40 0xe6 0x66 0x03 0x2f 0x64 0x91 0xdc 0xd6 0x58 0xff 0x4e 0x20 0x75 0xff 0x3b 0x1e 0x00 0x00 0x83 0xed 0x32 0xf9 0x1e 0x02 0xfe 0x3f 0x8c 0x24 0x21 0x40 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xa5 0xf0 0xcb 0xfe 0x3f 0x84 0xdc 0x21 0x40 0xa5 0xa5
64 230 102 3 47 100 145 220 214 88 255 78 32 117 255 59 30 0 0 131 237 50 249 30 2 254 63 140 36 33 64 165 165 165 165 165 165 165 165 240 203 254 63 132 220 33 64 165 165
#2 dump uint8_t buf[BME680_CDM_SIZE]
0x40 0xe6 0x66 0x03 0x2f 0x64 0x91 0xdc 0xd6 0x58 0xff 0x4e 0x20 0x75 0xff 0x3b 0x1e 0x00 0x00 0x83 0xed 0x32 0xf9 0x1e 0x02 0x40 0xe1 0x27 0x00 0x2d 0x14 0x78 0x9c 0x50 0x66 0x49 0xe7 0xc9 0x12 0x5b 0x00 0xfe 0x3f 0x84 0xdc 0x21 0x40 0xa5 0xa5
64 230 102 3 47 100 145 220 214 88 255 78 32 117 255 59 30 0 0 131 237 50 249 30 2 64 225 39 0 45 20 120 156 80 102 73 231 201 18 91 0 254 63 132 220 33 64 165 165
#3 dump uint8_t buf[BME680_CDM_SIZE]
0x40 0xe6 0x66 0x03 0x2f 0x64 0x91 0xdc 0xd6 0x58 0xff 0x4e 0x20 0x75 0xff 0x3b 0x1e 0x00 0x00 0x83 0xed 0x32 0xf9 0x1e 0x02 0x40 0xe1 0x27 0x00 0x2d 0x14 0x78 0x9c 0x50 0x66 0x49 0xe7 0xc9 0x12 0x5b 0x00 0x28 0xaa 0x16 0x4c 0x13 0x03 0x66 0x6c
64 230 102 3 47 100 145 220 214 88 255 78 32 117 255 59 30 0 0 131 237 50 249 30 2 64 225 39 0 45 20 120 156 80 102 73 231 201 18 91 0 40 170 22 76 19 3 102 108
W (510) BME680: Heater is not stable
Same code on both devices. Same sensor device used for both tests.
from esp-idf-lib.
@UncleRus I found a "fix" with all your hints.
Increasing BME680_RESET_PERIOD
from 5 to 10 ms
or
adding an extra 10 ms delay before the read calls (i2c_dev_read_reg(..)
) around line 582 of bme680.c helps.
from esp-idf-lib.
Great! Thank you!
from esp-idf-lib.
Related Issues (20)
- Write to config register triggers start conversion on ADS1115
- Support for BQ27441-G1
- Having issues using the TCA9548 code for my VEML7700
- SHT4x often gives "i2cdev: Could not read from device [0x44 at 0]" error on measurement HOT 2
- Strange behavior with BME280 + MAX17048 HOT 4
- Problem with nested structs in BME680-Driver / I²C-init
- error in bme680_convert_temperature() when temperature is below 0 HOT 2
- Unable to read from HX711 with esp-idf-lib HOT 2
- Watchdog timer reset after BME280 initialization on ESP32C3 HOT 1
- INA219 - Wrong current reading
- Integration Proposal for Software Testing using Wokwi Simulator CI in esp-idf-lib
- [sht3x]: i2cdev: Could not write to device [0x44 at 0] HOT 6
- I2C driver is old driver in i2cdev HOT 2
- mcp23x17 Interrupt Mirroring HOT 1
- Ultrasonic hogs the CPU HOT 1
- Any plan for a release ?
- ADS111x driver bug (and fix) dealig with ALERT/RDY signal HOT 1
- The component driver could not be found HOT 1
- Driver for LIS2HH12 3-axis accelerometer HOT 1
- Driver for AM1805 ultra-low power RTC
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp-idf-lib.