题目类型:□
编号:
毕业设计说明书
课 题:基于CAN总线的汽车车窗控制器设计 学 院: 信息与通信学院 专 业: 电子信息工程 学生姓名: 温家欢 学 号: 1261160205
姓
名: 黎洪松
职 称: 教授
理论研究 □实验研究 □工程设计 □
√工程技术研究 □软件开发 2016 年 6 月 10 日
桂林电子科技大学毕业设计(论文)报告用纸
第 1 页 共 2 页
摘 要
随着电子技术的发展,汽车电子技术领域的应用也越来越多。汽车技术的发展越来越多的体现在汽车电子领域,现代的汽车电子技术已经走向了整车集成电子化、智能化、模块化的广阔道路。汽车总线技术的发展,是车载电子领域的一个主要体现。目前有多种常用的汽车总线技术。本次课题对其中用的比较多的CAN总线技术进行研究。CAN是一种多主方式的串行通讯总线,基本设计规范要求有高的位速率和电磁干扰的高阻力,并产生出可以检测到任何错误。目前,在国外一些国家的CAN总线控制技术已经被广泛应用于汽车行业。 CAN其独特的优势,已经取代了传统的路由控制。本课题主要遵循CAN2.0B协议的汽车车窗CAN网络通信控制系统,其中着重讨论了以微控制器STM32、CAN通信收发器TJA1050等为核心器件来设计并制作PCB实验板,以电机的正反转来模拟汽车车窗的升降,完成硬件设计。同时以Keil公司设计、研发的uVision4 IDE为开发工具,采用C语言编写控制程序的软件设计,对程序进行调试、编译后,利用专用的单片机烧写软件,将程序写入PCB实验板中,完成本实验的网络控制模拟研究。本次课题将设计主控节点与四个从节点,通过主节点通过CAN总线各个节点对其进行控制。
关键词:汽车电子;CAN总线;车窗控制
桂林电子科技大学毕业设计(论文)报告用纸
第 2 页 共 2 页
Abstract
With the development of electronic technology, automotive electronic technology application areas is also increasing. Development of automobile technology more and more reflected in the field of automotive electronics, Hyundai's automotive electronics technology has been integrated to the vehicle electronics, intelligent, modular broad road. Development of automotive bus technology, is a mainly automotive electronics field. There are a variety of commonly used automotive bus technology. The issue of where the relatively large number of CAN bus technology used in the study. CAN is a multi-master mode serial communication bus, the basic design specification requires a high bit rate and high resistance to electromagnetic interference, and produce can detect any errors. At present, some foreign countries CAN bus control technology has been widely used in the automotive industry. CAN its unique advantages, has replaced the traditional routing control. This topic mainly follow CAN2.0B car windows CAN protocol network traffic control system, which focuses on the micro controller STM32, CAN communication transceiver TJA1050 like experimental design and production of PCB board as the core device in order to reverse the motor turn to simulate the car window lift, complete the hardware design. While Keil designed, developed uVision4 IDE development tools, using C language control program software design, debug the program, compiled, using a dedicated microcontroller programming software, the program is written PCB breadboard, complete simulation of the experiment network control. This topic will be designed from the master node and four node, through the master node through the CAN bus to control each node.
Key words:Automotive electronics; CAN bus; Window control
桂林电子科技大学毕业设计(论文)报告用纸
第 1 页 共 2 页
目 录
引言 ........................................................... 1
1 绪论 ................................................................... 1 1.1 课题研究背景 .......................................................... 1 1.2 国内外研究现状及发展 .................................................. 2 1.2.1汽车电子的发展现状 .................................................. 2 1.2.2汽车电子发展的趋势 .................................................. 2 1.3 车窗控制发展的趋势 .................................................... 3 1.4 本课题研究的内容 ...................................................... 3 1.4.1 研究重点 ............................................................ 3 1.4.2 研究难点 ............................................................ 3 2 系统设计: ............................................................. 4 2.1 CAN总线技术 .......................................................... 4 2.1.1CAN协议 ............................................................. 4 2.1.2电气参数及信号表示 .................................................. 5 2.2 系统方案选择 .......................................................... 5 2.2.1CAN控制收发模块方案 ................................................. 5 2.2.2直流电源电路方案选择 ................................................ 6 2.2.3电机驱动模块的选择 .................................................. 6 2.2.4键盘操作电路选择 .................................................... 6 2.3 系统总体实施方案 ...................................................... 7 3 系统硬件设计 ........................................................... 7 3.1 元器件介绍 ............................................................ 7 3.1.1 STM32F103单片机 .................................................... 7 3.1.2 CAN收发芯片TJA1050 ................................................. 8 3.1.3 L298N电机驱动芯片 .................................................. 8 3.2 电路设计: ............................................................ 9 3.2.1 STM32最小系统电路设计 .............................................. 9 3.2.2 直流稳压电源电路设计 ............................................... 10 3.2.3 CAN收发器TJA1050电路 ............................................. 11 3.2.4 电机驱动部分L298N电路 ............................................. 11 3.2.5 键盘输入电路 ....................................................... 12 3.2.6 LED显示电路 ....................................................... 13 4 系统软件设计: ........................................................ 14 4.1系统设计主流程图 ..................................................... 14 4.2 CAN模块程序软件设计 ................................................. 15 4.3 LED指示软件设计 ..................................................... 16 5 系统调试过程 .......................................................... 17 5.1 硬件调试 ............................................................. 17 5.1.1CAN节点调试 ........................................................ 17 5.1.2 电机控制模块调试 ................................................... 18 5.2 软件调试 ............................................................. 18
桂林电子科技大学毕业设计(论文)报告用纸
第 2 页 共 2 页
5.2.1 CAN节点通信调试 ................................................... 18 5.3 调试结果分析 ......................................................... 19 6 总结 .................................................................. 19 谢 辞 ................................................................... 21 附 录 ................................................................... 23 附录一 系统硬件实物图 .................................................... 23 附录二 系统各模块电路图及PCB ............................................ 23 附录三 系统部分程序 ...................................................... 26