GD32-based OTA new energy charger maintenance test system

By combining the GD32 microcontroller and WeChat mini-program with a Bluetooth module for OTA upgrades, the difficulties in maintenance and testing caused by the complexity of charger models are solved. This enables convenient and stable remote system updates and real-time monitoring, is compatible with multiple charger models, and reduces maintenance costs and operational complexity.

CN115712558BActive Publication Date: 2026-07-21HUBEI UNIV OF AUTOMOTIVE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUBEI UNIV OF AUTOMOTIVE TECH
Filing Date
2022-10-17
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

The wide variety of charger models makes repair and testing difficult, operations complicated, and requires a lot of repair equipment. Traditional upgrade methods require on-site operation by professional personnel, which is costly and inconvenient.

Method used

The system adopts an OTA-based new energy charger repair and testing system based on GD32. It uses WeChat mini-program and Bluetooth module to realize remote system updates. Combined with Ymodem protocol and IAP programming function, it supports multiple CAN protocols and power management, and transmits CAN protocol files and power current and voltage information via Bluetooth.

Benefits of technology

It enables convenient and stable remote system updates, reduces maintenance costs, simplifies operation procedures, adapts to various charger models, supports real-time monitoring and protocol updates, and reduces reliance on professional personnel.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115712558B_ABST
    Figure CN115712558B_ABST
Patent Text Reader

Abstract

The application relates to a GD32-based OTA type new energy charger maintenance test system, which comprises a background management system based on an OTA technology, a mobile terminal with a WeChat applet and a maintenance test equipment host, the background management system is used for realizing wireless downloading of a GD32F303 through the WeChat applet and related management, the WeChat applet and the maintenance test equipment host realize Bluetooth communication, the downloaded bin file is run on the GD32F303 single-chip microcomputer of the maintenance test equipment host, and the maintenance test equipment is controlled through the GD32F303 single-chip microcomputer. The application applies the OTA technology to the charger maintenance test equipment for the first time, uses the over-the-air downloading technology to realize online and timely updating of a protocol database and a system program, realizes wireless remote management, and the system has strong expansibility and is more intelligent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of new energy technology and relates to a new energy charger repair and testing system, and more particularly to an OTA-type multi-functional new energy charger repair and testing system based on GD32. Background Technology

[0002] In recent years, with the rapid development of intelligent and electric vehicles, the number of electric vehicles has been increasing, and their types vary greatly. This has led to a wide variety of charger models on the market. Different chargers have different voltages, currents, protocols, etc. Specifically, the charger needs to identify the battery voltage before starting, has a load current after starting, and requires CAN protocol support to start, which poses a significant obstacle for repair personnel. Therefore, there is an urgent market need for a multi-functional integrated platform that can not only provide a power supply with a voltage range of 0-600V, but also support electronic loads within the 0-600V range, and provide various CAN protocols.

[0003] Meanwhile, new electric vehicle chargers are constantly emerging on the market, necessitating the updating of the CAN protocol into charger repair and testing equipment. Furthermore, as charger types evolve, the equipment itself requires improvements or bug fixes, necessitating frequent updates to the system functions and CAN protocol.

[0004] For charger repair and testing equipment, as a new product after its market launch, its system functions are frequently improved or vulnerabilities are fixed, thus requiring a convenient and quick system update solution. Currently, commonly used embedded software upgrade methods include proprietary tool flashing, in-system programming (ISP), and in-application programming (IAP). The first two methods are very difficult for non-professionals to operate, requiring engineers to be on-site for maintenance, which is very inconvenient and results in significant waste of manpower, resources, and time. In-application programming (IAP) allows the application to be rewritten and run during program execution, and through flexible design, it can achieve serial port upgrades, USB upgrades, GPRS upgrades, WiFi upgrades, etc. Serial port and USB upgrades still require on-site download and update, which presents a certain level of operational difficulty for users.

[0005] Furthermore, the traditional charger repair process mainly involves testing the charger, primarily testing its output performance and the energy consumption of electronic loads. However, since electric vehicle electrical equipment cannot output DC power, additional DC power is required when the electrical equipment of the electric vehicle needs DC power. This process is complex, involves many repair devices, and significantly increases the manpower and material resources required for repairs.

[0006] For remote upgrade technology, scholars both domestically and internationally have proposed many solutions. Among them are the STM32 firmware remote upgrade system designed by Chen Yi'an et al., which implements software updates via WiFi module access to the network; the STM32 remote firmware update system designed by Chen Feng et al., which implements an online firmware update solution for controllers using the 485 bus; and the STM32 firmware remote upgrade system by Niu Junhao, which implements remote application program updates based on GPRS. Some of these solutions are costly to use WiFi, requiring a separate network card and router or access point (AP) device; others require wired connections, necessitating the preparation of connecting cables in advance, which is quite inconvenient.

[0007] OTA (Over-The-Air) is a technology that uses SMS mechanisms to remotely manage software via mobile terminals or servers through the air interface of mobile communication. Currently, mainstream OTA remote firmware updates are implemented via WiFi, which consumes a lot of power for microcontrollers, requires a separate network card, and is susceptible to interference. Applying OTA technology to charger repair and testing equipment, using over-the-air download technology to achieve real-time online updates of the system program and realize wireless remote management, is a current research direction aimed at addressing the urgent needs of new energy vehicle repair. Summary of the Invention

[0008] In order to solve the problems of difficult charging test, complicated operation and many maintenance equipment caused by the variety of charging models in the above-mentioned traditional charging repair, this invention proposes an OTA-type new energy charging repair and testing system based on GD32.

[0009] This invention is achieved through the following technical solution:

[0010] The aforementioned OTA-based new energy charger repair and testing system based on GD32 includes a backend management system, a mobile terminal, and a repair and testing equipment host. The backend management system stores .bin files for OTA upgrades. After being designed and tested by code developers, these files are uploaded to the backend database via a webpage by the system administrator, thus providing downloadable code. The mobile terminal includes a WeChat mini-program and a Bluetooth module. It establishes a Bluetooth connection with the repair and testing equipment host, transmits code using the Ymodem protocol to communicate with the host, and uses a custom protocol to obtain power management status and set parameters. The URL in the WeChat mini-program retrieves the necessary .bin files from the backend management system, saves them locally, and has system update, device monitoring, and protocol transmission functions. It includes a homepage and a monitoring function page. The homepage includes Bluetooth scanning, a list of nearby Bluetooth devices, system updates, and access to device monitoring. The monitoring function page includes a device information query function. The system includes functions such as an anomaly display panel, device parameter modification, and CAN protocol transmission. The maintenance and testing equipment host serves as the communication target for the mobile maintenance mini-program, i.e., the target for OTA upgrades. It is equipped with a GD32 microcontroller and uses IAP programming to burn received bin files into the system. File transfer uses the Ymodem protocol, and communication with the WeChat mini-program is conducted via a question-and-answer method, except for file transfer. The system update function, i.e., the homepage system update, is used to update the microcontroller program of the testing equipment. The device monitoring function mainly displays the power supply voltage, power supply current, load voltage, load current, and abnormal status information of the maintenance and testing equipment on the mini-program page. It also supports manually writing parameters and sending them to the testing equipment to control the equipment's voltage and current information. The protocol transmission function allows the user to obtain a list of selectable CAN protocols from the backend, select the required protocol for the testing equipment, download it from the server via network request, and then transmit it to the testing equipment via Bluetooth for processing.

[0011] The aforementioned OTA-based new energy charger repair and testing system based on GD32 includes the following: The system update function uses the Ymodem communication protocol. The operation process is as follows: Before starting, Bluetooth permission must be enabled on the mobile phone. Click the scan button to start scanning and obtain a list of all nearby Bluetooth devices. Click the device to be connected to. After successful connection, the user only needs to click the system update button to check if there is any update information. If not, a message will be displayed indicating that there is no update. Otherwise, the download will begin. After the program successfully downloads the code package from the server via network request, the system update button will change to a code transfer button. Clicking the code transfer button will upload the temporarily stored code file to the microcontroller via Bluetooth. A progress bar will appear during the transfer process to show the progress. After the transfer is complete, the system will then use the... The microcontroller's IAP programming function successfully implemented the system update. The device monitoring function uses a custom communication protocol, and its operation process is as follows: enable Bluetooth permission on the mobile phone, click the scan button to start scanning, obtain a list of all nearby Bluetooth devices, click the device to be connected, and after successful connection, query the device's current, voltage, and abnormal information to determine whether to write voltage or current values. If so, select the object to write and set the parameter values. The process ends after successful writing; otherwise, it ends directly. The protocol transmission function's operation process is as follows: enable Bluetooth permission on the mobile phone, click the scan button to start scanning, obtain a list of all nearby Bluetooth devices, click the device to be connected, and after successful connection, obtain the CAN protocol list from the background management system, select the required CAN protocol to send, and click end after successful transmission.

