11-30-2021 05:57 AM
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 ?
11-30-2021 08:00 AM
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.
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.
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;
12-01-2021 03:52 AM
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 ?
12-14-2021 12:41 AM
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.
12-28-2021 07:07 AM
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.