基于PC和单片机的数字示波器设计
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
现代仪器正在向着智能化、便携式和虚拟化的方向发展。借助少许的采集硬件和通用PC平台,仪器正在由单一化向集成化、由物理仪器向虚拟仪器方向发展。虚拟仪器的发展必将推动现代仪器事业的发展。
     示波器是现代测试中必不可少的电子仪器。随着现代电子技术和通信技术的飞速进步,示波器的实现方式正在经历着深刻的变革。传统的模拟示波器由于结构和功能上存在的缺点,正在被功能强大、使用方便的数字示波器所取代。目前国产的测试用数字示波器在技术上还比较落后,高性能的数字示波器主要靠进口,进口数字示波器虽然功能强大,但价格太高,难以普及;另外,主流的数字示波器大都面向高频信号,高频DSP和数据采集芯片成本都很高,用于低频信号测试精度又难以满足要求。本设计针对示波器开发以上的两个方面的问题,尝试开发了一种低频虚拟数字示波器。该示波器除了具有传统模拟CRT示波器对波形的采集、显示等一般功能,还可以实现对波形数据的存储和打印,以及对波形参数的计算和显示。
     本设计的做要工作包括:
     1、分析了示波器的工作原理和虚拟示波器的结构,探讨了滤波器的实现技术,选择切比雪夫低通滤波器作为低通滤波模型,并运用Matlab软件设计了低通滤波器;
     2、选低成本单片机PIC16F877作为数据采集和处理单元,将采集到的脉冲转换成数字信号,通过RS232串口传送到PC;
     3、通过对数字存储示波器功能和结构的分析,运用Proteus绘制了示波器各个模块的模拟和数字电路,对各电路的组成进行了说明;
     4、对设计中涉及到的通信协议进行了阐述,结合硬件构架和协议开发,运用VC++进行了示波器系统软件的设计,最后运用信号发生器进行了示波器的仿真测试。
     仿真结果证明,设计的示波器能够对20KHz以内低频信号的获取和显示,满足普通测试要求。具有结构简洁、操作方便、成本低廉的特点,且易于进行功能的扩展,拥有广阔的应用前景。
The osciloscope is an indispensible testing instrument. With rapid development in modern electronic and communication technilogy, its actualization technology is also experiencing a profound revolution. Due to its structural and functional defects, the conventional analog oscilloscope is now being replaced by the convenient digital storage oscilloscope. However, the domestic produced digital oscilloscope for testing is still technically backward, and the high-power digital oscilloscopes are mostly foreign produced. The imported digital oscilloscope is powerful but also expensive on the other hand, can not put into popular use. This study was targeted at solving the two problems mentioned above.
     In the designed virtual oscilloscope a low-cost PIC16F877 is selected as the unit for data acquisition and processing, which converted the collected analog signal to digital information and then transfered it to PC through RS232 serial port for storage or display. The stored signal can then be displayed on the screen of PC in wave form through a VC++ programed software interface in Windows. The designed oscilloscope has not only the functional of the conventional CRT oscilloscope like data collection and displaying, but also storage and display of the waveform data, as well as caculate and display the wave parameter.
     The methods adopted in this design and the conclusions are listed below:
     1. The working principle of oscilloscope and the structure of virtual sccilloscope are analyzed, and the actualization technology of filter is discussed. The Chebycov filter is selected as the low pass filter model, and the filter was designed using Matlab.
     2. By constructing the oscilloscope in a novel way of combining PICs and PC, it not only met the testing demand but also reduced the cost to a minimum.
     3. Based on the strutural and functional analysis of the digital oscilloscope, the analog and digital circuit of various modules of the oscilloscope is designed using Proteus, together with the introduction of the cirsuits. Circuit simulation indicated the designing is satisfactory.
     4. The communication protocols are explained, and software was designed using VC++, corresponded with the hardware and protocol development. And finally the simulation of the designing was conducted by using a signal generator.
     Conclusion:The simulation result indicated that the designed oscilloscope met the testing demand by successfully capturingand displaying the low frequency signal with 20Hz in wave form. The product has simple structure, easy manipulation and low building cost. The product has larg potential in functional extension and good prospect in popularity.