[0012] The aforementioned OTA-based new energy charger repair and testing system based on GD32 includes a background management system comprising a start page, an update package file management page, and a CAN protocol file management page. Administrators can upload, download, or delete files on the background server through these pages.

[0013] The aforementioned OTA-based new energy charger repair and testing system based on GD32 includes the following microcontroller control flow: After system startup, the system enters program initialization, which mainly initializes the timer, serial port, DAC, and ADC peripherals. Then, it enters the system self-test program. If the self-test fails, it waits for the system fault to be resolved, and the system displays fault prompt information. After the self-test passes, it enters the mode selection. At this time, it can select one of three modes: constant current mode, constant voltage mode, and DC output, or select DC output and one of the other two modes. Then, it enters the control subroutine, sets the preset current value, and enters the PID calculation program to determine whether the set value has been reached. If not, the PID calculation program is re-run. After the set value is reached, the control voltage signal is output through the DAC.

[0014] The aforementioned OTA-based new energy charger repair and testing system based on GD32 includes a microcontroller whose Flash memory stores boot programs, version parameter information, error flag information, APP startup programs, and long-term storage data sequentially starting from 0. It has an APP1 area for storing new APP startup programs and an APP2 area for storing backup APP startup programs.

[0015] The aforementioned OTA-based new energy charger repair and testing system based on GD32 includes a Bluetooth module using the JDY-18 transparent transmission module, which operates based on the Bluetooth 4.2 protocol standard, operates in the 2.4GHz frequency band, uses GFSK modulation, has a maximum transmission power of 0dB, and a maximum transmission distance of 60 meters.

[0016] The aforementioned OTA-based new energy charger repair and testing system based on GD32 includes: a main unit comprising a GD32 microcontroller, an LCD module, a FLASH module, a DC electronic load module, a DC power supply module, a CAN protocol simulation module, and a system power supply module; the GD32 microcontroller includes USART, CAN, EXMC, and SPI interface functions; the LCD module is connected to the microcontroller's EXMC interface, and the FLASH module is connected to the microcontroller's SPI interface; the DC electronic load module and the DC power supply module are respectively connected to the microcontroller's I / O ports; the CAN interface of the CAN protocol simulation module, used to simulate the communication protocols of various devices, is connected to the microcontroller's CAN interface; and the system power supply module is electrically connected to the microcontroller, the DC electronic load module, and the DC power supply module.

[0017] The aforementioned OTA-based new energy charger repair and testing system based on GD32 includes: a DC power supply module comprising a DC power supply, a filter amplifier circuit, and a DC power supply signal processing circuit; the DC power supply signal input terminal is connected to the filter amplifier circuit, and the signal output terminal is connected to the DC power supply signal processing circuit; the current and voltage signals of the DC power supply are fed back to the microcontroller through the DC power supply signal processing circuit, and the microcontroller controls the DC power supply by outputting a signal through the filter amplifier circuit via a TIMER.

[0018] The aforementioned OTA-based new energy charger repair and testing system based on GD32 includes: a DC electronic load module comprising a DC electronic load, a voltage amplification circuit, and a DC electronic load signal processing circuit; the signal input terminal of the DC electronic load is connected to the voltage amplification circuit, and the signal output terminal is connected to the DC electronic load signal processing circuit; the current and voltage signals of the DC electronic load are fed back to the microcontroller through the DC electronic load signal processing circuit, and the microcontroller outputs a voltage signal through a DAC, which is then amplified by the voltage amplification circuit to control the constant current and constant voltage modes of the DC electronic load. Beneficial effects

[0019] This invention utilizes OTA (Over-The-Air) remote online upgrade functionality to promptly update the functions of the charger repair and testing system. Transmitting CAN protocol files via Bluetooth enables timely updates to the charger's CAN protocol database, facilitating maintenance and upgrades. The lower-level device for OTA remote upgrades employs IAP (In-Application Programming), allowing for remote firmware updates with advantages such as convenience, stability, and low cost. The OTA upgrade scheme, based on Bluetooth IAP, requires only a Bluetooth connection to the test equipment for data transmission. The microcontroller then programs the data using IAP, enabling remote upgrades. This method is significantly more convenient and faster than traditional on-site updates by maintenance personnel, avoiding time and manpower losses. Users operate via a WeChat mini-program, downloading the pre-designed update package from the cloud to their local machine for OTA updates. The operation is simple, user-friendly, and easy to use even for non-developers, ensuring high reliability. Furthermore, the Bluetooth connection established through the WeChat mini-program allows for real-time monitoring of the device, acquiring power or load information such as current and voltage values, as well as any abnormal states, facilitating maintenance and updates for staff.

