Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BMP 280 - compensation formula in fixed/floating point (32 bit)

    BMP 280 - compensation formula in fixed/floating point (32 bit)

    isoukhmane
    New Poster

    Goodmorning everyone,

     

    I am a student working on a project and one of my tasks involves reading data from this sensor (bmp280) using Labview. Let me make the set up I adopted clear. The sensor is connected to an Arduino. The Arduino is connected to a computer. I use Labview to read the data (with the help of LINX functions). I know it would be easier to read data using Arduino IDE (since there is a library doing the "dirty-job" for you) but reading data using Labview is a priority. Anyways, I go to the registers and read all the data I need, namely digT1,...,digP1,...,adc_T,adc_P. At this point I use a compensation formula for 32 bits systems in order to process the data and get the final value for pressure. I don't use the compensation formula for 64 bits (like the Arduino IDE library does) as Labview coding-function doesn't support int64 variables. Anyway, by using both the two formulas for 32-bits I obtain pressures around 100 000 Pa. When I use arduino IDE (which relies on a 64-bit compensation formula) I obtain pressures around 93 000 Pa, which is a value agreeing with the weather station's measurments. And here comes my question.

    Do you think I am getting such difference in the final result because the 32-bit compensation formula is meant to be this "not precise" or I have implemented uncorrectly the compensation formula? If you had to read data from this sensor and get it somehow on LABVIEW, what would you do?

    I am not an expert when it comes to these kind of topics. I am less than a beginner. I hope to have made my problem as clear as possible so that you could give me a hint of how to tackle this problem.

     

    Have a nice day!

    1 REPLY 1

    Jet
    Occasional Contributor

    Hi Sir:

        I verified my BMP280 API and get the same results, no matter 32bit/64bit/double.

       Could you download BMP280 API from BST homepage and compare it with your source code to look for the difference?

      Please click two follow link to know BMP280 information and get BMP280 API.

      https://www.bosch-sensortec.com/products/environmental-sensors/pressure-sensors/bmp280/

       https://github.com/BoschSensortec/BMP280_driver

      

     

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist