Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BMP388 temperature measurement unreliability

    BMP388 temperature measurement unreliability

    gsewell
    New Poster

    Hi, we are using the BMP388 Temperature and pressure sensor and although the pressure reading seems fine, the temperature sensor reading is consistently about 6 degrees too high. For example I put our unit in a refrigerator at about 4 degrees and the reported temperature immediately on removal was 10.5. I am aware that the temperature is the die temperature but would you expect that sort of offset? I have tried running in forced mode so that the device sleeps between reads in order to limit self-heating but this had no effect. I have 5 units which behave the same. Hope you can help / advise.

     

    BMP388_CalData NewCal;

    void ReadBMP388CalibrationValues ( void )
    {
    ReadBoschChip(GetBoschI2Chandle(), 0x31, (uint8_t *)&NewCal.NVM_PAR_T1, 2);
    ReadBoschChip(GetBoschI2Chandle(), 0x33, (uint8_t *)&NewCal.NVM_PAR_T2, 2);
    ReadBoschChip(GetBoschI2Chandle(), 0x35, (uint8_t *)&NewCal.NVM_PAR_T3, 1);
    ReadBoschChip(GetBoschI2Chandle(), 0x36, (uint8_t *)&NewCal.NVM_PAR_P1, 2);
    ReadBoschChip(GetBoschI2Chandle(), 0x38, (uint8_t *)&NewCal.NVM_PAR_P2, 2);
    ReadBoschChip(GetBoschI2Chandle(), 0x3a, (uint8_t *)&NewCal.NVM_PAR_P3, 1);
    ReadBoschChip(GetBoschI2Chandle(), 0x3b, (uint8_t *)&NewCal.NVM_PAR_P4, 1);
    ReadBoschChip(GetBoschI2Chandle(), 0x3c, (uint8_t *)&NewCal.NVM_PAR_P5, 2);
    ReadBoschChip(GetBoschI2Chandle(), 0x3e, (uint8_t *)&NewCal.NVM_PAR_P6, 2);
    ReadBoschChip(GetBoschI2Chandle(), 0x40, (uint8_t *)&NewCal.NVM_PAR_P7, 1);
    ReadBoschChip(GetBoschI2Chandle(), 0x41, (uint8_t *)&NewCal.NVM_PAR_P8, 1);
    ReadBoschChip(GetBoschI2Chandle(), 0x42, (uint8_t *)&NewCal.NVM_PAR_P9, 2);
    ReadBoschChip(GetBoschI2Chandle(), 0x44, (uint8_t *)&NewCal.NVM_PAR_P10, 1);
    ReadBoschChip(GetBoschI2Chandle(), 0x45, (uint8_t *)&NewCal.NVM_PAR_P11, 1);
    }

    double GetTrueTemperature ( uint32_t Temperature )
    {
    double RealTemperature;
    double Parameter_T1, Parameter_T2, Parameter_T3;
    double PartialData1, PartialData2;

    Parameter_T1 = (double)(NewCal.NVM_PAR_T1) / pow(2.0, -8.0);
    Parameter_T2 = (double)(NewCal.NVM_PAR_T2) / pow(2.0, 30.0);
    Parameter_T3 = (double)(NewCal.NVM_PAR_T3) / pow(2.0, 48.0);

    PartialData1 = (double)(Temperature - Parameter_T1);
    PartialData2 = PartialData1 * Parameter_T2;

    RealTemperature = PartialData2 + (PartialData1 * PartialData1) * Parameter_T3;
    t_lin = RealTemperature;
    return RealTemperature;
    }

    3 REPLIES 3

    BSTRobin
    Community Moderator
    Community Moderator

    Hi gsewell,

    It is recommended that you use the BMP3 sensor API to read the sensor data and see the test result. The attachment is the example code on STM32 for your reference, which uses BMP3 sensor API on github.
    https://github.com/BoschSensortec/BMP3-Sensor-API

    Many thanks, I'll give that a try

    Regards

    Graham

    BSTRobin
    Community Moderator
    Community Moderator

    Welcome, gsewell.

    Did it work well?

    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