Skip to content

DEV-1521: Shimmer3 KXTC9-2050 default calibration is 2047/83 (uncalibrated units' Accel_LN changes ~17 %) - #357

Open
marknolan wants to merge 1 commit into
masterfrom
DEV-1521_kxtc9_default_calibration
Open

marknolan wants to merge 1 commit into
masterfrom
DEV-1521_kxtc9_default_calibration

Conversation

@marknolan

@marknolan marknolan commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

DEV-1521. The KXTC9-2050's default low-noise accel calibration changes from offset 2253 and sensitivity 92 to 2047 and 83, the KXRB5-2042's values. These are what the hardware gives on every Shimmer3 that carries the part.

Release note

This changes output. GitHub's generated notes carry only the PR title, so paste this into the release notes:

Shimmer3 low-noise accelerometer: corrected default calibration (DEV-1521). On Shimmer3 units with the newer IMU (the KXTC9-2050 low-noise accelerometer, boards from 2017 on), the driver's built-in default calibration is now offset 2047 and sensitivity 83. It used to be 2253 and 92, figures that assumed a 3.3 V supply; the part runs at 3.0 V on every Shimmer3, so calibrated Accel_LN read about 17 % high when the driver used its defaults.

  • Who sees a change: only where the driver falls back to its defaults, because the unit has no low-noise accel calibration of its own. There, calibrated Accel_LN values come out about 17 % lower than before, now correct. Raw values don't change.
  • No change for units with their own calibration record, whether from a Consensys calibration or written by the firmware. That includes units whose stored record still holds the old 2253/92, written by firmware from before 2025: the driver keeps using it, so they still read about 17 % high until recalibrated.
  • Such a unit no longer shows as "default calibration", because its record no longer matches the driver's default.
  • SD logs are decoded the same way. A log whose header carries a calibration record is unchanged.

Why

The KXTC9-2050's output is ratiometric to its supply. Kionix specifies zero-g 1.65 V and 660 mV/g at Vdd = 3.3 V. Its spec sheet also gives an offset ratiometric error of 0.2 % and a sensitivity ratiometric error of 0.3 % (x, y) and 0.15 % (z), both at 3.3 V ± 5 % (KXTC9-2050 Specifications Rev. 2, Table 1).

Every Shimmer3 board that carries it runs it from 3.0 V. That rail is the same 3.0 V LDO that feeds the MSP430's AVCC, the ADC reference:

Board Revision Schematic
SR31 10 sheet 5
SR47 6 sheet 4
SR48 5 sheet 5
SR49 3 sheet 6

In every case U20's VDD is PV_ACCEL, which is PV_3.0V through a 22.1 Ω pi filter.

At 3.0 V the part reads like the KXRB5-2042. Scaled to 3.0 V, zero-g is 1.5 V, or 2047 counts, and sensitivity is 600 mV/g, or 83.5 counts per m/s². Those are the KXRB5-2042's defaults. They are also what the firmware's own default calibration record has held since DEV-4 (log-and-stream-common ShimCalib_setDefaultKionixCalib).

The old values assumed 3.3 V. 2253 is 1.65 V on a 3.0 V ADC, and 92 is 660 mV/g. A new-IMU Shimmer3 left on default calibration read gravity about 17 % high.

Seen on the bench, 20 Nov 2026. Shimmer3 A615 (SR49-3-1) read 11.5 m/s² at rest on 2253/92. Its raw axis carrying gravity reads 1232; 2047/83 predicts 1233 for −1 g.

Change

  • SensorKionixKXTC92050: OffsetVectorLowNoiseAccelShimmer3 and SensitivityMatrixLowNoiseAccel2gShimmer3 change to 2047 and 83. The comment now gives the reasoning and cites the datasheet.

  • New API_00051_Kxtc9DefaultCalibrationTest. It checks three things:

    • the defaults against the datasheet figures scaled to 3.0 V;
    • that they equal the KXRB5-2042's;
    • that A615's raw sample at rest reads 1 g.

    All three fail on 2253/92.

Tested

  • ShimmerDriver: 235 tests, 0 failures.
  • ShimmerDriverPC, built through the junction the worktree layout needs: 174 tests, 0 failures.

Elsewhere

  • shimmer-host-core: its reference tests/data/java_shimmer3_newer_sensors_defaults.txt was regenerated with this change, and its model follows. That is ShimmerResearch/shimmer-host-core#122.
  • C# (Shimmer-C-API): the same constants change, in DEV-1521: Shimmer3 KXTC9-2050 default calibration is 2047/83 (uncalibrated units' LN accel changes ~17 %) Shimmer-C-API#235.
  • Firmware: nothing owed. LogAndStream has written 2047/83 since DEV-4 in 2025.
  • Web SDK: nothing owed. Its shimmer3-new defaults are already 2047/83.
  • pyshimmer and Swift: neither has these defaults.
  • Wrappers needing a republish and pin bump:
    • ShimmerAndroidAPI, through the shimmerdriver artifact;
    • Shimmer-MATLAB-ID, whose jar is built from this repo;
    • ASM_PC, whose submodule pin is this repo.
    • The MATLAB Legacy/ShimmerHandleClass.m driver still has 2253 and isn't changed here: no MATLAB on this machine.

Not fixed here

Units first configured under firmware from before DEV-4 still carry 2253/92 in their own stored calibration. A615's dump does. Any host that adopts the device's calibration will keep reading those units 17 % high. Choosing to treat such a stored default record as "default" is a separate decision, raised on DEV-1521.

🤖 Generated with Claude Code

…-2042's

The KXTC9-2050's output is ratiometric to its supply. Kionix specifies its
zero-g offset (1.65 V) and sensitivity (660 mV/g) at Vdd = 3.3 V, with an
offset and a sensitivity ratiometric error (KXTC9-2050 Specifications Rev. 2,
Table 1). Every Shimmer3 board that carries it (SR31-10, SR47-6, SR48-5,
SR49-3) powers it from the same 3.0 V LDO as the MSP430's AVCC, the ADC
reference, so in ADC counts it reads 1.5 V (2047) at zero g and 600 mV/g
(83 per m/s2): the KXRB5-2042's defaults, and what the firmware's own default
calibration record has held since DEV-4.

The old 2253 and 92 assumed a 3.3 V supply. A new-IMU Shimmer3 left on
default calibration read gravity about 17 % high (A615: 11.5 m/s2).

API_00051_Kxtc9DefaultCalibrationTest checks the defaults against the
datasheet scaled to 3.0 V, against the KXRB5-2042's, and A615's raw sample at
rest. All three fail on the old values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@marknolan marknolan self-assigned this Nov 20, 2026
@marknolan marknolan changed the title DEV-1521: KXTC9-2050 default calibration is 2047 and 83, as the KXRB5-2042's DEV-1521: Shimmer3 KXTC9-2050 default calibration is 2047/83 (uncalibrated units' Accel_LN changes ~17 %) Nov 20, 2026
@marknolan
marknolan requested a review from JongChern November 20, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant