热敏电阻

来自Labplus盛思维基百科
Tangliufeng讨论 | 贡献2018年1月12日 (五) 14:56的版本 概述
跳转至: 导航搜索
黑色传感器最终版12.20-30.png

概述

由于热敏电阻与温度变化呈指数关系,可用于测量环境温度变化。

技术参数

  • 工作电压:VCC 3.3-5V
  • 温度范围-10~100℃
  • 模块尺寸:24x46x7.5mm

引脚定义

VCC 电源
NC 空脚
AO 输出温度模拟量
GND

使用教程

连接示意图

Arduino示例

MicroPython示例

from microbit import *
import math
display.off()

def getNTC(pin):
  return 1/(math.log(1023/pin.read_analog() - 1)/3955 + 1/298) - 273      #将采样的温度模拟量转化为摄氏度
  

while True:
    print('NTC:',getNTC(pin2))
    sleep(1000)

图形化示例