Current location - Training Enrollment Network - Books and materials - Principle of Intelligent Lighting Control System [Design of Electric Vehicle Instrument Control System Based on CAN Bus]
Principle of Intelligent Lighting Control System [Design of Electric Vehicle Instrument Control System Based on CAN Bus]
China Library Classification Number: TP273 Document Identification Number: A Abstract: An automobile instrument control system based on single chip microcomputer, digital temperature sensor DS 18B20, speed sensor and CAN bus is designed. In this system, a dedicated power chip provides a stable power supply for the whole system. Each target electrical node of the automobile CAN transmit the parameters to the single chip microcomputer through CAN bus for data analysis and processing, and display relevant information through LCD. At the same time, the system can also upload the related data of single chip microcomputer system to PC through RS232 for further data analysis or data storage. The system uses CAN bus to realize the transmission of display information, and shares the information processed by other modules in the car, which makes the wiring in the car simple, the transmission and display information reliable, the instrument volume small, the system expansibility strong, the real-time performance good, the precision high, and the display information comprehensive and intuitive.

Keywords: CAN bus; Instrument; single chip microcomputer

Introduction to 0

At present, automobile instruments are undergoing a transition period from the third generation to the fourth generation. The working principle of the fourth generation automobile instrument is basically the same as that of the electrical instrument, except that the original electrical device is replaced by an electronic device. Because modern automobile instruments have more and more kinds of contents and information to display, and the accuracy is getting higher and higher, it is difficult for traditional electrical instruments to meet higher requirements, so the electronization and digitization of automobile instruments will become an inevitable trend. At the same time, in order to meet the real-time requirements of each subsystem, it is necessary to share automobile public data, such as engine speed, wheel speed, accelerator pedal position and so on. However, due to the different data update rate and control cycle, the real-time requirements of each control unit are also different. This requires its data exchange network to be based on priority competition and have a high communication rate. CAN bus is designed to meet these requirements.

In this design, the original mechanical movement watches, electrical instruments and analog circuit electronic instruments are replaced by instruments and microprocessors and digital electronic devices based on CAN bus network, and the measurement of various parameters is digitized, which is beneficial to the data exchange with other automobile electronic centralized control systems, the development and implementation of automobile centralized control systems, and also makes the power consumption, safety, reliability and comfort of automobile instruments better improved. By adjusting the circuit parameters, it can also meet the needs of different types and ranges of products, greatly improving the universality, modularity, standardization and serialization of automobile instruments, and further simplifying the production process and manufacturing equipment.

1 overall scheme design

This design is a solution of on-board instrument control system, which is used to display and record various state information during vehicle driving. The control of the system is realized by using general single chip microcomputer and software; Real-time collection of various state parameters during vehicle driving, and dynamic data such as speed and temperature during vehicle driving are displayed by LCD. At the same time, data communication is carried out through CAN bus, and the compatibility of software and hardware is designed to ensure the reliability and stability of the system.

The instrument system requires intuitive and accurate display, convenient and reliable use, and shows the future development trend and broad development space of the on-board instrument system. Single-chip microcomputer is the core of the whole system, and some basic driving information (speed and temperature) closely related to automobile instruments is the information that single-chip microcomputer needs to process, and the whole CAN communication of the system is also controlled by single-chip microcomputer. System software is the most fundamental means to realize system functions, and the anti-interference ability of the system is the basic guarantee for the stable and reliable work of the system. Through some theoretical analysis and research on them, the overall design of the system scheme is finally made.

The system consists of single chip microcomputer module, temperature measurement module, speed measurement module, display module, power supply module, serial communication module and CAN communication module. The system composition is shown in figure 1.

Figure 1 system composition block diagram

1. 1 MCU module

As the core of the whole system, MCU module mainly realizes the functions of input data acquisition and conversion, LCD display drive, CAN communication control and so on. According to the requirements of the system and practical considerations, AT89C5 1 single chip microcomputer of ATMEL company is selected. AT89C5 1 is a low-voltage, high-performance CMOS 8-bit microprocessor with 4K bytes of flash memory. The erasable read-only memory of this single chip microcomputer can be repeatedly erased 1000 times. ATMEL high-density nonvolatile memory manufacturing technology is adopted, which is compatible with the industrial standard MCS-5 1 instruction set and output pins. AT89C5 1 of ATMEL Company is an efficient microcontroller, which integrates multifunctional 8-bit CPU and flash memory on one chip, providing a flexible and cheap solution for embedded control system.

1.2 serial communication module

The serial communication module of single chip microcomputer is mainly used to expand the functions of single chip microcomputer, making it more powerful and convenient to operate. Through the serial communication module, you can directly operate the whole system on the computer, such as monitoring the system and obtaining relevant information directly from the computer, such as vehicle speed and temperature. You can also read and write the microcontroller of the system directly on the computer. For example, you can directly write the program needed in this design to directly control the temperature adjustment related to temperature measurement. The main function of serial communication module is to expand the following functions, so that the single chip microcomputer has more functions.

The system adopts RS232 serial interface, through the serial port of single chip microcomputer, the data of single chip microcomputer system can be sent back to the computer for processing, and corresponding actions can also be received from the computer. When CPU sends data through serial port, byte data is converted into serial bits. When receiving data, serial bits are converted into byte data.

1.3 CAN communication module

According to the principle of CAN communication, the single chip microcomputer selected in this system has no CAN controller. Therefore, the traditional CAN communication module is adopted, that is, the 5 1 series single chip microcomputer is used as the central processor, SJA 1000 is used as the CAN controller, and PCA82C250 is used as the CAN driver, which is flexible and convenient to use. The communication protocol of CAN is mainly completed by CAN controller. CAN controller is mainly composed of the part that realizes CAN bus protocol and the circuit that realizes the interface with microprocessor.

The intelligent node of CAN bus system designed in this paper uses 89C52 as the microprocessor of the node. The communication interface of CAN bus adopts SJA 1000 and 82C250 chips of Philips. SJA 1000 is an independent CAN communication controller, and 82C250 is a high-performance CAN bus transceiver.

The design circuit of this module is mainly composed of microcontroller 89C52, independent CAN communication controller SJA 1000, CAN bus transceiver 82C250 and high-speed photoelectric coupler 6N 137. Microprocessor 89C52 is responsible for the initialization of SJA 1000, and realizes communication tasks such as sending and receiving data by controlling SJA 1000.

AD0~AD7 of SJA 1000 are connected to P0 of 89C5 1 and P2.0 of 89C5 1. SJA 1000, select CPU as the off-chip memory address of the CPU of P2.0, and the CPU can read and write SJA 1000 through these addresses. SJA 1000, and ALE are connected to the corresponding pins of 89C52 respectively, and 89C52 can also access SJA 1000 through interrupt.