引文
[1] 张锡纯. 电子示波器及其应用,北京,机械工业出版社,1997 年.
    [2] 冯占岭. 数字电压表及数字多用表检测技术,北京,中国计量出版社,2003.
    [3] 刘悦音. 浅议现代测量仪器的发展[J]. 中国教育技术与装备,2004,11:10~12.
    [4] 杨振江. 智能仪器与数据采集系统中的新器件及应用,西安,西安电子科技大学出版社,2001年.
    [5] 林正盛. 虚拟仪器技术及应用,北京,微型机与应用,1997 年 8 月.
    [6] 李崇德. 现代数字存储示波器原理与应用,北京,电于工业出版社,1989 年.
    [7] 连海洲,赵英俊. 计算机化仪器技术发展与展望[J]. 测控技术,2001,Vol. 20(10):5~8.
    [8] 张苗苗,谢剑英,方敏. 多通道故障信号的采集处理及实现[J],北京,电子技术应用,2000 年12 月.
    [9] 李德英,宋莉,赵秀敏. 虚拟仪器系统的开发与应用研究,北京,计算机及其网络的应用与发展论文集,1999 年 5 月.
    [10] 赵茂泰,主编. 智能仪器原理及应用(第二版)[M]电子工业出版社,2004:230~265.
    [11] 李玉柏,彭启琼. 虚拟仪器关键技术分析,北京,电子测量与仪器学报,2001 年 3 月.
    [12] Test and Measurement Catalog 2002,Agilent Technologies,2001.
    [13] 王水鱼,李德昌. 国外示波器的发展与趋势,北京,国外电子测量技术,1999 年 1 月.
    [14] 彭利孝,虚拟设备驱动程序开发起步与进阶,北京,人民邮电出版社,2000 年.
    [15] Saliah H H, Dumont B P. Design of a web~based virtual laboratory inst rument measurement interface[A]. Proceedings of international conference on engineering education[C],Oslo,Norway,2001,1~16.
    [16] Ian Hickman. Oscilloscopes – How to use them, How they Work. Newnes ISBN, 1995.
    [17] Barry Ross. Hands-On Guide to Oscilloscopes. McGraw – Hill, 1994.
    [18] 应怀樵. 卡泰仪器与虚拟仪器技术的现状和发展趋势[J]. 国外电子测量技术,2000(2)2~4.
    [19] 王顺昌. 我国科学仪器现状和发展对策[J]. 仪器仪表学报,1997,18 (5):68~71.
    [20] 金钦汉. 从 99 匹兹堡会议看分析仪器的跨世纪发展动向[J]. 现代科学仪器,1999(3):8~10.
    [21] 程虎. 虚拟仪器的现状和发展趋势[J]. 现代科学仪器,1999,(4):6~9.
    [22] 李青霞,任焱日希. 虚拟仪器综述[J]. 现代科学仪器,1999,(4):10~12.
    [23] 回红,周泓,汪乐宇. 网络化手持式测试仪器的研究[J]. 现代科学仪器,1999,(5):13~15.
    [24] 陈浩,程鹏,熊时泽. 电子测试仪器的发展趋势[J]. 计算机自动测试与控制,1999,7 (2):7~9.
    [25] 秦树人,汤保平. 面向 21 世纪的绿色仪器系统[J]. 中国机械工程,2000,11 (3):275~278.
    [26] 杨宝民,朱一宁. 分布式虚拟现实技术及其应用[M]. 北京:科学出版社,2000.
    [27] Sid Katzen, The Quintessential PIC Microcontroller. Springer, 2001.
    [28] S. Sedra, Kenneth C. Smith. Microelectronic Circuits, 4th Edition. Oxford University Press, 1998.
    [29] David Petersen. Audio, Video And Data Telecommunication. McGraw-Hill, 1992.
    [30] Michael Duck, Peter Bishop, Richard Read. Data Communications for Engineers. Addison – Wesley Longman limited, 1997.
    [31] Ivor Matanle. PC-based virtual test and measurement speed bench testing[J]. AA Vol. 15 No. 4, 1995:page 12.
    [32] David A.Johns and Ken Martin. Analog Integrated Circuit Design, John Wiley & Sons Inc., 1997.
    [33] Behzad Razavi. Design of Analog CMOS Integrated Circuits, McGraw-Hill, 2001.
    [34] Sune S?derkvist, Tidsdiskreta. Signaler och System, Tryckeriet Erik Larsson AB, 1994.
    [35] 蔡文海. M a tlab 软件包在数字滤波器设计中的应用[J]. 安徽水利水电职业技术学院学报,2003,3 ( 1 ):40~42.
    [36] 叶晓慧,谢君,杨萍. 一种简易数字存储示波器的设计[J]. 电子测量与仪器学报,2002,(8):346~349.
    [37] 朱晓华. 基于组件技术的虚拟仪器开发方法研究[J]. 上海大学学报,1999,5 (4):357~361.
    [38] 刘君华,虚拟仪器图形化编程语言. 教程,西安,西安电子科技大出版社,2001 年.
    [39] 王福亮,韩雷,钟掘. GDS2820 数字存储示波器控制软件的开发[J],中南大学学报,2005(4): 262~265.
    [40] 武 莉,李济顺,张洛平. 基于 USB 接口的数据采集系统[J]. 河南科技大学学报(自然科学版),2003,24(2):66~68.
    [41] 江伟,袁方,黄乡生. 多功能虚拟示波器的设计[J]. 中国测试技术,2004,30(4),58~60.
    [42] 周玉鸿. 数字示波表组成分析[J]. 今日电子,2005,(1):35~36.
    [43] 李广军,林水生. 手持式数字示波表[Z]. 第四届 Motorola 杯设计应用大赛.
    [44] 陈景波. 基于高速数据采集卡的虚拟示波器的设计. 西工大硕士论文,2005.
    [45] 周明辉,宋 跃,张小平等. 基于 ARM 的等效采样手持式存储示波表设计[J]. 电脑开发与应用,2005,18(6):24- 28.
    [46] 吕向阳. 嵌入式数字存储示波器[J]. 仪表技术,2005,34(1):36- 46.
    [47] 陶春鸣,肖海红,王学智. 基于 S3C44B0X 的数字示波表设计[J],电测与仪表,2007(10),22~24.
    [48] 熊开盛,董兆鑫. 简易数字存储示波器中控制器模块的设计[J]. 数控技术,2007(4),92~94
    [49] Andy McFarlane. Digital signal processing[J] Sensor Review, 1997, 17(1):13~20, Emerald.
    [50] Robert M.Parkin and B. S. Dalay, Computer integrated documentation[J]. Industrial Management & Data Systems, Vol. 94(1)1:3-8.
    [51] 孙文斌,喻其山,杨小平. 通过 GPIB 接口实现数字存储示波器与微机之间通讯[J]. 安徽师范大学学报(自然科学版),1998,21(3):255~259.
    [52] 杨俊林,田秋,徐广智. 通过 RS2232 接口实现数字存储示波器与微机 486 间的数据传输[J]. 分析仪器,1995,(1):30~32.
    [53] 宋香丽,基于 DSP 的虚拟仪器的设计. 武汉大学硕士论文,2004.
    [54] 李继宇,董浩斌,汤 峰. 数字示波器在高频信号采集中的应用[J]. 现代电子技术,2003,(13):41~ 43.
    [55] 贾广雷,刘培玉,耿长欣. 多线程技术及其在串口通信中的应用[J]. 计算机工程,2003,29(1):247~249.
    [56] 李国治,徐春华,余岳辉. Matlab 与数字示波器的通信[J]. 电子技术应用,2002,(6):58~60.
    [57] 孟进,刘立柱,金俊利. 在 Win32 环境下实现高效的串行通信[J]. 计算机应用研究,2003,12(11):146~148.
    [58] RIAD SM. Modeling of t he HP21430A Feed through Wide2Band (282p s) Sampling Head[J]. IEEE Transactions on Instrumentation and Measurement, 1982, 31 (2):110~115.
    [59] Henderson D. Calibration of fast sampling o scilloscopes[J]. Meas Sci Technol, 1990 (1):673~679.
    [60] Ken R, St eve D, John K. Characterizing high2speed o scilloscopes[J]. IEEE Spectrum,1990: 38~39.
    [61] Jan V, Ken R. Individual Characterization of Broadband Sampling Oscilloscopes with a “Nose to Nose” Calibration Procedure[J]. IEEE Transaction on Instrumentation and Measurement, 1994, 43 (2):347~354.
    [62] ZHUJiang2miao, LIU Mingliang, YU Yuehua, LI Yang. Develop of the Method that Reconstruct Original Signal from Distortion Measurement Data[J]. ISTM’2007, 2007(2):1641~1644.
    [63] 丁玉美. 数字信号处理,西安,西安电子科技大学出版社,2004.
    [64] 陈爱萍,胡晓东. 基于 Matlab 的 IIR 数字滤波器的设计[J]. 湖南工程学院学报,2004,14 (3):8~10.
    [65] 石云霞,张志伟,范秋华. Matlab 在滤波器设计中的应用[J]. 青岛建筑工程学院学报,2004,25 (2):93~95.
    [66] 潘永才,王子旭,游治. 数字 FIR 滤波器的 Matlab 设计[J]. 半导体技术,2001,26 (8):52~54.
    [67] 郭中华,董涌,房卫东. 基于 Matlab 的 FIR 数字滤波器设计与仿真[J]. 宁夏工程技术,2004,3 (2):77~78.
    [67] 叶晓慧,谢君,杨萍. 一种简易数字存储示波器的设计[J]. 电子测量与仪器学报,2002 (8):346~349.
    [68] Deitz D. Impact codes for t he virtual laboratory[J]. Mechanical Engneering,1995,117 (5):66~70.
    [69] Saliah H,Dumont B P. Design of a web ~ based virtual laboratory instrument measurement interface[A]. Proceedings of international conference on engineering education[C],Oslo,Norway,2001(8):11~16.
    [70] 李玉柏,彭启琼. 虚拟仪器关键技术分析,北京,电子测量与仪器学报,2001 年 3 月.
    [71] “PIC16F877X Data Sheet”, 28/40-pin 8-bit CMOS flash microcontrollers (? 1999 microchip technology).
    [72] 李震,柯旭贵. 基于实例推理的虚拟仪器设计方法研究[J]. 中国机械工程,2001,12 (11):1267 ~1269.
    [73] B. Razavi. Design of Sample-and-Hold Amplifiers for High-Speed Low-Voltage A/D Converters[J]. Proceedings of the IEEE Custom Integrated Circuits Conference, Page(s):59~66, 1997.
    [74] D. Jakonis, Signal Readout and Sampling in CMOS[J]. Link?ping Studies in Science and Technology, Thesis No.967, LIU-TEK-LIC-2002:40, Department of Electrical Engineering, Link?ping University, Sweden, 2002.
    [72] 阎波,李广军. 基于 DSP+FPGA 结构的嵌入式便携式字存储示波器,电测与仪表,2005(11),31~33.
    [75] D. Jakonis, C. Svensson. GHz Linearized Track-and-Hold Circuit[J]. Proceedings of the IEEE International Symposium on Circuits and Systems, 2002.
    [76] P. Larsson, C. Svensson, Measuring High-Bandwidth Signals in CMOS Circuits[J]. Electronics Letter Vol. 29 (20): 1761~1762, 1993.
    [77] M. Takamiya. “An O-chip 100GHz Sampling Rate 8-channel Sampling Oscilloscope with Embedded Sampling Clock Generator”, IEEE International Solid-State Circuit Conference, Page:182~200.
    [78] 袁唯才,程向民,王辉. 多线程技术及其在 VC++串口通信程序中的应用[J]. 计算机与现代化,2003,15(8):33~35.
    [79] 郇义鹏,虞水俊. 利用 API 拦截技术实现串口通信数据拦截[J]. 计算机应用,2003,23(11):144~146.
    [80] K. L. Shepard and Y. Zheng. On-chip Oscilloscopes for Noninvasive Time-Domain Measurement of Waveforms[J]. Proceedings of the International Conference on Computer Design, Pages:221-226, 2001 Sampling Oscilloscope On-Chip 58.
    [81] R. Ho, etal. Applications of On-Chip Samplers for Test and Measurement of Integrated Circuits[J]. Symposium on VLSI Circuits Digest of Technical Papers, 138~139, 1998.
    [82] M. Shoji. Elimination of Process-Dependent Clock Skew in CMOS VLSI[J] IEEE Journal of Solid State Circuits, Vol. Sc-21, No. 5, October 1986.
    [83] 李扬,虚拟示波器的开发及研究,广东工业大学学报,1998, 2 (15):77~79.
    [84] 张毅刚. 自动测试系统[M]. 哈尔滨:哈尔滨工业大学出版社,2001.
    [85] 陆立巧等. 基于组件技术的虚拟仪器开发方法,武汉科技大学学报. 2002,2 (25):42~46.
    [86] 胡汉才. 单片机原理及其接口技术. 清华大学出版社,2004. 02.
    [87] 张大明. 单片微机控制应用技术实操指导书. 机械工业出版社,2007. 04.
    [88] 王福亮,韩雷,钟掘. GDS2820 数字存储示波器控制软件的开[J]. 中南大学学报,2005(4):262~265.
    [89] 肖宇峰,一款虚拟示波器的设计[J]. 兵工自动化,2002,5 (21):45~47.
    [90] 张元良,武举. 数字存储示波器的研究与设计[J]. 集成电路应用,2005 (8):55257.
    [91] 高峰. 单片微机应用系统设计及实用技术[ M]. 北京:机械工业出版社,2004.
    [92] 廉永康. 基于 USB 的虚拟示波器的设计. 太原理工大硕士论文,2004.
    [93] 王全玉,刘丹军,关文举. 基于 USB210 的虚拟示波器设计[J]. 电测与仪表,2004 (4):39~42.
    [94] 田华,李志华. 虚拟示波器的设计与实现[J]. 河北大学学报 (自然科学版),2002 (1):59~62.
    [95] 温红艳,高静涛. 虚拟示波器基于声卡的设计与实现[J]. 微计算机信息,2005 (3):109 ~113.
    [96] 路峻岭. 模拟纵波演示装置[J]. 物理实验,2003,23 (11 ):31~33.
    [97] 诸昌清,武元祯. 电子线路实验[M]. 北京:高等教育出版社,1984. 71~72.
    [98] 卢成武,种兰祥,张晓博. 基于 GPIB 接口的数字存储示波器功能扩展[J]. 微计算机信息,2005,21(5):157- 158.
    [99] 张元良,武举. 数字存储示波器的研究与设计[J]. 集成电路应用,2005,(8):55~57.

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700