# Temperature Transducer

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

> Device-tree binding reference for Temperature Transducer.

<!-- 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;transducer&#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">A temperature transducer is a device that converts a thermal quantity
into any other physical quantity. This binding applies to temperature to
voltage (like the LTC2997), and temperature to current (like the AD590)
linear transducers.
In both cases these are assumed to be connected to a voltage ADC.</p>
<p style="white-space: pre-wrap">When an io-channel measures the output voltage of a temperature analog front
end such as a temperature transducer, the interesting measurement is almost
always the corresponding temperature, not the voltage output. This binding
describes such a circuit.</p>
<pre><code>The general transfer function here is (using SI units)
  V(T) = Rsense * Isense(T)
  T = (Isense(T) / alpha) + offset
  T = 1 / (Rsense * alpha) * (V + offset * Rsense * alpha)</code></pre>
<p style="white-space: pre-wrap">When using a temperature to voltage transducer, Rsense is set to 1.</p>
<p style="white-space: pre-wrap">The following circuits show a temperature to current and a temperature to
voltage transducer that can be used with this binding.</p>
<pre><code>         VCC
        -----
          |
      +---+---+
      | AD590 |                               VCC
      +---+---+                              -----
          |                                    |
          V proportional to T             +----+----+
          |                          D+ --+         |
          +---- Vout                      | LTC2997 +--- Vout
          |                          D- --+         |
      +---+----+                          +---------+
      | Rsense |                               |
      +---+----+                             -----
          |                                   GND
        -----
         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;transducer&#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-4d8fe5a7c273d2d48596"></a>

### <code>sense&#45;offset&#45;millicelsius</code> — not listed as required here

<div id="dt-4a489a77b0a1ab19a883">
<p style="white-space: pre-wrap">Temperature offset.
This offset is commonly used to convert from Kelvins to degrees Celsius.
In that case, sense-offset-millicelsius would be set to &lt;(-273150)&gt;.</p>
</div>

**Default value (<code>default</code>):** <span id="dt-f8f5c851d2be92ca2cf6"><code>0</code></span>

<a id="dt-852af190d49f84ef0782"></a>

### <code>sense&#45;resistor&#45;ohms</code> — not listed as required here

<div id="dt-5926e6f1ffc17ff4dee6">
<p style="white-space: pre-wrap">The sense resistor.
By default sense-resistor-ohms cancels out the resistor making the
circuit behave like a temperature transducer.</p>
</div>

**Default value (<code>default</code>):** <span id="dt-3833e791bdfce39b3f33"><code>1</code></span>

<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">Sometimes referred to as output gain, slope, or temperature coefficient.</p>
<p style="white-space: pre-wrap">alpha is expressed in parts per million which can be micro-amps per
degrees Celsius or micro-volts per degrees Celsius. The is the main
characteristic of a temperature transducer and should be stated in the
datasheet.</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;alpha&#45;ppm&#45;per&#45;celsius&#34;</code></span>

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

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

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">ad950: temperature-sensor-0 {
    compatible = "temperature-transducer";
    #io-channel-cells = &lt;0&gt;;
    io-channels = &lt;&amp;temp_adc 3&gt;;

    sense-offset-millicelsius = &lt;(-273150)&gt;; /* Kelvin to degrees Celsius */
    sense-resistor-ohms = &lt;8060&gt;;
    alpha-ppm-per-celsius = &lt;1&gt;; /* 1 uA/K */
};
</code></pre>

<pre id="dt-bae0d43ea48e35208b4a"><code class="language-dts">znq_tmp: temperature-sensor-1 {
    compatible = "temperature-transducer";
    #io-channel-cells = &lt;0&gt;;
    io-channels = &lt;&amp;temp_adc 2&gt;;

    sense-offset-millicelsius = &lt;(-273150)&gt;; /* Kelvin to degrees Celsius */
    alpha-ppm-per-celsius = &lt;4000&gt;; /* 4 mV/K */
};
</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>
