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