基于AT89C51单片机的数字电压表设计_第1页
基于AT89C51单片机的数字电压表设计_第2页
基于AT89C51单片机的数字电压表设计_第3页
基于AT89C51单片机的数字电压表设计_第4页
基于AT89C51单片机的数字电压表设计_第5页
已阅读5页,还剩19页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、基于单片机的led显示屏的数字电压表 引言这是一个很容易建立并且非常准确和有用的数字电压表。它被设计成一个面板仪表,可用于直流电源供应器或其他需要有一个准确电压指示的地方。该电路采用的adc(模拟数字转换器)集成电路cl7107由intersil公司生产。该ic采用40引脚的情况下整合了所有必要的电路模拟信号转换为数字,可以直接驱动4个7段led显示。在ic中内置的电路是数字转换器,比较器,一个时钟,一个解码器和一个7段led显示驱动器模拟。在这里它描述了一个可以显示在0-1999电压范围的直流电压电路。前面led显示屏数字电压表技术规格 - 特征电源电压:.+ / - 5v(对称)。电源要求

2、:.200ma(最大)。测量范围:.+ / - 0-1,999v在四个范围。精度:.0.1。特征:- 小尺寸。- 简易建筑。- 成本低。- 简单的调整。- 易于读取距离。- 很少的外部元件。数字电压表的基本原则为了了解电路的运作的原则,说明adc的集成电路工程是必要的。该集成电路具有以下非常重要的特点:- 准确性。- 抗干扰性。- 无需要一个采样保持电路。- 它有一个内置的时钟。- 它不需要精度高的外部元件。一个模拟数字转换器(adc),从现在起更好的称为双斜率转换器或集成转换器。这种类型的转换器通常优于其他类型,因为它提供了准确,简洁的设计和它可以将相对不重要的噪音变得非常可靠。如果将电路分

3、两个阶段描述,该电路的操作将更好的理解。在第一阶段的输入集成电压和最后阶段的输出集成电压中有一个电压与输入电压成正比。在预设的时间结束时,积分将到达内部基准电压以及输出电路会逐渐降低直至达到零参考电压水平。第二个阶段就是所谓的负斜率时期,其持续时间由第一阶段积分器输出而定。作为第一个操作时间是固定的,第二个变量的长度就可以比较两个这样的输入电压,其实是相对于内部参考电压,其结果是编码,然后发送到显示。示意图(固定16-11-09)7段显示器引出线man6960这一切听起来很容易,但实际上它是一系列非常复杂的操作,这些都是由adc集成电路作出了很少的外部元件,帮助它们用来配置工作的电路。详细的电

4、路的工作原理如下。为了进行测量,需要将电压施加于电路的1和2点,最后通过电路的r3,r4和c4应用到集成电路的引脚30和31。从下图你可知这是该集成电路的输入(分别为高与低)。r1电阻的c1一起用来设置内部振荡器(时钟),该设置约48hz。在这个时钟速率大约有三个不同的每秒读数。连接集成电路引脚33和34之间的电容已被选定,以弥补由内部参考电压带来的误差,并保持稳定的显示。电容c3和电阻r5在一起的电路是输入电压的集成电路,同时它可避免任何使电路更快的分裂输入电压,从而使错误的可能性大大减少进而使电路更稳定。在没有输入电压时电容器c5强迫仪器显示为零。当输入为零时电阻r2和p1一起用来调整仪器

5、在设置过程中显示为零。电阻r6的控制电流允许流经显示,以便使电路在没有损坏的前提下显示充分的亮度。至于我们上面已经提到的芯片它能够驱动4个共阳极led显示屏。这三个最右边的显示器相连,使他们可以显示所有从0到9的数字,而从左边第一个只能显示数字1,当电压为负“-”的时候。整个电路工作,从对称5伏直流电电源,这在引脚1(+5v)申请,21(0v),26(-5v)集成电路。背面单片机自身的抗干扰措施为提高单片机自身的可靠性,近年来单片机的制造商在单片机设计上采取了一系列措施来提高可靠性。这些技术主要体现在以下几方面:1.降低外部时钟频率外部时钟是高频的噪声源,除了能对本应用系统引起干扰之外,还可能

