A portable CAN detection and upgrade device and method
Through the portable CAN detection and upgrade device, the microprocessor module and CAN/USB communication module are used to realize convenient CAN device detection and firmware upgrade without disassembling the device, solving the problems of complex operation and lack of upgrade interface in the existing technology. , improving upgrade efficiency and portability.
Patent Information
- Application Number
- CN202010441369.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-22
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2040-05-22
AI Technical Summary
Existing CAN cards are complex to operate and require a portable computer, and many products lack upgrade interfaces, making upgrades difficult and requiring the equipment to be disassembled for upgrades.
A portable CAN detection and upgrade device is designed, which includes a microprocessor module, CAN communication module, USB communication module, external power supply module, storage module and interaction module. It can send and receive CAN messages in real time and communicate with a PC through the USB interface. The built-in storage module stores the upgrade package file and performs firmware upgrades through the CAN bus without disassembling the device.
It realizes convenient CAN device detection and upgrade, reduces the complexity of operation, can carry out on-site operation without carrying a PC, supports different voltage power supply, and simplifies the upgrade process.
Smart Images

Figure CN111522332B
Abstract
Description
Technical Field
[0001] The invention relates to the field of vehicle-mounted technology, and in particular to a portable CAN detection and upgrading device and method. Background Art
[0002] There are many types of CAN cards on the market, but their functions are basically the same or similar. The mainstream products are CAN cards that convert bus signals into USB signals and connect to PCs. In this use, a PC must be used together, which requires high technical skills of the operator, and the operator must carry a portable computer and other equipment every time.
[0003] In addition, currently, dedicated burning tools are used to upgrade the products of non-networked terminal devices. However, many products do not have upgrade interfaces reserved due to factors such as appearance, usage environment, and design, and can only be upgraded by disassembling the products. Summary of the invention
[0004] The main purpose of the present invention is to overcome the problems in the prior art and to provide a portable CAN detection and upgrade device and method to facilitate the detection and upgrade of external CAN devices.
[0005] The present invention adopts the following technical solution:
[0006] On the one hand, a portable CAN detection and upgrade device includes: a microprocessor module, a CAN communication module, a USB communication module, an external power supply module, a storage module and an interactive module; the microprocessor module is connected to the CAN communication module to send and receive CAN messages; the microprocessor module is connected to the USB communication module to communicate with an external USB device and receive external power; the storage module is connected to the microprocessor module to store data; the external power supply module is connected to the microprocessor module to boost the power output by the microprocessor module for use by an external CAN device; the interactive module is connected to the microprocessor module to send control instructions and display processing results.
[0007] Preferably, the CAN communication module includes a CAN communication isolation circuit, a CAN transceiver, a CAN interface protection circuit and a CAN communication interface which are connected in sequence; the CAN communication isolation circuit is connected to the microprocessor module; and the CAN communication interface is connected to an external CAN device via a CAN bus.
[0008] Preferably, the USB communication module includes a USB communication interface; the microprocessor is connected to an external USB device via the USB communication interface.
[0009] Preferably, the USB communication interface includes a Type-C interface; and the external USB device includes a PC.
[0010] Preferably, the storage module includes a FLASH memory, an EEPROM memory or an SD card.
[0011] Preferably, the external power supply module includes a switching power supply chip; the output voltage sampling terminal of the switching power supply chip is connected to the microprocessor module; the collector lead terminal of the switching power supply chip outputs power through the external power supply interface.
[0012] Preferably, the interactive module includes a key input unit and a display screen output unit; the microprocessor module is connected to the key input unit to receive key instructions; and the display screen output unit is connected to the microprocessor module to display processing results.
[0013] Preferably, the interactive module includes a display screen touch unit and a display screen output unit; the microprocessor module is connected to the display screen touch unit to receive touch instructions; and the display screen output unit is connected to the microprocessor module to display processing results.
[0014] On the other hand, a CAN detection and upgrade method, based on the portable CAN detection and upgrade device, specifically includes:
[0015] The microprocessor module reads the working mode configured by the external USB device through the USB communication module; the working mode includes a first working mode, a second working mode and a third working mode;
[0016] When the working mode is the first working mode, the microprocessor module reads the shielding rule information of the decoded CAN message configured by the external USB device from the storage module; when the microprocessor module receives the CAN message through the CAN communication module, the decoded CAN message is displayed based on the shielding rule information;
[0017] When the working mode is the second working mode, the microprocessor module reads the CAN message sending mode configured by the external USB device, and the CAN message sending mode includes timed sending, control instruction sending and message triggered sending; when the CAN message sending mode is timed sending, the microprocessor module reads the timing related information from the storage module, starts the corresponding timer according to the timing related information, and sends the corresponding CAN message through the CAN communication module after the timing time is up; when the CAN message sending mode is control instruction sending, the microprocessor module determines whether there is a first preset control instruction input, and when the first preset control instruction is received, the microprocessor module reads the corresponding message information from the storage module, and sends the corresponding CAN message through the CAN communication module; when the CAN message sending mode is message triggered sending, the microprocessor module reads the message trigger data from the storage module, and when a message consistent with the message trigger data is received, the corresponding CAN message is sent through the CAN communication module;
[0018] When the working mode is the third working mode, the microprocessor module reads the upgrade package file from the storage module; when receiving the second preset control instruction, the microprocessor module sends the upgrade package file to the external CAN device through the CAN communication module.
[0019] Preferably, when the working mode is the third working mode, the method further includes:
[0020] The microprocessor module checks the upgrade package file. If the check fails, an error display is performed through the interactive module. If the check passes, the progress of sending the upgrade package file to the external USB device is displayed through the interactive module.
[0021] It can be seen from the above description of the present invention that, compared with the prior art, the present invention has the following beneficial effects:
[0022] (1) The present invention has a built-in CAN communication module, which is connected to the CAN bus through a CAN communication interface and can send and receive CAN messages in real time to achieve interaction with external CAN devices;
[0023] (2) The present invention is powered by a USB communication interface (it can also be powered by a built-in battery) and communicates with an external USB device such as a PC; parameter setting and data transmission (including upgrade package files) are achieved by communicating with the external USB device;
[0024] (3) The present invention has a built-in storage module, through which the setting parameters and transmission data are stored, which is convenient for subsequent use;
[0025] (4) The present invention upgrades the external CAN device firmware through the CAN bus based on the upgrade package file pre-stored in the storage module, and can achieve the device firmware upgrade without removing the shell;
[0026] (5) The present invention has a built-in external power supply module, which can set different output voltages through the microprocessor module to provide power supplies of different voltages for external CAN devices (especially when it is inconvenient for the external CAN devices to obtain power), which is convenient for detection and upgrade use;
[0027] (6) The interactive module of the present invention is composed of a key and a TFT display screen (or is implemented only by a TFT display screen without a key), which can conveniently issue control instructions and intuitively display processing results;
[0028] (7) Before going to the site to communicate with the external CAN device, the present invention can communicate with the PC, set one or more working modes through the PC, and download the parameters configured for various working modes and various required data (shielding rules for decoding CAN messages, timing information, instruction information, trigger message information, upgrade package files, etc.) to the storage module for storage. When operating on site, there is no need to carry the corresponding PC, and it is only necessary to select the corresponding working mode according to the site requirements and perform the corresponding operation. The operation is simple and convenient.
[0029] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments, but the portable CAN detection and upgrading device and method of the present invention are not limited to the embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a structural block diagram of the portable CAN detection and upgrading device of the present invention;
[0031] Figure 2 is a circuit diagram of a microprocessor module of the present invention;
[0032] Figure 3 A circuit diagram of a storage module of the present invention, wherein (a) represents FLASH storage and (b) represents EEPROM storage;
[0033] Figure 4 A circuit diagram of a CAN communication module of the present invention;
[0034] Figure 5 A circuit diagram of a USB communication module of the present invention;
[0035] Figure 6 A circuit diagram of the external power supply module of the present invention;
[0036] Figure 7 A circuit diagram of a key input unit of an interactive module of the present invention;
[0037] Figure 8 The circuit diagram of the display screen touch unit and the display screen output unit of the present invention;
[0038] Fig. 9 Flow chart of the method of the present invention. DETAILED DESCRIPTION
[0039] The present invention is further described below through specific implementation modes.
[0040] See also Figure 1 As shown, on the one hand, a portable CAN detection and upgrading device includes: a microprocessor module 10, a CAN communication module 30, a USB communication module, an external power supply module 50, a storage module 40 and an interactive module 60; the microprocessor module 10 is connected to the CAN communication module 30 to send and receive CAN messages; the microprocessor module 10 is connected to the USB communication module to communicate with an external USB device and receive external power; the storage module 40 is connected to the microprocessor module 10 to store data; the external power supply module 50 is connected to the microprocessor module 10 to boost the power output by the microprocessor module 10 for use by an external CAN device; the interactive module 60 is connected to the microprocessor module 10 to send control instructions and display processing results.
[0041] For details, see Figure 2 As shown, the microprocessor module 10 includes a processing chip of model STM32F103VET6, through which communication with the CAN communication module 30, USB communication module, external power supply module 50, storage module 40 and interaction module 60 is achieved.
[0042] For further information, see Figure 4 As shown, the CAN communication module 30 includes a CAN communication isolation circuit, a CAN transceiver, a CAN interface protection circuit and a CAN communication interface 301 which are connected in sequence. Specifically, the CAN communication isolation circuit is connected to the microprocessor module 10 through ports PA12-CAN_TX and PA11-CAN_RX; the CAN communication interface 301 is connected to an external CAN device through a CAN bus. The external CAN device includes automotive electronic devices such as TBOX, OBD, driving recorder, vehicle navigation screen, etc.
[0043] For further information, see Figure 5As shown, the USB communication module includes a USB communication interface 201; the microprocessor is connected to an external USB device via the USB communication interface 201. Specifically, the USB communication module is connected to the microprocessor module 10 via PC11-US4-RX and PC10-US4-TX.
[0044] In this embodiment, the USB communication interface 201 includes a Type-C interface; the external USB device includes a PC. The CAN message transceiver of the present invention realizes serial port communication with the external PC through the Type-C interface. At the same time, the power supply to each module of the device is also realized through the Type-C interface.
[0045] Furthermore, the portable CAN detection and upgrade device also includes a battery module, which can be a common battery or a rechargeable lithium battery. The rechargeable lithium battery can be charged through the Type-C interface.
[0046] For further information, see Figure 2 As shown, the storage module 40 includes a FLASH memory, an EEPROM memory or an SD card. The storage module 40 is used to store one or more upgrade packages, configuration data and other files. The FLASH memory U5 is connected to the microprocessor module 10 through PB12-F_CS, PB14-SPI2_MISO, PB13-SPI2_SCK and PB15-SPI2_MOSI. The EEPROM memory U7 is connected to the microprocessor module 10 through PB10-I2C2_SCL and PB11-I2C2_SDA.
[0047] For further information, see Figure 6 As shown, the external power supply module 50 includes a switching power supply chip MC33063AVDR; the output voltage sampling terminal MCU-DAC of the switching power supply chip is connected to the microprocessor module 10; the collector lead terminal SWC of the switching power supply chip outputs power through the external power supply interface 501. Through the output voltage sampling terminal MCU-DAC, different output voltages can be set through the microprocessor module 10 to meet the needs of various terminals. Figure 6 As shown, it also includes an output voltage acquisition terminal Vo-ADC, through which the output voltage after the actual boost processing can be detected to ensure that the output voltage is normal.
[0048] For further information, see Figure 7 and Figure 8As shown, the interactive module 60 includes a key input unit and a display screen output unit; the microprocessor module 10 is connected to the key input unit to receive key commands; the display screen output unit is connected to the microprocessor module 10 to display processing results. In this embodiment, the key input unit includes four keys S1, S2, S3 and S4, which are connected to the microprocessor module 10 through PE6-KEY1, PE5-KEY2, PE4-KEY3 and PE3-KEY4 respectively to input control commands to the microprocessor module 10. The display screen output unit includes a TFT22 display screen interface and a display screen backlight control circuit. The display screen backlight control circuit is connected to the microprocessor module 10 through PB5-BL_CTR.
[0049] In an alternative embodiment, see Figure 8 As shown, the interactive module 60 includes a display screen touch control unit and a display screen output unit; the microprocessor module 10 is connected to the display screen touch control unit to receive touch control instructions; the display screen output unit is connected to the microprocessor module 10 to display processing results. For the specific implementation of the display screen touch control unit, see Figure 8 The touch interface circuit includes a chip of model XPT2046N, which is connected to the microprocessor module 10 through PA5-SPI1-SCK, PB7-SPI1-CS3, PA7-SPI1-MOSI, PA6-SPI1-MISO and PB6-7846-INT.
[0050] See also Fig. 9 As shown, on the other hand, a CAN detection and upgrade method, based on the portable CAN detection and upgrade device, specifically includes:
[0051] The microprocessor module reads the working mode configured by the external USB device through the USB communication module; the working mode includes a first working mode, a second working mode and a third working mode;
[0052] When the working mode is the first working mode, the microprocessor module reads the shielding rule information of the decoded CAN message configured by the external USB device from the storage module; when the microprocessor module receives the CAN message through the CAN communication module, the decoded CAN message is displayed based on the shielding rule information;
[0053] When the working mode is the second working mode, the microprocessor module reads the CAN message sending mode configured by the external USB device, and the CAN message sending mode includes timed sending, control instruction sending and message triggered sending; when the CAN message sending mode is timed sending, the microprocessor module reads the timing related information from the storage module, starts the corresponding timer according to the timing related information, and sends the corresponding CAN message through the CAN communication module after the timing time is up; when the CAN message sending mode is control instruction sending, the microprocessor module determines whether there is a first preset control instruction input, and when the first preset control instruction is received, the microprocessor module reads the corresponding message information from the storage module, and sends the corresponding CAN message through the CAN communication module; when the CAN message sending mode is message triggered sending, the microprocessor module reads the message trigger data from the storage module, and when a message consistent with the message trigger data is received, the corresponding CAN message is sent through the CAN communication module;
[0054] When the working mode is the third working mode, the microprocessor module reads the upgrade package file from the storage module; when receiving the second preset control instruction, the microprocessor module sends the upgrade package file to the external CAN device through the CAN communication module.
[0055] In this embodiment, when the working mode is the third working mode, the method further includes:
[0056] The microprocessor module checks the upgrade package file. If the check fails, an error display is performed through the interactive module. If the check passes, the progress of sending the upgrade package file to the external USB device is displayed through the interactive module.
[0057] Fig. 9 In the embodiment, the storage module is a FLASH memory. The first preset control instruction and the second preset control instruction are input through a key.
[0058] The method of the present invention can communicate with a PC before going to the site to communicate with an external CAN device, set one or more working modes through the PC, and download the parameters configured for various working modes and various required data (shielding rules for decoding CAN messages, timing information, instruction information, trigger message information, upgrade package files, etc.) to a storage module for storage. When operating on site, there is no need to carry a corresponding PC, and only the corresponding working mode needs to be selected according to the site requirements and the corresponding operation can be performed. The operation is simple and convenient.
[0059] The above is only a specific implementation of the present invention, but the design concept of the present invention is not limited thereto. Any non-substantial changes to the present invention using this concept shall be deemed as an infringement of the protection scope of the present invention.
Claims
1. A portable CAN detection and upgrade device, characterized in that: include: Microprocessor module, CAN communication module, USB communication module, external power supply module, storage module and interaction module; The microprocessor module is connected to the CAN communication module to send and receive CAN messages; the microprocessor module is connected to the USB communication module to communicate with an external USB device and receive external power; the storage module is connected to the microprocessor module to store data; the external power supply module is connected to the microprocessor module to boost the power output by the microprocessor module and use it for the external CAN device; the interactive module is connected to the microprocessor module to send control instructions and display processing results; The CAN detection and upgrade method based on the portable CAN detection and upgrade device specifically includes: The microprocessor module reads the working mode configured by the external USB device through the USB communication module; the working mode includes a first working mode, a second working mode and a third working mode; When the working mode is the first working mode, the microprocessor module reads the shielding rule information of the decoded CAN message configured by the external USB device from the storage module; when the microprocessor module receives the CAN message through the CAN communication module, the decoded CAN message is displayed based on the shielding rule information; When the working mode is the second working mode, the microprocessor module reads the CAN message sending mode configured by the external USB device, and the CAN message sending mode includes timed sending, control instruction sending and message triggered sending; when the CAN message sending mode is timed sending, the microprocessor module reads the timing related information from the storage module, starts the corresponding timer according to the timing related information, and sends the corresponding CAN message through the CAN communication module after the timing time is up; when the CAN message sending mode is control instruction sending, the microprocessor module determines whether there is a first preset control instruction input, and when the first preset control instruction is received, the microprocessor module reads the corresponding message information from the storage module, and sends the corresponding CAN message through the CAN communication module; when the CAN message sending mode is message triggered sending, the microprocessor module reads the message trigger data from the storage module, and when a message consistent with the message trigger data is received, the corresponding CAN message is sent through the CAN communication module; When the working mode is the third working mode, the microprocessor module reads the upgrade package file from the storage module; when receiving the second preset control instruction, the microprocessor module sends the upgrade package file to the external CAN device through the CAN communication module.
2. The portable CAN detection and upgrade device according to claim 1, characterized in that: The CAN communication module comprises a CAN communication isolation circuit, a CAN transceiver, a CAN interface protection circuit and a CAN communication interface which are connected in sequence; the CAN communication isolation circuit is connected to the microprocessor module; and the CAN communication interface is connected to an external CAN device via a CAN bus.
3. The portable CAN detection and upgrading device according to claim 1 is characterized in that: The USB communication module includes a USB communication interface; the microprocessor is connected to an external USB device via the USB communication interface.
4. The portable CAN detection and upgrade device according to claim 3, characterized in that: The USB communication interface includes a Type-C interface; the external USB device includes a PC.
5. The portable CAN detection and upgrading device according to claim 1, characterized in that: The storage module includes a FLASH memory, an EEPROM memory or an SD card.
6. The portable CAN detection and upgrade device according to claim 1, characterized in that: The external power supply module includes a switching power supply chip; the output voltage sampling end of the switching power supply chip is connected to the microprocessor module; the collector lead end of the switching power supply chip outputs power through the external power supply interface.
7. The portable CAN detection and upgrading device according to claim 1, characterized in that: The interactive module includes a key input unit and a display screen output unit; the microprocessor module is connected to the key input unit to receive key instructions; the display screen output unit is connected to the microprocessor module to display processing results.
8. The portable CAN detection and upgrade device according to claim 1, characterized in that: The interactive module includes a display screen touch control unit and a display screen output unit; the microprocessor module is connected to the display screen touch control unit to receive touch control instructions; and the display screen output unit is connected to the microprocessor module to display processing results.
9. A CAN detection and upgrade method, characterized in that: Based on the portable CAN detection and upgrade device according to any one of claims 1 to 8, when the working mode is the third working mode, the method further includes: The microprocessor module checks the upgrade package file. If the check fails, an error display is performed through the interactive module. If the check passes, the progress of sending the upgrade package file to the external CAN device is displayed through the interactive module.
Citation Information
Patent Citations
Handheld bus debugging terminal and method thereof
CN104202207A
Method and device for analyzing CAN signal of whole vehicle by using diagnosis message
CN111045416A
Debugging device of on -vehicle information service system
CN206658216U
Portable testing device based on CAN communication
CN210225435U
Portable CAN detection and upgrading device
CN212060974U
