体育馆吊杆升旗控制系统开发与研究

 2022-02-17 09:02

论文总字数:25389字

摘 要

国旗是一个国家的标志。当我们举办重大活动时,通常会在活动前夕,进行升旗仪式。随着越来越多的国际性比赛在世界各地举行,体育馆内的升旗控制系统是广大厂商关注点之一。在体育馆内进行颁奖仪式时,采用自动升旗控制系统显得尤其重要。

本文的工作任务主要是开发并研究体育馆吊杆升旗控制系统。能透过与上位机串口通信,设置升旗时间、旗杆高度、曲目选择等等,并实现升旗时间与国歌播放时间同步的功能。整个系统的设计是以单片机STM32为核心,上位机界面为输入部分,并与下位机实时通信,在界面上能显示当前国旗的高度、速度和剩余时间。

本论文首先简述课题的背景和意义,提出了升旗控制系统的功能需求和性能需求,设计出总体方案,包括硬件和软件部分。还描述上位机与下位机间的基本通信原理,为本系统的软件设计提供理论基础。

本系统主要由以下几部分所共同组成:单片机系统、上位机系统以及电机及其机械系统。其中单片机系统包括最小系统模块、电源模块、语音模块、通信模块和输出模块,需要分别对以上模块进行电路设计并整合为一块电路板。再者,需要设计并调试相关程序,包括基于硬件平台的和上位机人机界面的。实现互相通信的功能,在升旗的过程中,能够在国歌播放时间内,实现国旗从底部到顶部为匀速上升。

关键词:自动升旗控制系统、单片机STM32、串口通信、上位机人机界面、电机及其机械系统。

Development and Research Systems OF stadium boom control OF flag

Abstract

The national flag is the symbol of a country, so when people hold a variety of activities, they often hold a flag-raising ceremony. As more and more international competitions held around the world, flag control system about stadium is one of the focuses of the majority of manufacturers. When the awards ceremony in the stadium, the flag automatic control system is particularly important.

The main task of this paper is to develop and study the stadium boom flag control system. It can communicate with the host computer via serial port to set the flag-raising time, flagpole height, track selection, etc. And achieve synchronization function between flag-raising time and national anthem playing time. The design of the whole system is based on single ship microcomputer STM32 as the core, the PC interface for the input section and the lower position machine real-time communication with the interface can display the height of the current flag, speed, and time remaining.

The system consists of the following parts of the common components: single chip microcomputer system, PC systems, and electrical and mechanical systems. Single chip microcomputer system including minimum system module, power module, voice module, communication module and output module, respectively, need more modules for circuit design and integrated into a circuit board. Furthemore, I need to design and debug procedures including hardware-based platforms and PC HMI. Communicate with each other to achieve the function, in the process of the flag-raising, can be in the national anthem play time, to achieve the national flag from bottom to top as uniform rise.

This paper first outlined the background and significance of topics proposed functional requirements and performance requirements of the flag of the control system, the overall program design, including hardware and software components. It also describes the basic principles of communication between PC and the next crew between software-based systems designed to provide a theoretical basis.

KEYWORDS: Automatic Control System Of The Flag, the microcontroller STM32, serial communication, PC interface, electrical and mechanical systems.

目录

摘要 I

Abstract II

第1章 绪论 1

1.1 项目背景 1

1.1.1 课题的背景和意义 1

1.1.2 问题的提出 1

1.1.3 本课题的目标 1

1.1.4 运行环境 2

1.2 本文工作和结构 2

1.2.1 本文工作 2

1.2.2 本文结构 2

1.3 本章小结 3

第2章 步进电机性能与控制理论分析 4

2.1 步进电机的性能概述 4

2.1.1 步进电机的简介 4

2.1.2 步进电机的结构与工作原理 4

2.1.3 步进电机的特点 5

2.1.4 步进电机的使用特性 5

2.1.5 步进电机的控制方式 6

2.2 控制原理 6

2.2.1 步进电机驱动计算 6

