{$cfg_webname}
主页 > 电子信息 > 单片机 >

基于单片机的包装业流水线产品计数器的设计

来源:wenku163.com  资料编号:WK16314180 资料等级:★★★★★ %E8%B5%84%E6%96%99%E7%BC%96%E5%8F%B7%EF%BC%9AWK16314180
资料介绍

基于单片机的包装业流水线产品计数器的设计(任务书,开题报告,论文13200字)
摘要
随着科学技术的发展和人类生活的变化,各类行业自动化理念层出不穷。在包装行业中,流水线产品计数器就是其中之一。本文基于单片机对包装业流水线产品计数器进行新的设计,实现传感器检测、产品计数、计数容限值设定、计数值显示以及声光报警等功能,并进行软件程序编写和硬件仿真。
第一,分析和选取适当光电传感器,构建光电传感器模块,设计采集电路。当流水线上有产品经过时,光电传感器自动检测并向单片机输送电平信号。
第二,分析主控芯片AT89C51单片机的工作原理以及各个引脚的功能,根据设计要求对AT89C51 单片机的外围电路,如时钟电路、复位电路等进行构建。根据设计要求,构建键盘输入模块,实现对流水线产品计数容限值的设定。构建声光报警模块,实现流水线计数值溢出时的报警功能。构建显示模块,实现计数值在LED显示屏上的显示。
第三,应用Keil uVision4软件,通过C语言对本设计进行程序编写,实现了各个功能。利用Protues软件对总电路进行构造,并将编译好的程序放到AT89C51单片机中对本设计需实现的功能进行仿真和调试。
最后,根据仿真结果,得出结论。本设计基本实现了包装业流水线的产品计数功能,并可以进行计数容限值的提前设定,在计数值大于等于容限值时,进行声光报警,而且在整个计数过程中可以将计数值显示在LED数码管显示屏上。
关键词:光电传感器; AT89C51单片机; LED; 声光报警

Abstract
With the development of science & technology and changes of human life, a variety of automation concepts have emerged one after another. In the packaging industry, the pipeline product counter is one of them. In this paper, based on single-chip microcomputer design of the packaging industry product counters, we achieve the functions such as sensor detection, product count, counting tolerance limit setting, count value display,acousto-optical alarm, and so on.And software programming and hardware simulation are also done.
First, the appropriate photoelectric sensor is selected and analyzed, and a photoelectric sensor module is constructed. The acquisition circuit is designed. When a product passes through the assembly line, the photoelectric sensor will detect and send a level signal to thesingle chip.
Secondly, the work principle of the AT89C51single chip and the function of each pin are analyzed, and the peripheral circuits of the AT89C51 single chip such as the clock circuit and the reset circuit are constructed according to the design requirements. The keyboard input module is constructed to realize the setting of the counting tolerance of the assembly line product. The constructed acousto-optical alarm module has the alarm effectas the pipeline count overflows.And the display module with the function of counting on the LED display screenis also constructed.
Thirdly, by using C language under Keil uVision4 software, develop the program to realize all functions of this design.Lumped circuit is constructed byusing Protues, and the compiled program is fixed to AT89C51 single chip to simulate and debug the functions that this design needs to realize.
Finally, based on the simulation results, it is concluded that the design basically achieves the product counting function of the packaging industry assembly line, and can set the counting tolerance value in advance. When the count value is greater than or equal to the tolerance value, an acousto-optical alarm is performed. The count value can be displayed on the LED digital display screen during the entire counting process.
Key words: Photoelectric sensor; AT89C51 single chip; LED; Acousto-optical alarm

论文中的主要工作
第一,基于单片机设计了流水线计数系统。在该系统中,主要设计了光电传感器模块,按键模块,声光报警模块,主控芯片以及外围电路模块,LED显示模块等。
第二,单片机设计流水线计数系统设计的具体方法是:
1. 用光电传感器模块设计采集电路进行对包装业流水线上的产品数量进行采集;
2.    运用主控芯片将采集电路产生的产品数量进行计数,并通过LED显示模块进行显示;
3.    设计按键模块,对流水线产品计数的容限值进行调节,当计数值到达容限值时,通过声光报警模块进行即时报警。
第三,基于以上所有模块,在AT89C51单片机中对各个模块进行仿真与测试。
最后,对总体的控制系统的各类仿真结果进行分析,并给出结论。
 
2.1设计要求
(1)给出单片机控制特点和原理;
(2)针对光电计数器的特点,进行设计与建模,实现对包装业流水线产品的数目进行监测以及容限值的设定;
(3)将计数值通过LED数码管显示;
(4)搭建系统仿真模型并进行仿真结果进行分析。
2.2论文整体构思
本设计以AT89C51单片机为主控芯片,以光电传感器为采集电路并通过 Keil uVision4进行单片机芯片的程序编译来实现多功能的包装线上的流水线计数器的设计。
对光电传感器进行选型,根据其功能和原理构建光电传感器模块,搭建采集电路,将流水线产品通过时检测而得到的光信号转换为电平信号输入到AT89C51单片机主控芯片。对AT89C51单片机的外围电路进行设计,其中包括时钟电路、复位电路等,其中复位电路设计按钮实现计数器复位重新计数的功能。根据题目要求,设计按键电路,对主控芯片的引脚输入电平信息,并通过软件程序编译来实现计数器容限值的设定。以LED数码管为核心,设计显示电路,与AT89C51单片机主控芯片相连,AT89C51单片机将计数值信号输入到LED数码管,通过电路连接和程序编写实现计数值即时的显示功能。用蜂鸣器和LED灯构建报警模块,当计数值超出设定的容限值时AT89C51单片机输出报警信号到报警模块,使LED灯发光,蜂鸣器发声,实现报警功能。
分析本设计各个模块的功能,并用 Keil uVision4进行程序编译,在Protues上绘制总电路图,并将程序放到AT89C51单片机主控芯片进行电路仿真,对其进行分析,总结仿真结果。
 

基于单片机的包装业流水线产品计数器的设计
基于单片机的包装业流水线产品计数器的设计
基于单片机的包装业流水线产品计数器的设计
基于单片机的包装业流水线产品计数器的设计


目录
摘 要    I
Abstract    II
第1章 绪论    1
1.1论文的研究背景及意义    1
1.2国内外的发展现状    1
1.3论文中的主要工作    2
第2章 系统总体设计    3
2.1设计要求    3
2.2论文整体构思    3
第3章 系统硬件设计    5
3.1光电传感器    5
3.1.1光电传感器选型    5
3.1.2光电传感器原理    7
3.2主控芯片单片机    7
3.2.1AT89S51单片机的功能    7
3.2.2部分管脚说明    7
3.2.3部分管脚说明    8
3.2.4时钟电路    9
3.2.5复位电路    10
3.2.6计数功能    12
3.3采集电路    13
3.3.1光电传感器检测部分    14
3.3.2键盘部分    14
3.4 LED数码管显示电路    15
3.5报警电路设计    18
第4章 系统软件设计    20
4.1软件设计总体思路    20
4.2.1主程序流程图    20
4.2.2 光电传感器采集计数程序    22
4.2.3 显示子程序设计    23
4.2.4 按键程序设计    24
4.3电路图设计    25
4.3.1Proteus软件介绍    25
4.3.2 总电路图    25
4.4编译软件介绍    27
4.4.1  Keil C51软件介绍    27
4.4.2 系统概述    27
4.5仿真及结果分析    27
第5章 结论    31
致谢    32
参考文献    33
附录1电路图    35
附录2 程序代码    36

推荐资料