当前位置:网站首页>Thermistor temperature calculation formula program
Thermistor temperature calculation formula program
2022-07-29 02:20:00 【Mubai 001】
One 、 Thermistor formula
NTC Thermistor temperature calculation formula :Rt = R *EXP(B*(1/T1-1/T2))
among ,T1 and T2 refer to K degree , Kelvin temperature .
Rt It's the thermistor in the T1 Resistance at temperature .
R It's the thermistor in the T2 Nominal resistance at room temperature .100K Thermistor 25℃ The value of is 100K( namely R=100K).T2=(273.15+25)
EXP yes e Of n Power
B Value is an important parameter of thermistor
The temperature can be obtained by conversion T1 And resistance Rt The relationship between T1=1/(ln(Rt/R)/B+1/T2)
The corresponding Celsius temperature t=T1-273.15, meanwhile +0.5 Error correction .
Two 、 Hardware connection
SCM is 3.3V Power supply , Thermistor and 100K Resistance connection .
The thermistor parameters are 100K,B The value is 3950
3、 ... and 、 Program
Here is the procedure (stm32), Tested 4 Road temperature
Because you need to use mathematical functions, you need to add header files #include "math.h"
Then write the formula ( Voltage conversion 、 Resistance conversion 、 Temperature conversion )
Four 、ln、log、lg explain
Formulas in mathematics and c There are small differences in language .
1、 In Mathematics
log It's a logarithmic sign , Photo number and base number on the right ( Above is the real number , Here is the base )
lg In order to 10 Base number ( example lg100=2)(lg Is the common logarithm )
ln In order to e Base number (lne2=2)(ln For natural logarithm e=2.7182818284590452353602874713527...)
2、c In language
c There are only two functions in the language log and log10
among
function log(x) It's expressed in e The natural logarithm of the base , namely ln(x)
function log10(x) With 10 Log base , namely lg(x)
The logarithm with other numbers as the base is expressed by the formula of changing the base
Function as follows :
double logab(double a,double b)
{
return log(b)/log(a);
}
边栏推荐
- 高效使用浏览器的5个小技巧,第1个技巧最实用
- Control the pop-up window and no pop-up window of the input box
- QT memory management tips
- Pointer - golden stage
- Resnet50 + k-fold cross validation + data enhancement + drawing (accuracy, recall, F value)
- C语言提高篇(一)
- 特殊流&Properties属性集实例遇到的问题及解决方法
- “蔚来杯“2022牛客暑期多校训练营3,签到题CAJHF
- Mathematical modeling -- cold proof simulation of low temperature protective clothing with phase change materials
- 「活动推荐」冲冲冲!2022 国际开源节有新内容
猜你喜欢
Using local cache + global cache to realize user rights management of small systems
Mysql存储json格式数据
Basic working principle and LTSpice simulation of 6T SRAM
应用系统中的报表开发成本值多少?
Mathematical modeling -- the laying of water pipes
Establish an engineering template based on STM32 in keil -- detailed steps
Motionlayout -- realize animation in visual editor
[circuit design] convert AC AC to DC
Blind separation of speech signals based on ICA and DL
Read the recent trends of okaleido tiger and tap the value and potential behind it
随机推荐
iVX低代码平台系列详解 -- 概述篇(二)
Mathematical modeling - location of police stations
mobile-picker.js
Quanzhi t3/a40i industrial core board, 4-core [email protected] The localization rate reaches 100%
点击按钮,下滑到指定的位置
Detailed explanation of IVX low code platform series -- Overview (II)
MySQL安装常见报错处理大全
高效使用浏览器的5个小技巧,第1个技巧最实用
表单校验 隐藏的输入框 显示才校验
[electronic components] zener diode
npm install 报错 Error: EPERM: operation not permitted, rename
Website Collection
Anti crawler mechanism solution: JS code generates random strings locally
Motionlayout -- realize animation in visual editor
Jetpack -- navigation realizes page Jump
[circuit design] open collector OC output of triode
密码安全如何保障?安全浏览器如何管理密码?
RGBD点云降采样
Understand the clock tree in STM32 in simple terms
Blind separation of speech signals based on ICA and DL