Design and Implementation of Passenger Car Light Shift System Based on CAN Bus

1 Introduction

This article refers to the address: http://

With the rapid development of the social economy and the heavy traffic in urban areas, traffic safety issues have received more and more attention. During the running of the vehicle, the driver must adjust the driving direction and driving speed of the vehicle in time according to the changes of the road and traffic conditions, so that the vehicle obtains good driving performance and fuel economy performance. Frequent shifts make the driver prone to fatigue and distraction, resulting in increased traffic accidents. This paper introduces the design of a passenger car light shifting system based on CAN bus, and realizes the passenger car shifting by using mechatronics technology. The system is mainly developed in combination with the shifting system of the passenger car, including two nodes before and after. The front node is the handle control command node, and the rear node is the execution control node. The overall frame of the system is shown in Figure 1.

2 system application design

2.1 System hardware structure and control principle

In order to achieve the responsive and reliable design requirements of the system, the control units of the front and rear nodes adopt the P87C591 single-chip microcomputer produced by Philips. He successfully included the PelICAN function of the Philips semiconductor SJAl000 CAN controller, which meets the system design requirements. The circuit diagram of the CAN communication part of the main control system is shown in Figure 2 [1]:

The acquisition of the gear position, vehicle speed and engine speed signal in the system is completed by the Hall element A3144EU. After the signal is amplified, it is isolated by the photocoupler TLP521 and sent to the CPU. After the logic operation of the CPU, the output signal is isolated by the optocoupler and sent to the high-power FET. The FET is used to drive the solenoid valve to control the cylinder action to complete the transformation of the corresponding gear.

The main control process of the system is as follows: the front node collects the signal according to the position of the handle and the opening and closing of the clutch switch, and processes the signal into a gear position command through the logic bus, and transmits it to the rear node through the CAN bus, and the rear node receives the gear position. After the command, the shift timing is judged by combining the vehicle speed, the engine speed and the current gear position, and then an action command is issued to the actuator. The actuator starts the corresponding solenoid valve according to the instruction requirements, thereby controlling the corresponding cylinder action to realize the shift of the gear position. After the gear shift is completed, the feedback signal is processed to determine the completion of the shifting operation before proceeding to the next step. The model has 5 upper gears and one reverse gear position. It adopts electric control air operation mode. The specific gear position and solenoid valve position are shown in Figure 3.

As shown in Fig. 3, when the valve 1 is vented and the valve 2 is deflated, the piston is pushed to the right end of the cylinder, and the fork is pushed to the predetermined position by the piston rod, and this position is defined as the KA layer; when the valve 1 is shut off, the valve 2 is ventilated. When defined as the KC layer; when both valves are shut off, due to the return spring in the gearbox, it will automatically locate the middle layer, defined as the KB layer. After the horizon is selected, the upper and lower gears in different directions are realized by the action of the two upper air valves at the corresponding positions, thereby completing the predetermined selection and shifting actions.

2.2 System software design

The practical application requires high real-time and reliability of the system. In the software design, the multi-task real-time operating system μC/OS-II programming method is adopted, that is, the application is decomposed into several independent processes, and another monitoring is created. Process, monitor the operation of each process, thus ensuring the real-time and reliability of the system operation [2].

The system uses Keil C51 compiler, combined with the technical characteristics of the single-chip microcomputer P89C591, the work of transplanting a μC/OS-II operating system supporting P89C591 includes:

(1) Set a constant value in OS_CPU.H with #define to control the growth direction of the task stack.

(2) Declare 10 data types in OS_CPU.H.

(3) Define three macros with #define in OS_CPU.H.

(4) Write 6 simple C language functions in OS_CPU.C, namely initialization task stack, task creation hook function, task delete hook function, task switch hook function, statistical task hook function and timing hook function. .

(5) Write 4 assembly language functions in OS_CPU_A.ASM.

A total of four tasks need to be created in the system. The system task assignment is shown in Figure 4.

The CAN bus scan task periodically scans the registers of the CAN bus for receiving the handle position signal sent by the front node.

The display task is mainly used for display, refresh, etc., and is used to observe the completion of the action during the debugging process.

The main task of the system is used to perform functions such as logic analysis and over-limit alarm of data. The data acquisition task will scan each data acquisition port in real time for collecting parameters such as vehicle speed and engine speed.

