Documentation sections
RTD Temperature Calculator (PT100/PT1000)
POSThttps://rftools.io/ api/ py/ v1/ calculate
Slug rtd-temperature. Calculate temperature from PT100 or PT1000 resistance — enter measured ohms, get °C instantly. Uses the Callendar-Van Dusen linear approximation. Includes presets for common PT100 values (119.4 Ω = 50 °C, 138.5 Ω = 100 °C).
Inputs
Send every one of these in inputs, in the units shown. Most are required: a call without one is refused (400) and costs nothing; one the calculator can do without takes the default shown. An input outside its range is still computed and flagged in the provenance.
| Name | Unit | Range | Default | Description |
|---|---|---|---|---|
| resistancenumber | Ω | at least 1 | 119.4 | Measured RTD resistance. At 0°C: PT100=100Ω, PT1000=1000Ω. |
| r0number | Ω | at least 1 | 100 | Nominal resistance at 0°C, e.g. 100 for PT100, 1000 for PT1000 |
| alphanumber | °C⁻¹ | 0.001 … 0.01 | 0.003851 | Temperature coefficient of resistance. IEC 60751 standard: 0.003851 °C⁻¹ |
| fixedResistornumber | Ω | at least 1 | 150 | The divider's fixed resistor: from the reference to the ADC node when the RTD is on the low side, from the ADC node to ground when it is on the high side. A value near the RTD's mid-range resistance gives the most even resolution. |
| adcRefnumber | V | 0.1 … 50 | 3.3 | The voltage across the divider, which is also the ADC full scale (ratiometric) |
| adcBitsnumber | bit | 1 … 24 | 12 | ADC resolution in bits |
| sensorPositionnumber | none | any | 0 | Low side: the RTD from the ADC node to ground. High side: from the reference to the node. |
Outputs
Returned in values, by key. A value that is unbounded or undefined is null.
| Field | Unit | Description |
|---|---|---|
| temperatureheadline | °C | Calculated temperature using linear RTD approximation |
| resistanceAt100C | Ω | Calculated resistance at 100°C for this RTD type |
| dividerVoltage | V | The voltage at the ADC node |
| adcCode | none | The code an ideal ADC reads: floor(V_out / V_ref × 2^N) |
| resolution | °C/LSB | The temperature one ADC step spans at this point |
Calling it
- Calculate: one call, the request and response in full, and its errors.
- Batch: this calculator with others, or a sweep, in one request.
- Solve for a target: the value of one input that brings an output to a target.