6、产生对外界的干扰,使电磁兼容检测不能达标。在对系统可靠性要求很高的应用系统中,选用频率低的单片机是降低系统噪声的原则之一。以8051单片机为例,最短指令周期1s,这时外部时钟是12mhz。而同样速度的motorola单片机系统时钟只需4mhz,更适合工业控制系统使用。近年来,一些生产8051兼容单片机的厂商也采用了一些新技术,在不牺牲运算速度的前提下将对外部时钟的需求降至原来的1/3。而motorola单片机在新推出的68hc08系列以及其16/32位单片机中普遍采用了内部锁相环技术,使得外部时钟频率降至32khz,而内部总线速度却提高到8mhz甚至更高。2.低噪声系列单片机传统集成电路的设计

7、中,通常将电源、地的引出安排在对称的两边。如左下角是地,右下角是电源,这使得电源噪声穿过整个硅片。改进的技术将电源、地安排在两个相邻的引脚上,这样一方面降低了穿过整个硅片的电流,一方面更容易在pcb的设计上安排外部去耦电容,以降低系统噪声。另一个在集成电路设计上降低噪声的例子是驱动电路的设计。一些单片机提供若干个大电流的输出引脚,从几十毫安到数百毫安。这些大功率的驱动电路集成到单片机内部无疑是增加了噪声源。而跳变沿软化技术可消除这方面的影响,办法是将一个大功率管做成若干个小管子的并联,再为每个管子的输出端串联不同等效阻值的电阻。这些是为了降低di/dt。3.时钟监测电路、看门狗技术与低电压复位

8、当发现系统时钟停振时,通过监测系统时钟产生系统复位信号可以恢复系统时钟,这是单片机提高系统可靠性的措施之一。而时钟监控有效与省电指令stop是一对矛盾,只能使用其中之一。看门狗技术是用来监测应用程序中一段定时中断服务程序的运行状况的,当这段程序不工作时判断为系统故障,从而产生系统复位。低电压复位技术是用来监测单片机电源电压的,当电压低于某一值时产生复位信号。由于单片机技术的发展,单片机本身对电源电压范围的要求越来越宽。电源电压从原来的5v下降至3.3v,并继续下降到2.7v、2.2v、1.8v。是否使用低电压复位功能应根据具体应用情况进行权衡。用于单片机系统的干扰抑制元件1.去耦电容每个集成电

9、路的电源、地之间都应该配置一个去耦电容,它可以滤掉来自电源的高频噪声。作为储能元件,它吸收该集成电路内部三极管导通、截止引起的电流变化(di/dt)或是提供三极管导通、截止所需的变化电流,从而降低系统噪声。要选用高频特性好的独石电容或瓷片电容作去耦电容。每块印制电路板上电源引入的地方要安放一只大容量的储能电容。由于电解电容的缠绕式结构,其分布电感较大,对滤除高频干扰信号几乎不起作用,使用时要与去耦电容成对使用。钽电容的使用效果相对电解电容更好。2.抑制高频电感用粗漆包线穿入轴向有几个孔的铁氧体芯,就构成了高频扼制器件。将其串入电源线或地线中可以阻止高频信号从电源/地线引入。这种元件特别适用于隔

10、开一块印制电路板上的模拟电路区、数字电路区、以及大功率驱动区的供电。必须注意的是它必须放在该区储能电容与电源之间而不能放在储能电容与用电器件之间。3.自恢复保险丝这是用一种新型高分子聚合材料制成的器件,当电流低于其额定值时,它的直流电阻只有零点几个欧姆。而随着电流大到一定程度,它的阻值也迅速升高,引起发热,而越热电阻值就越大,从而阻断电源电流。当温度降下来以后能自动恢复正常。这种器件可防止cmos器件在遇到强烈的冲击干扰时引起的所谓“可控硅触发”现象。这种现象是指集成电路硅片的基体变得导通,从而引起电流增大,导致cmos集成电路发热乃至烧毁。4.静电放电抢静电放电枪是一个相对便宜的可以帮助发现

11、数字电路中的高频感应性的工具。使用这种枪最初是为了保证设计不会被高压静电损毁。高压静电由人体产生在接触时产生放电。我们可以得到电池供电的便携式静电放电枪,且通过编程智能地设定不同的工作电压数量级。因为便携性,ems枪可以用在许多应用的免疫性能测试中。esd枪通常为用户提供了两种类型的尖端:空气放电尖端和接触放电尖端。空气放电尖端是球形的,然而接触放电尖端是锥形的。使用接触放电,尖端可以放在pcb导线或者器件的引脚上,然后可以按下esd枪触发器。大多数的esd枪限制了接触放电的电压为8kv。在电源线和外部连接上使用接触放电可以找到任何设计缺陷。一般的步骤是将尖端连接到导线上,当应用系统在运行的时

12、候,发射随机噪声尖峰,其初始值小于1kv,提高电压直到故障发生。空气放电可以从2kv到小于25kv进行设置,这只能应用在外部连接。这种类型的esd测试通常用在遭受esd放电的区域,这种放电是由于充电的人靠近设备引起的。这种类型的esd测试可以引起重复性的问题,这种重复性的问题是由尖端采用的角度和尖端靠近放电部位的速度引起的。在内部引脚和mcu引脚上应用空气esd会造成破坏,因此只推荐在pcb和遭受由人引起的esd的区域使用。5.防雷击装置室外使用的单片机系统或者电源线、信号线是从室外架空引入室内的单片机系统,要考虑系统的防雷击问题。常用的防雷击器件有:气体放电管,瞬态电压抑制器tvs(tran

13、sient voltage supervention)等。气体放电管在电源电压大于某一值时,此值通常为数十伏或数百伏,放电击穿气体,将电源线上的强冲击脉冲导入大地,tvs可以看成是两个方向相反的齐纳二极管的并联,当电两端电压高于某一额定值时导通。其特点是可以瞬态通过数百乃至上千安培的电流。这类元器件与抗共模和抗差模干扰的电感配合使用才可以提高抗干扰效果。数字电压表印刷电路板的加工首先让我们考虑建立一个印刷电路板上的电子电路的基础知识。该印刷电路板是由薄绝缘铜的导电复合材料薄层形成,这样以形成电路之间的各组成部分的必要的导体。一个设计完善的印刷电路板是非常可取的,因为它大大加快了加工,并大大减少

14、了决策失误的可能性。为了保护印刷电路板在存储过程中被氧化和保证它到达你所要求的完美的条件,在生产过程中将铜镀锡的同时起表面还要覆盖一层特殊的漆,这样不仅防止了它被氧化,也使焊接更容易。焊接的部件,印刷电路板是建立你的电路的唯一的方式和你在做板时很大程度上取决了你的成功或失败。这项工作也并不是很困难,如果你坚持有一些规则你应该没有问题。在你使用电烙铁时,其功率不应超过25瓦。它的尖应该是好的,并且必须时刻保持清洁。为此我们特地准备了一特制海绵并使其保持潮湿,这样可以不时擦拭热烙铁尖,从而去除积累在它上面的残渣。如果烙铁尖不能清洗或更换,请勿用文件或砂纸弄脏或磨损其尖部。在市场上有许多不同类型的焊

15、接剂,你应该选择一个优质的一个在其核心包含必需的流量的焊接剂,以保证每次焊接时都能完美的接合。不使用助焊剂除了在你的焊接剂里已含有助焊剂。太多的流量可能会导致许多问题,也是电路故障的主要原因之一。但如果您必须使用额外的流量,因为它是在你不得不将铜线镀锡的情况下,将起彻底清除干净后你完成了你的工作。为了焊接组件正确,您应该执行下列操作:- 用一小块砂纸清洁清洁组件。- 弯曲组件使它们之间有一合适的距离并插入在印刷电路板中的正确地位组成部分。- 你有时可能会发现比起平常还会有重计部分,它将过于厚而不能进入个人电脑印刷电路板的孔。在这种情况下使用的小型钻孔略有放大。不要使孔太大,因为这将会使焊接困难

