# Temperature Sense RTD

_Peios Kernel / Hardware and drivers / Device-tree binding reference / Industrial I/O bindings / afe_

> Device-tree binding reference for Temperature Sense RTD.

<!-- SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) -->


<a id="dt-root"></a>

**Schema identifier (<code>&#36;id</code>):** <span id="dt-09f478f44eb202ea573e"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;schemas&#47;iio&#47;afe&#47;temperature&#45;sense&#45;rtd&#46;yaml&#35;&#34;</code></span>

**Schema dialect (<code>&#36;schema</code>):** <span id="dt-dcb375baab6014763a68"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;meta&#45;schemas&#47;core&#46;yaml&#35;&#34;</code></span>

<a id="dt-e46b5a5dd81dbd751c9f"></a>

**Maintainers (<code>maintainers</code>):** <a id="dt-fbc39820abb8bb999095"></a> <span id="dt-fb78ddfc22abfc6fe56d"><code>&#34;Liam Beguin &#60;liambeguin&#64;gmail&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">RTDs (Resistance Temperature Detectors) are a kind of temperature sensors
used to get a linear voltage to temperature reading within a give range
(usually 0 to 100 degrees Celsius).</p>
<p style="white-space: pre-wrap">When an io-channel measures the output voltage across an RTD such as a
PT1000, the interesting measurement is almost always the corresponding
temperature, not the voltage output. This binding describes such a circuit.</p>
<p style="white-space: pre-wrap">The general transfer function here is (using SI units)</p>
<pre><code>  V = R(T) * iexc
  R(T) = r0 * (1 + alpha * T)
  T = 1 / (alpha * r0 * iexc) * (V - r0 * iexc)</code></pre>
<p style="white-space: pre-wrap">The following circuit matches what's in the examples section.</p>
<pre><code>         5V0
        -----
          |
      +---+----+
      |  R 5k  |
      +---+----+
          |
          V 1mA
          |
          +---- Vout
          |
      +---+----+
      | PT1000 |
      +---+----+
          |
        -----
         GND</code></pre>
</div>

<a id="dt-e1f655ed0ff4d595dadc"></a>

## Properties and child nodes (<code>properties</code>)

<a id="dt-5c1d81699dcbe840de83"></a>

### <code>compatible</code> — required here

**Exact value (<code>const</code>):** <span id="dt-1765195bf8e86c3ccec6"><code>&#34;temperature&#45;sense&#45;rtd&#34;</code></span>

<a id="dt-e11e74a4fd8058c71a77"></a>

### <code>io&#45;channels</code> — required here

**Maximum number of items (<code>maxItems</code>):** <span id="dt-b9221b1187f40eb0f40e"><code>1</code></span>

<div id="dt-00f0389e57ab952e1ac1">
<p style="white-space: pre-wrap">Channel node of a voltage io-channel.</p>
</div>

<a id="dt-6971e222e0082656e9f5"></a>

### <code>&#35;io&#45;channel&#45;cells</code> — not listed as required here

**Exact value (<code>const</code>):** <span id="dt-d32aef3dfe12cf2b3de1"><code>0</code></span>

<a id="dt-94a91e8752ef79c01f72"></a>

### <code>excitation&#45;current&#45;microamp</code> — required here

<div id="dt-66b44d70199b5ffea4e2">
<p style="white-space: pre-wrap">The current fed through the RTD sensor.</p>
</div>

<a id="dt-c1fdbbbb29f76d86b647"></a>

### <code>alpha&#45;ppm&#45;per&#45;celsius</code> — required here

<div id="dt-0e17f99582212d7db200">
<p style="white-space: pre-wrap">alpha can also be expressed in micro-ohms per ohm Celsius. It's a linear
approximation of the resistance versus temperature relationship
between 0 and 100 degrees Celsius.</p>
<p style="white-space: pre-wrap">alpha = (R_100 - R_0) / (100 * R_0)</p>
<p style="white-space: pre-wrap">Where, R_100 is the resistance of the sensor at 100 degrees Celsius, and
R_0 (or r-naught-ohms) is the resistance of the sensor at 0 degrees
Celsius.</p>
<p style="white-space: pre-wrap">Pure platinum has an alpha of 3925. Industry standards such as IEC60751
and ASTM E-1137 specify an alpha of 3850.</p>
</div>

<a id="dt-f348277459353488ad12"></a>

### <code>r&#45;naught&#45;ohms</code> — required here

<div id="dt-c7feaeb253660b5c63e9">
<p style="white-space: pre-wrap">Resistance of the sensor at 0 degrees Celsius.
Common values are 100 for PT100, 500 for PT500, and 1000 for PT1000</p>
</div>

<a id="dt-738c4b4f9e483441138b"></a>

## Properties not matched by properties or patternProperties in this schema (<code>additionalProperties</code>)

<code>false</code>

Not allowed by this rule.

**Required in this object (<code>required</code>):** <a id="dt-8313173ff1c9b300d560"></a> <span id="dt-048b70ee865d6847aa3d"><code>&#34;compatible&#34;</code></span>, <span id="dt-ee7433925c1528c16b99"><code>&#34;io&#45;channels&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;excitation&#45;current&#45;microamp&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;alpha&#45;ppm&#45;per&#45;celsius&#34;</code></span>, <span id="dt-391b1d2b563ec12ed437"><code>&#34;r&#45;naught&#45;ohms&#34;</code></span>

<a id="dt-1a130cabaa8a47b058bf"></a>

## Examples (<code>examples</code>)

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">pt1000_1: temperature-sensor0 {
    compatible = "temperature-sense-rtd";
    #io-channel-cells = &lt;0&gt;;
    io-channels = &lt;&amp;temp_adc1 0&gt;;

    excitation-current-microamp = &lt;1000&gt;; /* i = U/R = 5 / 5000 */
    alpha-ppm-per-celsius = &lt;3908&gt;;
    r-naught-ohms = &lt;1000&gt;;
};
</code></pre>

## Source notes

<details>
<summary>Annotations retained from the schema source</summary>

<p id="dt-comment-0"><strong>Line 1:</strong> <span> SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)</span></p>

</details>
