1、 毕业设计毕业设计 基于基于 CAN 总线总线的的汽车电器网络汽车电器网络设计设计 摘 要 随着社会的发展,汽车逐渐成为人们生活中不可缺少的交通工具。电子装置 在汽车上的使用使汽车的驾驶更加舒适安全。 为了满足人们对于汽车性能越来越 高的要求,汽车上装备的电子装置、控制单元也在不断增加,传统的线束已远远 不能满足复杂的控制系统要求。汽车 CAN 总线技术的引入给汽车电子控制技术 带来了新的飞跃。CAN 总线技术不仅满足了车身控制的功能要求,而且可以降 低成本、简化车身冗余线束。 本文提出了一种基于 CAN 总线的汽车电器网络的设计方案。设计中采用了 ATmega128作为主控制器, CAN 模
2、块电路主要采用了CAN 总线控制器SJA1000、 总线驱动器 PCA82C250 以及高速光耦 6N137,通过 ATmega128 控制工作在 PeliCAN 模式下的 SJA1000 实现各 ECU 单元之间的通信。 文中完成了系统软件开发,并在 CAN2.0B 通信协议以及车用 CAN 协议 (SAEJ1939)的基础上制定了基于车身控制模块的应用层协议;同时,为保证 系统能够稳定、可靠地工作,文中针对系统工作中可能出现的干扰因素进行了分 析,并进行了软硬件的抗干扰设计。 通过联机调试,验证了整个系统通信的可靠性,该网络能够较好地达到车内 总线对于信号传输的实时性与稳定性的要求。 关键
3、词:CAN 总线; 控制网络;电子控制单元; 数据采集;数据传输 ABSTRACT With the development of society, automobiles play a very important role in peoples daily life, and the electronic devices equipped in the vehicle make the driving more comfortable and safe. With the electronic device in vehicle increasing continuously, the t
4、raditional wiring harnesses can not satisfy the complex functions of the control system. As the CAN bus introduced into vehicle control system, great progress has taken in the areas of vehicle electron. By adopting CAN bus, the function of vehicle body control system is satisfied perfectly, the cost
5、 is decreased, and the redundant wiring harnesses are cut down. A vehicle electrical network design based on CAN bus is brought forward in this paper to achieve the data transmission of the electric control units (ECU). In this design, the main controller uses ATmega128. The hardware circuit of CAN
6、bus communication module adopts CAN bus control chip SJA1000, bus driver PCA82C250 and high-speed optical coupler 6N137. ATmega128 completes the data transmission of ECU through controlling SJA1000 which works on the PeliCAN mode. Following,the software designs are discussed, and the CAN communication protocol of application layer which matches the vehicle body control system is constructed based on CAN2.0 protocol and SAEJ1939 protocol. Furthermore, some anti-interference measurements are pu