CAN bus automotive instrument research

Automobile instrumentation is the window for information exchange between the car and the driver. It is the center of the car information. It can reflect various dynamic indicators such as driving speed, mileage, electric condition and braking in a concentrated, intuitive and rapid manner. , pressure, engine speed, coolant temperature, oil quantity, various hazard alarms. With the advancement of technology, the use performance of automobile emissions, energy saving, safety and comfort has been continuously improved, and the degree of electronic control of automobiles has become higher and higher. The automotive electronic control device must quickly and accurately process various information and display it through the instrument, so that the driver can understand and master the running state of the car in time to properly handle various situations.
Here is a car instrument design scheme based on CAN (Controller Area Network) bus. The meter uses the CAN bus to make it part of the body network and reads information such as engine speed and water temperature in accordance with the SAE J1939 protocol. The meter can also receive signals such as vehicle speed, oil quantity, oil pressure and brake pressure, and display the real-time vehicle conditions for the driver. The designed instrument is mainly used in heavy-duty trucks and other fields. The test results carried out in a heavy-duty vehicle factory show that the instrument can meet the requirements of data reliability and real-time.

1 CAN bus and SAE J1939 protocol
1.1 CAN bus and SAE J1939 protocol introduction
CAN bus belongs to the field bus field. It is an effective development of Bosch in Germany in the early 1980s to solve the data exchange between many control and test instruments in modern automobiles. A serial communication network that supports distributed control or real-time control. CAN bus communication has strong real-time performance, data transmission rate can be up to 1 Mb/s, communication medium can be twisted pair, coaxial cable or optical fiber, which can be easily connected through standard connectors. CAN bus data communication has outstanding reliability, real-time and flexibility, and is currently the most widely used car bus.
The SAE J1939 protocol is a vehicle network serial communication and control protocol issued by the Society of Automotive Engineers SAE (Societv of Automotive Engineer) with CAN2.0B as the core protocol of the network. J1939 was developed with reference to the 7-layer benchmark reference model defined by ISO's open data interconnect model. The agreement clearly stipulates the address configuration, naming, communication mode and message transmission priority of the internal ECU of the car, and gives detailed explanations of each specific ECU communication inside the car. It uses multiplexing technology to provide standardized high-speed network connections based on the CAN bus for various sensors, actuators and controllers on the car, enabling high-speed data sharing between in-vehicle electronic devices, effectively reducing The number of electronic harnesses increases the flexibility, reliability, maintainability, and standardization of the vehicle's electronic control system, giving the CAN superior performance.
1.2 SAE J1939 data frame format SAE J1939 data frame is based on PDU (Protocol Data Unit), with priority (P), reserved bit (R), data page (DP), PDU format (PF), PDU. It consists of seven fields: detail (Ps), source address (SA), and data field (Date Field). A PDU other than the data field corresponds to a 29-bit identifier of the CAN extended frame. Where PS is an 8-bit segment whose definition depends on the PF value. If the PF value is less than 240, PS is the target address (DA). If the PF value is between 240 and 255, PS is a group extension (GE).
Some CAN data frames are not defined in the PDU, including SOF, SRR, IDE, RTR, Control Domain Part, CRC Field, ACK Field, and EOF Domain. These fields are defined by CAN and are not modified by SAE J1939.

2 CAN bus car instrument design
2.1 Overall design of
the instrument The automotive instrumentation system consists of three modules: data acquisition, processing and display. The data acquisition module is responsible for receiving various data of the vehicle, and preprocessing the data and transmitting it to the microprocessor. The sensor signals such as the analog signal, the pulse signal and the switching signal are collected at each sensor, and then sent to the microprocessor after being divided, filtered, and optically isolated. The CAN bus data such as engine speed, water temperature and fault code is sent to the CAN bus through the engine CAN module, and then received through the CAN transceiver. After receiving the required data, the microprocessor processes the data according to a predetermined algorithm and outputs the processing result. The display module includes a pointer, an LCD, and a display of various signal lights. The microprocessor outputs the engine speed, the vehicle speed and the like to the motor driver, and the driver drives the stepping motor to rotate, thereby driving the pointer display; the microprocessor directly drives the LCD display and the LED light is turned off. The structure of the car instrument system is shown in Figure 1.

This article refers to the address: http://


According to the overall analysis of the automobile instrument, the automobile instrument panel is composed of three sub-dial plates. The left sub-dial shows the engine speed and oil quantity, the right sub-dial shows the data such as the vehicle speed and oil pressure, and the middle sub-dial is used to place the LCD display. And a variety of indicators. The meter hands are all driven by a stepper motor. Among the various data received by the meter, engine speed, water temperature and voltage are obtained from the CAN bus, and vehicle speed, oil quantity, air pressure and oil pressure are obtained from various sensors.
2.2 System hardware design The instrument uses Luminarv's LM3S2948 processor. This is a microprocessor based on ARMCortexM3 core. It adopts 32-bit RISC, embedded CAN controller, analog-to-digital converter (ADC), analog comparator and other functional modules, which reduces peripheral circuits and reduces system design cost. The built-in CAN module of the LM3S2948 processor facilitates the transmission of CAN bus data, and at the same time makes the communication of the instrument easy to implement and improves reliability. Its built-in CAN module has the following features: support CAN 2.0B protocol and support extended frame transmission of SAE J1939 protocol: bit rate can be up to l Mb / s; with 32 message objects, each object has its own Identifier mask; includes maskable interrupts, time-triggered CAN (1TrCAN) applications with optional auto-re-send mode; seamless connection to external CAN PHY via CANOTx and CANORx pins; programmable F1F0 mode.
The LM3S2948 microprocessor features fast operation, low power consumption, small size, and low price. Its CAN controller module features fully meet the application requirements of CAN bus automotive instrumentation. The processor has powerful processing capability and can reflect vehicle information in real time under various working conditions of the vehicle. At the same time, the processor has a large expandable space, which is beneficial to subsequent development.
Since the LM3S2948 has a built-in CAN controller module, it is only necessary to connect an external CAN transceiver to receive bus data. The meter uses the CTM8251T as the CAN transceiver. The CTM8251T is a versatile CAN transceiver with isolation that integrates all necessary CAN isolation and CAN transceivers. The device can be connected to any CAN protocol controller to achieve CAN node transmission and reception and isolation. The device is small in size and high in integration, which can replace the traditional CAN transceiver and its peripheral circuits, reducing the complexity of the circuit and reducing the design cost, as shown in Figure 2.