16、。安置部分印刷电路板尺寸:77,6毫米 44,18毫米或35的范围内做拿着热铁将其尖端放在组件的一角上,同时将焊锡丝末梢放在尖端的一个点上。烙铁头必须触及略高于印刷电路板的地方。当焊锡丝开始融化和流动等待它均匀覆盖孔周围的区域和通量疖并且焊料从下面流出。整个过程不应超过5秒。清除烙铁,让焊接剂自然冷却不吹,或移动组件。如果一切处理得当则表面联合处有一个光明的金属质感,其边缘应该是平滑的并且有一轨道面。如果焊料看起来暗淡无光,有裂痕的,或有一个气泡的形状,那么你虚焊了和你应该清除焊接剂(用泵,或焊芯)然后重做它。注意不要过热的轨道,因为它是很容易从其电路板上解除从而损坏电路板。在你焊接一个敏感元

17、件时,很好的做法是用一个长鼻子钳子夹着电路板组件的边缘进行热转移但是那样容易损坏组件。确保你不使用过多的焊料是必需的,因为你正在冒着毗邻轨道短路的风险,特别是如果他们都非常接近时。当你完成你的工作时,切断组件的多余部分和用适当的溶剂来彻底清除可能还留在电路板上的助焊剂残留物。更换的电阻按照下表:0 - 2v. r3 = 0欧姆10 - 20v. r3 = 1.2千欧10 - 200v. r3 = 12千欧10 - 2000v. r3 = 120千欧1当您完成所有的电路板上焊接和您确信一切正常,可以插入在其位芯片。该ic是cmos类型于是对静电非常敏感。它有铝箔包裹以防止静电放电,并应小心处理,

18、以免损坏它。尽量避免用你的手接触引脚,并且保持地面电路和你的身体电位在你插入的位置。电路连接到一个合适的电源5伏直流电上,开启电源。在光显示区应立即形成一个数字。短路输入(0v)和调整微调小屏幕显示,直到完全去掉0。零件清单r1=180kp1=2万多转微调r2=22ku1=icl7107r3=12kld1,2,3,4=man6960共阳极led显示屏r4=1mr5=470kr6=560 ohmc1=100pfc2,c6,c7=100nfc3=47nfc4=10nfc5=220nf故障检查简介检查您可能造成的虚焊,跨越邻近轨道或助焊剂残留物的桥梁工作,通常会造成问题。再次检查所有的电路和外部连接

19、,看看是否有一个错误。看是否有任何组件丢失或错误的地方插入:- 确保所有的两极分化组件已被焊接正确。- 确保供应具有正确的电压,以正确的方式连接到你的电路上。- 检查您的故障或损坏的部件项目。样品电源1样品电源2led display digital voltmeter based on mcufront sidecopyright of this circuit belongs to smart kit electronics. in this page we will use this circuit to discuss for improvements and we will intr

20、oduce some changes based on original schematicgeneral description this is an easy to build, but nevertheless very accurate and useful digital voltmeter. it has been designed as a panel meter and can be used in dc power supplies or anywhere else it is necessary to have an accurate indication of the v

21、oltage present. the circuit employs the adc (analogue to digital converter) i.c. cl7107 made by intersil. this ic incorporates in a 40 pin case all the circuitry necessary to convert an analogue signal to digital and can drive a series of four seven segment led displays directly. the circuits built

22、into the ic are an analogue to digital converter, a comparator, a clock, a decoder and a seven segment led display driver. the circuit as it is described here can display any dc voltage in the range of 0-1999 volts. technical specifications - characteristicssupply voltage: . +/- 5 v (symmetrical)pow

23、er requirements: . 200 ma (maximum)measuring range: . +/- 0-1,999 vdc in four rangesaccuracy: . 0.1 %features- small size - easy construction - low cost.- simple adjustment.- easy to read from a distance.- few external components. how it works in order to understand the principle of operation of the

