I have custom design based around BHI260AP smart sensor, with the BMP390 pressure sensor attached to its i2c1 bus, same as in the shuttle board 3.
I have built the FW for the sensor with the `VirtPressure` virtual sensor enabled and I've enabled it in my host mcu firmware.
I am using the BHY2 API code from github to interface with the smart sensor in my host mcu.
When I read the pressure sensor, I get raw values ~125250, and to convert them in hPa, according to the BHY2 API code, I need to divide by 128, so I obtain ~978 hPa, which is very off.
What can cause this? Is the `BMP3Baro` driver inside BHI260AP SDK (I am using version 18.104.22.168) doing pressure compensation, or should I implement custom driver for BMP390? Can anyone check what value they are obtaining when using the shuttle board?
Thanks in advance!
Solved! Go to Solution.
I've did more experimentations and implemented custom driver for the BMP390 sensor using the BHI260AP SDK, but still the value is same, incorrect.
I've dumped the trimming values for the calibration process and I've put them in a spreadsheet for compensation that I've found in previous forum post, for BMP388, but the procedure for compensation looks the same.
With the trimming values I've got from the sensor, the value calculated in the spreadsheet is the same as the one from the firmware, inaccurate (attached the spreadsheet with file name bmp390_compensation.xlsl).
But if I use the trimming values from the original spreadsheet, I obtain much more sensible values (attached the spreadsheet with file name bmp390_compensation_other_trim.xlsl).
I've checked the CRC for them using the self-test code found in the BMP3 API github repo, and the CRC is correct.
Is it possible that the trimming values stored in the sensor are incorrect? Any other suggestions?
Multiple devices use the same design and all give incorrect values for the pressure.
Thank you in advance.
In another link https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/BHI260AP-sensor-with-BMP390-to-get-press..., we run example code which parse temperature, humidity, pressure, gas sensor data on BHI260AP shuttle board 3.0, it works well. You can refer it.
Thanks for sharing that post, I've tried that code, and the pressure sensor is reporting same value, around ~980 hPa.
But I've got another idea, to check the national hydrometeorological service data for atmospheric and not to rely on accuweather.
And then I've found that accuweather was reporting atmospheric pressure of 1019 hPa, but the national hydrometeorological service was reporting values in range 980 - 990 hPa, depending on the region in the city. The sensor was reporting 987 hPa this night, which is inline with the data from the national hydrometeorological service. So everything is fine with the sensor, it was false alarm.
I am sorry for the inconvenience.