2.2.2 脉冲的计算 6

2.2.3 国旗运动的控制 7

2.3 本章小结 7

第3章 系统的硬件设计 8

3.1 总体设计 8

3.1.1 模块结构和功能简要说明 8

3.1.2 国旗各状态说明 8

3.2 主要模块电路 9

3.2.1 STM32的选型 9

3.2.2 电源模块制作 9

3.2.3 步进电机及其驱动器 10

3.2.4 步进驱动器的设置 12

3.2.5 音乐播放模块的设计 13

3.2.6 通信模块的设计 15

3.2.7 系统的PCB板绘制 15

3.3 本章小结 16

第4章 软件设计方法分析 17

4.1 系统的软件总体设计 17

4.2 人机交互界面设计 18

4.3 控制器的主程序设计 19

4.4 串口驱动程序设计 20

4.5 控制电机模块的程序设计 21

4.5.1 脉冲的形成 21

4.5.2 速度和方向控制 21

4.5.3 定时中断 21

4.6 音乐播放模块的程序设计 22

4.6.1 通讯格式 22

4.6.2 常用指令 23

4.7 本章小结 23

第5章 上位机的软件设计 24

5.1 上位机软件总体设计 24

5.2 上位机的人机交互界面设计 24

5.3 串行通信端口的程序设计 25

5.3.1 串行通信控件 25

5.4 发送数据设计部分 26

5.5 接收数据设计部分 27

5.6 本章小结 27

第6章 调试 28

6.1 硬件调试 28

6.2 软件调试 28

6.2.1 硬件平台的軟件 28

6.2.2 上位机的软件 30

6.3 软硬联调 30

6.4 本章小结 33

第7章 总结与展望 34

7.1 工作总结 34

7.2 展望 34

参考文献 35

致谢 36

绪论

项目背景

课题的背景和意义

现今的体育场馆内大多使用集成控制系统,运用先进的计算机技术、网络技术、信息技术以及通信技术等等,能够实时掌握所有各系统的各种情况,易于处理突发事件。其中升旗控制系统也是集成控制系统之一,主要应用于在颁奖仪式期间,通过升旗仪式以表示对国旗的热爱和尊重。在举行升旗仪式时,所有人都应站立起来,目光注视着国旗。能够在体育馆中升旗是一件国家光荣的事情,因此升旗控制系统就变得尤其重要。

目前,大部分的场合还停留在人工升旗阶段。因此,如果旗手对此并不纯熟掌握,这会使得在升旗过程中,容易出现国歌与国旗不同步或升旗速度不一致等现象。当我们采用自动升旗控制系统,不仅使国旗与国歌同步,还能减少人力的浪费。

问题的提出

升旗的规定

中华人民共和国国旗是中华人民共和国的象征和标志。每一个公民都应尊重国旗和爱护国旗。《中华人民共和国国旗法》规定升挂国旗的场所、机构和要求。在举办重大的事情如体育活动时,应当升挂国旗。在一些节日期间,公民也可举行升旗仪式来庆祝节日[1][2]

升旗的环境

为了使国旗能在空中飘扬,大多会选择放在较高的建筑物上。因此,每当升旗的时候,都会把时间花在前期准备工作上,并且当遇到刮风下雨等气候情况时,容易造成不必要的意外[2]

传统升旗方式

传统升旗的方式大多是由人手拉动绳索,带动滑轮使国旗缓缓升起到达旗杆项部。即使是熟练的旗手,也不能保证在每次升旗时,都能使国旗与国歌同步,并且匀速上升。

本课题的目标

本设计是为了实现国旗上升与国歌播放的同步。因此必需考虑三方面的问题:旗杆的长度、歌曲播放的时间以及电机的转速,它们之间是相互约束的。另外,还需要实现音乐播放功能、电机正反转功能和与上位机通信功能,最终透过上位机来控制升降。

运行环境

硬件平台 Keil uVision4

剩余内容已隐藏,请支付后下载全文,论文总字数:25389字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;