24、 circuit it is necessary to explain how the adc ic works. this ic has the following very important features: - great accuracy.- it is not affected by noise.- no need for a sample and hold circuit.- it has a built-in clock.- it has no need for high accuracy external components.schematic (fixed 16-11-

25、09)7-segment display pinout man6960an analogue to digital converter, (adc from now on) is better known as a dual slope converter or integrating converter. this type of converter is generally preferred over other types as it offers accuracy, simplicity in design and a relative indifference to noise w

26、hich makes it very reliable. the operation of the circuit is better understood if it is described in two stages. during the first stage and for a given period the input voltage is integrated, and in the output of the integrator at the end of this period, there is a voltage which is directly proporti

27、onal to the input voltage. at the end of the preset period the integrator is fed with an internal reference voltage and the output of the circuit is gradually reduced until it reaches the level of the zero reference voltage. this second phase is known as the negative slope period and its duration de

28、pends on the output of the integrator in the first period. as the duration of the first operation is fixed and the length of the second is variable it is possible to compare the two and this way the input voltage is in fact compared to the internal reference voltage and the result is coded and is se

29、nd to the display.back sidescms own anti-jamming measuresto improve the reliability of its own microcontroller. in recent years, in single-chip microcontroller manufacturers to take a series of measures designed to improve reliability. these techniques are mainly embodied in the following aspects. 1

30、. reduce the external clock frequency external clock is a high-frequency noise sources, in addition to this application systems can cause interference, the right may also be generated from outside interference and electromagnetic compatibility testing so that compliance can not be. system reliabilit

31、y in the demanding applications, the use of scm is to reduce low frequency noise of the principles of the system. in 8051, for example, the shortest 1s instruction cycle, the external clock is 12mhz. while at the same speed of the motorola mcu system clock only 4mhz, more suitable for industrial con

32、trol systems. in recent years, some of the production 8051-compatible microcontroller manufacturers have also adopted a number of new technologies, without sacrificing speed of operation under the premise of the external clock needs by up to 1/3. the motorolas 68hc08 microcontroller family in the ne

33、w release and its 16/32 bit microcontroller widely used in the internal phase-locked loop technology, the external clock frequency down to 32khz, while the internal bus speed is increased to even higher 8mhz .待添加的隐藏文字内容12. low noise series mcu traditional ic design, in the power, ground leads usuall

34、y be arranged symmetrically on both sides. if the bottom left corner is, the bottom right corner is the power supply. this makes the power supply noise across the entire wafer. improved technology will power, to arrange the two adjacent pins on the one hand, this reduces the current through the sili

35、con, on the one hand an external decoupling capacitor in the pcb design is more easily arranged, in order to reduce system noise . another noise reduction in integrated circuit design example is the drive circuit design. some microcontroller provides a number of large current output pin, from the te

36、ns of ma to hundreds of milliamps. these high-power drive circuit integrated into the mcu will undoubtedly increase the internal noise source. the softening of hopping along the technology can eliminate the impact of this by way of a high-power tube made of a number of small tubes in parallel, and t

37、hen pipe the output for each string of different equivalent resistance of the resistor. to reduce the di / dt. 3. clock monitor circuit, watchdog technology and low-voltage reset monitoring the system clock, it became apparent that the system clock to stop vibration generated when the system reset s

38、ignal in order to restore the system clock is the scm one of the measures to improve system reliability. the clock monitoring of effective and energy-saving instruction stop is a contradiction. can only use one of them. watchdog technology is to monitor the application of a timer interrupt service r

39、outine of operating conditions, when this program is not working to determine the system failure, resulting in a system reset. low-voltage reset microcontroller technology is the monitoring of power supply voltage, when the voltage falls below a certain value generated reset signal. since the develo

40、pment of single chip microcomputer, microcontroller itself, the power have become increasingly demanding a wide voltage range. the original power supply voltage from 5v down to 3.3v and continue down to 2.7v, 2.2v, 1.8v. on whether the use of low-voltage reset function shall be based on the specific