The main function is responsible for the initialization of the system and the creation, startup, etc. of the task.

Each task can communicate with each other through semaphores, message queues, etc., to ensure real-time and synchronization of task execution.

3 system communication mechanism design

The requirements of the portable shifting system for the communication system are: reliable data transmission, high real-time performance, high transmission rate and low bit error rate [3]. As a serial communication network that effectively supports distributed control or real-time control, CAN bus has strong flexibility, simple expansion possibility, excellent communication real-time performance, communication reliability and error detection capability. A variety of demanding electronic environments have become the preferred form of network communication bus for automobiles.

The model structure of the CAN bus has only three layers: the physical layer, the data link layer and the application layer. The transmission medium is twisted pair, and the communication rate is up to 1 Mb/s (40 m). The communication method is flexible, and no station address is required. Node information, using non-destructive bus arbitration technology, meets real-time requirements.

On the basis of studying the CAN 2.0B specification, the communication between the two nodes before and after the system is realized by the scheme of the custom communication protocol. The former node issues a command, and the subsequent node does not send an acknowledgment signal after receiving it. The former node determines whether the information is correct after receiving the information of the node. If it is incorrect or cannot be received within the specified time, the command is resent and the retransmission exceeds the specified The number of times is a communication failure; the latter node sends a message, the previous node does not send confirmation information after receiving, and the previous node fails to receive the communication within the specified time. The basic structure of the node data frame is defined as follows:

Each node data frame in the system is distinguished by an ID, and each node can define multiple different data frames to transmit different information.

System anti-jamming design

The system will take measures from both hardware and software to comprehensively prevent the impact of interference on the operation of the microcontroller system.

The hardware aspect is mainly to cut off the interference from the transmission channel and the power line. In the design, the application of the filter capacitor, the optocoupler, and the reasonable component layout and wiring can effectively suppress the interference of the distributed capacitance, the electromagnetic mutual inductance, the leakage of the magnetic flux, and the like. At the same time, the scientific grounding of the PCB board is a good solution to the signal integrity problem and improves the electromagnetic compatibility (EMC) of the PCB.

In terms of software, the program redundancy, software traps and watchdog technology ensure the normal operation of the program, effectively solving the problem of running and dead loops during the running of the program.

5 Conclusion

The passenger car light shifting system changes the manual shifting to the electronically controlled light shifting, which enables the vehicle to achieve better shifting comfort and economy, and fully realizes the passenger car shifting, which not only retains the high efficiency of the mechanical transmission, The advantages of low cost and simple structure make full use of the characteristics of fast electronic control response and high controllability, which is in line with the development direction of electronic, intelligent and humanized automotive technology.

The innovation of this paper is to abandon the single-task mode of the previous single-chip system software programming, and adopt the embedded real-time multi-task operating system μC/OS-II programming method to make the real-time performance of the system more improved. It has been proved by practice that the system runs reliably, communication is normal, and high performance indicators are achieved. The system only needs a small amount of adjustment, which can be applied to all types of passenger cars, and has broad development and application prospects.

11 Inch Laptop

Do you still operate 11 Inch Laptop Deals? If yes, here is the right place you should put more time and energy. You can see here 11 Inch Laptop in traditional standard or touch screen or 360 rotating. 11 Inch Windows Laptop in metal with 360 yoga, 11 Inch Touch Screen Laptop on 2 in 1 style, 11 Inch Laptop With 8gb Ram 128gb in plastic, etc. Believe you can find right one here for you. Of course, if have other special requirement prefer, just call us and share your demand details, thus we can send right and value information for you quickly. Sometimes, you may hesitate which storage is most suitable for your jobs? 256GB or 512GB SSD ROM provides huge storage space for big files, so that you can hold large documents and work your way through it freely. No worry lack of storage any more. N5100 CPU can enhance the overall performance for office, children students, daily entertainment, etc.

Any other style prefer, just contact us and share your demand, then we can know how to do more for you.

11 Inch Laptop,11 Inch Windows Laptop,11 Inch Touch Screen Laptop,11 Inch Laptop Deals,11 Inch Laptop With 8gb Ram

Henan Shuyi Electronics Co., Ltd. , https://www.shuyioemelectronics.com