[0020] WeChat Mini Programs are an interactive platform for charger repair personnel. They require no installation or uninstallation, and their small memory footprint and fast running speed allow them to run well even on low-spec phones. Based on the characteristics of the WeChat platform, they are also compatible with any mobile phone system. The extremely widespread availability of mobile phones means that we can use Mini Programs in almost any scenario. Only a mobile phone is needed to access the service, which greatly reduces the cost for users to use the system and is also conducive to the promotion and use of the system in the charger repair industry.

[0021] The development based on WeChat Mini Programs can be adapted to multiple mobile phone systems, has low requirements for mobile phone performance, and is lightweight. As long as users have mobile devices, they can use the service. The characteristics of not being limited by the mobile phone operating system are conducive to the widespread promotion of the software. The transfer of the device management and real-time monitoring functions in human-computer interaction from the device itself to the Mini Program is also conducive to the improvement and maintenance of the monitoring functions in the future.

[0022] In addition, the program also provides a CAN protocol selection and download function for various CAN protocol requirements of the test equipment, which can make the test equipment work according to the set CAN protocol parameters to adapt to different chargers.

[0023] This system combines an adjustable DC high-voltage DC power supply, a DC electronic load, and a CAN protocol simulation. Compared to the traditional charger repair process, which mainly involves testing the charger, this system integrates these three functions into one, reducing unnecessary costs and time for charger repair and testing personnel. It is also easy to operate.

[0024] This system enables real-time monitoring of test equipment via a mini-program, overcomes the cumbersome methods of updating test equipment systems, and provides multiple CAN protocols for test equipment to choose from, thus adapting to different chargers. For embedded devices on the market with serial ports and Bluetooth modules, this solution allows for convenient functional expansion and system updates, greatly reducing maintenance costs. It is also safe, reliable, and has promising application prospects. Attached Figure Description

[0025] Figure 1 This is a schematic diagram of the OTA-based new energy charger repair and testing system based on GD32 according to the present invention.

[0026] Figure 2 This is a WeChat mini-program flowchart of the OTA-based new energy charger repair and testing system based on GD32 according to the present invention;

[0027] Figure 3 This is a flowchart of the WeChat mini-program system update function of the OTA-based new energy charger repair and testing system based on GD32 of this invention.

[0028] Figure 4 This is a flowchart of the WeChat mini-program device monitoring function of the OTA-based new energy charger repair and testing system based on GD32 according to the present invention.

[0029] Figure 5 This is a flowchart illustrating the operation of the WeChat mini-program protocol transmission function of the OTA-based new energy charger repair and testing system based on GD32 according to the present invention.

[0030] Figure 6 This is a flowchart of the microcontroller control of the OTA-type new energy charger repair and testing system based on GD32 according to the present invention.

[0031] Figure 7 This is a flowchart of the microcontroller control subroutine of the OTA-type new energy charger repair and testing system based on GD32 according to the present invention;

[0032] Figure 8 This is a partition diagram of the FLASH module of the OTA-type new energy charger maintenance and testing system based on GD32 according to the present invention;

[0033] Figure 9This is a DC electronic load control state diagram of the OTA-type new energy charger maintenance and testing system based on GD32 according to the present invention.

[0034] Figure 10 This is a DC power supply control state diagram of the OTA-type new energy charger repair and testing system based on GD32 according to the present invention.

[0035] Figure 11 This is a diagram of the WeChat mini-program update package transmission interface of the OTA-type new energy charger repair and testing system based on GD32 according to the present invention.

[0036] Figure 12 This is a diagram showing the status information of the test equipment in the OTA-based new energy charger maintenance and testing system based on GD32 of this invention.

[0037] Figure 13 This is a test diagram of the writing parameter function of the OTA-type new energy charger maintenance and testing system based on GD32 according to the present invention. Detailed Implementation

[0038] like Figures 1 to 12 As shown, the present invention is an OTA-type new energy charger repair and testing system based on GD32, which includes a background management system 1, a mobile terminal 2, and a repair and testing equipment host 3.

[0039] The backend management system 1 stores the bin files used for OTA upgrades. After being designed and tested by the code developers, the files are uploaded to the backend database by the system administrator via a webpage, thus providing the code for download.

[0040] Mobile device 2 establishes a Bluetooth connection with the maintenance and testing equipment host 3 and transmits code to communicate with the maintenance and testing equipment host 3 using the Ymodem protocol. It also communicates with the maintenance and testing equipment host 3 using a custom protocol to obtain power management status and set parameters, including WeChat mini program 21 and Bluetooth module 22.

