Design of General Fault Diagnosis Instrument for Automobile OBD Based on R8C

Design of General Fault Diagnosis Instrument for Automobile OBD Based on R8C

0 Introduction The on-board diagnostic system (On-Board DiagnosTIcs, OBD) has the function of identifying areas where there may be a fault, and stores this information in the memory of the ECU (Electronic Control Unit) in the form of a fault code, through the OBD fault diagnostic instrument The fault code and related information stored in the ECU in the car can be read out to facilitate vehicle management and maintenance. The OBD system was originally proposed to control the increasingly serious car pollution problems, which originated from the emission regulations formulated by CARB in 1982, and then implemented the new OBD II requirements in 1996. In 2001, the European Community also required that cars produced by car manufacturers in various European countries should be equipped with European On-board Diagnosis System (EOBD). In China, in April 2005, the State Environmental Protection Administration and the State Administration of Quality Supervision, Inspection and Quarantine jointly issued GB18352.3-2005 ((Light Vehicle Pollutant Emission Limits and Measurement Methods (China Phase III and IV)), referred to as "National â…¢, â…£ ". According to the requirements of National â…¢, from July 1, 2008, the first type of gasoline vehicles (the total number of seats does not exceed 6 seats, and the maximum total mass does not exceed 2 500 kg M1 category vehicles) require the installation of OBD system, The compliance check of the in-use vehicle is performed synchronously.
According to the requirements of GB18352.3 for OBD system and fault diagnosis device, on the basis of fully studying the OBD standards and communication protocols related to ISO and SAE, a car based on Renesas R8C microcontroller-R5F21237 is designed. OBD general fault diagnostic instrument. The diagnostic instrument is compatible with all communication protocols specified in GB18352.3, can diagnose all diagnostic services specified in ISO 15031-5, and has the characteristics of low cost and easy portability.

1 Automotive OBD general fault diagnostic instrument requirements According to the requirements of GB18352.3, the external diagnostic equipment that communicates with the vehicle OBD system must comply with ISO 15031-4 "Road vehicles-Communication between vehicles and emission-related external diagnostic equipment. Part: Requirements for external fault diagnosis equipment ". These requirements mainly include four aspects: unified diagnostic connector, compatible communication protocol, standard fault code and diagnostic service scope.
1.1 Diagnosis connector The connector between the OBD universal fault diagnosis instrument and the vehicle uses a unified diagnosis connector, and its pin configuration is defined as shown in Figure 1, where the undefined pins can be reserved for future use by the diagnostic instrument. .

1.2 Communication protocol The communication protocol that can be used by the communication system between the OBD general fault diagnosis instrument and the vehicle is ISO 9141, SAE J1850 41, 6 Kb / sPWM (pulse width modulation), SAEJ1850 10, 4 Kb / s VPW (available Variable pulse width), ISO 14230 (KW 2000), ISO 15765-4 (CAN), SAE J1939-73 (CAN). According to the requirements of SAE J1978 or ISO15031-5, only one communication protocol is allowed for any vehicle. In order to be compatible with the OBD system of various vehicle models, the automobile general fault diagnostic instrument must support all the above protocols.
1.3 Scope of diagnosis service The diagnosis content of the automobile general fault diagnosis instrument includes nine service modes, the details are as follows:
The purpose of reading current power system diagnostic data is to obtain emission-related data values, including analog input, output, digital input, output, and system status information.
The purpose of reading the system freeze frame is to collect the freeze frames related to the power system emissions and other system freeze frames of the manufacturer's special needs. Read the fault diagnosis code Automobile general fault diagnosis instrument to obtain the conventional fault diagnosis code of each vehicle system.
Clearing / Resetting Diagnosis Information Related to Emissions The automobile general fault diagnostic instrument provides a method to clear the fault diagnosis information of each ECU of the vehicle. These fault diagnosis information include: the number of diagnostic fault codes, diagnostic fault codes, fault codes of frozen frame data, frozen frame data, status of system monitoring test, vehicle monitoring test results, mileage traveled when MIL is activated, warm-up after DTC clear Number of times, mileage after DTC is cleared, engine running time when MIL is activated, time after diagnosis fault code is cleared, and other recorded information defined by other manufacturers.
Read the oxygen sensor monitoring test results. The automobile general fault diagnostic instrument obtains the vehicle oxygen sensor monitoring test results.
Read the monitoring test results of the on-board special monitoring system. The automobile general fault diagnosis instrument obtains the on-board diagnostic monitoring test results of the discontinuous monitoring of special components / systems. For example, catalyst monitoring and evaporation monitoring system.
The vehicle-general fault diagnostic instrument that reads the emission-related diagnostic fault code detected during the current or recent driving obtains the diagnostic fault code detected during the current or recent driving. The purpose is to help technical service personnel to obtain the test and maintenance effect through a single driving cycle after the vehicle is repaired or after the diagnostic information is cleared.
The purpose of reading the on-board system, test, or component is to allow the car's general fault diagnostic instrument to control the operation of the on-board system, test, or component.
Reading vehicle information The automobile general fault diagnostic instrument can request vehicle information describing the vehicle, such as the vehicle identification code and calibration ID.
1.4 Display of the diagnostic trouble code (DTCs_DiagnosTIc Trouble Code) The OBD diagnostic trouble code read by the general fault diagnostic instrument consists of two bytes, and it should be displayed according to 1 letter + 1 decimal number + 3 hex The standard display of numbers is displayed. The conversion relationship between the read two-byte data and the standard display mode is shown in Figure 2. DTCs are divided into four categories according to the initial letters, where B represents body DTCs, C represents chassis DTCs, P represents power DTCs, and U represents network DTCs.

2 Design of automobile general fault diagnosis instrument
2. The hardware design of the system The hardware part of this design is mainly divided into four modules. The hardware structure is shown in Figure 3.

The single-chip microcomputer module is the core part of the entire hardware system, including a Renesas R8C series single-chip microcomputer R5F21237JPF and some peripheral circuits, which undertake the tasks of computing and processing signals. This module is connected to the keyboard module, the liquid crystal display module and the communication module, and interacts with these three modules.
R5F21237JPF belongs to the R8C / TIny series of microcontrollers of Renesas. This design uses two 8-bit multi-function timers of R5F21237JPF for system timing control; two serial ports are used to drive MC33390 and ST-L9637, and its CAN The controller drives the TJA1050 to communicate; 11 input / output ports are used to connect the keyboard module; 2 KB RAM and 64 KB program flash memory are used to write embedded programs, and parallel port 2 is used to communicate with the LCD.
The LCD screen uses COMJ4 & TImes; 8C, which is a 128 × 64 graphic dot matrix LCD screen, which can display 8 × 4 (16 × 16 dot matrix) Chinese characters, and can also display graphics and characters; it has internal The display data latch also has simple operating instructions. The main function of this module is to display the function menu, fault name and so on.
The core of the keyboard module is a 3 × 8 small keyboard array. The 3 columns and 8 rows are connected to the single-chip microcomputer through 11 pins. The keyboard keys include 10 numeric keys, page feed keys, line feed keys, OK and cancel keys. The communication module is the interface between the diagnostic instrument and the vehicle ECU. It is mainly composed of ST-L9637, MC33390 and TJA1050, among which ST-L9637 implements ISO 9141, ISO 14230 (KW 2000) protocols; MC33390 implements SAE J1850 41, 6 Kb / s PWM , SAEJ1850 10, 4 Kb / s VPW agreement; TJA1050 realizes ISO 15765-4 (CAN), SAE J1939-73 (CAN) agreement. The vehicle ECU is connected to the single-chip microcomputer through these chips. This part of the circuit is slightly complicated and the role is very important. It is the key to the diagnostic instrument to meet all communication protocols required by ISO15031 and SAEJ1978.
2. 2 software design The software structure chart of this design is shown as in Fig. 4.


(1) Start the diagnostic instrument When the fault diagnosis is connected to the vehicle diagnostic interface, put the vehicle ignition key in the ON position, and the vehicle supplies power to the diagnostic instrument. After the diagnostic instrument is powered on, the initial parameters of the diagnostic instrument are set under the control of R5F21237JPF.
(2) Confirm the diagnosis protocol After the fault diagnosis instrument is initialized, it starts to send protocol confirmation data to the vehicle diagnostic interface. Each diagnostic protocol of the fault diagnosis instrument to the connector that conforms to the "SAE J1962 Vehicle Fault Diagnosis Interface" standard (including ISO9141, ISO 14230 (KW 2000), SAE J1850 41, 6 Kb / sPWM, SAE J1850 10, 4 Kb / s VPW , ISO 157654, SAE J193973) pins send protocol confirmation commands one by one. If the correct response is received in a confirmation, the communication is confirmed to use the protocol; if the confirmation command of a certain protocol is sent without response or the response is none, the fault diagnostic instrument sends the confirmation command of the next protocol; if 5 consecutive cycles After sending the confirmation command of each protocol, the correct response is still not received, and the fault diagnosis instrument issues an error warning.
(3) Keyboard scan The keyboard scan in this design uses the regular scan mode. The keyboard is scanned every 50 ms. If a key press is detected, the calculation operation is to display the operation or select the type of service for diagnosis.
(4) Diagnosis service If you confirm the service mode required by the troubleshooter through the keyboard scanning program, send the service request and read the corresponding response information. The diagnosis service plays a vital role in this design, it realizes the information interaction between the diagnosis instrument and the ECU.
(5) Display content The display module contains all the subroutines related to the liquid crystal display, displays the menu, displays the fault content and displays the warning information, etc. Through the key operation, the selection display menu is used to select the operation service of the diagnostic instrument and the selected display content; if more than one page is displayed when the fault content is displayed, you can use the "previous page" and "next page" keys to turn the page and press The "Cancel" button returns to the previous directory; the warning message display is to display the corresponding warning message when the communication protocol fails to be confirmed or the diagnostic service fails. The warning message is automatically displayed when the operation fails.

3 Conclusion This article expounds the basic requirements of automobile OBD general fault diagnosis in accordance with the requirements of GB18352.3-2005, and introduces a design scheme of related hardware and software of automobile general fault diagnosis instrument based on Renesas R8C microcontroller. The advantages of this solution are: it can be compatible with various OBD diagnostic communication protocols, Chinese display interface, low cost and easy to carry and operate. Tests on Hafei Saibao V, BYD F6 and Chevrolet Cruze prove that the diagnostic instrument is stable, easy to operate, and has strong anti-interference ability. With the gradual implementation of the relevant legal requirements of OBD in China, the diagnostic and software design of the diagnostic instrument will have broad application prospects.

For more exciting content about OBD, please click: http: //

Introduction of EMI Filter In Medical Devices

Rated currents: 0.5 to 300A

Various types of connections: pin, IEC inlet, wire, solder lug, thread, terminal block, etc.

Custom specific versions available on request

Features of Medical Device Filters

Excellent common and differential mode attenuation effect, guarantees the accuracy and reliability of medical equipment;

Very low leakage current, fully comply with the safety requirement of medical devices.

Items with IEC inlet or pin connection available, compact structure, easy to install, high cost performance;

Three-phase versions are suitable for high power medical devices, which are safe and effective.

AC 3-Phase 4-Line Filters for Medical Devices

EMI Filter In MedicaI Devices

Ac Noise Filter,EMI Filter In Medical Devices,EMI Filter For Medical Appliance,Medical Device Filters

Jinan Filtemc Electronic Equipment Co., Ltd. , https://www.chinaemifilter.com