Bosch Sensortec Community

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

    BMP180 datasheet

    BMP180 datasheet

    Carlo
    New Poster

    Hello everyone.

    By using an Arduino Uno board (programming in Simulink), I am tring to read data from a BMP180 sensor and to calculate the true temperature and pressure, by following the functions shown in figure 4 (pag. 15) in the datasheet:

    https://cdn-shop.adafruit.com/datasheets/BST-BMP180-DS000-09.pdf

    While the temperature reading appears correct, there are some problems with the pressure: in my opinion, by considering the “calculate true pressure” in the datasheet, the coefficients B6, X1, X2, X3, B3, B4, B7, p, UP, are returned when the value 0x2E is write into 0xF4 register: in fact, similar values are returned to me, from my BMP180, when I write the 0x2E value into 0xF4 register, instead of 0x34 (pressure, with OSS = 0).

    Moreover, a pressure value of 69964 Pa appears irrealistic: by considering the figure 5, it means an altitude of about 3000 m over the sea level (I do not know if the Bosch research center is so high).

    The if condition is not respected: in fact, 0x80000000 means 2147483648 in decimal. Therefore, being B7 = 1171050000 the value 70003 would be returned, as p, instead 69964.

    I developed, in Simulink, two different functions: one to calculate the true temperature, the other to calculate the true pressure. If I use, as inputs, the same datasheet values, the two functions return, respectively, 150 and 70003. Therefore, they are correct.

    But, if I use the real time data from the sensor, while the temperature (0x2E into 0xF4 register) is a realistic value (about 22 – 24 °C), the pressure (0x34 into 0xF4 register) is not a realistic value (about 81000 Pa), by considering an altitude of 44 m over the sea level of my office.

    The BMP180 sensor run properly, since I tested it with an example for the IDE of Arduino Uno.

    Therefore my question is: is the “calculate true pressure” function shown in the figure 4 of the datasheet correct or is there a problem?

    Sincerely

     

    7 REPLIES 7

    elrhoul
    Long-established Member

    Dear Carlo,

    The BMP180 is end of life and not recommended for new design. We suggest you to switch to our latest pressure sensor BMP388, and use the our standard API available for download from Github.

    Best regards

    Dear Elrhoul,

    thank you for the answer and the suggestion. I will be happy to use the new BMP388 for future projects. Actually, I am tring to re-programming some electronic board (Arduino Uno based), where the BMP180 is still employed. At the begin, the temperature reading were sufficient. But now, the pressure is required. To avoid the lost and/or the modification of each board, a check of the mentioned datasheet is needed.

    Best regards

     

    handytech
    Community Moderator
    Community Moderator

    Unfortunately because the product reached end-of-life for some time now, we cannot review this specific documentation. A recommendation from our side we be to look for the latest datasheet revision on our official website rather than third-parties (although this specific section may be identical).

    For reference implentation of this algorithm, we provide generic C-code sensor API/drivers as recommended by Elrhoul. It can be found here for the BMP180, and includes the bmp180_data_readout_template() example that shows a typical sensor data read-out sequence including the compensation formulas.

    Althought usually I use Simulink as programming languange, from the code that you suggested me I do not find how the true pressure is calculated: in fact, the function:

    bmp180_get_pressure(v_uncomp_press_u32)

    returns the compensated pressure, but no informations about how this function works can be deduct from the code. This is my problem.

    Regards

    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