单片机自带温度采集

[复制链接]
2177|4
 楼主| e08610318 发表于 2013-5-17 14:29 | 显示全部楼层 |阅读模式
  用MSP430单片机自带的温度采集,实际上是通过AD采样然后换算的
  先发现,一样的程序,一样的板子,一样的环境,两者采出来的值居然相差了好几度,有没有前辈可以解释下啊
huangxz 发表于 2013-5-17 14:36 | 显示全部楼层
这么严重么,参考手册上面有没有写准确度啊
 楼主| e08610318 发表于 2013-5-17 15:27 | 显示全部楼层
huangxz 发表于 2013-5-17 14:36
这么严重么,参考手册上面有没有写准确度啊

上两个图吧,斜率误差在3%,说明书说可能要校准吧

Tousethe on-chiptemperature sensor,the userselectsthe analoginput channelINCHx =1010.Any
otherconfigurationis doneasif anexternalchannelwasselected,including referenceselection,
conversion-memoryselection,etc.
Thetypical temperature sensortransfer function is shownin Figure23-10. Whenusingthe temperature sensor,the sampleperiodmustbegreaterthan 30µs.The temperature sensor offset error can be large,and may need to be calibrated for most applications.See device-specific datasheet for parameters.
Selectingthe temperature sensorautomaticallyturns onthe on-chipreferencegeneratorasavoltage
sourcefor the temperature sensor.However,it doesnotenablethe V
REF+
outputoraffectthe reference
selectionsfor the conversion.Thereferencechoicesfor convertingthe temperature sensorarethe same
aswithanyotherchannel.

我用的是1.5v参考电压,分辨率4095  1号设备AD值 2911 <-> 1066mv <-> 22.5度
                                                           2号设备AD值2960 <->  1084mv <-> 27.6度

采样保持8个时钟,时间为 8/32768s  连续采40次,去掉第一次和最后一次值,再求平均

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
yl581101 发表于 2013-5-17 15:51 | 显示全部楼层
是不是应该去掉最大和最小值啊
 楼主| e08610318 发表于 2013-5-17 18:50 | 显示全部楼层
有没有前辈用单片机来采温度的呢?效果怎么样呢?
刚才试了下,我用当前温度和采到的AD值自动计算出斜率,然后放到高低温箱测了下,效果挺理想的,稳定温度和高低温箱显示的温度误差在1度以内
您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:你可能不知道今天所做的事情会对未来有多大的干预能力!

67

主题

310

帖子

12

粉丝
快速回复 在线客服 返回列表 返回顶部