Clarification on Offset-Step Identification and Conversion for NTM88x12

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Clarification on Offset-Step Identification and Conversion for NTM88x12

1,000 次查看
Kafei42
Contributor II

Hello,

I’m working with the NTM88x12 accelerometer in the extended range option (–175 g to +550 g) and have encountered a few points of confusion. I’ve attached the relevant datasheet table and application-note flowchart for reference.

  1. Implementing AN13614 Offset-Step Identification
    AN13614 shows an algorithm for finding the “starting offset step” and then updating it based on raw ADC readings when using standard ±g ranges. For the –175 g…+550 g option, the NTM88Jxx5S-DS datasheet’s Table 18 indicates that the offset steps are listed in reverse order. When I port the AN13614 logic to this range, should I simply invert the step index comparisons (i.e. decrement where the note increments and vice versa)? 

  2. Conversion Formula Applicability
    AN13614 defines the acceleration-transfer function as: 
    Kafei42_3-1751486506057.png
    Can I apply this same formula unchanged for the –175 g…+550 g range—even though its offset steps are in inverted order—or must the formula itself be adjusted to account for the reversal?

  3. Usable Offset-Step Subset
    AN13614 mentions that “for certain models only offset steps 4…10 are usable, as indicated in the datasheet.” I did not find any step-range restriction in either the NTM88Jxx5S-DS or related datasheets. Which offset-step indices are officially supported for the all others variants, and where is it documented?

Thank you in advance for any guidance you can provide!

 

Kafei42_2-1751486422379.png

Kafei42_0-1751486378196.png

标签 (1)
0 项奖励
回复
4 回复数

951 次查看
Kafei42
Contributor II

Hello Jozef,

Thanks again for your clear answers!

I implemented the AN13614 algorithms exactly as described, using these macros:

// LSB limits for compensated value
#define LSB_A_MIN 2 // LSB
#define LSB_A_MAX 1022 // LSB

// Number of half-bands from AN13614
#define HALF_BANDS_A 17.0

// Visual proof:
//   bands:  |--0---|---2---|--4---|---6---|---8---|---10---|---12---|---14---|
//          Min |-1-|-2-|-3-|-4-|-5-|-6-|-7-|-8-|-9-|-10-|-11-|-12-|-13-|-14-|-15-|-16-|-17-| Max
//   bands:        |---1---|---3---|--5---|---7---|---9---|---11----|---13---|---15----|
 

// Band step size (G)
#define CALC_STEP(min, max) (float)((max - min) / HALF_BANDS_A)

// Lower bound of a band (G)
#define CALC_BAND_MIN(acc_min, band, step) (float)(acc_min + (band * step))

// Delta (G/LSB)
#define CALC_DELTA(step) (float)((2.0f * step) / (LSB_A_MAX - LSB_A_MIN))

// Offset (G)
#define CALC_OFFSET(band_min, delta) (float)(band_min - (LSB_A_MIN * delta))

typedef enum {
BAND_0 = 0,
BAND_1,
…,
BAND_15
} accel_band_t;

For example, for –80 g…+90 g I did:

#define N80_90_MIN -80.0f
#define N80_90_MAX 90.0f
#define N80_90_STEP CALC_STEP(N80_90_MIN, N80_90_MAX)
#define N80_90_DELTA CALC_DELTA(N80_90_STEP)

#define N80_90_BAND0_MIN CALC_BAND_MIN(N80_90_MIN, BAND_0, N80_90_STEP) // –80.0 g
#define N80_90_BAND0_OFFSET CALC_OFFSET(N80_90_BAND0_MIN, N80_90_DELTA)
… (bands 1 through 15)

  • Result: For the –80…+90 g range, my computed band limits and offsets match the datasheet exactly.

  • Issue: For the other ranges (–360…+400 g, –120…+520 g, –175…+550 g, –400…+400 g), my values diverge significantly from those listed in their datasheets.

Question: Is there any NXP reference (application note, errata, or spreadsheet) that provides the full set of ΔA, proof-inertia (@Aₘᵢₙ) and offset values for all 16 steps of each of the five acceleration ranges? Having those tables or formulas would help me validate and correct my implementation.

Thanks in advance for any pointers or documents you can share!
-Kafei

0 项奖励
回复

981 次查看
JozefKozon
NXP TechSupport
NXP TechSupport

Hello Kafei42,

  1. Implementing AN13614 Offset-Step Identification
    AN13614 shows an algorithm for finding the “starting offset step” and then updating it based on raw ADC readings when using standard ±g ranges. For the –175 g…+550 g option, the NTM88Jxx5S-DS datasheet’s Table 18 indicates that the offset steps are listed in reverse order. When I port the AN13614 logic to this range, should I simply invert the step index comparisons (i.e. decrement where the note increments and vice versa)? 

[A] Yes, for the extended range (–175 g to +550 g), the offset steps are listed in reverse order in Table 18 of the NTM88Jxx5S-DS datasheet. Therefore, when porting the AN13614 algorithm, you should invert the step index comparisons.