[0041] The URL in WeChat Mini Program 21 retrieves the necessary bin files from the backend management system 1 and saves them locally. It has system update, device monitoring, and protocol transmission functions, including a homepage 211 and a monitoring function page 212; for example... Figure 2 As shown, the homepage 21 includes Bluetooth scanning, a list of nearby Bluetooth devices, system updates, and access to device monitoring; the monitoring function page 212 includes a device information query function, an anomaly display, a device parameter modification function, and a CAN protocol transmission function.

[0042] The system update function, specifically the system update function on the homepage, is used to update the microcontroller program of the test equipment. The system update function uses the Ymodem communication protocol, and the operation process is as follows: Figure 3As shown, before starting, Bluetooth permission needs to be enabled on the mobile app. Click the scan button to start scanning and obtain a list of all nearby Bluetooth devices. Click the device you want to connect to and connect. After successful connection, the user only needs to click the system update button to check if there is any update information. If not, a message will be displayed indicating that there is no update. Otherwise, the download will begin. After the program successfully downloads the code package from the server via network request, the system update button will change to the transfer code button. Clicking the transfer code button will upload the temporarily stored code file to the microcontroller via Bluetooth. A progress bar will appear during the transfer to show the transfer progress. After the transfer is complete, the system update can be successfully achieved using the microcontroller's IAP programming function.

[0043] The equipment monitoring function primarily displays information such as power supply voltage, power supply current, load voltage, load current, and abnormal status of the equipment being repaired and tested on the mini-program page. It also supports manually writing parameters and sending them to the test equipment to control its voltage and current. The equipment monitoring function uses a custom communication protocol, and the operation process is as follows: Figure 4 As shown: Before starting, enable Bluetooth permission on your mobile phone (version 11), click the scan button to start scanning, obtain a list of all nearby Bluetooth devices, click the repair and testing device you need to connect to, and connect. After successful connection, check the device's current, voltage, and abnormal information, and determine whether to write voltage or current or voltage value. If yes, select the object to write and set the parameter value. After successful writing, click End; otherwise, click End directly.

[0044] The protocol transmission function involves the user obtaining a list of selectable CAN protocols from the backend, choosing the protocol required by the test device, downloading it from the server via network request, and then transmitting it to the test device via Bluetooth for processing. The operation flow of the protocol transmission function is as follows: Figure 5 As shown: Before starting, enable Bluetooth permission on your mobile phone 11, click the scan button to start scanning, obtain a list of all nearby Bluetooth devices, click the repair and testing device you need to connect to, and connect. After successful connection, obtain the CAN protocol list from the background management system 13, select the required CAN protocol to send, and click end after successful transmission.

[0045] The maintenance and testing equipment host 3 is the communication target of the mobile terminal 2, i.e., the target of OTA upgrade. It is equipped with a GD32 microcontroller and burns the received bin file into the system through the IAP burning function. The file transfer process adopts the Ymodem protocol. In addition to the file transfer function, it communicates with the WeChat mini program 21 in a question-and-answer manner. It includes a GD32 microcontroller 31, an LCD module 32, a FLASH module 33, a DC electronic load module 34, a DC power supply module 35, a CAN protocol simulation module 36, a system power supply module 37, and a host Bluetooth module 38.

[0046] The GD32 microcontroller 31 includes USART, CAN, EXMC, and SPI interface functions; the control flow of the GD32 microcontroller 31 is as follows: Figure 6 As shown, after the system starts, it enters program initialization, which mainly initializes peripherals such as timers, serial ports, DACs, and ADCs. Then it enters the system self-test program. If the self-test fails, it waits for the system fault to be resolved, and the system displays a fault message. After the self-test passes, it enters the mode selection. At this time, you can choose one of three modes: constant current mode, constant voltage mode, and DC output, or choose DC output and one of the other two modes. Then it enters the control subroutine, such as... Figure 7 As shown, after setting the preset current value, the PID calculation program is entered to determine whether the set value has been reached. If not, the PID calculation program is re-run. Once the set value is reached, the control voltage signal is output through the DAC.

[0047] The LCD module 32 is connected to the EXMC interface of the GD32 microcontroller 31.

[0048] The FLASH module 33 is connected to the SPI interface of the GD32 microcontroller 31; for example... Figure 8 As shown, the Flash module stores the boot program, version parameter information, error flag information, APP startup program and long-term storage data sequentially starting from 0. It has an APP1 area for storing new APP startup programs and an APP2 area for storing backup APP startup programs to prevent abnormal problems from occurring during the burning process.

