量程自动转换数字万用表设计
量程自动转换数字万用表设计
摘要
本文主要介绍量程自动转换数字万用表的设计方法。本设计的主要目的是使数字万用表实现量程自动转换功能。作为使用者,不必手动选择量程,省去了量程选择过程,数字万用表省去了量程选择旋钮。量程自动转换功能的过程通过程序控制硬件实现,从而使得测量过程更为方便。尤其,本设计使数字万用表成为了智能化的仪器,与传统数字万用表相比,提高了测试效率和测试结果的准确性。其中,量程自动转换模块采用程控增益放大器PGA,用试探法通过采样确定PGA的控制值。本设计能够实现以下功能:第一,量程自动转换;第二,避免万用表被损毁;第三,避免量程选择开关的机械损耗引起的准确度下降。
本设计基于AT89C51单片机,是由硬件设计和软件设计两部分组成的。其中,硬件设计主要包括A/D转换电路、量程自动转换模块设计、单片机控制与显示电路设计、电阻-电压转换电路模块设计、电流-电压转换模块设计。软件设计包括主程序以及各个模块的控制程序,最终实现对量程的控制,并且测量结果显示在LED数码管上。
关键词:量程自动转换,智能仪器,PGA
I V
太原工业学院毕业设计(论文)
Design of Auto-range digital multimeter
Abstract
The article focuses on describing the design range digital multimeter designed for automatic conversion.The main purpose of this design is to make the digital multimeter to realize automatic range conversion function.As a user,not the need to manually select the range,eliminating the range selection process,digital multimeteromits the range selector button.The process of automatic range switching function is realized by program control hardware,which makes the measurement more convenient.Especially,the design of the digital multimeter become intelligent instrument,compared with the traditional digital multimeter,to improve the accuracy of the test efficiency and test results.Among them,automatic conversion range module adopts programmable gain amplifier PGA,sampling to determine the PGA control values by trial method.The design can achieve the following functions:First,automatic range conversion;Second,avoid the multimeter damaged;Third,avoid accuracy decline caused by mechanical loss range switch.The design is based on AT89C51, consists of hardware design and software design of two parts. Among them, the hardware design includes A/D conversion circuit, module design,automatic range conversion microcomputer control and display circuit design, resistance to voltage conversion circuit module design,current to voltage conversion module design.Software design including the main program and each module of the control program, and ultimatelyto achieve control of the range, and the measurement results are displayed in LED Segment Displays .
Key words:Automatic conversion range,Intelligent instruments,PGA
V
量程自动转换数字万用表设计
目 录
1 绪论 .................................................................... 1
1.1 国内外研究进展 .................................................... 1 1.2 问题的提出 ........................................................ 2
1.3 研究的背景与意义 .................................................. 3 1.4 主要实现的功能 .................................................... 3 1.5 系统设计方案 ...................................................... 4 1.6 万用表的分辨率与精度 .............................................. 4 1.7 数字万用表与智能仪器 .............................................. 5 1.8 设计中重点解决的问题 .............................................. 6 2 系统整体结构 ............................................................ 7
2.1 系统设计方框图 .................................................... 7 2.2 系统设计方案 ...................................................... 7 2.3 量程自动转换功能的方案设计与论证 .................................. 8
2.3.1 方案设计 .................................................... 8 2.3.2 方案论证 ................................................... 11
3量程自动转换数字万用表的硬件电路设计 ................................... 13
3.1 A/D转换电路 ..................................................... 13 3.2 单片机控制与显示电路 ............................................. 14
3.2.1 单片机最小系统 ............................................. 15 3.2.2 LED显示电路设计 ........................................... 17 3.3 量程自动转换模块电路 ............................................. 18 3.4 电流/电压转换电路 ................................................ 23
3.4.1 继电器介绍 ................................................. 23 3.5电阻/电压转换电路 ................................................ 24 4 量程自动转换数字万用表的程序设计 ....................................... 26
4.1 protues软件简介 ................................................. 26
VI
太原工业学院毕业设计(论文)
4.2 编程语言选择和keil uVision4软件简介 ............................. 26
4.2.1 编程语言选择 .............................................. 26 4.2.2 keil uVision4软件简介 .................................... 27 4.3 软件设计流程 ..................................................... 31 4.4 protues与keil uVision4软件的联合调试 ........................... 32 5 量程自动转换数字万用表系统测试 ......................................... 34 6 总结 ................................................................... 36 致谢 ..................................................................... 38 参考文献 ................................................................. 40 附录 ..................................................................... 41
附录A:整机电路图 ................................................... 41 附录B:输入为15V时仿真图 ........................................... 42 附录C:超量程时显示仿真图 ........................................... 42 附录D:程序源代码 ................................................... 43
VII