2. Conversion Formula Applicability
AN13614 defines the acceleration-transfer function as: 
JozefKozon_0-1751519409693.png

Can I apply this same formula unchanged for the –175 g…+550 g range—even though its offset steps are in inverted order—or must the formula itself be adjusted to account for the reversal?
[A] The acceleration-transfer function defined in AN13614 can still be applied unchanged, even for the extended range. The formula itself is independent of the offset step order; it operates on the raw ADC values and offset step index.

3. Usable Offset-Step Subset
AN13614 mentions that “for certain models only offset steps 4…10 are usable, as indicated in the datasheet.” I did not find any step-range restriction in either the NTM88Jxx5S-DS or related datasheets. Which offset-step indices are officially supported for the all others variants, and where is it documented?

JozefKozon_1-1751519409618.png

JozefKozon_2-1751519409752.png

[A] There is no documented restriction in the datasheet for the –175 g to +550 g variant. Unless otherwise specified in a future datasheet revision or errata, you may assume all offset steps are usable for this range.

With Best Regards,

Jozef

 

0 项奖励
回复

953 次查看
Kafei42
Contributor II

Hello Jozef,

Thanks again for your clear answers!

I implemented the AN13614 algorithms exactly as described, using these macros: 

 
// LSB limits for compensated value
#define LSB_A_MIN     2    // LSB
#define LSB_A_MAX   1022   // LSB

// Number of half-bands from AN13614
#define HALF_BANDS_A 17.0f  

// Band step size (G)
#define CALC_STEP(min, max)      ( ((max) - (min)) / HALF_BANDS_A )

// Lower bound of a band (G)
#define CALC_BAND_MIN(acc_min, band, step)  ( (acc_min) + ((band) * (step)) )

// Delta (G/LSB)
#define CALC_DELTA(step)         ( (2.0f * (step)) / (LSB_A_MAX - LSB_A_MIN) )

// Offset (G)
#define CALC_OFFSET(band_min, delta)        ( (band_min) - (LSB_A_MIN * (delta)) )

typedef enum {
    BAND_0 = 0,
    BAND_1,
    …,
    BAND_15
} accel_band_t;

For example, for –80 g…+90 g I did:

#define N80_90_MIN   -80.0f
#define N80_90_MAX    90.0f
#define N80_90_STEP   CALC_STEP(N80_90_MIN, N80_90_MAX)
#define N80_90_DELTA  CALC_DELTA(N80_90_STEP)

#define N80_90_BAND0_MIN    CALC_BAND_MIN(N80_90_MIN, 0, N80_90_STEP)   // –80.0 g
#define N80_90_BAND0_OFFSET CALC_OFFSET(N80_90_BAND0_MIN, N80_90_DELTA)
… (bands 1 through 15)
  • Result: For the –80…+90 g range, my computed band limits and offsets match the datasheet exactly.

  • Issue: For the other ranges (–360…+400 g, –120…+520 g, –175…+550 g, –400…+400 g), my values diverge significantly from those listed in their datasheets.

Question: Is there any NXP reference (application note, errata, or spreadsheet) that provides the full set of ΔA, proof-inertia (@Aₘᵢₙ) and offset values for all 16 steps of each of the five acceleration ranges? Having those tables or formulas would help me validate and correct my implementation.

Thanks in advance for any pointers or documents you can share!

— Kafei

0 项奖励
回复

917 次查看
JozefKozon
NXP TechSupport
NXP TechSupport

Hello Kafei42,

references that include the full set of ΔA (delta), offset, and proof-inertia values for all 16 offset steps across the five acceleration ranges supported by the NTM88 sensor family can be found in the AN13614, UM11227 and in the UM11145. Please see below.

AN13614

  • Formulas for ΔA and Offset:

    • ΔA=2⋅StepSizeLSBmax−LSBminΔA=LSBmaxLSBmin2StepSize
    • Offset=BandMin−(LSBmin⋅ΔA)Offset=BandMin(LSBminΔA)
  • Step-by-step breakdown of how each offset step maps to a subrange of the full acceleration range.

  • Illustrative examples for ranges like –360 g to +400 g, showing how each step overlaps and transitions.

  • Proof-inertia calculation using:

    ΔAMAX–MIN=Proof Inertia @AMAX−Proof Inertia @AMINAMAX−AMINΔAMAX–MIN=AMAXAMINProof Inertia @AMAXProof Inertia @AMIN

UM11145-https://www.nxp.com/docs/en/user-manual/UM11145.pdf

This guide explains how the firmware uses the ΔA and offset values during compensation:

  • Describes the Universal Uncompensated Measurement Array (UUMA) format.
  • Lists all compensation functions, including TPMS_COMP_ACCEL_X and TPMS_COMP_ACCEL_Z.
  • Confirms that compensation relies on factory-programmed trim coefficients, which are essential for accurate results.

 

 

For the –175 g to +550 g range, offset steps are listed in reverse order in the datasheet.

 

https://docs.nxp.com/bundle/UM11227/page/topics/optional_acceleration_measurements.html

JozefKozon_0-1752036362796.png

 

With Best Regards,

Jozef

0 项奖励
回复