本站所列毕业设计(论文)资料均属于原创者所有,初衷是为大家在毕业设计(论文)过程中参考和学习交流之用。

毕业设计我帮你

基于单片机的数据采集及通讯系统设计

www.bysj580.com / 2016-11-19
基于单片机的数据采集及通讯系统设计
基于单片机的数据采集及通讯系统设计
摘要
    随着信息技术和通讯技术的进步,基于单片机的数据采集技术取得了飞速的发展和广泛应用。本系统采用模块化,层次化设计原则,将整体电路分为温度采集模块,压力采集模块。系统采用AT89C51 单片机为主要控制核心,以温度、压力传感器作为测量元件,通过与单片机连接进行环境数据采集,并实现对温度的控制、数据处理、实时显示等功能
    本设计主要完成了以下几方面的工作:第一,确定了系统的总体设计方案,包括系统的设计原则,系统的功能设计,仿真软件的确定,整体软件流程设计等,并简要介绍了系统整体电路的组成部分和工作原理。第二,将整体电路划分成温度压力采集模块、温度控制模块和传输模块,分别对各个模块进行了硬件电路设计,并采用Keil C51 软件进行了编程调试,结合Proteus 仿真软件对电路进行了仿真和分析,验证了电路功能。包括对DS18B20 数字温度传感器测温时序和输出数据波形的仿真;对MPX4115 压力传感器输出波形的仿真分析;ADC0832 模数转换器控制信号和输出数据信号的时序分析,波形仿真等;以及对温度控制模块信号的模拟仿真,数字仿真和模数混合仿真等。第三,实现了数据采集电路系统的总体仿真,得到了系统总体电路仿真结果,达到了设计要求。
    本系统设计中将数据采集,数据处理,数据显示、传输等多种信息技术融合在一起,实现了对温度,压力等环境参数的自动监测和控制,最终实现了数据采集系统的自动化和智能化,为数据传输系统的设计和仿真提供了一种新的设计思路和方法。
关键字:数据采集,单片机,AT89C51,通讯
    
    单片机是器件级计算机系统,它可以嵌入到任何对象体系中去,实现智能化控制。小到微型机械,如手表、助听器。集成器件级的低价位,低到几元、十几元,足以使单片机普及到许多民用家电、电子玩具中去。单片机构成的现代电子系统已深入到各家各户,正改变我们的生活,如家庭中的音响、电视机、洗衣机、微波炉、电话、防盗系统、空调机等。单片机革新了原有电子系统,如微波炉采用单片机控制后,可方便地进行时钟设置、程序记忆、功率控制;空调机采用单片机后不但遥控参数设置方便,运行状态自动变换,还可实现变频控制。目前许多家用电器如VCD、DVD只有单片机出现后才可能实现其功能。
常用单片机芯片简介
STC单片机
 
 STC公司的单片机主要是基于8051内核,是新一代增强型单片机,指令代码完全兼容传统8051,速度快8~12倍,带ADC,4路PWM,双串口,有全球唯一ID号,加密性好,抗干扰强.
PIC单片机:
是MICROCHIP公司的产品,其突出的特点是体积小,功耗低,精简指令集,抗干扰性好,可靠性高,有较强的模拟接口,代码保密性好,大部分芯片有其兼容的FLASH程序存储器的芯片。 
EMC单片机:
是台湾义隆公司的产品,有很大一部分与PIC 8位单片机兼容,且相兼容产品的资源相对比PIC的多,价格便宜,有很多系列可选,但抗干扰较差
 ATMEL单片机(51单片机):
ATMEl公司的8位单片机有AT89、AT90两个系列,AT89系列是8位Flash单片机,与8051系列单片机相兼容,静态时钟模式;AT90系列单片机是增强RISC结构、全静态工作方式、内载在线可编程Flash的单片机,也叫AVR单片机
PHLIPIS 51PLC系列单片机(51单片机):
  PHILIPS公司的单片机是基于80C51内核的单片机,嵌入了掉电检测、模拟以及片内RC振荡器等功能,这使51LPC在高集成度、低成本、低功耗的应用设计中可以满足多方面的性能要求.
HOLTEK单片机:
台湾盛扬半导体的单片机,价格便宜,种类较多,但抗干扰较差,适用于消费类产品.
TI公司单片机(51单片机):
  德州仪器提供了TMS370和MSP430两大系列通用单片机.TMS370系列单片机是8位CMOS单片机,具有多种存储模式、多种外围接口模式,适用于复杂的实时控制场合;MSP430系列单片机是一种超低功耗、功能集成度较高的16位低功耗单片机,特别适用于要求功耗低的场合
是台湾松翰公司的单片,大多为8位机,有一部分与PIC 8位单片机兼容,价格便宜,系统时钟分频可选项较多,有PMW ADC 内振 内部杂讯滤波。缺点RAM空间过小,抗干扰较好。
数据采集系统,正如名字所暗示的,是一种用来采集信息成文件或分析一些现象的产品或过程。在最简单的形式中,技术人员将烤箱的温度记录在一张纸上就是数据采集。随着技术的发展,通过电子设备,这个过程已经得到简化和变得比较精确、多用途和可靠。设备从简单的存储器发展到复杂的电脑系统。数据采集产品像聚焦点一样为系统服务,和一系列产品一起,诸如传感器显示温度、水流、程度或者过程。    
数据采集技术在过去30到40年以来已经取得了很大的飞跃。举例来说,在 40 年以前,在一个著名的学院实验室中,为追踪用青铜做的坩埚中的温度上升情况的装置是由热电偶、继电器、查询台、一捆纸和一支铅笔。    
今天的大学学生很可能在PC机上自动处理和分析数据,有很多种可供你选择的方法去采集数据。至于选择哪一种方法取决于多种因素,包括任务的复杂度、你所需要的速度和精度、你想要的证据资料等等。无论是简单的还是复杂的,数据采集系统都能够运行并发挥它的作用。
铅笔和纸    
用铅笔和纸的旧方式对于一些情形仍然是可行的,而且它便宜、易获得、快速和容易开始。而你所需要的就是捕捉到多路数字信息(DMM),然后开始用手记录数据。    
不幸的是这种方法容易发生错误、采集数据变慢和需要太多的人工分析。此外,它只能单通道采集数据;但是当你使用多通道DMM时,系统将很快变得非常庞大和呆笨拙。精度取决于誊写器的水平,并且你可能需要自己动手依比例输入。举例来说, 如果DMM 没有配备处理温度的传感器,旧需要动手找比例。考虑到这些限制,只有当你需要实行一个快速实验时,它才是一个可接受的方法。
长条图表记录仪    
现代多种版本的长条图表记录仪允许你从多个输入取得数据。他们提供数据的长备纸记录,因为数据是图解的格式,他们易于现场采集数据。一旦建立了长条图表记录仪,在没有操作员或计算机的情况下,大多数记录仪具有足够的内部智能运行。缺点是缺乏灵活性和相对的精度低,时常限制在百分点。你能很清楚地感觉到与笔只有小的改变。在多通道内较长时间的监控,记录仪能发挥很好的作用,除此之外,它们的价值得到限制。举例来说,他们不能够与另外的装置轮流作用。其他的顾虑就是笔和纸的维护,纸的供给和数据的存储,最重要的是纸的滥用和浪费。然而,记录仪相当容易建立和操作,为数据快速而简单的分析提供永久的记录。
数字扫描传多用表   
 一些 benchtop DMMs 提供可选择的扫描能力。仪器的背面有一个槽孔接收一张在较多输入时能多重发讯的扫描仪卡片,通常是8到10通道的mux。固有的在仪器的前面嵌板中的受到限制。它的柔韧性也受到限制,因为它不能超过可用通道数。外部的PC机通常处理数据采集和分析。
PC机插件卡片   
 PC机插件卡片是单板测量系统,它利用ISA或PCI总线在PC机内扩大插槽。它们时常具有高达每秒1000的阅读速率。8到16通道是普遍的,采集的数据直接存储在电脑里,然后进行分析。因为卡片本质上是计算机的一部分,建立测试是容易的。PC机卡也相对的便宜,一部分地,因为他们以来主机PC去提供能源、机械附件和使用界面。
数据采集的选择    
在缺点上,PC机插件卡片时常只有12字的容量,因此你不能察觉输入信号的小变化。此外,PC机内的电子环境经常很容易发出噪声、产生高速率的时钟和总线噪声,电子接触面限制PC机插件卡片的精度。这些插件卡片也测量一定范围的电压。为了测量其他输入信号,如电压、温度和阻力,你也许需要一些外部信号监测的器件。其它关心包括复杂的校正和全部的系统成本,尤其如果你需要购买额外信号监测器件或用PC机适应插件卡片。把这些考虑进去,如果你的需要在卡片的能力和限制范围内变动,PC机插件卡片给数据采集提供吸引人的方法。
数据电子自动记录仪    
数据电子自动记录仪是典型的单机仪器,一旦配备它们,就能测量、记录和显示数据而不需要操作员或计算机参与。它们能够处理多信号输入,有时可达120通道。 精度可与无与伦比的台式 DMMs 匹敌,由于它在22字、 0.004个百分率的精度范围内运转。一些数据电子自动记录仪有能力按比例测量,检查结果不受使用者定义的限制,而且输出为控制作信号。    
使用数据电子自动记录仪的一个好处就是他们的内部监测信号。大部分能够直接地测量若干不同的输入信号,而不需要额外的信号监测器件。一个通道能够监测热电偶、温阻器(RTD)和电压。    
热电偶为准确的温度测量提供具有参考价值的补偿,是很典型的配备了多路插件卡片。内设智能数据电子自动记录仪帮助你设定测量周期和具体指定每个通道的参数。一旦你全部设定好,数据电子自动记录仪就如同无与伦比的装置运行。它们存储的数据分布在内存中,能够容纳500000或更多的阅读量。    
与PC机连接容易将数据传送到电脑进行进一步的分析。大多数数据电子自动记录仪可设计为柔性和简单的组态和操作, 而且经由电池包裹或其它方法,多数提供远程位置的操作选项。靠 A/ D 转换技术,一定的数据电子自动记录仪阅读的速率比较低,尤其是跟PC机插件卡片比较。然而,每秒250的阅读速率比较少见。要牢记正在测量的许多现象本质上是物理的,如温度、压力和流量,而且一般有较少的变动。此外,因为数据电子自动记录仪的监测精度,多量且平均阅读没有必要,就像它们经常在PC记插件卡片一样。前端数据采集。
前端数据采集经常做成模块而且是典型地与PC机或控制器连接。他们被用于自动化的测试中,为其它测试装备采集数据、控制和循环检测信号。发送信号测试装备的零配件。前端运转的效率是非常高的,能与速度和精度与最好的单机仪器匹敌。前端数据采集在很多模型里都能运行,包括VXI版本,如Agilent E1419A 多功能测量和VXI控制模型,还有专有的卡片升降室。虽然前端器成本已经降低,但是这些系统可能会非常贵,除非你需要提供高的运转,而查找它们的价格是禁止的。另一方面,它们的确能够提供相当多的可挠性和测量能力。
 
 
参考文献:
[1] 刘和平.刘跃.单片机原理及应用.重庆.重庆大学出版社,2004
[2] 杨西明.朱骐.单片机编程与入门.北京.机械工业出版社,2004
[3] 陈明荧.89C51单片机课程设计实训教材.北京.清华大学出版社,2004
[4] 刘瑞新.单片机原理及应用教程.北京.机械工业出版社,2003
[5] 李朝青.单片机原理及接口技术.北京.北京航空航天大学出版社,2002
[6] 肖洪兵. 跟我学用单片机. 北京:北京航空航天大学出版社,2002.8
[7] YAN J R ,QIAN X Z. Oscillation and comparision results for delay difference equations[J ] . J Math Ana Appl ,1992 ,165(2)
  
Based on SCM data acquisition and communication system design
ABSTRACT
    As information and communication technology advances, data collection based on microcontroller technology has achieved rapid development and wider application.The system uses a modular and hierarchical design principles. The whole circuit is divided into the
temperature acquisition module, the pressure acquisition module,The system adopts the AT89C51 microcontroller as the main control of the core, the temperature and pressure sensor as a measuring element to achieve temperature control, data processing, real-time display and  transmission capability.
    The design will highlight the following aspects of work:First, determine the system's overall design programs, including system design principles, the system's functional design, simulation software to determine the overall software process design, and briefly describes the system as a whole circuit components and working principle. Second, the whole circuit is divided into temperature and pressure acquisition module, temperature control module and  transmission modules, each module separately conducted a hardware circuit design and using Keil C51 programming software debugging, combined with Proteus simulation software circuit simulation and analysis carried out to verify the circuit functions, including DS18B20 digital temperature sensor output data timing and waveform simulation; MAX4115 pressure sensor output waveform of the simulation analysis; ADC0832 analog control signals and output data signals of timing analysis; and the temperature control module signal simulation, digital and hybrid simulation module and so on. Third, the overall simulation of the data acquisition system has been achieved.
    The system has integrated data acquisition, data processing, data show, and transmission technology, completed the right temperature, pressure and other environmental parameters of the automatic monitoring and controlling, eventually achieved the automation and intelligent of  data acquisition system. and provided a new design ideas and methods for data transmission system design and simulation.
KEY WORDS: data acquisition,Single chip microcomputer,AT89C51, Communications
The early radio technology to promote the development of electronic technology, most notably electronic vacuum tube technology to semiconductor electronic technology. Semiconductor technology to realize the active device miniaturization and low cost, so more popular with radio technology and innovation, and to greatly broaden the number of non-radio-control areas.      The development of semiconductor technology lead to the production of integrated circuit, forming the modern electronic technology leap from discrete electronics into the era of era of integrated circuits. Electronic design engineers no longer use the discrete electronic components designed circuit modules, and direct selection of integrated circuit components constitute a single system. They freed the design of the circuit unit dedicated to system design, greatly liberating the productive forces of science and technology, promote the wider spread of electronic systems.
STC microcontroller
    STC's mainly based on the 8051 microcontroller core is a new generation of enhanced MCU, the instruction code is fully compatible with the traditional 8051, 8 to 12 times faster, with ADC, 4 Road, PWM, dual serial ports, a global unique ID, encryption of good, strong anti-interference.
PIC Microcontroller:
    MICROCHIP's products is its prominent feature is a small, low power consumption, reduced instruction set, interference, reliability, strong analog interface, the code of confidentiality is good, most of the chip has its compatible FLASH program memory chips.
EMC SCM:
    Elan's products in Taiwan, with much of the PIC 8-bit microcontroller compatible, and compatible products, resources, compared to the PIC's more, cheap, there are many series of options, but less interference.
 ATMEL microcontroller (MCU 51):
    ATMEl company's 8-bit microcontroller with AT89, AT90 two series, AT89 series is the 8-bit Flash microcontroller 8051 is compatible with the static clock mode; AT90 RISC MCU is to enhance the structure, all static methods of work, containing the line can be Flash MCU programming, also known AVR microcontroller.
PHLIPIS 51PLC Microcontroller (MCU 51):
    PHILIPS company's MCU is based on the 80C51 microcontroller core, embedded power-down detection, simulation and on-chip RC oscillator and other functions, which makes 51LPC in highly integrated, low cost, low power design to meet various applications performance requirements.
HOLTEK SCM:
    Sheng Yang, Taiwan Semiconductor's single chip, cheap more categories, but less interference for consumer products.
TI company microcontroller (MCU 51):
    Texas Instruments MSP430 provides the TMS370 and two series of general-purpose microcontroller. TMS370 MCU is the 8-bit CMOS MCU with a variety of storage mode, a variety of external interface mode, suitable for real-time control of complex situations; MSP430 MCU is a low power, high functionality integrated 16-bit low-power microcontroller, especially for applications that require low power consumption occasions
Taiwan Sonix's single, mostly 8-bit machines, some with PIC 8-bit microcontroller compatible, cheap, the system clock frequency may be more options there PMW ADC internal noise filtering within the vibration. Shortcomings RAM space is too small, better anti-interference.
 
Data acquisition systems, as the name implies, are products and/or processes used to collect information to document or analyze some phenomenon. In the simplest form, a technician logging the temperature of an oven on a piece of paper is performing data acquisition. As technology has progressed, this type of process has been simplified and made more accurate, versatile, and reliable through electronic equipment. Equipment ranges from simple recorders to sophisticated computer systems. Data acquisition products serve as a focal point in a system, tying together a wide variety of products, such as sensors that indicate temperature, flow, level, or pressure. Some common data acquistion terms are shown below:    Data acquisition technology has taken giant leaps forward over the last 30 to 40 years. For example, 40 years ago, in a typical college lab, apparatus for tracking the temperature rise in a crucible of sodiumtungsten- bronze consisted of a thermocouple, a bridge, a lookup table, a pad of paper and a pencil.     Today's college students are much more likely to use an automated process and analyze the data on a PC Today, numerous options are available for gathering data. The optimal choice depends on several factors, including the complexity of the task, the speed and accuracy you require, and the documentation you want. Data acquisition systems range from the simple to the complex, with a range of performance and functionality.
Pencil and paper
    The old pencil and paper approach is still viable for some situations, and it is inexpensive, readily available, quick and easy to get started. All you need to do is hook up a digital multimeter (DMM) and begin recording data by hand.
    Unfortunately, this method is error-prone, tends to be slow and requires extensive manual analysis. In addition, it works only for a single channel of data; while you can use multiple DMMs, the system will quickly becomes bulky and awkward. Accuracy is dependent on the transcriber's level of fastidiousness and you may need to scale input manually. For example, if the DMM is not set up to handle temperature sensors, manual scaling will be required. Taking these limitations into account, this is often an acceptable method when you need to perform a quick experiment.
Strip chart recorder
    Modern versions of the venerable strip chart recorder allow you to capture data from several inputs. They provide a permanent paper record of the data, and because this data is in graphical format, they allow you to easily spot trends. Once set up, most recorders have sufficient internal intelligence to run unattended — without the aid of either an operator or a computer. Drawbacks include a lack of flexibility and relatively low accuracy, which is often constrained to a few percentage points. You can typically perceive only small changes in the pen plots. While recorders perform well when monitoring a few channels over a long period of time, their value can be limited. For example, they are unable to turn another device on or off. Other concerns include pen and paper maintenance, paper supply and data storage, all of which translate into paper overuse and waste. Still, recorders are fairly easy to set up and operate, and offer a permanent record of the data for quick and simple analysis.
Scanning digital multimeter
    Some benchtop DMMs offer an optional scanning capability. A slot in the rear of the instrument accepts a scanner card that can multiplex between multiple inputs, with 8 to 10 channels of mux being fairly common. DMM accuracy and the functionality inherent in the instrument's front panel are retained. Flexibility is limited in that it is not possible to expand beyond the number of channels available in the expansion slot. An external PC usually handles data acquisition and analysis.
