《基于单片机的多路温度采集系统外文文献翻译(共19页).doc》由会员分享,可在线阅读,更多相关《基于单片机的多路温度采集系统外文文献翻译(共19页).doc(19页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、精选优质文档-倾情为你奉上毕业论文(设计)外文翻译题 目: 基于单片机的多路温度采集系统设计 系部名称: 专业班级: 学生姓名: 学 号: 指导教师: 教师职称: 2013年3月22日多路温度传感器一 温度传感器简介1.1温度传感器的背景在人类的生活环境中,温度扮演着极其重要的角色。无论你生活在哪里,从事什么工作,无时无刻不在与温度打着交道。自 18 世纪工业革命以来,工业发 展对是否能掌握温度有着绝对的联系。在冶金、钢铁、石化、水泥、玻璃、医药 等等行业,可以说几乎%80 的工业部门都不得不考虑着温度的因素。 温度对于工业如此重要,由此推进了温度传感器的发展。1.2温度传感器的发展传感器主要
2、大体经过了三个发展阶段:模拟集成温度传感器。该传感器是采用硅半导体集成工艺制成,因此亦称硅传感器或单片集成温度传感器。此种传感器具有功能单一(仅测量温度)、测温误差小、价格低、响应速度快、传输距离远、体积小、微功耗等,适合远距离测温、控温,不需要进行非线性校准,外围电路简单。它是目前在国内外应用最为普遍的一种集成传感器,典型产品有AD590、AD592、TMP17、LM135 等;模拟集成温度控制器。模拟集成温度控制器主要包括温控开关、可编程温度控制器,典型产品有 LM56、AD22105 和 MAX6509。某些增强型集成温度控制器(例如 TC652/653)中还包含了 A/D 转换器以及固
3、化好的程序,这与智能温度传感器有某些相似之处。但它自成系统,工作时并不受微处理器的控制,这是二者的主要区别;智能温度传感器。能温度传感器(亦称数字温 度传感器)是在20世纪90年代中期问世的。它是微电子技术、计算机技术和自动测试技术(ATE)的结晶。智能温度传感器内部都包含温度传感器、A/D 转换器、 信号处理器、存储器(或寄存器)和接口电路。有的产品还带多路选择器、中央控制器(CPU)、随机存取存储器(RAM)和只读存储器(ROM)。智能温度传感器的特点是能输出温度数据及相关的温度控制量,适配各种微控制器(MCU);并且它是在硬件的基础上通过软件来实现测试功能的,其智能化程度也取决于软件的开
4、发水平。 温度传感器的发展趋势。 进入21世纪后,温度传感器正朝着高精度、多功能、总线标准化、高可靠性及安全性、开发虚拟传感器和网络传感器、研制单片测温系统等高科技的方向迅速发展。1.3单点与多点温度传感器目前市场主要存在单点和多点两种温度测量仪表。对于单点温测仪表,主要采用传统的模拟集成温度传感器,其中又以热电阻、热电偶等传感器的测量精度高,测量范围大,而得到了普遍的应用。此种产品测温范围大都在-200800之间,分辨率12位,最小分辨温度在0.0010.01 之间。自带LED显示模块,显示4位到16位不等。有的仪表还具有存储功能,可存储几百到几千组数据。该类仪表可很好的满足单个用户单点测量
5、的需要。多点温度测量仪表,相对与单点的测量精度有一定的差距,虽然实现了多路温度的测控,但价格昂贵。 针对目前市场的现状,本课题提出了一种可满足要求、可扩展的并且性价比高的单片机多路测温系统。通过温度传感器 DS18B20采集,然后通过C51 单片机处理并在数码管上显示,可以采集室内或花房中四处不同位置的温度,用四个数码管来显示。第一个数码管显示所采集的是哪一路,哪个通道;后三个数码管显示所采集通道的温度值,精确到0.1度。二 系统的实现及相关技术2.1系统的实现系统的实现采用多线连接,就是四个DS1820分别连接到单片机的四个IO口,这种方案虽然占用单片机的四个IO口,但在单片机IO口不紧缺的
6、情况下采用这种方案大大的简化了编程难度,缩短了设计周期,同时也能保证系统的稳定。方案二的框图如“图1-1”所示 DS1820DS1820DS1820DS1820AT89C51单片机P1.0P1.1P1.2P1.3P3.4显示单元按键控制单元 图1-1 DS1820多线连接方案2.2.AT89C51单片机简介AT89C51是一种带4K字节FLASH(FPEROMFlash Programmable and Erasable Read Only Memory)的低电压、高性能CMOS 8位微处理器,俗称。AT89C2051是一种带2K字节闪存可编程可擦除的单片机。单片机的可擦除只读存储器可以反复擦
7、除1000次。该器件采用ATMEL高密度非易失存储器制造技术制造,与工业标准的MCS-51指令集和输出管脚相兼容。由于将多功能8位CPU和闪烁存储器组合在单个芯片中,ATMEL的AT89C51是一种高效微控制器,AT89C2051是它的一种精简版本。AT89C51单片机为很多提供了一种灵活性高且价廉的方案。外形及引脚排列如图“图1-2”所示图1-2 AT89C51引脚图主要特性:与MCS-51 兼容 4K字节可编程FLASH存储器 寿命:1000写/擦循环 数据保留时间:10年 全静态工作:0Hz-24MHz 三级程序存储器锁定 1288位内部RAM 32可编程I/O线 两个16位/计数器 5
8、个中断源 可编程串行通道 低功耗的闲置和掉电模式 片内振荡器和时钟电路管脚说明:VCC:供电电压。 GND:接地。 P0口:P0口为一个8位漏级开路双向I/O口,每脚可吸收8TTL门电流。当P0口的管脚第一次写1时,被定义为输入。P0能够用于外部程序数据存储器,它可以被定义为数据/地址的第八位。在FIASH编程时,P0 口作为原码输入口,当FIASH进行校验时,P0输出原码,此时P0外部必须被拉高。 P1口:P1口是一个内部提供上拉电阻的8位双向I/O口,P1口缓冲器能接收输出4TTL门电流。P1口管脚写入1后,被内部上拉为高,可用作输入,P1口被外部下拉为低电平时,将输出电流,这是由于内部上
9、拉的缘故。在FLASH编程和校验时,P1口作为第八位地址接收。 P2口:P2口为一个内部上拉电阻的8位双向I/O口,P2口缓冲器可接收,输出4个TTL门电流,当P2口被写“1”时,其管脚被内部上拉电阻拉高,且作为输入。并因此作为输入时,P2口的管脚被外部拉低,将输出电流。这是由于内部上拉的缘故。P2口当用于外部程序存储器或16位地址外部数据存储器进行存取时,P2口输出地址的高八位。在给出地址“1”时,它利用内部上拉优势,当对外部八位地址数据存储器进行读写时,P2口输出其特殊功能寄存器的内容。P2口在FLASH编程和校验时接收高八位地址信号和控制信号。 P3口:P3口管脚是8个带内部上拉电阻的双
10、向I/O口,可接收输出4个TTL门电流。当P3口写入“1”后,它们被内部上拉为高电平,并用作输入。作为输入,由于外部下拉为低电平,P3口将输出电流(ILL)这是由于上拉的缘故。RST:复位输入。当振荡器复位器件时,要保持RST脚两个机器周期的高电平时间。 ALE/PROG:当访问外部存储器时,地址锁存允许的输出电平用于锁存地址的地位字节。在FLASH编程期间,此引脚用于输入编程脉冲。在平时,ALE端以不变的频率周期输出正脉冲信号,此频率为振荡器频率的1/6。因此它可用作对外部输出的脉冲或用于定时目的。然而要注意的是:每当用作外部数据存储器时,将跳过一个ALE脉冲。如想禁止ALE的输出可在SFR
11、8EH地址上置0。此时, ALE只有在执行MOVX,MOVC指令是ALE才起作用。另外,该引脚被略微拉高。如果微处理器在外部执行状态ALE禁止,置位无效。 /PSEN:外部程序存储器的选通信号。在由外部程序存储器取指期间,每个机器周期两次/PSEN有效。但在访问外部数据存储器时,这两次有效的/PSEN信号将不出现。 /EA/VPP:当/EA保持低电平时,则在此期间外部程序存储器(0000H-FFFFH),不管是否有内部程序存储器。注意加密方式1时,/EA将内部锁定为RESET;当/EA端保持高电平时,此间内部程序存储器。在FLASH编程期间,此引脚也用于施加12V编程电源(VPP)。 XTAL
12、1:反向振荡放大器的输入及内部时钟工作电路的输入。 XTAL2:来自反向振荡器的输出。 2.3.DS1820简介DALLAS最新单线数字温度传感器DS18B20简介新的一线器件体积更小、适用电压更宽、更经济 Dallas 半导体公司的数字化温度传感器DS1820是世界上第一片支持 一线总线接口的温度传感器。一线总线独特而且经济的特点,使用户可轻松地组建传感器网络,为测量系统的构建引入全新概念。DS18B20 一线总线数字化温度传感器同DS1820一样,DS18B20也支持一线总线接口,测量温度范围为-55C+125C,在-10+85C范围内,精度为0.5C。现场温度直接以一线总线的数字方式传输
13、,大大提高了系统的抗干扰性。适合于恶劣环境的现场温度测量,如:环境控制、设备或过程控制、测温类消费电子产品等。与前一代产品不同,新的产品支持3V5.5V的电压范围,使系统设计更灵活、方便。而且新一代产品更便宜,体积更小。DS18B20可以程序设定912位的分辨率,精度为0.5C。可选更小的封装方式,更宽的电压适用范围。分辨率设定,及用户设定的报警温度存储在EEPROM中,掉电后依然保存。DS18B20的性能是新一代产品中最好的!性能价格比也非常出色!DS1820的新性能: (1)可用数据线供电,电压范围:3.05.5V; (2)测温范围:-55+125,在-10+85时精度为0.5; (3)可
14、编程的分辨率为912位,对应的可分辨温度分别为0.5、0.25、0.125和0.0625; (4)12位分辨率时最多在750ms内把温度值转换为数字; (5)负压特性:电源极性接反时,温度计不会因发热而烧毁,但不能正常工作。DS1820的外形DS18B20内部结构主要由四部分组成:64位光刻ROM、温度传感器、非挥发的温度报警触发器TH和TL、配置寄存器。DS18B20的管脚排列如“图1-3”所示。内部结构如“图1-4”所示图1-3 DS18B20外形图 (1) DQ为数字信号输入/输出端; (2) GND为电源地; (3) VDD为外接供电电源输入端(在寄生电源接线方式时接地)。 图1-4内
15、部结构三 调试仿真3.1.硬件仿真采用Proteus7 Proteus 是英国 Labeenter electronics 公司研发的 EDA 工具软件。 Proteus 不仅是模拟电路、数字电路、模数混合电路的设计与仿真平台, 更是目前世界最先进、 最完整的多种型号微控制器系统的设计与仿真平台。 它真正实现了在计算机上完成从原理图设计、电路分析与仿真、单片机代 码级调试与仿真、系统测试与功能验证到形成 PCB 的完整电子设计与研发 过程。Proteus 产品系列也包含了革命性的 VSM 技术,可以对基于微控制 器的设计连同所有的外围电子器件一起仿真。首先启动 Proteus 并从 Prote
16、us 元件库中选择需要的元件,绘制电路图并设置相应元件的参数值。3.2.软件仿真采用KeilVision 2 KeilVision 2 是 Keil 公司关于 8051 系列 MCU 的开发工具,可以用来编译 C 源码、汇编源程序、连接和重定位目标文件和库文件、创 建 HEX 文件、调试目标程序等,是一种集成化的文件管理编译环境。它集成了文件编辑处理、编译连接、项目管理、窗口、工具引用和软件仿 真调试等多种功能,是相当强大的开发工具。在 keil 里面编写好所需程序,对其进行调试。3.3.Proteus与Keil的连接设置 (1)检测 TCPIP。 (2)复制 Proteus 安装目录下的 M
17、ODELS 文件夹里的 vdm51dll 到 keilcC51bin 目录。 (3)修改 Keil 安装目录下的 tools ini, 添加 TDRV4=BINVDM51 DLL。 (4)在 Proteus 中画好原理图,在“Debug”菜单中选择“Use Remote Debug Monitor”。 (5)在 Keil 中打开一个工程,右击 Target1,选择 Options for TargetTarget 1。在打开的对话框中选择“De-bug”选项 卡,选择使用 Proteus VSM Emulator 仿真,单击 “Ok”完成 Debug 设置。 这样 Proteus 和 Keil
18、 就连接好了,仿真结果可以在 Proteus 或者 Keil 中 看到。该电路系统采用“一总线”数字传感器 DS18B20 实现温度的采集, 采用七段数码管进行数据显示。Distributed Temperature Sensor1.Sensor introduction1.1 Temperature sensor backgroundIn the human living environment, temperature playing an extremely important role。No matter where you live, engaged in any work, eve
19、r-present dealt with temperature under. Since the 18th century, industry since the industrial revolution to whether can master send exhibition has the absolute temperature touch. In metallurgy, steel, petrochemical, cement, glass, medicine industry and so on, can say almost eighty percent of industr
20、ial departments have to consider the factors with temperature. Temperature for industrial so important, thus promoting the development of the temperature sensor. 1.2 Temperature sensor developmentMajor general through three sensor development phase: analog integrated temperature sensor. The sensor i
21、s taken with silicon semiconductor integrated workmanship, therefore also called silicon sensor or monolithic integrated temperature sensor. Such sensing instruments have single function (only measuring temperature), temperature measurement error is smaller, price low, fast response, the transmissio
22、n distance, small volume, micro-consumption electronic etc, suitable for long distance measurement temperature, temperature control, do not need to undertake nonlinear calibration, peripheral circuit is simple. It is currently the most common application at home and abroad, an integrated sensor。Typi
23、cal products have AD590 AD592, TMP17, LM135, etc.jAnalog integrated temperature controller. Analog integrated temperature controller mainly include temperature control switch, programmable temperature controller, a typical product have LM56, AD22105 and MAX6509. Some increase strength type integrate
24、d temperature controller (for example TC652/653) also contains the A/D converter and cure good sequence, this process with the intelligent temperature sensor some similarities. But it is not its system, work by micro processing device control, this is the main difference between. Intelligent tempera
25、ture sensor. intelligent temperature sensor (also called digital temperature degrees sensor) is in the mid 1990s launch. It is microelectronics technology, computer technology and the dynamic testing technology (ATE) crystallization. Intelligent temperature sensor internal contain temperature sensor
26、, A/D converter, signal processor, memory (or registers) and interface circuit. Some products still take multiplexer, central control system device (CPU), random access memory (RAM) and read only memory (ROM). Intelligent temperature sensor is characteristic of temperature data and relevant can outp
27、ut the temperature control of the quantity, adaptation various micro controller (MCU);1.3 Single point and more temperature sensorThe development trend of the temperature sensor. In the 21st century, the temperature sensor is headed in high precision, multi-function, bus, standardization, high relia
28、bility and safety, development of virtual sensor and network sensor, research monolithic temperature measuring system and other high-tech direction develop rapidly. Sensors in the application temperature controlling system. Current market exists mainly single point and more two temperature measureme
29、nt. For single point temperature foundment instrument, mainly adopts the traditional analog integrated temperature sensor, which heat resistance, thermocouple sensors measuring accuracy, high measurement range, and got the general application. This product is temperature measuring range 200 mostly b
30、etween 800 , resolution 12th, and least distinguishable temperature in 0.001 0.01 between. Cabin LED display module, shows ranging from 4 to 16. Some instruments also has memory function, can store several hundred to a few thousand sets of data. This instrument can be very good meet a single user si
31、ngle-point measurement needs. More temperature measurement, relative and single point measurement precision has certain gap, although realized the multi-channel temperature measurement and control, but the price is expensive. In view of the present market situation, proposed this topic can satisfy r
32、equirements, scalable and cost-effective single-chip multi-channel temperature measuring system. Through the first temperature sensor DS18B20 acquisition, and then through the C51 SCM processing and displayed on the digital tube, can be collected indoor or a greenhouse around in different locations
33、of the temperature, with four digital tube to display. The first digital pipe display acquisition is which way, which channel. Three digital pipe display after the acquisition channel by temperature, accurate to 0.1 degrees.2. The system realized and related technologies2.1.The system is realizedBy
34、the whole control system for core AT89C51, using four ways of temperature sensor DS18B20 in production site for distribution area of four different temperature measurement result with the chip checking, collation store and display, and through the button control, temperature will process after the L
35、ED digital display to come out, and the software assurance system anti-interference capacity。four DS1820 connected to MCU respectively, this scheme four IO mouth occupy MCU four IO though, but the microcontroller IO mouth under the condition of mouth not shortage by this scheme greatly simplify prog
36、ramming difficulty, shorten the design cycle, also can guarantee the stability of the system. A multipoint connection as shown“1-1”DS1820DS1820DS1820DS1820AT89C51MCUP1.0P1.1P1.2P1.3P3.4Display elementButton control unit1-1 multipoint connection2.2 .AT89C51 Chip introductionAT89C51 is a 4K bytes FLAS
37、H Memory (Erasable Programmable and FPEROM - FLASH for the campaigns with) low voltage, high-performance CMOS eight microprocessors, commonly known as the microcontroller. AT89C2051 is a 2K bytes with flash memory can be erased programmable read-only memory , SCM can erase read-only memory can be re
38、peated erased 1000 times. This device adopts ATMEL high-density non-volatile memory manufacturing technology manufacturing, and industrial standard MCS - 51 instruction set and output tube compatible. Due to the multifunctional 8 bits CPU and will be flashing on single chip combination of memory, AT
39、MEL AT89C51 is a kind of high efficient micro controller, AT89C2051 is a streamlined version. AT89C 51microcontroller as many embedded control system .Arrange appearance and pin as shown in figure 1-2 shown1-2 AT89C51 pins figureMajor features: and MCS - 51 compatible 4K bytes programmable FLASH mem
40、ory life: 1000 write/wipe cycle data retention time: 10 years the static job: 0Hz - 24MHz level 3 program memory lock 128 x 8 bits internal RAM 32 programmable I/O lines two 16 timer 5 interrupt source programmable serial channels low power consumption of idle and power lost mode piece inside oscill
41、ator and clock circuitTube feet explains:VCC: power supply voltage.GND: grounded.P0 Mouth: P0 mouth a eight leak level two-way I/O mouth open, every foot can absorb 8TTL gate current. When the pipe mouth P0 feet first write 1, defined as high resistance input. P0 can be used for external program dat
42、a storage, it can be defined as the eighth data/address. In FIASH programming, P0 mouth as the source-code input port, when FIASH check, the source-code P0 output, when P0 external must be pulled.P1 mouth: mouth is an internal P1 provide pull-up resistors 8-bit two-way I/O mouth, P1 mouth buffer can
43、 receive 4TTL gate current output. P1 mouth tube feet, was then write 1 for high, pull up inside can be used as input, P1 mouth be external pull down for low electricity at ordinary times, will output current, this is due to internal pull up sake. In FLASH programming and calibration, P1 mouth as ei
44、ghth address to receive.P2 mouth: for an internal P2 mouth on the 8-bit pull-up resistors two-way I/O port, P2 mouth to receive, the output buffer 4 TTL gate current, when P2 mouth is written 1, its tube feet are internal pull-up resistors, and push as input. And so as the input, P2 mouth feet are e
45、xternal down tube, will output current. This is due to internal pull up sake. P2 mouth when used external program memory or 16 address external data memory access, P2 mouth high output address eight. In a given address 1, it using internal and external 8 address advantage, when for reading and writi
46、ng data memory, P2 when the special function registers mouth output of content. P2 mouth in FLASH programming and the calibration eight address when receiving high signal and control signals.P3 mouth: P3 mouth pipe is 8 feet with internal pull-up resistors two-way I/O port, may receive four TTL gate
47、 current out put. When P3 mouth writing 1, they are internal and high level, and used as input. As input, due to external drop-down for low level, P3 mouth will output current (ILL) this is due to pull ups sake.RST: reset input. When oscillator reset device to keep RST feet high level two machine cycle time.ALE/PROG: when access external storage, address latch allows the output level of the position for latch address byte. During the FLASH programming, this pin for input programming pulse. In peacetime, the ALE with a constant frequency cycle output is the pulse signal, the frequencies of
限制150内