高温传感器

简介

想要测量高温怎么办?很多人应该首先想到DS18B20温度传感器,但是DS18B20只能测量125度以内的温度,超过125度以后就只能用其他的传感器了。所以我们选用工业上常用的PT100电阻式高温探头作为我们的传感器探头,通过我们的高温模块,就能实现30-350度范围内的温度探测了!我们的模块兼容3.3V-5.5V的输入电压,所以ARDUINO和STM32等MCU均能使用我们的模块。

产品参数

模块

PT100探头

引脚说明

SEN0198-LINE.png

标号 名称 功能描述
1 PT100- PT100电阻端负端
2 PT100- PT100电阻端负端
3 PT100+ PT100电阻端正端
4 信号输出端 模拟电压输出端
5 电源输入正 电源输入正
6 电源输入负 电源输入负

使用教程

本教程将介绍如何用高温传感器模块和PT100来探测温度。

准备

接线图

SEN0198-CON1.png

样例代码

警告:下载程序前先要知道你的模拟口的基准电压。如果你的板子供电电压是3.3V,然后将样例代码中的const float voltageRef = 5.000; 中的5.000替换成3.3V电压。如果你的板子供电电压是5.0V,然后将样例代码中的voltageRef设置成5.0V 。如果你想要更高的精度,那么你就需要测量IOREF端口的电压值。将测量的电压值替换掉5.000。

点击下载高温传感器库文件如何安装库?

/***************************************************
  This example reads HighTemperature Sensor.

  Created 2016-1-13
  By berinie Chen <bernie.chen@dfrobot.com>

  GNU Lesser General Public License.
  See <http://www.gnu.org/licenses/> for details.
  All above must be included in any redistribution
 ****************************************************/

/***********Notice and Trouble shooting***************
  1.Connection and Diagram can be found here  https://www.dfrobot.com/wiki/index.php?title=HighTemperatureSensor_SKU:SEN0198
  2.This code is tested on Arduino Uno.
 ****************************************************/


#include<DFRobotHighTemperatureSensor.h>

const float voltageRef = 5.000;       //Set reference voltage,you need test your IOREF voltage.
//const float voltageRef = 3.300;
int HighTemperaturePin = A0;    //Setting pin
DFRobotHighTemperature PT100 = DFRobotHighTemperature(voltageRef); //Define an PT100 object

void setup(void) {
  Serial.begin(9600);
}

void loop(void) {
  int temperature = PT100.readTemperature(HighTemperaturePin);  //Get temperature
  Serial.print("temperature:  ");
  Serial.print(temperature);
  Serial.println("  ^C");
  delay(1000); //just here to slow down the output so it is easier to read
}

注意:如果你的单片机的参考电压是3.3V,那么请将样例代码中的voltageRef改为3.3V。如果你的单片机ADC转换精度是12位,请将库中的readTemperature()函数下的voltage = sensorValue * _voltageRef / 1024.0;中的1024改为4096. |

结果

SEN0198-RESUALT1

SEN0198-RESUALT2

常见问题

还没有客户对此产品有任何问题,欢迎通过qq或者论坛联系我们!

更多问题及有趣的应用,可以 访问论坛 进行查阅或发帖

更多

高温传感器原理图 PT100分度表 Arduino library SVG文件 PT100电阻式高温探头

DFshopping_car1.png DFRobot商城购买链接