# Temperature Sensor Resistance Lookup

Implemented 2026-09-13. Local classic scripts; no runtime downloads or dependencies.
`calculators/temperature-resistance.html` converts resistance ↔ temperature as the
user types and shows a separate °C / °F / Ω / kΩ table for the chosen curve.

## Reference data and limits

| Selection | Reference | Supported lookup interval |
| --- | --- | --- |
| 10k Type II | [BAPI 10K-2 output table](https://www.bapihvac.com/wp-content/uploads/2010/11/Thermistor_10K-2.pdf), Rev. 10/16/12 | −39 to 187°F (−39.444… to 86.111…°C) |
| 10k Type III | [BAPI 10K-3 output table](https://www.bapihvac.com/wp-content/uploads/2010/11/Thermistor_10K-3.pdf), Rev. 10/16/12 | −39 to 187°F |
| 1k Pt · 375 | [BAPI 1K (375) output table](https://www.bapihvac.com/wp-content/uploads/2010/11/RTD_1K-375.pdf), Rev. 10/16/12 | −40 to 186°F (−40 to 85.555…°C) |
| Pt1000 / 1k Pt · 385 | [TI AN-1559, section 2.3](https://www.ti.com/lit/an/snoa481b/snoa481b.pdf) | −50 to 150°C, chosen HVAC lookup subset |

The user approved merging the two names for the 385 curve and adding 375 as a
distinct curve. This does not implement the separately planned equipment/signal
Temperature Sensor Selector.

The three BAPI datasets transcribe the 114 numerical points of the published 2°F
grid. Exact Fahrenheit defines the temperature coordinate; Celsius is derived
from it rather than using the PDF's rounded two-decimal Celsius labels. The
reference revision is explicit because nominal tables can differ by manufacturer
and revision. Direct PDF downloads were blocked by BAPI's access challenge; the
numeric tables were read from indexed primary-source PDF text, not guessed from
generic Beta constants or third-party calculators.

## Calculation contract

`sensor-curves.js` owns immutable source facts and coefficients.
`sensor-lookup.js` owns pure calculation/range checking/table generation.
`sensor-ui.js` owns live inputs, unit changes, direction swapping and rendering.

For table-backed curves, use piecewise linear interpolation in resistance versus
temperature. The inverse solves the same segment, including descending NTC and
ascending platinum rows. Published points are preserved; interpolated values are
labeled estimates. No extrapolation, silent range clamping or universal accuracy
claim. Floating-point equality and temperature-endpoint roundoff use a tiny
centralized tolerance (1e−10°C); this does not extend the usable lookup interval.

385 curve: R0=1000Ω, A=3.9083e−3, B=−5.775e−7, C=−4.183e−12.
For t≥0: R=R0(1+At+Bt²). For t<0: add R0 C(t−100)t³.
Inverse uses bounded bisection of the same monotonic equation; this is not a
constant 3.85Ω/°C approximation. The UI subset is narrower than the equation's
published domain and is not an assertion about a particular packaged sensor.

Ω/kΩ and °C/°F changes preserve magnitude. Swap uses the last valid converted
value; invalid input clears results and does not produce an invented swap value.
Selecting another sensor preserves the entered value and recomputes or reports
out-of-range. Use nominal point explicitly loads 10,000Ω / 25°C for NTC or
1,000Ω / 0°C for RTD. Table intervals 1/5/10°C or published rows do not affect
the conversion. Highlight identifies the nearest displayed row, not an exact match.

Nominal outputs do not compensate for lead-wire resistance, sensor tolerance,
meter error or self-heating. Resistance alone cannot identify an unknown curve.

## Verification

`node tests/sensor-lookup-tests.cjs` checks source anchors, monotonicity, boundaries,
inverse/forward conversions, units, negative temperatures, live page interactions
and table refresh. `node tests/run-node.cjs` checks site links and page wiring.
Automated DOM checks are not native browser/layout/console checks. Real file-URL
browser inspection remains pending under the existing browser security restriction.
