I'm testing the sensing capabilities of the NTM88, I'm attempting to use it to perform measurements for acceleration, temperature, pressure, and voltage and then transmit these measurements so that they can be analyzed at different conditions.
I'm curious about the compensation functions provided, and I have some questions:
- Is it possible to skip the compensation functions and perform only the measurements and use the proper formula to compute the real values from the RAW measurements provided?
- How accurate are these measurements if the compensated is discarded?
- At conditions where the temperature and voltage are greatly changed from nominal conditions, do I expect these measurements (without compensation) to be highly affected?
I'm highly interested to being able to use the sensing capabilities of the NTM88 without performing the compensation for these measurements, and I would like to know if this is feasible.
Thank you
Solved! Go to Solution.
Hello
The output of the compensation routines is a value in counts, specified in the datasheet. The formula to convert the compensated sensor value in counts into a value in common units (kPa for pressure, g for acceleration, volt for voltage and °C for temperature) is indicated in the datasheet. Refer to the appropriate datasheet as all part numbers have different sensor characteristics (offset and sensitivity), giving different conversion formulas.
For example:
The example was done with a FXTH8715xx device (similar NTM88) in the range 100 – 1500kPa, using the FXTH871x6 datasheet.
Pressure:
Compensated pressure value received: Pressure = 1.
The pressure in kPa can be calculated with the Eqn. 1 on page 80: P = ΔP1500 * PCODE + (100 - ΔP1500 )
We have PCODE = 1, it is the compensated value given by the module. Then in the table on page 155 of the datasheet we find that ΔP1500 = 2.750 kPa/count.
So we have P = 2.750*1 + (100 – 2.750) = 100kPa
AccelZ and AccelX
AccelZ = 264, measured at offset step 6.
▪ In order to find the value in g of the Z-axis acceleration, we need to know the offset step of the acceleration measure. As the Z-axis acceleration goes from -210g to 300g (FXTH870x11 family) the range has been divided into 16 ‘windows’ or steps, and each step has been divided into 510 counts. So we always get an acceleration value between 1 and 510 counts, but depending on the offset step, that does not correspond to the same actual acceleration.
In our case the offset step is step 6 so acceleration is between -30g and 30g (refer to the datasheet).
▪ Then we also need to know some acceleration measurement characteristics of the device that are given in the datasheet (in this example in section 17.10.2 on page 157):
Now we can apply the Eqn. 17 on page 156 : AZ = ΔAZ6 * AZCODE + (AZ6 @AZCODE1 - ΔAZ6 )
We have ΔAZ6 = 0.118g/count, AZCODE = 264 (the compensated acceleration value given by the module) and AZ6 @AZCODE1 = -30g
So we get AZ = 0.118*264 + (-30 – 0.118) = 1.034g
Hope this helps.
Hello,
Getting a sensor value with the accuracy specified in the datasheet is done in two steps:
1. The function TPMS_READ_xxx is executed. This function returns a raw value which is the output of the ADC. This value is
not completely linear and for pressure and acceleration it also includes an error due to the sensor deviation with
temperature and voltage.
2. The function TPMS_COMP_xxx is executed. This function takes the raw measurement as input and returns a
compensated value which has been linearized and, for pressure and acceleration, corrected of the sensor deviations with
temperature and voltage. It is this compensated measurement which is specified in the datasheet.
So, yes, you can TPMS_READ_xxx value.
Please note that for the pressure sensor and accelerometers are sensitive to voltage and temperature, the compensation function will correct the error due to the voltage and temperature sensitivities. This is why the compensation function needs the voltage and temperature values as input.
Hope this helps!
Thank you for your reply.
I have been performing some tests to monitor the values of both the compensated and uncompensated accelerations in order to compare their values and monitor how they change with different accelerations. I'm testing multiple sensors at the same time while maintaining same conditions (temperature and voltage). I can see that for most of the sensors, the uncompensated measurements (in g) is very close to the compensated measurement at relatively low accelerations (I'm assuming before the start of the non-linearity). Except for one sensor that is producting different results from the rest.
For example if I introduce to the sensors an acceleration equivalent to 3g, I can see that the uncompensated acceleration read from the sensors are somewhat accurate (around 2.7g), except for one sensors that is reading an uncompensated acceleration of around 0.2g. The strange thing is that the compensation function is able to fix the readings from that one sensor and I can see the compensated acceleration from this sensor as 3g (as expected).
My question is mainly about this one sensor, and how the compensation function is able to correct such unexpected values and produce the correct compensated values from them. Is there specific coefficients that are used in the compensation function which are used to correct this measurement and maybe the coefficients of this one sensor is just very different from the other ones?
Hello
The output of the compensation routines is a value in counts, specified in the datasheet. The formula to convert the compensated sensor value in counts into a value in common units (kPa for pressure, g for acceleration, volt for voltage and °C for temperature) is indicated in the datasheet. Refer to the appropriate datasheet as all part numbers have different sensor characteristics (offset and sensitivity), giving different conversion formulas.
For example:
The example was done with a FXTH8715xx device (similar NTM88) in the range 100 – 1500kPa, using the FXTH871x6 datasheet.
Pressure:
Compensated pressure value received: Pressure = 1.
The pressure in kPa can be calculated with the Eqn. 1 on page 80: P = ΔP1500 * PCODE + (100 - ΔP1500 )
We have PCODE = 1, it is the compensated value given by the module. Then in the table on page 155 of the datasheet we find that ΔP1500 = 2.750 kPa/count.
So we have P = 2.750*1 + (100 – 2.750) = 100kPa
AccelZ and AccelX
AccelZ = 264, measured at offset step 6.
▪ In order to find the value in g of the Z-axis acceleration, we need to know the offset step of the acceleration measure. As the Z-axis acceleration goes from -210g to 300g (FXTH870x11 family) the range has been divided into 16 ‘windows’ or steps, and each step has been divided into 510 counts. So we always get an acceleration value between 1 and 510 counts, but depending on the offset step, that does not correspond to the same actual acceleration.
In our case the offset step is step 6 so acceleration is between -30g and 30g (refer to the datasheet).
▪ Then we also need to know some acceleration measurement characteristics of the device that are given in the datasheet (in this example in section 17.10.2 on page 157):
Now we can apply the Eqn. 17 on page 156 : AZ = ΔAZ6 * AZCODE + (AZ6 @AZCODE1 - ΔAZ6 )
We have ΔAZ6 = 0.118g/count, AZCODE = 264 (the compensated acceleration value given by the module) and AZ6 @AZCODE1 = -30g
So we get AZ = 0.118*264 + (-30 – 0.118) = 1.034g
Hope this helps.