登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 毕业论文 > 机械机电类 > 测控技术与仪器 > 正文

多通道操控手柄设计毕业论文

 2021-04-03 07:04  

摘 要

目前市场上提供的高精度的手柄售价往往较高,普通消费者难以承受。因而本文据此设计了一个低成本多通道的操控手柄,该手柄在保证开发成本的前提下采用了十六位高精度的ADC对手柄摇杆的数据进行采集,并且为了最大限度地提升手柄的性能还采用了专用的滤波算法对手柄数据进行了优化处理。

在硬件方面本文主要完成了摇杆的选型、手柄控制器的电路设计以及PCB的绘制和焊接工作。在软件方面主要完成了上位机测试软件的开发以及下位机驱动程序的编写工作。上位机采用C#语言在VS平台进行开发,为手柄功能测试软件,主要用于测试所开发手柄的功能。下位机采用C语言在KEIL5平台上进行编写,主要完成了UC/OS-II嵌入式系统的移植、AD转换程序、USB HID设备端程序、按键扫描程序以及数据滤波算法程序的编写工作。

最后进行了系统的测试工作,对操控手柄的各项功能进行了逐一验证,基本实现了既定功能。同时还对调试过程中所发现的问题进行了分析和总结,并针对相关问题提出了相应的解决方案。

关键词:手柄控制器; STM32F103; UC/OS-II; USB HID; C#

Abstract

Currently, high precision handles on the market are usually so expensive that customers can’t afford to buy them. On this occasion, this paper intends to design a multi-channel handle with low-cost. On the premise of ensuring the development cost, this newly designed handle not only uses 16-bit high-precision ADC to collect the data of the rocker, but also is optimized by utilizing special filter algorithm. Therefore, the performance of the handle is greatly improved.

On the hardware side, this paper aims to select the proper model of rocker and design the main circuit scheme of handle controller. Meanwhile, some drawing and welding works which relate to PCB will be accomplished in this paper. In software programming, the author develops PC software for test and completes the driver programming of lower position machine. PC software is developed in VS platform by using C# language to test the function of the developed handle. Moreover, the lower position machine is developed in KEIL5 platform by using C language. Five tasks should be finished in the lower position machine, such as the transplantation of UC/OS-II embedded system, the AD conversion program, USB HID device, Keystroke-scan procedure and the designing of data filter algorithm.

Finally, the author systematically carries on the debugging and verifies the various functions of control handle. The verification results show that the handle can basically achieve the established function. In the meantime, the author also analyzes and summarizes the problems during the debugging, and accordingly provides some solutions.

Key words: Handle controller; STM32F103; UC/OS-II; USB HID ;C#

目 录

第1章 绪论 1

1.1 论文研究背景及意义 1

1.2 国内外发展现状 1

1.3 相关政策法规支持 2

1.4 本文主要完成工作 2

1.5 本文主要研究内容 3

第2章 系统总体设计方案 4

2.1设计需求分析 4

2.2相关技术指标 4

2.3硬件系统方案设计 4

2.4软件系统方案设计 5

2.4.1下位机软件方案设计 5

2.4.2 上位机功能测试软件方案设计 6

第3章 硬件系统电路设计 7

3.1手柄摇杆选型 7

3.2单片机主控电路设计 8

3.3 电源电路设计 9

3.4 调试电路设计 10

3.5 USB通信电路设计 11

3.6 模数转换电路设计 11

3.7 按键电路设计 13

3.8 PCB的设计 13

3.9 经济成本分析 14

第4章 下位机软件系统设计 16

4.1 UC/OS-II操作系统的移植 16

4.2 主程序的设计 17

4.2.1系统初始化程序设计 17

4.2.2任务的设计 18

4.3 USB HID类设备端程序的设计 21

4.3.1 USB通信机制 21

4.3.2 USB枚举过程 22

4.3.3 USB描述符的构造 22

4.3.4 USB数据的发送 24

4.4 ADS1115模数转换程序的设计 24

4.5 软件滤波算法的设计 26

4.6 按键扫描程序的设计 27

第5章 操控手柄功能测试软件设计 29

5.1 手柄功能测试软件窗体界面的设计 29

5.2 手柄窗体程序的设计 30

5.2.1 Windows API和USB HID类的构造 30

5.2.2 窗体主程序的设计 31

第6章 系统调试与分析 32

6.1 USB HID类设备的识别测试 32

6.1.1 测试工具及步骤 32

6.1.2 测试过程 32

6.2 USB通信功能测试 33

6.2.1 测试内容 33

6.2.2 测试工具及步骤 33

6.2.3 测试过程 34

6.3 测试结果分析 36

第7章 总结与展望 38

7.1 总结 38

7.2展望 38

参考文献 40

附录A 操控手柄下位机程序 42

附A1 手柄主程序 42

附A2 ADS1115程序 49

附A3 USB HID设备端配置程序 52

附A4 USB HID设备端描述符程序 56

附A5 按键扫描程序 61

附录B 操控手柄上位机程序 64

附B1 Windows API.cs程序 64

附B2 USB HID.cs程序 69

附B3 Form1.cs程序 80

附录C 电路图 88

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

企业微信

Copyright © 2010-2022 毕业论文网 站点地图