NTC 溫度感測器 (ntcSensor)
熱敏電阻,以 Steinhart-Hart 或 B 方程式把熱網路的溫度轉成電阻。
分類: 量測 · 種類: {"kind":"ntcSensor"}
何時使用
用來經由分壓器量測散熱片、繞組或模組底板的溫度,送給 ADC 或比較器,做過溫保護或降額。限制湧入電流請改用 NTC 熱敏電阻。
接腳
| 接腳 | 訊號域 | 意義 |
|---|---|---|
p |
電氣 | 一端 |
n |
電氣 | 另一端 |
常用參數
r25: Resistance at 25 °C (預設值: 10k)law: Resistance law: steinhartHart (a1 to d1) or beta (b only) (預設值: steinhartHart)b: B value: how fast the resistance falls with temperature (預設值: 3977)thermal: Thermal net for its heat and temperature; replaces delta and cth (預設值: 選填(預設關閉))
參數
| 鍵 | 單位 | 預設值 | 典型範圍 | 說明 |
|---|---|---|---|---|
r25 |
Ω | 10k | Resistance at 25 °C | |
law |
— | steinhartHart | Resistance law: steinhartHart (a1 to d1) or beta (b only) | |
b |
K | 3977 | B value: how fast the resistance falls with temperature | |
a1 |
1/K | 3.354016m | Steinhart–Hart a1: 1/T at R = r25 | |
b1 |
1/K | 256.985u | Steinhart–Hart b1: coefficient of ln(R/r25) | |
c1 |
1/K | 2.620131u | Steinhart–Hart c1: coefficient of ln²(R/r25) | |
d1 |
1/K | 63.83091n | Steinhart–Hart d1: coefficient of ln³(R/r25) | |
delta |
W/K | 7m | Dissipation factor: heat it loses per kelvin above its surroundings | |
cth |
J/K | 0.105 | Heat capacity | |
ta |
°C | 25 | Temperature of its surroundings | |
thermal |
— | 選填(預設關閉) | Thermal net for its heat and temperature; replaces delta and cth |
參數說明在兩種語言中都是英文。
適用於: 散熱片溫度 · 過溫保護 · 降額輸入
不適用於: 湧浪電流限制 → ntc
公式
| 公式 | 方程式 | 出處 |
|---|---|---|
| B 方程式的電阻 | R = r25·exp(b·(1/(T + 273.15) − 1/298.15)) | IEC 60539-1:2016, B value |
| 分壓輸出(NTC 接地) | Vout = Vref·R/(R + Rfix) | Hayt, Kemmerly & Durbin, Engineering Circuit Analysis, 8th ed. (2012), ch. 3 (voltage division) |
| 自熱誤差 | ΔT = P/delta = Vout²/(R·delta) | IEC 60539-1:2016, dissipation factor |
快速驗算
輸入:
r25: 25 °C 電阻 = 10k Ω,r25b: B 值 = 3.977k K,bdelta: 散熱係數 = 7m W/K,deltatb: 量測溫度 = 85 °Crfix: 分壓電阻 = 10k Ωvref: 分壓電源 = 3.3 V
輸出:
rt: tb 下的電阻 =r25*exp(b*(1/(tb + 273.15) - 1/298.15))Ωvout: 分壓輸出 =vref*rt/(rt + rfix)Vdt: 自熱誤差 =vout^2/rt/deltaK
模型邏輯
- law 為 steinhartHart 時,電阻由 1/T = a1 + b1·x + c1·x² + d1·x³ 解出 x = ln(R/r25),在區間內以牛頓法求解;law 為 beta 時為 r25·exp(b·(1/T - 1/298.15 K))。
- 設定 thermal 時,T 是該熱網路節點的溫度,它自身的少量發熱也流入該節點。
- 未設定時,T 由 ta 開始,每個被接受的時間步後以時間常數 cth/delta 趨向 ta + P/delta。
- 每個時間步使用上一步結束時溫度下的電阻。
模型
law 為 steinhartHart 時,電阻 R 滿足 1/T = a1 + b1 * x + c1 * x² + d1 * x³,其中 x = ln(R / r25),T 以克耳文計(傳統三項方程式即 r25 = 1 Ohm、c1 = 0)。law 為 beta 時依照 R = r25 * exp(b * (1/T - 1/298.15 K))。設定 thermal 時,T 是該熱網路的溫度,它自己少量的熱也流入該網路。沒有熱網路時,溫度依功率除以 cth 上升,並依散熱係數 delta 往 ta 降低,波形為 T(name)。T 在每一步之後更新。
常見錯誤
- 它自己的功率會讓它發熱:delta 為 7 mW/K,所以分壓器中 1 mW 的功率會讓讀值偏高約 0.14 K。請讓分壓器電流保持很小。
- 沒有熱網路時它只讀到自己本體的溫度,會停在 ta。請把 thermal 設為它所量測元件的熱網路。
規格書與來源
r25 與 b(B25/85)取自訂購表。Steinhart-Hart 係數 a1 到 d1 取自標稱電阻值參數表中你的 B 值那一列。delta 取散熱係數,cth 取熱時間常數乘以 delta。預設值是 Vishay NTCLE100E3103(10 kOhm,B25/85 = 3977 K),2025 年 5 月 7 日版 29049 號規格書第 1、2、4 頁。
範例
以指令 file.openExample 開啟範例,名稱為 demo:ntcSensor.
由 cargo xtask reference 依使用說明文字與參數規格產生,請勿手動編輯。