41、 application to weigh. 4. eft technology the newly launched motorola m68hc08 series mcu uses eft (electrical fast transient) technology to further improve anti-jamming capability of the microcontroller. when the oscillator circuit sine wave signal from outside interference, its waveform will be supe

42、rimposed on a number of glitches. schmitt circuit to its shaping, this glitch will become a trigger signal interfered with the normal clock signal. alternate use of schmitt circuit and rc filter can make this glitch does not work, this is the eft technique. as vlsi technology continues to evolve, th

43、e circuits internal anti-jamming technology has been developing. 5. software measures mcu instruction itself also has some anti-jamming design considerations. illegal instruction illegal instruction reset or interrupt is encountered while running the program when an illegal instruction or an illegal

44、 address space can generate reset or interrupt. microcomputer application system program is written in advance, there can be no illegal instruction or address. the system must be subject to interference, cpu read instruction wrong. mentioned above, is currently widely used microcontroller should hav

45、e an internal anti-interference measures. in the selection of scm, it is necessary to check whether the performance of all of these in order to design a highly reliable system.in the application of software design, designers have their own experience. here we must remind the rom is the final right n

46、ot to do treatment. principle is the case here since the resumption of proceedings fall. scm systems for interference suppression components1. decoupling capacitor each ic power, ground should be configured between a decoupling capacitor, which can filter out high frequency noise from the power supp

47、ly. as the energy storage components, which absorb or provide the ic transistor conduction cut-off due to current changes (di / dt), thus reducing system noise. to select high-frequency characteristics of a good monolithic capacitor or porcelain capacitors for decoupling capacitors. each printed cir

48、cuit board power supplies should be placed where the introduction of a large-capacity storage capacitor. as the electrolytic capacitors winding structure, the distribution of a larger inductance, for filtering high-frequency interference signal is almost does not work. when used with the decoupling

49、capacitor pairs. tantalum capacitors are better than electrolytic capacitors. 2. suppress high-frequency inductance enameled wire with thick axial penetration of the ferrite core has several holes, they constitute a high-frequency devices to deter. its power cord or string into the ground can be pre

50、vented high-frequency signal from the power / ground to introduce. this device particularly suitable for separating a printed circuit board area of analog circuit, digital circuit areas, and high-power-driven power supply area. it should be noted is that it must be placed in the area between the ene

51、rgy storage capacitor and the power can not be placed between the energy storage capacitor and the electrical device. 3. pptc this is a new type of polymer material of the device, when the current is below its rated value, its dc resistance is only a few european 12:00. the current is large to a cer

52、tain extent, its resistance increased rapidly, causing fever, and the more the greater the thermal resistance, thus choking off the supply current. when the temperature down to be able to automatically return to normal. this device prevents the cmos devices in the face of strong impact-type interfer

53、ence caused by so-called scr triggering phenomenon. this phenomenon refers to the matrix of silicon integrated circuits has become conduction, causing current increases, leading to fever and even the burning of cmos integrated circuits. 4. esd gunan electrostatic discharge (esd) gun is a relatively

54、inexpensive tool that will help find any high-frequency susceptibility in any digital circuit. use of this gun is designed primarily to ensure that designs are not damaged with the high static voltages humans generate and discharge onto applications by contact. the esd gun is available in battery-po

55、wered portable form and can be intelligently programmed to different voltage magnitudes. because of its portability, the esd gun can be used in many applications to test immunity performance. the esd gun normally provides the user with two types of tips: air-discharge and contact-discharge. the air-

56、discharge tip usually is spherical, whereas the contact-discharge tip is conical to a point.using contact discharge, the tip can be placed on a pcb track or device pin, and then the gun trigger can be pressed. most esd guns will limit the contact discharge to 25 kv, which should be applied only to external connections. this type of esd testing is applied usually to areas where the application will be subject to esd discharges caused by charged humans approaching the equipment. this type of esd testing can cause repeatability problems due to

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论