基于单片机的电流检测电路设计
基于单片机的电流检测电路设计(论文15000字)
摘 要
当今形势下,社会正在迅速发展,电子技术的发展也异常迅猛。单片机技术属于电子领域的一部分,其电流检测技术重要程度毋庸置疑。而在单片机检测电流的过程中,因为电流量是模拟量,并且对于电流量不能直接进行读取。因此在对数据进行读取以及后续的处理之前,电流到电压之间的转换是必不可少的。接着A/D转换器读取电压信号并处理之。
在本课题的研究之中,首先对电流的检测方法进行介绍,该方法主要是建立在AT89S52单片机来进行的。然后就是仿真过程,在这一过程之中主要运用的是proteus。在进行电流测量的过程中,量程的设置可同时进行。此外,当有异常情况出现时比如传感器等技术故障等,会有相应的报警装置进行报警。具体方法是使用电池供电,必须先实现电流信号与电压信号之间的转换,此过程主要是通过电流传感器来实现的。至于模拟信号与数字信号之间的转换,这里是通过A/D转换器ADC0832来实现的。在LCD1602显示器中实现电流值显示,并通过键盘输入电流值的量程,超过设定的电流值将触发警报,以保证电流在允许的范围之内。为了使得电流的测量精度<=1mA, 在对AD转换器进行选择时,必须要有科学性和合理性。本设计围绕单片机以及各种硬件的组合,采用一种简单易行的方法对电流进行测量,用途范围极广。
关键词:ADC0832 电流检测 电流传感器 AT89S52
The design of current detection circuit based on Micro-controller
Abstract
With the development of society, the technology of electronic engineering changes quickly. In the realm of electricity, the importance of current detection based on Micro-controller is undisputed. In the course of the current detection, the electric current is the analogue signal, and it can not be read directly. Therefore, it needs to transform the electric current into the voltage, which is indispensable. Then the A/D converter receives the signal, reads and deals with it.
This paper firstly describes a method about the measurement of current based on the AT89C52 Micro-controller and uses Proteus to simulate the circuit. It can finish the measurement. Meanwhile, it can also set the measuring range during the progress. In addition, if it runs into technical problem including current sensor problem, it will run alert immediately. The specific method is that it uses the battery to apply the power, and uses the current sensor to convert the current signal into voltage signal. Then, it converts the analogy signal into digital signal through the A/D converter called ADC0832. The signal is displayed in LCD1602 screen through the form of digital. We can use the keyboard to input the measurement of current, if the current overload the range of measurement, the circuit will log on the alarm system to ensure the safety of circuit. We should choose the A/D converter reasonably to ensure that the precision of measurement is less or equal to 1mA. This design using a combination of a simple method measures the current. The method is easy and it can be widely used in most realms. [来源:http://www.doc163.com]
Key Words: ADC0832; Current detection; Current sensor; AT89S52; LCD1602
[资料来源:https://www.doc163.com]
目 录
摘 要 I
Abstract II
第一章 绪 论 5
1.1 课题研究的意义 5
1.2 论文所做的工作 5
第二章 方案论证 7
2.1 单片机的选择 7 [版权所有:http://DOC163.com]
2.2 电流传感器的选择 8
2.2.1 ACS712概述 8
2.2.2 ACS712内部结构及工作原理 9
2.3 模数转换器的选择 10
2.3.1 模数转换器的分类 10
2.3.2 ADC0832简介 11
2.4 液晶显示器的选择 12
2.4.1 1602液晶显示屏 13
2.4.2 12864液晶显示屏 14
2.4.3 12864与1602的比较 15
第三章 系统硬件介绍 17
3.1 硬件模块框图 17
3.2 单片机最小系统 17
3.2.1 晶振电路 19
3.2.2 复位电路 20
3.3 AD转换电路 20
3.4 键盘输入电路 22
3.5 LCD显示电路 23
3.6 报警电路 24
第四章 系统软件设计 25
4.1 系统主程序设计 25
4.2 AD转换程序 26
[资料来源:http://doc163.com]
4.3 LCD显示程序 27
4.4 键盘程序 28
4.5 报警程序 29
第五章 系统调试及总结 31
5.1 系统调试 31
5.2 总结 33
结 束 语 34
参 考 文 献 35
致 谢 36
附录Ⅰ 各模块软件电路图 37
附录Ⅱ 各模块程序 38