PC plug-in cards
    PC plug-in cards are single-board measurement systems that take advantage of the ISA or PCI-bus expansion slots in a PC. They often have reading rates as high as 100,000 readings per second. Counts of 8 to 16 channels are common, and acquired data is stored directly into the computer, where it can then be analyzed. Because the card is essentially part of the computer, it is easy to set up tests. PC cards also are relatively inexpensive, in part, because they rely on the host PC to provide power, the mechanical enclosure and the user interface.
Data acquisition options
    In the downside, PC plug-in cards often have only 12 bits of resolution, so you can't perceive small variations with the input signal. Furthermore, the electrical environment inside a PC tends to be noisy, with high-speed clocks and bus noise radiated throughout. Often, this electrical interference limits the accuracy of the PC plug-in card to that of a handheld DMM .These cards also measure a fairly limited range of dc voltage. To measure other input signals, such as ac voltage, temperature or resistance, you may need some sort of external signal conditioning. Additional concerns include problematic calibration and overall system cost, especially if you need to purchase additional signal conditioning accessories or a PC to accommodate the cards. Taking that into consideration, PC plug-in cards offer an attractive approach to data acquisition if your requirements fall within the capabilities and limitations of the card.
Data loggers
    Data loggers are typically stand-alone instruments that, once they are setup, can measure, record and display data without operator or computer intervention. They can handle multiple inputs, in some instances up to 120 channels. Accuracy rivals that found in standalone bench DMMs, with performance in the 22-bit, 0.004-percent accuracy range. Some data loggers have the ability to scale measurements, check results against user-defined limits, and output signals for control.
One advantage of using data loggers is their built-in signal conditioning. Most are able to directly measure a number of different inputs without the need for additional signal conditioning accessories. One channel could be monitoring a thermocouple, another a resistive temperature device (RTD) and still another could be looking at voltage.
    Thermocouple reference compensation for accurate temperature measurement is typically built into the multiplexer cards. A data logger's built-in intelligence helps you set up the test routine and specify the parameters of each channel. Once you have completed the setup, data loggers can run as standalone devices, much like a recorder. They store data locally in internal memory, which can accommodate 50,000 readings or more.
    PC connectivity makes it easy to transfer data to your computer for in-depth analysis.   Most data loggers are designed for flexibility and simple configuration and operation, and many provide the option of remote site operation via battery packs or other methods. Depending on the A/D converter technique used, certain data loggers take readings at a relatively slow rate, especially compared to many PC plug-in cards. Still, reading speeds of 250 readings/second are not uncommon. Keep in mind that many of the phenomena being monitored are physical in nature — such as temperature, pressure and flow — and change at a fairly slow rate. Additionally, because of a data logger's superior measurement accuracy, multiple readings and averaging are not necessary, as they often are in PC plug-in solutions.
Data acquisition front ends
    Data acquisition front ends are often modular and are typically connected to a PC or controller. They are used in automated test applications for gathering data and for controlling and routing signals in other parts of the test setup. Front end performance can be very high, with speed and accuracy rivaling the best standalone instruments. Data acquisition front ends are implemented in a number of formats, including VXI versions, such as the Agilent E1419A multifunction measurement and control VXI module, and proprietary card cages.. Although front-end cost has been decreasing, these systems can be fairly expensive, and unless you require the high performance they provide, you may find their price to be prohibitive. On the plus side, they do offer considerable flexibility and measurement capability.
 
 
 
reference
[1] Liu Heping Liu Yue. Principle and application of single chip microcomputer. Chongqing: Chongqing University press, 2004
[2] Yang Ximing Zhu Qi. Programming and entry SCM. Beijing: Mechanical Industry Press, 2004
[3] Chen Ming..89C51 singlechip curriculum design training materials. Beijing: Tsinghua University press, 2004
[4] Liu Ruixin. Principle and application of single-chip tutorial. Beijing. Mechanical Industry Press, 2003
Li Zhaoqing [5]. Single chip microcomputer principle and interface technology. Beijing: Beihang University press, 2002
[6] Xiao Hongbing. Learn to use SCM with me. Beijing: Beihang University press, 2002.8
收缩