← Eggert Gudmundsson Projects

Thermal sensor · production test

Production Calibration

A per-unit calibration routine for the Grid-EYE: a Peltier-driven isothermal plate stepped through setpoints, an on-device least-squares fit, coefficients written to NVS, and a console command interface. Design stage; not yet built.

Rationale

The Flat-Field Study used a steel block warming from 2 to 21 °C over three hours — ~180 reference points. That is a characterisation method. A production routine uses a small number of stable reference points, and relies on two results from characterisation: the response is linear, and the non-uniformity is almost entirely additive.

The reference is a single Peltier-driven aluminium plate, shared with the two-zone contrast test (planned): run isothermal for calibration, stepped through three setpoints. One plate rather than three always-on plates trades throughput (a settling wait between setpoints) for hardware simplicity, and several units can face the plate at once so the settling time is amortised.

The AMG8854 is rated ±3.0 °C typical accuracy, over a −20 to +80 °C operating (device) range and a −20 to +100 °C object range [1]. Per-device calibration targets the deployment field range within those limits, not the datasheet extremes. Multi-point per-device non-uniformity correction below the typical accuracy has been demonstrated for this sensor family [2].

Reference plate

A 200 mm aluminium plate with a 40 mm central Peltier and eight bonded PT1000s (two on the Peltier face, four on the centrelines at 54 mm, two on opposite diagonal corners at 75 mm). The same plate is used for the two-zone contrast test; for calibration the whole plate is driven to one temperature and the eight PT1000s serve to confirm surface uniformity across the field of view rather than a zone gradient.

FOV footprint @ 152mm — 98mm (35.6°) 54mm 54mm 75mm 75mm P1 P2 S1 S2 S3 S4 S5 S6 200mm 200mm 40mm

The AMG8854M01 field of view is 35.6° [3], so the 8×8 footprint is 0.643·d — 98 mm at the two-zone test's 152 mm working range, 64 mm at 10 cm. Either standoff over-fills the 200 mm plate with >50 mm of margin. The eight PT1000 positions were laid out for the two-zone contrast test's wider assumed field; for calibration they bracket the plate temperature around and just outside the imaged region.

  • Surface — a thin high-emissivity coating (3M black tape, ε ≈ 0.95, or verified black anodise). A settled, actively-driven plate is a cleaner reference than a slewing block, and its surface uniformity is verified by the PT1000s rather than assumed.
  • Reference temperature — the bonded PT1000s, read with every frame. T_ref is the plate reading, not the Peltier setpoint; the corner and centreline PT1000s bound the residual surface non-uniformity.
  • Setpoints — three, spanning the deployment field range; the Peltier steps between them with a settling wait (minutes) at each. Batch several units facing the plate to amortise the wait.
  • Capture — at each settled setpoint, a 2–4 s frame burst (20–40 frames at 10 fps, internal moving-average off). This drives the per-capture noise to ~0.03–0.04 °C [1] — below the residual the calibration itself leaves.

Point count

T = a[i] + b[i]·T_ref has two unknowns per pixel, so two setpoints is the minimum.

  • Gain precision scales as σread / (ΔTspan·√N). With a 2–4 s burst (σread ≈ 0.04 °C) and two setpoints 25 °C apart, gain uncertainty is ~0.2 %, or ~0.05 °C at the far end of the range — near the noise floor. Span dominates over point count.
  • Linearity is established by characterisation (gain σ 0.04 over ~180 points) and is consistent with the two-point vs. multi-point NUC results for this sensor family [2]. Production verifies it: a third setpoint in the middle, fit the line through the two ends, test the middle point's residual against ~0.2 °C. Within tolerance, the two-parameter fit holds; outside, flag the pixel or unit.
  • Redundancy — with two setpoints a bad frame or a plate slip enters the coefficients undetected; three detect it.

Three setpoints, low / mid / high, spanning the deployment scene range (≈ 5 / 15 / 25 °C for a sewer, or 5 / 20 / 35 to bracket wider). Two ends fit the line, the middle checks linearity. First-article: 5–6 setpoints on a few units to confirm the response is linear enough to reduce the routine to three, or two.

Per-pixel gain vs. one global gain

CorrectionResidual (flat-field run)
per-pixel offset only0.26 °C
per-pixel offset + gain0.19 °C (noise floor)

Per-pixel gain reduces the residual by 0.07 °C. For a ±1–2 °C accuracy budget, per-pixel offset with one batch-level global gain is sufficient — one setpoint on the line, 64 constants rather than 128. Per-pixel gain and three setpoints apply where the budget is tighter.

Die / window axis

T_scene ≈ (T_apparent − (1−τ)·T_die) / τ — one additional constant, τ, on top of the per-pixel table. Where each term is measured depends on how much it varies between units:

TermUnit-to-unit variationMeasured
per-pixel offsetyes — intrinsic fixed patternevery unit, on the line
gain (per-pixel or global)small (σ 0.04)every unit, or batch
τ — window transmissionexpected low — a property of the window partbatch, from a few units
die-temp compensation residualnot yet characterised3–5 units at bring-up

τ and the die-temp term are measured on 3–5 units at product bring-up: one plate, the sensor+window assembly stepped over its field range. A small spread against the accuracy budget makes them firmware/batch constants, omitted on the line; a larger spread adds a two-point step (one plate, two assembly temperatures). The table schema allows per-unit values and defaults to a compile-time constant.

On-device cal routine

The nRF9151 runs the routine, driven by commands over the console — USB-serial now, BLE later. A Zephyr shell backend carries the same command definitions on either transport. The capture primitive exists: thermal_capture_frame(n, &record) performs burst capture with per-frame validation. A new module, grideye_cal.c, is the policy layer over the grideye.c mechanism.

grideye cal slot <lo|mid|hi> <ref_C>   capture and average a burst; store the frame and the
                                     operator-entered plate temperature to a RAM slot;
                                     print min/max/mean
grideye cal show                     dump captured slots, current NVS table, residual
grideye cal build                    per-pixel least-squares fit from the filled slots ->
                                     a[i], b[i]; middle-slot linearity residual; flag
                                     out-of-tolerance pixels/unit; write table to NVS
grideye cal apply <on|off>            enable/disable correction in the frame path
grideye cal clear                    wipe RAM slots / NVS table
grideye cal tau <cold|warm> <asm_C>   (phase 2) one plate, assembly stepped in temperature
grideye cal tau build

Stored table, ~200 bytes — a Zephyr settings tree (grideye/cal) on an NVS partition carved from the unused flash regions:

struct grideye_cal_table {
    uint16_t version;
    int16_t  offset_centic[64];   /* a[i] -- subtract */
    uint16_t gain_q12[64];        /* b[i], Q4.12 (4096 = 1.000); or one shared value */
    int32_t  die_cal_centic;      /* die temperature during this cal */
    int16_t  one_minus_tau_q12;   /* 0 = use compile-time batch default */
    int32_t  build_time;          /* uptime, until an RTC exists */
    uint16_t lin_resid_max_centic;
    uint32_t crc;
};

Correction in the frame path, after averaging: corrected[i] = (centic[i] − offset_centic[i]) · 4096 / gain_q12[i] — 64 integer subtracts and divides, ~µs. An invalid or absent table passes frames through unchanged. The config hash in the production payload carries the table version.

Build order:

  • Shell plus a trivial command; confirm the interactive console (tio / picocom, not the read-only capture tail — one reader per /dev/ttyACM0).
  • cal slot and cal show — RAM only, bench-tested against the plate.
  • NVS partition, cal build and clear — table persists across reboot.
  • Correction in the frame path, apply toggle.
  • Phase 2: cal tau.

Production flow, per batch

  • Units in the fixture facing the plate, powered, thermally settled at a known ambient (recorded).
  • Plate to setpoint 1; wait for settle; each unit runs grideye cal slot lo <T>. Repeat for mid, hi.
  • Each unit runs grideye cal build — coefficients, linearity residual, pass/fail written to NVS.
  • grideye cal apply on; one frame at a known plate temperature confirms corrected output within tolerance.
  • Table version and residual recorded to each unit's traveller.

Open

  • Plate settling time per setpoint, and batch size that keeps it acceptable.
  • Setpoint temperatures, once the scene range is confirmed.
  • Per-pixel gain or one global gain, set by the accuracy budget.
  • Shell command syntax, or a binary protocol for the jig.
  • Die-temp term variation across units, from the 3–5 unit sample.

References

  1. Panasonic. Infrared Array Sensor “Grid-EYE” Reference Specifications, AMG88** (document 160205). Temperature accuracy, NETD, operating and object temperature ranges.
  2. Paes, V.F. et al. (2022). Calibration uncertainty of MEMS thermopile imagers for quantitative temperature measurement. Infrared Physics & Technology 120. Tests the AMG8833; two-point vs. multi-point NUC. ScienceDirect. See Literature.
  3. Panasonic. Infrared Array Sensor Grid-EYE AMG8854M01 (Narrow type), document pana-s-a0011553419-1 (30-Sep-20). 35.6° viewing angle, per-pixel optical properties.

Design notes, 2026-08-30. Builds on the Flat-Field Study. Not yet implemented. Field-of-view figures use the 35.6° narrow-angle AMG8854M01.