Automobile single-chip microcomputer and CAN bus experiment device
By designing the automotive microcontroller and CAN bus experimental device and constructing a small vehicle CAN network system, it solves the problem of difficulty in simulating the automotive microcontroller experimental environment in the existing technology, and achieves the effect of improving the teaching and research efficiency of the automotive electronic control system and UDS diagnostic system.
Patent Information
- Application Number
- CN202420509110.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-15
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2034-03-15
AI Technical Summary
It is difficult for the existing technology to accurately simulate the experimental environment of a car microcontroller in a teaching or R&D environment, affecting its teaching or R&D efficiency.
Design an automotive microcontroller and CAN bus experimental device, build a small vehicle CAN network system, and provide users with a software development and debugging environment for CAN bus and UDS diagnostic applications.
Through this experimental device, users can more effectively display and debug automobile electronic control systems and UDS diagnostic systems, improving teaching and research efficiency.
Smart Images

Figure CN222380022U_ABST
Abstract
Description
Technical Field
[0001] The utility model belongs to the technical field of automobile single chip microcomputer research and development, in particular to an automobile single chip microcomputer and CAN bus experimental device. Background Art
[0002] The automotive single-chip microcomputer is one of the core components in the modern automotive electronic control system. It is responsible for automatic control and regulation functions. The single-chip microcomputer is a highly integrated and programmable microcomputer system that integrates multiple basic components such as CPU, RAM, ROM, I / O port, timer, interrupt controller, etc. In the automotive electronic control system, the single-chip microcomputer controls the hydraulic, electric, force transmission and engine systems of the vehicle by reading the signal of the sensor. Specific applications include ignition control, fuel injection control, ABS control, air conditioning control, etc.
[0003] With the rapid development of automotive electronic technology, automotive electronic control technology based on single-chip microcomputer and CAN bus architecture has been widely used. In the research and development and teaching process in this field, it is not possible to directly display the operation of the single-chip microcomputer, and the operating mechanism of the single-chip microcomputer cannot be better displayed in the teaching or research and development environment. It is not convenient to provide the real operation and experimental environment of each electronic control unit and CAN bus, and it is not convenient to develop and debug the application of automotive electronic control system based on CAN bus. Therefore, an automotive single-chip microcomputer and CAN bus experimental device is proposed to solve the above problems. Utility Model Content
[0004] In order to make up for the shortcomings of the existing technology, the utility model proposes an automotive single-chip microcomputer and CAN bus experimental device to address the problem that the experimental environment cannot be accurately simulated during the development of the single-chip microcomputer, which affects the teaching or development efficiency of the single-chip microcomputer. By constructing a small-scale on-board CAN network system, it provides users with an automotive software development and debugging environment for CAN bus and UDS diagnostic applications, effectively improving the teaching and research efficiency of the automotive electronic control system and UDS diagnostic system.
[0005] The utility model solves the technical problem by adopting a technical solution which is an automobile single chip microcomputer and CAN bus experimental device, comprising: a box body, in which a high-speed CAN bus and a low-speed CAN bus are assembled;
[0006] An engine module is installed in the box, and the engine module and the wheel speed module are connected to a high-speed CAN bus;
[0007] The box body is equipped with an anti-theft module, a main driver module and a co-driver module, wherein the anti-theft module, the main driver module and the co-driver module are connected to a low-speed CAN bus;
[0008] A user module, wherein the box is provided with a user module, and the user module is connected to the high-speed CAN bus or the low-speed CAN bus;
[0009] A throttle sensor is installed in the box, and the engine module is connected to the throttle sensor via a signal line;
[0010] A wheel speed module and a speed sensor are installed in the box, and the wheel speed module and the speed sensor are connected via a signal line;
[0011] An instrument module is arranged in the box, and the instrument module is connected to the low-speed CAN bus and the high-speed CAN bus respectively;
[0012] A DLC module is installed in the box, and the DLC module is connected to the low-speed CAN bus and the high-speed CAN bus respectively, so as to better judge whether different detection information is abnormal through waveforms.
[0013] Preferably, an anti-theft switch is installed in the box, and the anti-theft module is connected to the anti-theft switch via a signal line.
[0014] Preferably, a light switch and a window switch are provided in the box, and the main driver module is connected to the light switch and the window switch respectively through signal lines; the co-driver module is connected to the window motor through a signal line.
[0015] Preferably, the user module is a single-chip microcomputer development board, which provides various common interfaces and exchanges data with other modules through the CAN bus.
[0016] Preferably, the high-speed CAN bus and the low-speed CAN bus are connected to the display via signal lines respectively.
[0017] Preferably, the baud rate of the high-speed CAN bus is 500 Kb / s; the baud rate of the low-speed CAN bus is 125 Kb / s, and the high-speed CAN bus and the low-speed CAN bus are interconnected through an instrument module.
[0018] Preferably, the light switch is connected in series with the light, the light signal is transmitted to a low-speed CAN bus, and the light status is displayed on a display.
[0019] Preferably, the user module is the Zhengdian Atom F103 single-chip microcomputer development board.
[0020] Preferably, the wheel speed module sends wheel speed frames on the high-speed CAN bus at a frequency of 100 ms.
[0021] Preferably, when the main driver module is working, the main driver module heartbeat frame will be sent to the instrument module via the low-speed CAN bus at a frequency of 2 Hz; when the co-driver module is working, the co-driver module heartbeat frame will be sent to the instrument module via the low-speed CAN bus at a frequency of 2 Hz.
[0022] CAN frame application layer definition
[0023] The application layer definition of CAN data frames of each module of the experimental device is shown in the following table:
[0024]
[0025]
[0026] UDS Features
[0027] The engine module, wheel speed module and instrument module support UDS protocols: 15765 protocol, 14229 protocol, and mainly provide services such as session control, ECU reset, data reading, input and output control, fault code operation, module programming, etc. You can obtain UDS services from the engine module, wheel speed module and instrument module through an external CAN analysis device or user module. The UDS service address value settings of each module in this experimental device are shown in the following table:
[0028] UDS service address
[0029] Address Type Hexadecimal code Binary Code Instrument Module Physical Addressing 7E7 11111100111 Engine Module Physical Addressing 7E8 11111101000 Wheel Speed Module Physical Addressing 7E9 11111101001 Instrument Module Function Addressing 790 11110010000 Engine module function addressing 791 11110010001 Wheel speed module function addressing 792 11110010010
[0030] The main time parameters of the UDS service of each module of this experimental device are shown in the following table:
[0031] UDS time parameters
[0032]
[0033]
[0034] The utility model is beneficial in that:
[0035] This utility builds and simulates a basic automotive electronic control system model, provides demonstration of the basic working principles and signal measurement of automotive electronic control systems based on the CAN bus, development of automotive microcontroller applications, CAN bus application development, development and testing of automotive electronic control system fault diagnosis service functions, etc. By building a small-scale on-board CAN network system, it provides users with an automotive software development and debugging environment for CAN bus and UDS diagnostic applications, effectively improving the teaching and research efficiency of automotive electronic control systems and UDS diagnostic systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the utility model or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.
[0037] Figure 1 The schematic diagram of the experimental device structure.
[0038] Figure 2 This is the waveform diagram of the throttle position signal measurement;
[0039] Figure 3 It is the measured waveform diagram of the wheel motor control signal;
[0040] Figure 4 It is the wheel speed signal measurement waveform diagram;
[0041] Figure 5 It is the waveform diagram of CAN bus signal waveform measurement;
[0042] Figure 6 This is the throttle position signal fault display diagram;
[0043] Figure 7 It is the CAN bus fault display diagram;
[0044] Figure 8 This is the wheel speed signal fault display diagram;
[0045] Fig. 9 It is the working interface of USB-CAN analyzer;
[0046] In the figure: 1. Box, 2. Engine module, 3. Wheel speed module, 4. Instrument module, 5. Anti-theft module, 6. Driver module, 7. Passenger module, 8. User module, 9. DLC module, 10. Throttle sensor, 11. Wheel motor, 12. Speed sensor, 13. Anti-theft switch, 14. Light switch, 15. Window switch, 16. Window motor, 17. High-speed CAN bus, 18. Low-speed CAN bus, 20. Lights. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the utility model to clearly and completely describe the technical solutions in the embodiments of the utility model. Based on the embodiments in the utility model, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the utility model.
[0048] See also Figure 1-9 As shown, an automotive single-chip microcomputer and CAN bus experimental device, the box 1 is equipped with a high-speed CAN bus 17 and a low-speed CAN bus 18;
[0049] The box 1 is provided with an engine module 2, and the engine module 2 and the wheel speed module 3 are connected to a high-speed CAN bus 17;
[0050] The box 1 is equipped with an anti-theft module 5, a main driver module 6 and a co-driver module 7, which are connected to a low-speed CAN bus 18;
[0051] A user module 8 is installed in the box 1, and the user module 8 is connected to the high-speed CAN bus 17 or the low-speed CAN bus 18;
[0052] A throttle sensor 10 is installed in the box 1, and the engine module 2 is connected to the throttle sensor 10 through a signal line; the engine module 2 receives the throttle sensor 10 signal generated by the rotary potentiometer in real time, converts it into a throttle position value, an integer value within 0-100, and displays the throttle position value in real time on the display screen, the engine module 2 outputs a corresponding PWM control signal to the wheel motor controller according to the throttle position value, and sends a throttle position frame on the high-speed CAN bus 17 at a frequency of 10 Hz, when the engine module 2 detects that the throttle sensor 10 is abnormal, its display screen will display a fault light pattern, and send an engine module 2 fault frame on the high-speed CAN bus 17;
[0053] The box 1 is equipped with a wheel speed module 3 and a speed sensor 12. The wheel speed module 3 is connected to the speed sensor 12 via a signal line. The wheel speed module 3 receives the wheel speed signal output by the speed sensor 12, and after processing, the wheel speed value is displayed in real time on the display, and the wheel speed value is sent via the high-speed CAN bus 17; the module sends wheel speed frames on the high-speed CAN bus at a frequency of 100ms.
[0054] The anti-theft module 5 is connected to the anti-theft switch 13 through a signal line. The anti-theft module 5 receives the power-on and power-off signals output by the anti-theft switch 13. After processing, the display shows the power-on and power-off status in real time, and sends power-on and power-off commands through the low-speed CAN bus 18. The anti-theft module 5 enters the working state after being powered on. When it receives the signal that the ignition switch is pressed, it will send a startup frame on the low-speed CAN bus 18, and the display screen will display the "power-on" character; when the module presses the ignition switch in the power-on state, it will send a shutdown frame on the low-speed CAN bus 18, and the display screen will display the "power-off" character. When other modules on the low-speed CAN bus 18 receive the startup frame, they will reply with a startup response frame and enter the working state; when it receives the shutdown frame, it will reply with a shutdown response frame and enter the shutdown state.
[0055] The main driver module 6 is connected to the light switch 14 and the window switch 15 through signal lines respectively. The main driver module 6 receives the light switch signal or the window lifting signal output by the light switch 14 or the window switch. After processing, the display displays the light 20 switch in real time, or sends the window lifting command through the low-speed CAN bus 18; when the module is working, the main driver module heartbeat frame will be sent to the instrument module through the CAN bus at a frequency of 2Hz.
[0056] The passenger module 7 is connected to the window motor 16 through a signal line. The passenger module 7 receives the window lifting control signal on the low-speed CAN bus 18, controls the operation of the window motor 16 after processing, and displays the window lifting status in real time on the display; when the passenger module 7 receives the light and window frame on the low-speed CAN bus 18, it controls the window motor 16 to rotate forward and reverse or raise and lower the window, and the operating status of the window motor 16 is displayed in real time on the display. When the module is working, the heartbeat frame of the passenger module 7 will be sent from the low-speed CAN bus 18 to the instrument module 4 at a frequency of 2Hz.
[0057] The instrument module 4 is connected to the low-speed CAN bus 18 or the high-speed CAN bus 17. The instrument module 4 receives data such as throttle position signals, speed signals, light signals, etc. on the high-speed CAN bus 17 and the low-speed CAN bus 18, and displays relevant status information on the display, and provides data forwarding functions of the high-speed CAN bus 17 and the low-speed CAN bus 18. The instrument module 4 will read all data frames transmitted on the high-speed CAN bus 17 and the low-speed CAN bus 18 in real time, and display the throttle position value, wheel speed value, and light and window status on the display screen by parsing the throttle position frame, wheel speed frame data, and light and window frames. At the same time, the instrument module 4 will count the number of throttle position frames, wheel speed frames, and heartbeat frames of the driver and co-driver modules within a unit time, and will display the fault light pattern on the display screen after the following fault coding conditions are met.
[0058] The box body is provided with a DLC module 9, which is respectively connected to a low-speed CAN bus 18 and a high-speed CAN bus 17, so as to better judge whether different detection information is abnormal through waveforms.
[0059] 1) Receive engine module 2 fault frame;
[0060] 2) When the throttle position value is greater than 8 and the wheel speed value is 0;
[0061] 3) Within a 500ms period, the number of throttle position frames received is less than 3;
[0062] 4) Within a 500ms period, the number of wheel speed frames received is less than 2;
[0063] 5) Within a 500ms period, the number of heartbeat frames received from the main driver is less than 3;
[0064] 6) Within a 500ms period, the number of co-pilot heartbeat frames received is less than 3;
[0065] When the user clicks the fault code button, all current fault code information is displayed.
[0066] User module 8 is a single-chip microcomputer development board that provides various common interfaces and exchanges data with other modules through the high-speed CAN bus 17, the low-speed CAN bus 18, and other modules. User module 8 is the Zhengdian Atom F103 single-chip microcomputer development board. Users can develop stand-alone programs by writing programs, and can also exchange data with other modules of the experimental device through the high-speed CAN bus 17, the low-speed CAN bus 18, to achieve rich electronic control system application development, UDS application development and testing functions.
[0067] The high-speed CAN bus 17 and the low-speed CAN bus 18 are connected to the display through signal lines respectively.
[0068] The baud rate of the high-speed CAN bus 17 is 500 Kb / s; the baud rate of the low-speed CAN bus 18 is 125 Kb / s, and the high-speed CAN bus 17 and the low-speed CAN bus 18 are interconnected through the instrument module 4 .
[0069] The light switch 14 is connected in series with the light 20 , and the light 20 signal is transmitted to the low-speed CAN bus, and the state of the light 20 is displayed on the display.
[0070] UDS Features
[0071] The engine module 2, wheel speed module 3 and instrument module 4 support the UDS protocol. The UDS protocol is: 15765 protocol, 14229 protocol, and mainly provides services such as session control, ECU reset, data reading, input and output control, fault code operation, module programming, etc. The UDS service can be obtained from the engine module 2, wheel speed module 3 and instrument module 4 through an external CAN analysis device or user module 8;
[0072] How to use the experimental device
[0073] Connect the power interface on the right side of the experimental device to a 220V AC power source;
[0074] The power switch on the right side of the experimental device is in the on state, and the display shows the anti-theft module 5 as "power off";
[0075] Press the ignition switch, the display shows the anti-theft module 5 as "on", and other modules enter the working state. At this time, the following operations can be performed:
[0076] Adjust the knob of the throttle sensor 10, the display screen will show the corresponding throttle opening value of the engine module 2, the wheel motor will drive the wheel to rotate, and the wheel speed module 3 display screen will show the wheel speed;
[0077] When the light 20 is turned on or off, the driver module 6 will turn on or off the light, and the instrument module 4 will synchronously display the on / off status of the light 20;
[0078] Press the window switch 15, the passenger module 7 will control the window motor 16 to rotate forward and reverse, and the instrument module 4 will synchronously display the working status of the window motor 16;
[0079] When the anti-theft module 5 is in the power-on state and the ignition switch is pressed again, its display will show the character "power off", and other modules will enter the power-off state;
[0080] Throttle position signal measurement: The throttle position signal is generated by the EC11 rotary encoder, and its signal waveform can be measured through the measuring hole;
[0081] Wheel speed signal measurement: the wheel speed signal is generated by the speed sensor 12, and its signal waveform can be measured through the measuring hole;
[0082] High-speed CAN bus 17 and low-speed CAN bus 18 signal waveform measurement, the signal waveforms of the high-speed and low-speed CAN bus H and L lines can be measured through the measurement hole;
[0083] Fault settings:
[0084] Throttle position signal failure
[0085] Use a connecting wire to connect the throttle signal terminal 1 / 2 and the GND terminal, and turn the knob. The engine module 2 can detect the throttle position signal fault, and set the throttle position signal value to 0. It sends a fault data frame to the instrument module 4 through the CAN bus, and the display will display the fault. After receiving the frame, the instrument module 4 will display the fault light. If you click the "DTC" button on the screen, you can see the corresponding fault code information;
[0086] CAN-H or CAN-L line short circuit or open circuit fault;
[0087] Pull out the CAN-H connecting line of the main driving module 6 from any terminal, which will cause the CAN-H line to be open circuit; or use the connecting line to connect the CAN-H and CAN-L lines of the main driving module 6, which will cause a CAN-H or CAN-L line short fault, then the instrument module 4 will display a fault light, and if you click the "DTC" button on the screen, you can see the corresponding fault code information;
[0088] Wheel speed signal failure;
[0089] Use a connecting wire to connect the speed signal terminal and the GND terminal, then the wheel speed signal value is 0. If the engine throttle position value is greater than 10 at this time, the instrument module 4 will display a fault light. If you click the "DTC" button on the screen, you can see the corresponding fault code information;
[0090] CAN data analysis tool usage
[0091] Various CAN bus data detection and analysis equipment can be connected to the measuring hole on the operation panel that is connected to the CAN bus. The experimental device provides the USBCAN adapter of Chuangxin Technology, which supports the USB_CAN TOOL common tool software.
[0092] User module 8 uses the Zhengdian Atom STM32F103 development board, which provides rich hardware interface resources such as USART, ADC, I2C, SPI, CAN, LCD, etc., and can be used for various microcontroller application development. User module 8 is pre-installed with the automotive diagnostic instrument application routine Diagnostic Tool based on the UDS protocol. This routine uses the UDS service functions provided by the engine module 2, wheel speed module 3 and instrument module 4 to realize data reading, parameter control, fault code processing and other diagnostic operations, which is used to demonstrate the basic UDS service process and application development reference.
[0093] In the description of this specification, the basic principles, main features and advantages of the utility model are shown and described above. For those skilled in the art, they can still modify the technical solutions recorded in the aforementioned embodiments, or make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the utility model shall fall within the scope of the utility model to be protected.
Claims
1. An automotive single-chip microcomputer and CAN bus experimental device, characterized in that: include: A box (1), wherein a high-speed CAN bus (17) and a low-speed CAN bus (18) are installed in the box (1); An engine module (2), wherein the box (1) is provided with the engine module (2), and the engine module (2) and the wheel speed module (3) are connected to a high-speed CAN bus (17); The box (1) is equipped with an anti-theft module (5), a main driver module (6) and a co-driver module (7), wherein the anti-theft module (5), the main driver module (6) and the co-driver module (7) are connected to a low-speed CAN bus (18); A user module (8), wherein the box (1) is provided with a user module (8), and the user module (8) is connected to a high-speed CAN bus (17) or a low-speed CAN bus (18); A throttle sensor (10) is installed in the box (1), and the engine module (2) is connected to the throttle sensor (10) via a signal line; A wheel speed module (3) and a speed sensor (12) are installed in the box (1), and the wheel speed module (3) and the speed sensor (12) are connected via a signal line; An instrument module (4) is arranged in the box (1), and the instrument module (4) is connected to a low-speed CAN bus (18) and a high-speed CAN bus (17) respectively; A DLC module (9) is installed in the box, and the DLC module (9) is connected to a low-speed CAN bus (18) and a high-speed CAN bus (17) respectively.
2. The automotive single chip microcomputer and CAN bus experimental device according to claim 1 is characterized in that: An anti-theft switch (13) is installed in the box (1), and the anti-theft module (5) is connected to the anti-theft switch (13) via a signal line.
3. The automotive single chip microcomputer and CAN bus experimental device according to claim 2 is characterized in that: A light switch (14) and a window switch (15) are arranged in the box body (1); the main driver module (6) is connected to the light switch (14) and the window switch (15) respectively via signal lines; and the auxiliary driver module (7) is connected to the window motor (16) via a signal line.
4. The automotive single chip microcomputer and CAN bus experimental device according to claim 3 is characterized in that: The user module (8) is a single-chip microcomputer development board, which provides various common interfaces and performs data exchange with other modules via the CAN bus.
5. The automotive single chip microcomputer and CAN bus experimental device according to claim 4 is characterized in that: The high-speed CAN bus (17) and the low-speed CAN bus (18) are respectively connected to the display via signal lines.
6. The automotive single chip microcomputer and CAN bus experimental device according to claim 5, characterized in that: The baud rate of the high-speed CAN bus is 500 Kb / s; the baud rate of the low-speed CAN bus is 125 Kb / s, and the high-speed CAN bus (17) and the low-speed CAN bus (18) are interconnected via an instrument module (4).
7. The automotive single chip microcomputer and CAN bus experimental device according to claim 6 is characterized in that: The vehicle light switch (14) is connected in series with the vehicle light (20); a signal of the vehicle light (20) is transmitted to a low-speed CAN bus (18); and a display shows the state of the vehicle light (20).
8. The automotive single chip microcomputer and CAN bus experimental device according to claim 7 is characterized in that: The user module (8) is a Zhengdian Atom F103 single-chip microcomputer development board.
9. The automotive single chip microcomputer and CAN bus experimental device according to claim 7, characterized in that: The wheel speed module (3) sends wheel speed frames on the high-speed CAN bus (17) at a frequency of 100 ms.
10. The automotive single chip microcomputer and CAN bus experimental device according to claim 9, characterized in that: When the main driving module (6) is in operation, a heartbeat frame of the main driving module (6) is sent from the low-speed CAN bus (18) to the instrument module (4) at a frequency of 2 Hz; when the auxiliary driving module (7) is in operation, a heartbeat frame of the auxiliary driving module (7) is sent from the low-speed CAN bus (18) to the instrument module (4) at a frequency of 2 Hz.