[0049] The APP startup program and the bootloader are stored at different addresses in the Flash module 33. The program or data is received through communication methods (USART, GPRS, WiFi, etc.) to upgrade and update the APP startup program. The update process is as follows: After the device is powered on, the bootloader first runs, receives the updated application through Bluetooth and writes it to the APP1 area of ​​the Flash module 33. Then, the program pointer of the GD32 microcontroller 31 points to the new program code, thereby realizing the program jump. When the bootloader updates the APP startup program, if the program is normal, it will be written normally; otherwise, it will jump to the backup APP startup program.

[0050] The DC electronic load module 34 is connected to the I / O port of the GD32 microcontroller 31, and includes a DC electronic load (not shown), a voltage amplifier circuit (not shown), and a DC electronic load signal processing circuit (not shown). The signal input terminal of the DC electronic load is connected to the voltage amplifier circuit, and the signal output terminal is connected to the DC electronic load signal processing circuit. The DC electronic load is connected to the GFIO port of the microcontroller 31, the voltage amplifier circuit is connected to the DAC port of the microcontroller 31, and the DC electronic load signal processing circuit is connected to the ADC port of the microcontroller 31. The current and voltage signals of the DC electronic load are fed back to the microcontroller 31 through the DC electronic load signal processing circuit. The microcontroller 31 outputs a voltage signal through the DAC, which is then amplified by the voltage amplifier circuit to control the constant current and constant voltage modes of the DC electronic load. The DC electronic load control is as follows: Figure 9 As shown, the system first starts up and enters standby mode. Then, you can choose to enter constant current mode or constant voltage mode. You can return to standby mode in both modes. When a fault occurs, it enters fault mode. In fault mode, you can also enter shutdown mode.

[0051] The DC power supply module 35 is connected to the I / O port of the GD32 microcontroller 31, and includes a DC power supply (not shown), a filter amplifier circuit (not shown), and a DC power supply signal processing circuit (not shown). The DC power supply signal input is connected to the filter amplifier circuit, and the signal output is connected to the DC power supply signal processing circuit. The filter amplifier circuit is connected to the TIMER port of the microcontroller 31, and the DC power supply signal processing circuit is connected to the CAN port of the microcontroller 31. The current and voltage signals of the DC power supply are fed back to the microcontroller 31 through the DC power supply signal processing circuit. The microcontroller 31 controls the DC power supply by outputting a signal through the TIMER and passing it through the filter amplifier circuit. The control of the DC power supply is as follows: Figure 10 As shown, after startup, it enters standby mode. After setting the output voltage, the DC power supply works. If a fault occurs in the system, it enters fault mode or returns to standby mode. If the fault mode is not cleared, it enters shutdown mode.

[0052] The CAN interface of the CAN protocol simulation module 36, which is used to simulate the communication protocols of various devices, is connected to the CAN interface of the GD32 microcontroller 31.

[0053] The system power supply module 37 is electrically connected to the GD32 microcontroller 31, the DC electronic load module 34, and the DC power supply module 35, respectively.

[0054] The Bluetooth module 38 uses the JDY-18 transparent transmission module, which operates based on the Bluetooth 4.2 protocol standard, operates in the 2.4GHz frequency band, uses GFSK modulation, has a maximum transmit power of 0dB, and a maximum transmit distance of 60 meters.

[0055] Testing of the system's update function and CAN protocol transmission:

[0056] After the program update operation is performed, the mini-program displays a message indicating that the code transfer is complete. Figure 11 As shown, the device under test is successfully programmed, the program runs successfully, the CAN protocol is selected and transmitted, and finally the device starts up normally.

[0057] Testing the device monitoring function of the system:

[0058] After performing operations related to device monitoring, the mini-program, such as Figure 12 As shown, the power supply voltage, power supply current and other information were successfully obtained, which are consistent with the information displayed on the device screen.

[0059] Start the write parameter test, set the write object to the power supply, mode to internal power supply, voltage 237V, current 3A, and submit as follows: Figure 13 As shown, the setup was successful, and the test device displayed a voltage of 237V and a current of 3A, consistent with the input values.

[0060] In summary, this system has the following characteristics:

[0061] WeChat Mini Programs are an interactive platform for charger repair personnel. They require no installation or uninstallation, and their small memory footprint and fast running speed allow them to run well even on low-spec phones. Based on the characteristics of the WeChat platform, they are also compatible with any mobile phone system. The extremely widespread availability of mobile phones means that we can use Mini Programs in almost any scenario. Only a mobile phone is needed to access the service, which greatly reduces the cost for users to use the system and is also conducive to the promotion and use of the system in the charger repair industry.

[0062] The development based on WeChat Mini Programs can be adapted to multiple mobile phone systems, has low requirements for mobile phone performance, and is lightweight. As long as users have mobile devices, they can use the service. The characteristics of not being limited by the mobile phone operating system are conducive to the widespread promotion of the software. The transfer of the device management and real-time monitoring functions in human-computer interaction from the device itself to the Mini Program is also conducive to the improvement and maintenance of the monitoring functions in the future.

[0063] In addition, the program also provides a CAN protocol selection and download function for various CAN protocol requirements of the test equipment, which can make the test equipment work according to the set CAN protocol parameters to adapt to different chargers.

[0064] This invention utilizes OTA (Over-The-Air) remote online upgrade functionality to promptly update the charger system. Transmitting CAN protocol files via Bluetooth enables timely updates to the charger's CAN protocol database, facilitating maintenance and upgrades. The lower-level device for OTA remote upgrades employs IAP (In-Application Programming), allowing for remote firmware updates with advantages such as convenience, stability, and low cost. The OTA upgrade scheme, based on Bluetooth IAP, requires only a Bluetooth connection to the test device for data transmission. The microcontroller then programs the data using IAP, enabling remote upgrades. This method is significantly more convenient and faster than traditional on-site updates by maintenance personnel, avoiding time and manpower losses. Users operate via a WeChat mini-program, downloading the pre-designed update package from the cloud to their local machine for OTA updates. The operation is simple, user-friendly, and easy to use even for non-developers, ensuring high reliability. Furthermore, the Bluetooth connection established through the WeChat mini-program allows for real-time monitoring of the device, acquiring power or load information such as current and voltage values, as well as any abnormal states, facilitating maintenance and updates.

Claims

1. A GD32-based OTA-type new energy charger maintenance and testing system, characterized in that: The system includes a back-end management system, a mobile terminal, and a maintenance and testing equipment host. The backend management system is used to store bin files for OTA upgrades. After being designed and tested by the code developers, the files are uploaded to the backend database by the system administrator via a webpage, thereby providing downloadable code. The mobile terminal includes a WeChat mini-program and a Bluetooth module. It establishes a Bluetooth connection with the host of the maintenance and testing equipment, transmits code using the Ymodem protocol to communicate with the host, and obtains power management status and sets parameters using a custom protocol to communicate with the host. The URL in the WeChat mini-program obtains the necessary bin files from the backend management system, saves them locally, and has system update, device monitoring, and protocol transmission functions, including a homepage and a monitoring function page. The homepage includes Bluetooth scanning, a list of nearby Bluetooth devices, system updates, and access to device monitoring. The monitoring function page includes a device information query function, an anomaly display, a device parameter modification function, and a CAN protocol transmission function. The main unit of the maintenance and testing equipment is the communication object of the mobile maintenance applet, i.e. the object of OTA upgrade. It is equipped with a GD32 microcontroller and burns the received bin file into the system through the IAP burning function. The file transfer process uses the Ymodem protocol, and in addition to the file transfer function, it communicates with the WeChat mini program in a question-and-answer manner. The system update function, namely the system update on the homepage, is used to update the microcontroller program of the test equipment. The equipment monitoring function mainly displays the power supply voltage, power supply current, load voltage, load current, and abnormal status information of the maintenance and testing equipment on the mini-program page. It also supports manually writing parameters and sending them to the testing equipment to control the voltage and current information of the equipment. The protocol transmission function involves the user obtaining a list of selectable CAN protocols from the backend, selecting the protocol required by the test device, downloading it from the server to the local machine via network request, and then transmitting it to the test device for processing via Bluetooth.

