Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 8, No. 2, 2023 40 Optimized Design of C8051F040 SOC Based Automotive Engine Tester Yalatu Su1, * 1Hulunbuir University, Neimenggu, 021000, China * Corresponding author E-mail: gcfyjx@163.com Abstract: Automotive engine tester is an important instrumentation for performance testing and fault diagnosis of automotive engines. How to make real-time effective and fast engine testing has become a key technology for automotive engine testing. This paper further optimizes the C8051F040 SOC's automotive engine tester based on the use of a cost-effective C8051F040 system-on-chip as the core, supplemented by relevant sensor sets and other functional components, to achieve the design requirements of a low-cost, high-performance instrument. The overall performance of the system is superior and versatile through prototype testing. Keywords: Automotive engine testing, C8051F040, Engine tester, Optimized design. 1. Introduction The physical structure and parameters of an automobile engine are bound to change after a long period of operation [1], and the characteristics of these parameters and their changes can be seen in the trend of change in the curve of their changes. The trend of the curve is directly related to the performance state, fatigue state and fault state of the engine itself. Therefore, by detecting the parameters of the engine working process in real-time, especially the ignition parameters of the engine, and using the sensors for timely data transmission on the computer for visualization and processing, while using the microcontroller to analyze the data theoretically, the state data of the engine can be derived. Car use or vehicle maintenance personnel can be based on the data state so that it is easier to see the technical state of the engine, the degree of failure and the trend of failure, etc., to facilitate the development of the use of reasonable maintenance programs, timely troubleshooting or to remove hidden problems. The C8051F040 SOC-based automotive engine tester is a special device based on real-time fault diagnosis and status detection of the engine, which can be used to collect real-time samples, data processing and accurate display of the engine's working parameters through the sensor signal detection and transmission technology without disassembling the vehicle, enabling the operator or maintenance personnel to grasp the engine's technical status and facilitate timely maintenance. The design is optimized based on this. It reduces the maintenance and running costs of the vehicle, and also reduces the technical requirements for the maintenance personnel, meeting the needs of the modern automotive engine testing and maintenance industry. 2. Detector Hardware Structure 2.1. The overall structure of the detector hardware Figure 1. General block diagram of the detector As shown in Figure 1, the detector consists of a signal acquisition circuit group, a display module, a control module, a data storage module, an interface group circuit and a C8051F040 SOC. The acquired signal is modulated by the signal acquisition circuit to a level suitable for reading by the C8051F040's on-chip AD converter, and the C8051F040 then performs response calculation processing, either by LCD or storing the data in FLASH according to the software settings. The C8051F040 then responds to the software requirements by performing calculations, displaying the data on LCD or storing the data in FLASH. The C8051F040 microcontroller is a fully integrated mixed-signal system-on-a-chip MCU from Silicon Lab with 64 digital I/O pins, an 8-bit ADC with PGA and 8-channel analog multi-switch sampling rate of 500ksps and a 12-bit ADC with PGA and 8-channel analog multi-switch sampling rate of 100ksps. The internal domain network controller (CAN2.0B), with 32 message objects, each with its own identity [2], is used in this design to test the parameters of the car engine using its rich on-chip resources. Since most of the resources are integrated into the C8051F040 C8051F040CPU Signal acquisition circuit set Control modules Display modules Data storage modules Interface group 41 chip, the instrument is compact and easy to carry. 2.2. Design of the signal acquisition circuit set Figure 2. Diagram of the composition of the sensor group The signal acquisition circuit group consists of a low- frequency low voltage acquisition circuit and a high- frequency high voltage acquisition circuit, where the low- frequency low voltage acquisition circuit mainly completes the testing of signal parameters other than the ignition system, and the high-frequency high voltage acquisition circuit mainly focuses on the testing of ignition system parameters. Nowadays, engines are equipped with various special sensors, which can be directly connected to the matching sensors according to the distribution instructions of the signal acquisition circuit group, and only in the high-voltage ignition part do we need to use special protection devices for testing. 2.3. Display module design The LCD module is a type FM240128B-1 LCD module. It adopts the SMD hard package method, has a backlight for night use, reliable connection and long life. Can be fully applied to the engine parameters, waveform display, can be full screen single channel full information display, can also be full-screen 4 channel important data node display. 2.4. Control module design Considering the rich I/O resources of the C8051F040, the keyboard control circuit uses the common 4 × 4 matrix trial keyboard, interrupt query mode. 2.5. Data storage module design This instrument is due to the need to store a large amount of data memory using EEPROM + FLASH scheme, EEPROM to store the program code, FLASH is used to store the measured data. The EEPROM stores the program code and the FLASH is used to store the measured data. The FLASH write and erase is done by the C8051F040 controlling the CPLD PM3128ATC. 2.6. Design of each interface The instrument uses a variety of interfaces to communicate with other instruments, including RS232, CAN2.0B and SPI communication, due to the application environment, measurement properties and the nature of the C8051F040 on- chip system where various interfaces can be easily obtained. Among them, RS232 mainly and the host computer for communication, CAN bus is mainly used in scalability, with other equipment and instruments with CAN bus to form an intelligent test network, SPI is also used in scalability, can be connected to other SPI from the test equipment to complete the corresponding test. 3. Detector Software Design The instrument is related to an automotive engine fault, performance testing so the real-time requirements are high, it is not easy to use a multi-tasking time-sharing mechanism, the main flow chart of the program is shown in Figure 4. the main body of the program consists of seven parts are: detection part, data storage part, interface communication part, ADC parameter setting part, LCD driver display part and interrupt processing part at all levels. Figure 4. Main flow diagram of the program 3.1. Software menu flow chart The tester adopts a large LCD and a user-friendly menu interface for operation, the menu direction is shown in Figure 5. 3.2. CPLD program design The CPLD is mainly used for the operation of the FLASH in the instrument. The program menu towards the flow chart is shown in Figure 5. Low Frequency Low Voltage Acquisition Circuits High frequency high voltage acquisition circuits Signal Acquisition Circuit Sets 42 Figure 5. Flowchart of the operation menu path 4. Performance Measurement of The Detector 4.1. Measurement items The test platform used for the test project was the Lexus LS400 engine. The measurement items of this instrument mainly used the non-on-board sensor ignition waveform test and the on-board sensor fuel injection nozzle test, because the on-board sensor is relatively easy to test so only one test was carried out in the on-board sensor. 4.2. Specific test data The single-cylinder ignition waveform test graph is shown in Figure 6. The test graph gives a general indication of the secondary ignition voltage, sparkline, oscillation waveform and other parameters, which can be viewed through the menu. The four-cylinder ignition waveform test graph and overlap waveform graph are shown in Figures 7 and 8, specific parameters can be viewed through the menu. The saturated switch type injector controller wave line graph is shown in Figure 9. Figure 6. Single-cylinderignitionwavefom Figure 7. Four-cylinder ignition waveform Figure 8. Overlapping waveforms Figure 9. Saturation-switched injector controller waveforms 43 5. Conclusion The optimized development and design of the C8051F040 SOC automotive engine tester are based on the basic requirements of the traditional automotive tester, and the optimized design of the CPLD program and user-friendly operation based on meeting the basic functions of the automotive tester; and the optimized design of the related software and hardware development based on the concept of simplicity and a high degree of intelligence. The C8051F040 SOC is designed to diagnose faults in the engine of the car engine tester with a high accuracy rate and has good applicability. Proof of intellectual property rights: This thesis is not subject to intellectual property disputes References [1] Zhang Jianjun. Automotive Inspection Technology, 1st Edition. Beijing: Higher Education Press. 2003 [2] Mixed Signal ISP Flash MCU Family. Silicon Laboratories [M]. 2005. [3] Jin Yiquan, Sun Yukai. Principles, testing and maintenance of electronic ignition systems for automobiles [J]. Electronic World. 2002 (5): 53 – 541. [4] Yu C.S. Theory of automobiles (3rd ed.) [M]. Beijing: Machinery Industry Press. 2001. [5] Xiao Yunkui. Automotive Troubleshooting (1st ed.) [M]. Beijing: Beijing Institute of Technology Press. 2001. [6] Yong W K, Grorgio R. Automotive engine diagnosis and control via nonlinear estimation control system [J]. Microprocessors and Microsystems. 1998. :3-7.