Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    bma456 - temperature compensation

    TMunb
    New Poster

    bma456 - temperature compensation


    hello Bosch,

    I would like to know what is the correct or best way to use the temperature reading, which I can obtain by reading Register TEMPERATURE (0x22), to improve the accuracy of the bma456 accelerometer readings ?

    The datasheet states that Zero-g Offset is +/-20mg at nominal VDD, 25oC and at gFS4g (the +/-4g range setting I assume ?). What is nominal VDD and how is this +/-20mg figure affected at other values of VDD and at other range settings ?

    Zero-g Offset Temperature Drift is then given as +/-0.2mg/K, for the x and y axes, so I think I can use this parameter to calculate predicted offset as the temperature changes. But, when the figure is given as +/-, in this case +/-0.2mg/K, how do I know whether to add or subtract this value as the temperature changes ?

    Apart from this example what other temperature-related techniques are available, having read Register TEMPERATURE, that allow compensation or improvement in accuracy with regards to accelerometer readings ?

    Out of interest why does your software routine bma4_get_temperature() employ a scaling factor of 1000 ? What is lost by not simply using the raw value returned by Register TEMPERATURE ?

     

    4 REPLIES 4
    BSTRobin
    Community Moderator

    Re: bma456 - temperature compensation

    Hello TMunb,

    I would like to know what is the correct or best way to use the temperature reading, which I can obtain by reading Register TEMPERATURE (0x22), to improve the accuracy of the bma456 accelerometer readings ?
    Apart from this example what other temperature-related techniques are available, having read Register TEMPERATURE, that allow compensation or improvement in accuracy with regards to accelerometer readings ?
    Reply: This temperature value is internal temperature of the sensor. The accelerometer value has been compensated inside the chip. Usually, it does not need to be compensated outside the chip.

    The datasheet states that Zero-g Offset is +/-20mg at nominal VDD, 25oC and at gFS4g (the +/-4g range setting I assume ?). What is nominal VDD and how is this +/-20mg figure affected at other values of VDD and at other range settings ? Zero-g Offset Temperature Drift is then given as +/-0.2mg/K, for the x and y axes, so I think I can use this parameter to calculate predicted offset as the temperature changes. But, when the figure is given as +/-, in this case +/-0.2mg/K, how do I know whether to add or subtract this value as the temperature changes ?
    Reply: nominal VDD mean sensor works under the normal power supply range specified in the data sheet. +/-0.2mg/K had explained that it may be a little more or less different.

    BMA456 VDD VDDIO supply voltage.png
    Out of interest why does your software routine bma4_get_temperature() employ a scaling factor of 1000 ? What is lost by not simply using the raw value returned by Register TEMPERATURE ?
    Reply: from BMA456 data sheet: The temperature value in two's complement representatin in units of 1 Kelvin:0x00 corresonds to 23 degree Celsius.

    BMA456 0x22 temperature register.png

    In addition, you could get knowledge from web site the international unit of temperature is Kelvin, represented by the symbol "K". The Kelvin temperature scale is established by an ideal gas, and its zero point is called absolute zero. According to the kinetic theory, when the temperature is at absolute zero, the kinetic energy of gas molecules is zero. For convenience. The scale unit of the Kelvin thermometer is consistent with that of the centigrade thermometer, that is, one degree on the Kelvin thermometer is equal to one degree on the centigrade thermometer, the freezing point of water is 0 ℃ and the Kelvin thermometer is 273.15 K.

    So you could see the implementation of function bma4_get_temperature() like this:

    /*! for handling float temperature values */
    #define BMA4_SCALE_TEMP INT32_C(1000)

    /**\name TEMPERATURE CONSTANT */
    #define BMA4_OFFSET_TEMP UINT8_C(23)

    /* BMA4_KELVIN_SCALED = 273.15 * 1000 */
    #define BMA4_KELVIN_SCALED INT32_C(273150)

    /* Read temperature value from the register */
    rslt = bma4_read_regs(BMA4_TEMPERATURE_ADDR, data, BMA4_TEMP_DATA_SIZE, dev);
    /* '0' value read from the register corresponds to 23 degree C */
    (*temp) = temp_raw_scaled + (BMA4_OFFSET_TEMP * BMA4_SCALE_TEMP);
    /* Temperature in degree Kelvin */
    (*temp) = (*temp) + BMA4_KELVIN_SCALED;

    TMunb
    New Poster

    Re: bma456 - temperature compensation


    hi BSTRobin,

    Ok, so the temperature reading taken from Register TEMPERATURE is the internal temperature of the sensor. The sensor would be performing its measurements at this temperature - is that correct ?

    Ok, nominal VDD is the normal allowed power supply range specified in the datasheet - that's clear, thank-you. What about the other questions in relation to Zero-g Offset; ie, this value is according to the datasheet +/-20mg at 25oC and gFS4g (which I assume means the +/-4g range - is that correct ?), but how does it vary with other range settings ?

    Zero-g Offset Temperature Drift is given as +/-0.2mg/K for the x, y axes - if Register TEMPERATURE indicates temperature is 35oC, so 10oC above the nominal 25oC, then how much do I add or subtract from the raw g readings ? Or are you saying such compensation is not recommended or required because the sensor does already always compensate for temperature changes in the readings it provides ?

    Is there any temperature-related technique that the user should or could employ in order to improve accuracy of the sensor's readings ?

    TMunb
    New Poster

    Re: bma456 - temperature compensation


    hi BSTRobin,

    when you have some time can you please get back to me in relation to the questions in my previous post ?

    Thank-you.

    BSTRobin
    Community Moderator

    Re: bma456 - temperature compensation

    Hello TMunb,

    1.Yes;
    2.Yes, range is +/-4g. When testing, you need to set a sensor range, which uses 4G range as a reference. Other ranges are similar.
    3.The data output by the sensor is processed internally and usually does not need additional temperature compensation when you use BMA456.

    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