xref: /freebsd/sys/contrib/device-tree/Bindings/iio/afe/temperature-sense-rtd.yaml (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/iio/afe/temperature-sense-rtd.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Temperature Sense RTD
8
9maintainers:
10  - Liam Beguin <liambeguin@gmail.com>
11
12description: |
13  RTDs (Resistance Temperature Detectors) are a kind of temperature sensors
14  used to get a linear voltage to temperature reading within a give range
15  (usually 0 to 100 degrees Celsius).
16
17  When an io-channel measures the output voltage across an RTD such as a
18  PT1000, the interesting measurement is almost always the corresponding
19  temperature, not the voltage output. This binding describes such a circuit.
20
21  The general transfer function here is (using SI units)
22
23    V = R(T) * iexc
24    R(T) = r0 * (1 + alpha * T)
25    T = 1 / (alpha * r0 * iexc) * (V - r0 * iexc)
26
27  The following circuit matches what's in the examples section.
28
29           5V0
30          -----
31            |
32        +---+----+
33        |  R 5k  |
34        +---+----+
35            |
36            V 1mA
37            |
38            +---- Vout
39            |
40        +---+----+
41        | PT1000 |
42        +---+----+
43            |
44          -----
45           GND
46
47properties:
48  compatible:
49    const: temperature-sense-rtd
50
51  io-channels:
52    maxItems: 1
53    description: |
54      Channel node of a voltage io-channel.
55
56  '#io-channel-cells':
57    const: 0
58
59  excitation-current-microamp:
60    description: The current fed through the RTD sensor.
61
62  alpha-ppm-per-celsius:
63    description: |
64      alpha can also be expressed in micro-ohms per ohm Celsius. It's a linear
65      approximation of the resistance versus temperature relationship
66      between 0 and 100 degrees Celsius.
67
68      alpha = (R_100 - R_0) / (100 * R_0)
69
70      Where, R_100 is the resistance of the sensor at 100 degrees Celsius, and
71      R_0 (or r-naught-ohms) is the resistance of the sensor at 0 degrees
72      Celsius.
73
74      Pure platinum has an alpha of 3925. Industry standards such as IEC60751
75      and ASTM E-1137 specify an alpha of 3850.
76
77  r-naught-ohms:
78    description: |
79      Resistance of the sensor at 0 degrees Celsius.
80      Common values are 100 for PT100, 500 for PT500, and 1000 for PT1000
81
82additionalProperties: false
83required:
84  - compatible
85  - io-channels
86  - excitation-current-microamp
87  - alpha-ppm-per-celsius
88  - r-naught-ohms
89
90examples:
91  - |
92    pt1000_1: temperature-sensor0 {
93        compatible = "temperature-sense-rtd";
94        #io-channel-cells = <0>;
95        io-channels = <&temp_adc1 0>;
96
97        excitation-current-microamp = <1000>; /* i = U/R = 5 / 5000 */
98        alpha-ppm-per-celsius = <3908>;
99        r-naught-ohms = <1000>;
100    };
101...
102