毕业设计-云台控制器的软件设计
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
摘要
近年来,视频监控得到了迅速发展,其应用范围越来越广。为扩大监控范围,改善监控视野,可以借助于云台,即把摄像机装在云台上,通过云台转动带动摄像机旋转,同时可以控制摄像机镜头的参数。云台在监控系统中起着关键的作用,它直接反映监控系统的监控指标。
本文设计了一种基于AT89C52单片机的电动云台控制器。该控制器能够接收控制台的控制命令,控制云台的垂直运动和水平运动,以及摄像机的聚焦/散焦,变倍近远、光圈变力小,以调整摄像机的视野.
本文在介绍课题的应用背景的基础上,重点分析了云台所具备的功能,并针对这些功能提出了本设计的实现方案。在软件程序设计中,简要介绍了串行通讯的基本知识和详细说明了应用于云台中的通讯协议PELCO-D和PELCO-P等协议,并在此基础上设计了各部分的软件流程图。最后阐述了本设计所采用的有关软件可靠性方面的措施。
通过调试、系统的实际运行,验证了本设计运行稳定,实现了云台的上下左右旋转,实现了对镜头聚焦、变倍、光圈的控制。达到了预期的应用目标。
关键词:云台,协议,监控系统,解码器
ABSTRASCT
In recent years, the development of video surveillance is rapid, the range of applications become wide. In order to expand the scope of monitoring and improve the monitoring of vision, The pan/tilt/zoom (PTZ) can be used, which means to put a camera on a PTZ and to control the PTZ camera rotating. At the same time, the parameters of the camera lens can be controlled. The PTZ play a key role in the monitoring system, it reflects the performance of monitoring system.
In this paper, a controller for electric PTZ, which is based on microcomputer AT89C52 and applied in explosion-proof PTZ system, has been designed. It can receive commands from the controller, which control the PTZ motion, the camera, NEAR/FAR, TELE/WIDE, Close/Open. The parameters of the camera can be saved in memory.
First of all, the background of the subject, the classification of PTZ and the development of PTZ Controller are introduced. The functions of PTZ are analyzed. A program for these functions is proposed. Secondly, the entire process in detail about software is described. In the process of software design, the basic concepts of serial communication and both the PELCO-D and PELCO-P protocol are introduced. The main software programs and subroutine are finished. Finally, the reliability design about software is described.
Through the actual running of the system, it is proofed that the system runs stable. The PTZ rotating and the parameters of the camera lens and Preset function can be controlled. The goal of the expected is achieved.
KEY WORDS: pan/tilt/zoom, protocol, monitoring system, decoder
前言
云台控制器是视频监控系统中重要的前端控制设备,它接收中心控制设备发送的串行编码信号,通过软件解码后驱动不同的硬件电路,以控制云台、镜头、辅助照明灯光、雨刷等操作,能方便地跟踪被监控目标。中心控制设备可以是视频矩阵切换器、控制键盘、多媒体计算机、数字视频录像机(DVR)等,中心控制设备和云台控制器之间一般通过串行RS-485接口进行通信。随着单片机和大规模集成电路技术的发展,解码器也逐渐由独立设备向模块化发展,尤其是在智能球形摄像机中应用得更普遍。目前视频监控行业还没有建立统一的中心控制设备与前端控制设备之间的通信控制协议标准,各个厂商都使用各自的通信控制协议,这些协议互不兼容,常用的通信控制协议有PELCO-D,PELCO-P PANASONIC,PHILIPS,SAMSUNG,RM110,CCR-20G,AB,AD,DALLES,KALATEL, KRE-301, VICON , ORX-10, YAAN, HY , ALEC,KONY等。目前市场上的云台控制器大部分采用拨码开关的方式,由人工选择要选用的通信协议,本设计就是采用拨码开关选择多种协议像PELCO-P、PECLO-D、YAAN、明景等云台协议,而单片机内部根据所选协议而执行相应控制协议方案。本设计通过上位机控制云台控制器执行相应云台上、下、左、右。镜头的变焦、变倍、光圈动作等。通过测试验证了本设计的可行性。