AI Foundry · thermal camera

Calibrating the P3 on the card's back: true temperatures, reflections and a live reference

AI Foundry. Written Wed 14 Oct 2026 (week 42), 15:50–23:50 PDT, on the Intel (~/git0/gyroscope), on your ask: is there a temperature measurement you can do, how to calibrate the camera, whether a webcam over the chip or the outside temperature helps with reflections, which sensor you can buy, mount and stream live, and what the Kapton is for. For your visit on Fri 16 Oct. Built from two research passes (calibration practice, emissivity data and the literature; sensors you can get by Friday), your Antigravity session's reverse-engineering of your unit (~/git/thermal-android/THERMAL_MASTER_P3.md on the M5), and a band-integrated radiometry calculation. Part of the thermal camera hub. Where the camera goes: Friday thermal measurements and the focus simulator.

The short answer

What the camera actually measures

The P3 doesn't measure temperature. It measures how much 8–14 µm infrared reaches each pixel, then converts that into a temperature with three numbers you give it:

A surface glows by its emissivity and mirrors its surroundings by the rest:

what reaches the camera = emissivity × glow of the surface + (1 − emissivity) × glow of the surroundings

So a surface at emissivity 0.9 is 90% itself and 10% reflection, while a shiny tin end cap (0.05–0.3) is mostly a mirror. Worked through for an 8–14 µm camera, with the surface truly at 50 °C:

Surface Camera settings Reads
Solder mask (0.9), surroundings 35 °C right 50.0 °C
Solder mask (0.9), surroundings 35 °C app defaults (0.95, 25 °C) 49.7 °C
Black electrical vinyl (0.96), surroundings 35 °C app defaults 50.6 °C
1-mil Kapton over shiny metal (0.62) as if 0.95, reflected right 45.0 °C
Tin end cap (0.3), surroundings 35 °C as if 0.95 40.4 °C
Tin end cap (0.3), room at 25 °C as if 0.95 33.5 °C
Tin end cap (0.3) right emissivity, reflected 5 °C off 39.0 °C
Anything, everything at 25 °C any 25.0 °C

Three things follow:

The camera's own limits

From your Antigravity session's reverse-engineering of your unit (SN P3025043DG040200256, firmware 00.00.02.18), published as Reverse-engineered Thermal Master P3 and rechecked against it on Thu 15 Oct:

Friday's calibration, step by step

About 20 minutes once the camera is in place: at about 60 mm, focused on the board, the focus ring fixed with a strip of Kapton, and warmed up for 20 minutes in the gap.

  1. Flat field (2 minutes). Hold a piece of cardboard covered in black electrical vinyl a centimetre in front of the lens, filling the view, for a few seconds. Save those frames. Whatever pattern they show is the camera's own, so subtract it from everything after. This is what the shutter does; doing it yourself, with the shutter off, keeps one reference for a whole run.
  2. Reflected temperature (3 minutes). Crumple a square of aluminium foil, flatten it shiny side out on cardboard, and hold it in the view against the board's back. Foil conducts, so keep it on the cardboard and off the pads. Set the app's emissivity to 1.0 and read the foil's average: that's the reflected temperature. Enter it as the environmental temperature. Expect 30–40 °C in the gap.
  3. The black patch and the contact sensor (5 minutes). Stick a 1 × 1 cm square of black electrical vinyl on bare solder mask in the view, away from the cold-dot capacitors. Put the contact sensor beside it on a strip of Kapton, which keeps it from shorting the board's pads. Wait three minutes. Read the patch at emissivity 0.96 with step 2's reflected temperature; its difference from the sensor is the camera's offset at that temperature.
  4. A second point (5 minutes). Repeat step 3 under load. The card idles near 51 °C and settled at 62–63 °C in Friday's burst test. Two points give both the offset and the slope.
  5. The solder mask (2 minutes). Read the bare solder mask right next to the patch, and adjust the emissivity until it matches the patch. Expect about 0.9.
  6. Mark the liars (2 minutes). Shift the camera 2–3 mm sideways and back. Spots that move with the camera, not with the board, are reflections. That includes the camera seeing its own cold sensor mirrored in shiny parts. Mask them, or cover them with vinyl.

Everything that touches the card needs Roman's OK: it's the lab's card.

A sensor you can stream live

Option Accuracy How it reads live Cost By Friday noon?
Adafruit TMP117 (4821) + MCP2221A USB adapter (4471) + 15 cm cable, all from Digi-Key (1528-4821-ND, 1528-4471-ND, 1528-4397-ND) ±0.1 °C to 50 °C, ±0.2 °C to 100 °C USB into the lab host. Linux's own hid-mcp2221 driver turns the adapter into an I²C bus, and about ten lines of Python read it $18.95 + overnight shipping ($27–30) Ordered tonight, it ships Thursday and should arrive Friday morning. Choose the earliest morning service
Adafruit MCP9808 (1782, 1528-1782-ND) ±0.25 °C typical the same adapter $4.95 add it to the same order as a second point and a spare
Inkbird IBS-TH2 Plus, temperature-probe version (B095WJ8QQF) ±0.5 °C, −40 to 125 °C Bluetooth to the phone app, updating every 10–60 s; Linux can listen with inkbird-ble about $25 Amazon Prime, if it promises Friday. The temperature-and-humidity probe stops at 60 °C: wrong one
PCsensor TEMPer USB sticks ±2 °C; a tested unit read 2.5 °C low USB about $41 not accurate enough
Self-adhesive K-type thermocouples (Omega SA1XL-K) ±1.1 °C at best needs a logger (Pico TC-08, $499) $255+ fast (0.15 s) and insulated, but costly and less accurate
Room air: Xiaomi LYWSD03MMC with the open pvvx firmware, or a SwitchBot Meter Plus ±0.2–0.3 °C Bluetooth broadcast any Linux box can read $5–13 Amazon

Central Computers in SF stocks no Adafruit parts; Micro Center in Santa Clara does, so call before driving.

Mounting the TMP117: lay the breakout flat on a strip of Kapton, with a dab of thermal paste between them, and hold it down with a second strip. It then reads the board through its own small circuit board, which is slow (tens of seconds) but fine for steady readings, and steady readings are what calibration needs. The Inkbird's probe goes the same way: flat on the board, under a strip of Kapton.

Reading it live on the lab host:

# The MCP2221A shows up as an I2C bus (Linux driver hid-mcp2221).
# pip install smbus2; find the bus number with `i2cdetect -l` ("MCP2221 usb-i2c bridge").
import time
from smbus2 import SMBus

BUS = 1  # replace with the MCP2221's bus number
with SMBus(BUS) as b:
    while True:
        raw = b.read_word_data(0x48, 0x00)       # TMP117 temperature register
        raw = ((raw & 0xFF) << 8) | (raw >> 8)   # the chip sends its high byte first
        if raw & 0x8000:
            raw -= 1 << 16
        print(f"{time.time():.2f} {raw * 0.0078125:.3f}", flush=True)
        time.sleep(1)                            # one new reading a second by default

Log it on the same clock as the card's own sensors and the workload's switch times, so it lines up with the camera's frames afterwards.

What the Kapton is for

The webcam idea

The outside temperature

What the lab already reads, free

Sources

Total life satisfaction: the thermal model is one of the three goals at the top of your Project doc. Friday can now end with the first calibrated number, a black patch read against a contact sensor, not just a colour picture.