Reference-junction temperature sweep in thermocouple testing (source code)

= Reference-junction temperature sweep in thermocouple testing

A \b[reference-junction temperature sweep] tests a <thermocouple> measurement system by varying its connection-region <temperature> while holding the <thermocouple measuring junction> at an independently known, stable <temperature>. The intended invariant is the inferred measuring-junction temperature after <cold-junction compensation>; the raw <electric potential difference> is expected to change.

Let $F(T)=E(T,0)$ be the <thermocouple reference function>, $T_h$ the fixed measuring-junction temperature, $T_j$ the actual terminal temperature and $T_s$ the reference-sensor reading. In an ideal matched readout,
$$
V_{\rm raw}=F(T_h)-F(T_j),\qquad
\widehat T_h=F^{-1}\!\left(V_{\rm raw}+F(T_s)\right).
$$
If $T_s=T_j$, the sum inside the <inverse function> stays equal to $F(T_h)$ throughout the sweep. This tests the thermal reference and the compensation calculation together; it does not require the raw signal to be constant.

A primary design verification by <Mike Beckman> and <Luis Chioye> places the ADS1118 board and reference connections in a temperature-controlled environment, while the other end of the thermocouple remains in a stable bath. Its Figure17 keeps the USB interface outside that environment. The companion experiment instead varies the measuring-junction bath while holding the reference region near ambient temperature. These are different tests of the measurement chain.<Precision Thermocouple Measurement with the ADS1118 by Mike Beckman and Luis Chioye>[Section7, printedpp.20–21, Figures17–20: two complementary temperature sweeps]{ref}

For an original linear model only, stipulate $F(T)=ST$ with $S=40\,\mathrm{\mu V/K}$ and a fixed measuring junction at $80\,{}^{\circ}\mathrm C$. Raising the reference from $20$ to $35\,{}^{\circ}\mathrm C$ changes the raw signal from $2.4$ to $1.8\,\mathrm{mV}$. The appropriate reference correction changes from $0.8$ to $1.4\,\mathrm{mV}$, leaving the corrected sum at $3.2\,\mathrm{mV}$. No actual thermocouple material is assigned this constant coefficient.

If the reference sensor reads $33\,{}^{\circ}\mathrm C$ while the terminals are actually at $35\,{}^{\circ}\mathrm C$, the same model reports $78\,{}^{\circ}\mathrm C$. For a nonlinear reference function, first-order expansion gives
$$
\widehat T_h-T_h\simeq\frac{F'(T_j)}{F'(T_h)}(T_s-T_j),
$$
provided $F'(T_h)\ne0$. A reference-sensor temperature error therefore need not transfer one-for-one to the final temperature at every operating point.

Log the raw readout, reference-sensor reading, independent bath temperature and inferred temperature separately. Plateau measurements test steady behaviour; deliberate ramps can expose <cold-junction thermal coupling> and finite settling time. Reversing sweep direction can help distinguish reproducible offsets from lag. Maintaining a stable bath and adequate immersion remains necessary: a drift in the measuring junction would otherwise be confounded with reference compensation error.