Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How can we know j 1939 and how can we relate it to j 1939?
How can we know j 1939 and how can we relate it to j 1939?
Automobile instrument is the window of information exchange between automobile and driver, and the center of automobile information, which can reflect various dynamic indexes of automobile during driving, such as driving speed, mileage, electrical system condition, braking, pressure, engine speed, coolant temperature, oil quantity and various danger alarms.

A design scheme of automobile instrument based on CAN (Controller Area Network) bus is proposed. The instrument uses CAN bus to make it a part of the body network, and reads the engine speed, water temperature and other information according to SAE J 1939 protocol. The instrument can also receive and display signals from sensors, such as vehicle speed, fuel quantity, oil pressure and brake air pressure, so as to provide real-time vehicle working conditions for drivers. The designed instrument is mainly used in heavy transport vehicles and other fields. The test results in a heavy vehicle factory show that the instrument can meet the requirements of data reliability and real-time.

1 CAN bus and SAE J 1939 protocol.

Brief introduction of 1. 1 CAN bus and SAE J 1939 protocol

FAN 100CAN bus belongs to field bus, which is a serial communication network that effectively supports distributed control or real-time control. It was developed by Bosch Company of Germany in the early 1980s to solve the data exchange among many control and test instruments in modern automobiles. The communication of CAN bus is real-time, the data transmission rate can be as high as 1 MB/s, and the communication medium can be twisted pair, coaxial cable or optical fiber, which can be easily connected through standard connectors. The data communication of CAN bus has outstanding reliability, real-time performance and flexibility, and it is the most widely used automobile bus at present.

FAN 100SAE J 1939 protocol is a serial communication and control protocol for vehicle network with CAN2.0B as the core protocol, which is issued by SAE (Society of Automotive Engineers). J 1939 is formulated with reference to the 7-layer benchmark reference model defined by ISO's open data interconnection model. The agreement clearly stipulates the address configuration, naming, communication mode and message sending priority of ECU inside the automobile, and describes every specific ECU communication inside the automobile in detail. It uses multiplexing technology to provide standardized high-speed network connection based on CAN bus for various sensors, actuators and controllers in automobiles, which realizes high-speed data sharing among on-board electronic devices, effectively reduces the number of electronic harnesses, improves the flexibility, reliability, maintainability and standardization of automobile electronic control system, and gives full play to the excellent performance of CAN.

1.2 SAE J 1939 data frame format

The FAN 100SAE J 1939 data frame is based on PDU (protocol data unit), and * * consists of priority (p), reserved bit (r), data page (DP), PDU format (PF), PDU details (Ps), source address (SA) and date fields. The PDU other than the data field corresponds to the 29-bit identifier of the CAN extension frame. Where PS is 1 8-bit segment, and its definition depends on 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 the group extension (GE).

FAN 100 Some CAN data frames are not defined in PDU, including SOF, SRR, IDE, RTR, control field, CRC field, ACK field and EOF field. These fields are defined by CAN, and SAE J 1939 will not be modified.

Design of Automobile Instrument Based on 2 CAN Bus

2. 1 overall design of the instrument

FAN 100 automobile instrument system consists of three modules: data acquisition, processing and display. Among them, the data acquisition module is responsible for receiving all kinds of vehicle data and sending them to the microprocessor after preprocessing. Among them, analog signals, pulse signals, switching signals and other sensor signals are collected at each sensor and sent to the microprocessor after voltage division, filtering, shaping and photoelectric isolation respectively. CAN bus data such as engine speed, water temperature and fault code are sent to the CAN bus through the engine CAN module, and then received by the CAN transceiver. After the microprocessor receives the required data, it processes the data according to a predetermined algorithm and outputs the processing result. The display module includes pointer, LCD and display of various signal lights. The microprocessor outputs the engine speed, vehicle speed and other results to the motor driver, and the driver drives the stepping motor to rotate, thus driving the pointer display; Microprocessor directly drives the switch of LCD and LED lamp. The structure of automobile instrument system is shown in figure 1.

FAN 100 According to the overall analysis of the automobile instrument, the automobile instrument panel consists of three sub-dials, the left sub-dial displays data such as engine speed and oil quantity, the right sub-dial displays data such as vehicle speed and oil pressure, and the sub-dial is used for placing LCD and various indicator lights. The instrument hands are all driven by stepping motors. Among all kinds of data received by the instrument, engine speed, water temperature and voltage are obtained from CAN bus, while vehicle speed, fuel quantity, air pressure and oil pressure are obtained from various sensors. 2.2 system hardware design

The FAN 100 instrument adopts the LM3S2948 processor of Luminarv company. This is a microprocessor based on ARMCortexM3 core, which adopts 32-bit RISC and embeds functional modules such as CAN controller, analog-to-digital converter (ADC) and analog comparator to reduce peripheral circuits and system design cost. The built-in CAN module of LM3S2948 processor facilitates the transmission of CAN bus data, and at the same time makes the communication between instruments easy to realize and improves the reliability. Its built-in CAN module has the following characteristics: it supports the message transmission of CAN 2.0B protocol and extended frames conforming to SAE J 1939 protocol; The bit rate can be as high as1MB/s; There are 32 message objects, each with its own identifier mask; Including shielding interrupt, for time-triggered CAN( 1TrCAN) application, automatic retransmission mode can be selected; Seamless connection with external CAN PHY through CANOTx and CANORx pins; It has a programmable F 1F0 mode. ?