The meter uses a VID6606 driver to drive the stepper motor. Each VID6606 can drive 4 stepper motors simultaneously. Input pulse sequence F (SCX) at its frequency control end, the output end can be controlled to make the output shaft of the stepping motor rotate in microsteps. The output shaft of each microstep motor rotates by 1/12 (°), and the maximum angular velocity can reach 600. (°) / s. The motor driver has the following features: hardware micro-step drive, easy to use, the motor only needs speed F (sex) and direction (CW / CCW) 2 control terminals, all input pins have interference filters, wide working voltage, Low electromagnetic interference radiation. The instrument panel pointer is driven by a VID-29 motor. The motor has a gear train with a reduction ratio of 180/1, which can directly and accurately convert the digital signal into an analog display output. The motor has a high display accuracy with a step angle of at least 1/2 (°). Figure 3 shows the VID6606 driving instrumentation circuit.


The meter uses the LCD display time, fuel consumption and the fault name when the fault occurs. The signal sent by the processor is first amplified by the 74HC245 power and then sent to the LCD screen F2000LCD for display. The LCD circuit is shown in Figure 4.


2.3 System software design system software design is divided into four modules: main program, CAN communication, data acquisition processing and data display. The main program module handles data processing by calling each sub-module program: the CAN communication module is responsible for transmitting and receiving data; the data acquisition and processing module performs collection and calculation of various types of data; the data display module is for vehicle speed, oil pressure, signal light, etc. The information is displayed on the meter.


Figure 5 shows the main program flow of the system. The main program flow of the system is divided into: 1) system initialization. System initialization mainly includes initializing the system clock, CAN node, LCD screen, stepper motor, etc., enabling CAN interrupt, setting CAN mask code and acceptance code. The CAN node initialization is mainly to initialize the CAN controller and interrupt the CAN controller: 2) Read the sensor and CAN bus data, and drive the display of the pointer and LCD, while waiting for the CAN reception interrupt. 3) The CAN receive interrupt is generated, and the receive interrupt subroutine reads the data. It is judged whether the data meets the data receiving condition, and if it is met, the data is received. This process compares the received 29-bit identifier with the acceptance code and mask code bit by bit. Only when the corresponding bit of the identifier is the same as the corresponding bit of the acceptance code, the system begins to receive data. 4) The processor parses the received message, extracts the required data and processes it. The processor processes and calculates the data transmitted from the sensor and the data read by the CAN bus, obtains the corresponding pointer driving parameters, calculates the pointer rotation angle, and calculates the pointer rotation speed according to the parameters of the initialized stepping motor. The pointer rotation speed is proportional to the corresponding parameter change speed. At the same time, the mileage of the vehicle is calculated and added to the total distance. 5) The processor sends a set of pulse sequences including vehicle operating conditions to the stepper motor driver, and the driver drives the stepping motor to rotate in a microstep manner, indicating corresponding engine speed, vehicle speed, water temperature, and oil pressure; Data including information such as the total distance of the vehicle is sent to the LCD controller, and the controller controls the LCD to display the corresponding total distance, etc.: The processor changes the corresponding I/O pin status to directly turn on/off the corresponding indicator.
2.4 Fault Display The instrument can receive the fault code from the CAN bus and parse the fault code. After comparing with the pre-written fault code, find the corresponding fault information and display it on the LCD screen. Each type of data has a specific data frame ID, and the system determines the location of the fault based on the frame ID. If a single frame failure is received, the system extracts the total number of bytes and the total number of packets; if a multi-frame failure is received, the system continuously extracts the fault diagnosis message to a specific byte, and then searches according to the fault code. Fault type.

3 Conclusion Based on the study of CAN bus and SAE J1939 protocol, design CAN bus instrument. The design makes full use of the functions of the LM3S2948 and VID6606, which greatly reduces the design and cost of the peripheral circuits of the system. The results of several real vehicle tests show that compared with conventional instruments, the CAN bus meter has the following advantages: strong anti-interference ability, high transmission rate, can ensure effective, fast and stable data transmission; reduce body wiring, software solution software implementation It simplifies the design and reduces the cost; timely and intuitively checks the vehicle fault; the CAN bus forms a network system for the whole vehicle, which can enhance the flexibility of the system, conveniently increase the equipment, and expand the space that can be developed.

Solar power system is the conversion of energy from sunlight into electricity. Solar PV is rapidly becoming the most economical and efficient technology to harness renewable energy from the sun. FORZATEC will provide you with professional one-station service with our 12-year and 160MW EPC experience in developing Solar Power System.

Solar Power System

Solar Power System,Solar Battery,Solar Modules ,Crystalline Photovoltaic Panel

FORZATEC CO., LIMITED , http://www.forzatec.com

Posted on