Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    Working with the BMP388 Pressure sensor

    Working with the BMP388 Pressure sensor

    Kmoore
    Established Member

    Hi, I am working with the BMP388. I was able to read the chip id from the sensor. However, when reading the pressure or temperature I only get the default values in the data sheet. I guessing I didn't initialize something right, my sensor settings are attached.

    Thanks in advance for any asistance!

    Ken

     

    4 REPLIES 4

    Vincent
    Community Moderator
    Community Moderator

    The setting is correct and the procedure looks also OK since i tried at my side,  the sensor is working and i can get the temperature and pressure data after follow your steps. 

    So you need check your bus write function to see if the value are correctly write into the sensor.  you can try to read the value after write the register to double check. 

    Kmoore
    Established Member

    That's what I figured, so I read back the written values to double check. And I read the correct configuration settings, however I still get the defaults. It looks like this.

    read_byte[2] = 0x80

    read_byte[1] = 0x00

    read_byte[0] = 0x00

    I did check the Status register too, it reads 0x10, the data sheet states that drdy_press get reset when pressure data is read out. Does this mean it will go high after a read? Or does it need to be high before a pressure read?

    Also, when putting the sensor in normal mode, can it not respond to I2C for some duration? I tried to read that part too, but it froze up then.

    Vincent
    Community Moderator
    Community Moderator

    You can refer to figure 11 in the datasheet for default as non-latching mode with status register change plotter. 

    So when data is stored into data register,  the status is going to high.  then the read of data register done,  the status bit will be clear to 0.  then next new data stored in register,  the status bit will change to 1 again.  

    So  you need to read the status bit first to make sure it is 1 which means you have new data stored in the data register,  then you read the data register.  In this case,  you should not get default value from data register any more. 

    Hint:  the data measurement always take some time.  after you change the power mode of sensor,  you need to wait certain time to get measurement done and new data stored in data register.  this time is different based on different over sampling settings. 

    At the same time,  the normal mode is running in internal logic.  during normal mode,  the bus communicate have no lilmitation.  you can always do read / write to the sensor registers.  But if you change any setting about the measurement,  it will affect the result in data register.  

    Kmoore
    Established Member

    Okay thanks Vincent, I figured that's what needed to be done. I also found out that the sensor was not soldered on that well either. After fixing that it worked just fine.

    Thanks for the help!

    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