2. The OTA-based new energy charger repair and testing system based on GD32 as described in claim 1, characterized in that: The system update function uses the Ymodem communication protocol. The operation process is as follows: Before starting, Bluetooth permission needs to be enabled on the mobile phone. Click the scan button to start scanning and obtain a list of all nearby Bluetooth devices. Click the device to be connected to. After successful connection, the user only needs to click the system update button to check if there is any update information. If not, it will prompt that there is no update. Otherwise, the download will start. After the program successfully downloads the code package from the server through the network request, the system update button will change to the code transfer button. Clicking the code transfer button will upload the code file temporarily stored locally to the microcontroller via Bluetooth. A progress bar will appear to show the transfer progress during the transfer. After the transfer is completed, the system update is successfully achieved by using the microcontroller's IAP programming function. The device monitoring function uses a custom communication protocol. The operation process is as follows: turn on Bluetooth permission on the mobile phone, click the scan button to start scanning, obtain a list of all nearby Bluetooth devices, click the device to be connected to, and after successful connection, query the device current, voltage and abnormal information, determine whether to write voltage or current values, if so, select the object to write and set the parameter values, and end after successful writing. Otherwise, end directly; The operation process of the protocol transmission function is as follows: turn on Bluetooth permission on the mobile phone, click the scan button to start scanning, obtain a list of all nearby Bluetooth devices, click the device to be connected to, and after successful connection, obtain the CAN protocol list from the background management system, select the required CAN protocol to send, and after successful transmission, click end.

3. The OTA-based new energy charger repair and testing system based on GD32 as described in claim 1, characterized in that: The backend management system includes a start page, an update package file management page, and a CAN protocol file management page. Administrators can upload, download, or delete files on the backend server through these pages.

4. The OTA-based new energy charger repair and testing system based on GD32 as described in claim 1, characterized in that: The control flow of the microcontroller is as follows: After the system starts, it enters the program initialization stage, which mainly initializes the timer, serial port, DAC, and ADC peripherals. Then, it enters the system self-test program. If the self-test fails, it waits for the system fault to be cleared, and the system displays a fault message. After the self-test passes, it enters the mode selection stage, where it can choose one of three modes: constant current mode, constant voltage mode, and DC output, or one of two other modes: DC output. Then, it enters the control subroutine, sets the preset current value, and enters the PID calculation program to determine whether the set value has been reached. If not, the PID calculation program is re-run. After the set value is reached, the control voltage signal is output through the DAC.

5. The OTA-based new energy charger repair and testing system based on GD32 as described in claim 1, characterized in that: The microcontroller's Flash memory stores the boot program, version parameter information, error flag information, APP startup program, and long-term storage data sequentially starting from 0. It has an APP1 area for storing new APP startup programs and an APP2 area for storing backup APP startup programs.

6. The OTA-based new energy charger repair and testing system based on GD32 as described in claim 1, characterized in that: The Bluetooth module uses the JDY-18 transparent transmission module, operates based on the Bluetooth 4.2 protocol standard, operates in the 2.4GHz frequency band, uses GFSK modulation, has a maximum transmit power of 0dB, and a maximum transmit distance of 60 meters.

7. The OTA-based new energy charger repair and testing system based on GD32 as described in claim 1, characterized in that: The main unit of the maintenance and testing equipment includes a GD32 microcontroller, an LCD module, a FLASH module, a DC electronic load module, a DC power supply module, a CAN protocol simulation module, and a system power supply module; The GD32 microcontroller includes USART, CAN, EXMC, and SPI interface functions; The LCD module is connected to the microcontroller's EXMC interface, and the FLASH module is connected to the microcontroller's SPI interface. The DC electronic load module and the DC power supply module are respectively connected to the microcontroller's I / O port; The CAN interface of the CAN protocol simulation module, which is used to simulate the communication protocols of various devices, is connected to the CAN interface of the microcontroller. The system power supply module is electrically connected to the microcontroller, the DC electronic load module, and the DC power supply module, respectively.

8. The OTA-based new energy charger repair and testing system based on GD32 as described in claim 7, characterized in that: The DC power module includes a DC power supply, a filter amplifier circuit, and a DC power signal processing circuit; the DC power signal input terminal is connected to the filter amplifier circuit, and the signal output terminal is connected to the DC power signal processing circuit. The current and voltage signals of the DC power supply are fed back to the microcontroller through the DC power supply signal processing circuit. The microcontroller controls the DC power supply by outputting a signal through the TIMER and passing it through the filtering and amplification circuit.

9. The OTA-based new energy charger repair and testing system based on GD32 as described in claim 7, characterized in that: The DC electronic load module includes a DC electronic load, a voltage amplifier circuit, and a DC electronic load signal processing circuit; the DC electronic load signal input terminal is connected to the voltage amplifier circuit, and the signal output terminal is connected to the DC electronic load signal processing circuit. The current and voltage signals of the DC electronic load are fed back to the microcontroller through the DC electronic load signal processing circuit. The microcontroller outputs a voltage signal through a DAC and controls the constant current and constant voltage modes of the DC electronic load through a voltage amplification circuit.