FAN 100LM3S2948 microprocessor has the characteristics of fast operation speed, low power consumption, small size and low price. Its CAN controller module characteristics fully meet the application requirements of CAN bus automobile instruments. The processor has powerful processing ability, which can reflect the vehicle information in various working conditions in real time. At the same time, the processor has a lot of expandable space, which is beneficial to the subsequent development.

FAN 100 Because LM3S2948 has built-in CAN controller module, it only needs an external CAN transceiver to receive bus data. The instrument selects CTM825 1T as CAN transceiver. CTM825 1T is a general CAN transceiver with isolation, which integrates all necessary CAN isolation and CAN transceiver. The device CAN be connected with any CAN protocol controller to realize the receiving, sending and isolating functions of CAN nodes. The device has small design volume and high integration, and CAN replace the traditional CAN transceiver and its peripheral circuits, thus reducing the complexity and design cost of the circuit, as shown in Figure 2.

FAN 100 instrument uses VID6606 driver to drive stepping motor. Each VID6606 can drive four stepping motors at the same time. Input the pulse sequence F(SCX) at its frequency control end, which can control the output end to make the output shaft of stepping motor rotate slightly. The output shaft of each micro-stepping motor rotates112 (), and the maximum angular velocity can reach 600 ()/s. The motor driver has the following characteristics: hardware micro-stepping drive, simple and easy to use, the motor only needs two control terminals, namely speed f and direction CW/CCW, all input pins are provided with interference filters, the working voltage is wide, and electromagnetic interference radiates. The instrument panel pointer is driven by VID-29 motor, and the motor has a gear train with the reduction ratio of 180/ 1, which can directly and accurately convert digital signals into analog display outputs. The display accuracy of the motor is high, and its minimum step angle can reach 1/2 (). Fig. 3 shows the driving instrument circuit of VID6606.

When FAN 100 fails, the instrument uses LCD to display time, fuel consumption and failure name. The signal sent by the processor is amplified by 74HC245 power, and then sent to the LCD screen F2000LCD for display. The LCD circuit is shown in fig. 4.

2.3 System software design

The software design of FAN 100 system is divided into four modules: main program, CAN communication, data acquisition and processing and data display. The main program module handles data processing by calling each sub-module program: CAN communication module is responsible for sending and receiving data; The data acquisition and processing module completes the collection and calculation of all kinds of data; The data display module displays information such as vehicle speed, oil pressure and signal lights on the instrument.

FAN 100 Figure 5 is the main program flow of the system, which is divided into: 1) system initialization. System initialization mainly includes initializing system clock, CAN node, LCD screen, stepping motor, etc. , enable CAN interrupt, set CAN mask and accept code. The initialization of CAN node is mainly to initialize and interrupt the CAN controller: 2) read the data of sensor and CAN bus, drive pointer and LCD display, and wait for CAN to receive the interrupt. 3)CAN receives the interrupt and enters the interrupt receiving subroutine to read the data. It is judged whether the data meets the data receiving conditions, and if so, the data is received. This process compares the received 29-bit identifier with the acceptance code and mask bit by bit. Only when the corresponding bit of the identifier is the same as the corresponding bit of the acceptance code can the system start receiving data. 4) The processor parses the received message, extracts the required data and processes it. The processor processes and calculates the data transmitted by the sensor and the data read by CAN bus, obtains the corresponding pointer driving parameters, calculates the pointer rotation angle, and calculates the pointer rotation speed according to the initialized stepper motor parameters. The rotation speed of the pointer is proportional to the change speed of the corresponding parameters. At the same time, the vehicle mileage is calculated and accumulated to the total distance. 5) The processor sends a group of pulse sequences including vehicle working conditions to the stepper motor driver, and the driver drives the stepper motor to rotate in micro steps, indicating the corresponding engine speed, vehicle speed, water temperature, oil pressure, etc. The processor sends the data including the total distance of the vehicle to the LCD controller, and the controller controls the LCD to display the corresponding total distance. The processor changes the state of the corresponding I/O pin to directly turn on/off the corresponding indicator light.

2.4 Fault display

FAN 100 This instrument CAN receive fault codes from CAN bus and analyze them. Compared with the pre-written fault code, the corresponding fault information can be found and displayed on the LCD screen. Each type of data has a specific data frame ID, and the system judges the location of the fault according to the frame ID. If a single frame fault is received, the system will extract the total number of bytes and the total number of packages; If a multi-frame fault is received, the system will continuously extract the fault diagnosis information to a specific byte, and then find the fault type according to the fault code.

3 Conclusion

Based on the research of CAN bus and SAE J 1939 protocol, the CAN bus automobile instrument is designed. This design makes full use of the functions of LM3S2948 and VID6606, which greatly reduces the design and cost of the peripheral circuit of the system. The results of many real vehicle tests show that compared with conventional instruments, CAN bus instrument has the following advantages: strong anti-interference ability, high transmission rate, effective, fast and stable data transmission; The wiring of car body is reduced, and the hardware scheme is realized by software, which simplifies the design and reduces the cost; Check vehicle faults in time and intuitively; CAN bus can make the whole vehicle become a network system, which can improve the flexibility of the system, facilitate the increase of equipment and expand the development space.