Charger voltage and current automatic calibration method based on multiple communication types
Through the automatic voltage and current calibration method of charger based on multi-communication types, the real-time communication between the automatic calibration host and the charger and electronic load is solved, and the existing charger calibration equipment is achieved with high efficiency and automated voltage and current calibration.
Patent Information
- Application Number
- CN202311141692.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-06
- Publication Date
- 2025-03-07
AI Technical Summary
Existing charger calibration equipment has problems such as inaccurate voltage and current calibration, inconvenient data storage, and single testing functions, which are difficult to meet the automated calibration needs of large-scale chargers.
The automatic calibration method of voltage and current of the charger based on multi-communication type is adopted to realize automatic calibration of voltage and current by automatically calibrating the real-time communication between the upper computer and the charger and the electronic load. Specific steps include device connection, voltage and current calibration, coefficient calibration, etc., and data storage is saved using the Flash memory area.
It improves the accuracy of charger voltage and current calibration, simplifies the operation process, reduces manual intervention, and realizes automatic data storage and efficient system operation.
Smart Images

Figure CN119575272A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of new energy vehicle charging, and in particular to a method for automatic calibration of voltage and current of a charger based on multiple communication types. Background Art
[0003] The sales volume of charger products will also increase with the market demand, and the rated output voltage and rated output current of the charger are important indicators to measure the product quality. At present, there is no universal calibration method with high efficiency, accurate calibration data and system. Therefore, it is particularly important to design a system for automatic calibration of the output voltage and current of large quantities of chargers.
[0004] Current calibration equipment has the following disadvantages:
[0005] (1) For some chargers that require a long soft start, the calibration system running on the PC sends communication instructions to obtain the voltage inside the charger and the actual output voltage displayed on the electronic load. There is a small probability that there will be a missynchronization phenomenon, which can easily cause misjudgment of the automatic calibration result;
[0006] (2) Currently, it is not possible to document the calibration results of each device in the past, making it difficult to trace and compare and analyze.
[0007] (3) The calibration and testing of the charger cannot be separated from the electronic load. The electronic load itself not only has the function of calibrating voltage and current, but other testing functions need to be further developed.
[0008] Therefore, how to provide a charger voltage and current automatic calibration method based on multiple communication types to solve the problems existing in the prior art is of great significance to its application. Summary of the invention
[0009] In view of this, the purpose of the present application is to provide a charger voltage and current automatic calibration method based on multiple communication types to solve the problem.
[0010] To achieve the above object, the present invention provides the following technical solution: comprising the following steps
[0011] S1: Connect the device, including:
[0012] S1.1: Connect the charger's communication signal line to the corresponding communication level conversion device, and then connect the communication level conversion device to the automatic calibration host computer via a USB cable;
[0013] S1.2: Connect the communication line of the electronic load to the automatic calibration host computer via USB;
[0014] S2: The automatic calibration host computer sends a command to the electronic load and charger, and the electronic load and charger respond and start charger calibration;
[0015] The S2 comprises the following steps:
[0016] S2.1: voltage calibration;
[0017] S2.2: voltage coefficient calibration;
[0018] S2.3: Current calibration;
[0019] S2.4: Current coefficient calibration.
[0020] Preferably, the specific steps of S2.1 are as follows:
[0021] S2.1.1: Automatic calibration: The host computer sends relevant instructions, and the electronic load is set to CC mode with 0.5A load;
[0022] S2.1.2: The communication sends a voltage calibration command to the charger. After receiving the command, the charger determines whether the current voltage meets the preset value. If so, the actual voltage of the first reference point is written into the internal Flash of the charger.
[0023] S2.1.3: The communication sends a voltage calibration command to the charger. After receiving the command, the charger determines that the current voltage meets the preset value. If it meets the preset value, the actual voltage of the second reference point is written into the internal Flash of the charger.
[0024] S2.1.4: After receiving the command, the charger will calculate the PWM value of the control voltage after linear fitting, and the charger outputs the expected voltage.
[0025] Preferably, the specific steps of S2.2 are as follows:
[0026] S2.2.1: Communication sends a voltage coefficient calibration command to the charger to match the charger ADC sampling coefficient, so that the output voltage of the charger matches the voltage displayed by the electronic load;
[0027] S2.2.2: Is the internal voltage of the charger consistent with the voltage displayed by the electronic load? If so, the communication sends a voltage calibration instruction to the charger to compare the internal voltage of the charger with the voltage displayed by the electronic load. If not, return to the step.
[0028] S2.2.3: The communication sends a command to the electronic load to set the output state (OFF) of the load.
[0029] Preferably, the specific steps of S2.3 are as follows:
[0030] S2.3.1: Communicate and send an instruction to the electronic load to switch to CV mode;
[0031] S2.3.2: CV load voltage according to the charger request;
[0032] S2.3.3: Communicate and send the setting calibration load voltage to the electronic load;
[0033] S2.3.4: The electronic load is set to the load output state (on) under communication.
[0034] Preferably, the specific steps of S2.4 are as follows:
[0035] S2.4.1: Communication sends voltage coefficient calibration instructions to the charger to match the charger ADC sampling coefficient, so that the output voltage of the charger matches the voltage displayed by the electronic load
[0036] S2.4.2 communication sends a current calibration instruction to the charger to calibrate the charger output current;
[0037] S2.4.3 determines whether the current output current is the expected value based on the communication feedback result of the charger. If so, it prompts that the calibration is completed. If not, return to step S2.3.2 and execute again.
[0038] Preferably, in S2.2, the PWM value of the control voltage is used as the horizontal coordinate, and the output voltage of the charger is used as the vertical coordinate, that is, the coordinates of the current first point are marked as (x0, y0); after the charger receives the first voltage command sent by the calibration host computer running on the PC, the charger first writes the actual voltage value y0 on the electronic load corresponding to the current PWM value x0 into the flash storage area inside the charger, and then the MCU of the charger adjusts the PWM value to x1. Due to the voltage PWM adjustment, the output voltage of the charger will also change to around the predefined y1.
[0039] Preferably, in S2.2, if the automatic calibration host computer sends a voltage calibration command for the second time, after the charger parses it correctly according to the preset communication protocol, the MCU of the charger will execute and write the actual output voltage value corresponding to the PWM value x1 at this time into the internal Flash.
[0040] Preferably, in S2.2:
[0041] If the automatic calibration host sends a voltage calibration command for the third time, the charger will read out the actual voltage values y0, y1 corresponding to the PWM values x0, x1 previously written into its own Flash after the charger correctly interprets it according to the preset communication protocol, and perform a linear fitting operation to obtain two reference points (x0, y0) and (x1, y1).
[0042] From the point-line equation we can get:
[0043] Slope: k = (y1-y0) / (x1-x0) Y-intercept: b = y0-k*x0
[0044] The fitting curve equation is: y=k*x+b (y is the voltage value to be output, and x is the corresponding voltage PWM value);
[0045] After calculating the fitted linear curve, the charger's MCU performs linear operations based on the required output reference voltage value and calculates the required voltage PWM to ensure the required constant voltage output;
[0046] If the automatic calibration host computer sends a voltage calibration command for the fourth time, the charger will perform calculations according to the steps in claim 7 after correctly parsing it according to the preset communication protocol, and re-output to verify whether the output is correct.
[0047] Preferably, in S2.2:
[0048] Correct the error of the ADC data collected by the charger, and use the coefficient K variable to correct the voltage collected by the ADC, that is, the actual voltage value = ADC sampling value * coefficient K;
[0049] The charger uses its own ADC output sampling circuit to obtain the real-time charger voltage, and uses the ADC sampling circuit voltage divider resistor to obtain the initial coefficient K0. The error correction of the sampling coefficient can be completed by the following calculation relationship:
[0050] Charger internal ADC sampling voltage * sampling correction voltage coefficient K = electronic load voltage * initial sampling coefficient K0
[0051] In the above calculation, the sampling correction coefficient K is unknown, and the corresponding coefficient can be obtained through calculation.
[0052] Preferably, in S2.2:
[0053] If the automatic calibration host sends a voltage coefficient calibration command, the charger will parse it correctly according to the preset communication protocol and write the corresponding voltage coefficient into the charger's internal Flash for permanent reading after the above calculation. Power-off preservation has been achieved.
[0054] Preferably, in S2.3
[0055] After receiving the current calibration command from the calibration host computer, the charger converges the current electronic load current data in the command with the current sampled by the charger itself, and gradually makes the current value sampled by the ADC inside the charger close to the electronic load current value by slightly adjusting the PWM value of the output current. At the same time, the corresponding control current PWM value is written into the internal Flash to achieve power-off preservation.
[0056] Preferably, in S2.4, the charger uses its own ADC output sampling circuit to obtain the real-time charger current, and the initial coefficient K0 is obtained through the ADC sampling circuit voltage divider resistor. The error correction of the sampling correction coefficient K can be completed by the following calculation relationship:
[0057] The charger's internal ADC sampling current * sampling correction coefficient K = electronic load current * initial sampling coefficient K0;
[0058] In the above calculation, only the sampling correction current coefficient K is unknown, and the corresponding coefficient can be obtained through calculation;
[0059] Preferably, if the automatic calibration host computer sends a voltage coefficient calibration command, the charger correctly parses it according to the preset communication protocol and then writes the corresponding current coefficient into the charger's internal Flash according to the above calculation for permanent reading, thus realizing power-off preservation.
[0060] Compared with the prior art, the present invention has the following beneficial effects:
[0061] (1) The automatic calibration system provided by the present invention has a simple interface and operation. The automatic calibration method enables the entire voltage and current calibration process of the charger to be carried out automatically without the need for special operations by a dedicated person, thereby reducing the burden on operators and improving product production efficiency.
[0062] (2) The method of the present invention performs real-time data interaction through real-time communication between the host computer and the charger and electronic load. The calibration is considered to be successful only when specific conditions are met, which greatly improves the accuracy of equipment calibration.
[0063] (3) The calibration host computer in the calibration system is developed in Python. Due to its open source nature, programs developed in Python can run on Windows, Linux and other systems across platforms. In addition, Python's own standard library is very large, which can help handle various tasks and provide a good foundation for subsequent optimization.
[0064] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application so that it can be implemented in accordance with the contents of the specification, and to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the following is a detailed description of the preferred embodiments of the present application in conjunction with the accompanying drawings as follows.
[0065] Based on the detailed description of the specific embodiments of the present application in combination with the accompanying drawings below, those skilled in the art will become more aware of the above and other objects, advantages and features of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings without creative work. In all drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, each element or part is not necessarily drawn according to the actual scale.
[0067] Figure 1 It is a calibration timing diagram of the internal calibration procedure of the charger of the present invention;
[0068] Figure 2A This is a flowchart of the charger calibration procedure of the present invention;
[0069] Figure 2B This is a flowchart of the charger calibration procedure of the present invention;
[0070] Figure 3A The operation block diagram of the present invention after the upper computer clicks the automatic calibration button:
[0071] Figure 3B This is the operation block diagram of the present invention after the calibration host computer clicks the automatic calibration button;
[0072] Figure 3C This is the operation block diagram of the present invention after the calibration host computer clicks the automatic calibration button;
[0073] Figure 3D This is the operation block diagram of the present invention after the calibration host computer clicks the automatic calibration button;
[0074] Figure 3E This is the operation block diagram of the present invention after the calibration host computer clicks the automatic calibration button;
[0075] Figure 4A This is a calibration flow chart after the calibration host computer of the present invention clicks the automatic calibration button;
[0076] Figure 4BThis is a calibration flow chart after the calibration host computer of the present invention clicks the automatic calibration button;
[0077] Figure 4C This is a calibration flow chart after the calibration host computer of the present invention clicks the automatic calibration button;
[0078] Figure 5 This is the automatic upper computer calibration interface diagram of the present invention;
[0079] Figure 6 This is the prompt interface for successful voltage and current calibration of the charger of the present invention;
[0080] Figure 7 This is the abnormal prompt interface of the charger voltage and current calibration of the present invention;
[0081] Figure 8 This is the overall structural diagram of the automatic calibration system;
[0082] Fig. 9 Execute the logic diagram for the charger calibration procedure. DETAILED DESCRIPTION
[0083] To make the purpose, technical scheme and advantages of the embodiment of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiment of the present application. Obviously, the described embodiment is a part of the embodiment of the present application, rather than all of the embodiments. In the following description, specific details such as specific configuration and components are provided only to help fully understand the embodiments of the present application. Therefore, it should be clear to those skilled in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. In addition, for clarity and brevity, the description of known functions and structures is omitted in the embodiment.
[0084] In addition, the present application may repeat reference numerals and / or letters in different examples. This repetition is for the purpose of simplicity and clarity, and does not in itself indicate the relationship between the various embodiments and / or settings discussed.
[0085] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, B exists alone, and A and B exist at the same time. The term " / and" in this article describes another type of association object relationship, indicating that there can be two relationships. For example, A / and B can mean: A exists alone, and A and B exist alone. In addition, the character " / " in this article generally indicates that the previous and next associated objects are in an "or" relationship.
[0086] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusions.
[0087] The present invention provides a technical solution for a method for automatic calibration of voltage and current of a charger based on multiple communication types: the entire automatic calibration system includes a charger (including a calibration program), a communication signal level conversion device, an automatic calibration host computer, an electronic load, etc. The overall structural block diagram is as follows: Figure 8 As shown:
[0088] The functions of each part are as follows:
[0089] (1) Charger: As the device to be calibrated, it waits for the host computer to issue instructions to calibrate the output voltage and current.
[0090] (2) Communication level conversion device: It serves as a bridge between the charger and the PC, converting the communication signals (CAN, 485, TTL) on the charger into USB signals that can be recognized and processed by the computer (PC).
[0091] (3) Automatic calibration host computer: It plays a core role in the entire calibration system. It uses communication to continuously communicate with the charger and electronic load to obtain the voltage and current information collected by the ADC of the charger's internal sensor circuit and the real-time voltage and current information on the electronic load. According to the voltage and current conditions of the two, the voltage and current are adjusted by issuing commands to the charger. After specific steps, if the output voltage and current of the charger are consistent with the electronic load, the PWM signal value of the charger's output voltage and current will be written into the internal power-off data storage area. At the same time, a prompt interface for successful calibration will pop up in the host computer running in the PC. If an error occurs in a step during the calibration process, the corresponding fault code will pop up in the prompt box, and the corresponding fault has been identified, prompting the operator to handle the problematic machine.
[0092] (4) Electronic load: As a measuring tool to measure whether the charger output voltage and current are standard, after receiving the command from the automatic calibration host computer, it promptly transmits the internal voltage and current information back to the automatic calibration host computer for identification and processing.
[0093] The calibration method of the entire calibration system requires the coordination of the charger, the calibration host computer running on the PC, and the communication signal conversion device. Since the program logic of the communication signal conversion device is not the focus of this article, the calibration process involving the automatic calibration host computer and the charger is now described in detail. For details, see the attached automatic calibration process flow chart:
[0094] The calibration sequence of the charger internal calibration program is as follows: Fig. 9 As shown:
[0095] The functions of each step are described as follows:
[0096] 1. Voltage calibration:
[0097] Because the output voltage of the charger is controlled by the PWM signal output by the internal MCU, the output voltage value of the charger will also change linearly with different PWM values. Since there is a linear relationship between the actual output voltage of the charger and the PWM value output by the corresponding pin of the MCU, two reference points need to be selected in advance, that is, when the PWM value is x0, the actual output voltage value of the charger is y0, which is used as the first reference point. Similarly, if the PWM value is x1, the actual voltage value corresponding to the charger is y2, which is used as the second reference point. After selecting the reference points, the voltage calibration can be divided into the following 4 steps:
[0098] (1) After the charger is started, the PWM value that controls the charger output voltage will be set according to the first point. If the PWM value of the control voltage is used as the horizontal coordinate and the charger output voltage is used as the vertical coordinate, the coordinates of the current first point are marked as (x0, y0); after the charger receives the first voltage command sent by the calibration host computer running on the PC, it first writes the actual voltage value y0 on the electronic load corresponding to the current PWM value x0 into the flash storage area inside the charger, and then the charger's MCU adjusts the PWM value to x1. Due to the voltage PWM adjustment, the charger output voltage will also change to near the predefined y1.
[0099] (2) At this time, if the automatic calibration host computer sends a voltage calibration command for the second time, after the charger correctly interprets it according to the preset communication protocol, the charger's MCU will execute and write the actual output voltage value corresponding to the PWM value x1 into the internal Flash.
[0100] (3) If the automatic calibration host sends a voltage calibration command for the third time, the charger will parse it correctly according to the preset communication protocol. Then the charger will read out the actual voltage values y0 and y1 corresponding to the PWM values x0 and x1 previously written into its own Flash for the subsequent linear fitting operation. So far, we have obtained two reference points (x0, y0) and (x1, y1).
[0101] The point line equation can be obtained:
[0102] Slope: k = (y1-y0) / (x1-x0) Y-intercept: b = y0-k*x0
[0103] The fitting curve equation is: y = k*x + b (y is the voltage value to be output, x is the corresponding voltage PWM value)
[0104] After calculating the fitted linear curve, the charger's MCU will perform linear operations based on the required output reference voltage value to calculate the required voltage PWM to ensure the required constant voltage is output.
[0105] (4) If the automatic calibration host computer sends a voltage calibration command for the fourth time, the charger will parse it correctly according to the preset communication protocol, and then perform the calculation according to the above step 3 and re-output to verify whether the output is correct.
[0106] 2. Voltage coefficient calibration
[0107] Taking into account the error of the ADC data collected by the charger, a coefficient variable is used to correct the voltage collected by the ADC, that is, the actual voltage value = ADC sampling value * coefficient K
[0108] Because the electronic load voltage sent by the calibration host computer to the charger is standard, and the charger uses its own ADC output sampling circuit to obtain the real-time charger voltage, the initial coefficient K0 will be obtained by the ADC sampling circuit voltage divider resistor, and the sampling coefficient error correction can be completed by the following calculation relationship:
[0109] Charger internal ADC sampling voltage * sampling correction voltage coefficient K = electronic load voltage * initial sampling coefficient K0
[0110] In the above calculation, only the sampling correction coefficient K is unknown. The corresponding coefficient can be obtained through calculation.
[0111] If the automatic calibration host sends a voltage coefficient calibration command, the charger will parse it correctly according to the preset communication protocol and write the corresponding voltage coefficient into the charger's internal Flash for permanent reading after the above calculation. Power-off preservation has been achieved.
[0112] 3. Current calibration
[0113] After receiving the current calibration command from the calibration host computer, the charger will converge the current electronic load current data in the command with the current sampled by the charger itself, and gradually make the current value sampled by the ADC inside the charger close to the electronic load current value by slightly adjusting the PWM value of the output current. At the same time, the corresponding control current PWM value is written into the internal Flash to achieve power-off preservation.
[0114] 4. Current coefficient calibration
[0115] The process is the same as the voltage coefficient calibration process, because the electronic load current sent to the charger by the calibration host computer is standard, and the charger uses its own ADC output sampling circuit to obtain the real-time charger current. The initial coefficient K0 will be obtained by the ADC sampling circuit voltage divider resistor. The error correction of the sampling coefficient can be completed by the following calculation relationship:
[0116] Charger internal ADC sampling current * sampling correction coefficient K = electronic load current * initial sampling coefficient K0
[0117] In the above calculation, only the sampling correction current coefficient K is unknown. The corresponding coefficient can be calculated by calculation.
[0118] If the automatic calibration host sends a voltage coefficient calibration command, the charger will parse it correctly according to the preset communication protocol and write the corresponding current coefficient into the charger's internal Flash for permanent reading after the above calculation. Power-off preservation has been achieved.
[0119] The workflow of the automatic calibration host computer running on the PC is as follows:
[0120] The calibration host computer communication adopts thread control. In addition to the following process, it is also constantly sending request commands to the charger and the electronic load, constantly asking for information about the voltage and current inside the charger and the voltage and current on the electronic load (the voltage and current actually output by the charger). The calibration host computer plays the role of a transit communicator in the entire system. By using mutual communication, it can send relevant information of the electronic load to the charger according to the communication protocol. At the same time, it also judges the execution of the calibration based on the status information uploaded by the charger, and informs the relevant operators of the execution of the calibration through the UI interface. The specific steps are described in text as follows:
[0121] 1. After the operator clicks the automatic calibration button on the GUI interface, the host computer sends a message command to the electronic load to switch to the program-controlled mode through the communication link.
[0122] 2. After receiving the corresponding communication message command sent back by the electronic load, the upper computer of the automatic calibration sends the electronic load a command message to switch to CC mode.
[0123] 3. Automatic calibration After receiving the corresponding communication message command sent back by the electronic load, the host computer sends a command message to set the load current in CC mode to 0.5A.
[0124] 4. After receiving the corresponding communication message command sent back by the electronic load, the upper computer automatically calibrates and sends the command message to set the electronic load to the load output state (on).
[0125] 5. After receiving the corresponding communication message command sent back by the electronic load, the host computer sends the communication to the charger to start executing the automatic calibration command.
[0126] 6. Automatic calibration: When the host computer receives the message sent back by the charger, it shows that the previous command was executed normally. The communication sends a voltage calibration instruction to the charger. After receiving the command, the charger will determine whether the current voltage meets the preset value. If so, it will write the actual voltage of the first reference point into the internal Flash of the charger.
[0127] 7. Automatic calibration The host computer receives the message sent back by the charger and shows that the previous command is executed normally. The communication sends a voltage calibration instruction to the charger. After receiving the command, the charger will determine whether the current voltage meets the preset value. If it does, it will write the actual voltage of the second reference point into the internal Flash of the charger.
[0128] 8. Automatic calibration The host computer receives the message sent back by the charger and shows that the previous command is executed normally. The communication sends the voltage calibration instruction to the charger. After receiving the command, the charger calculates the PWM value of the control voltage after linear fitting, so that the charger can output the expected voltage.
[0129] 9. The automatic calibration host computer receives the message sent back by the charger and shows that the previous command is executed normally. If the automatic calibration host computer detects that the voltage coefficient calibration command is sent less than 3 times, it will send the voltage coefficient calibration command to the charger through communication. If it is sent more than 3 times, and the message data sent back by the charger after the command is sent shows that it is executed normally, it will proceed to the next step. If the charger executes abnormally, the calibration will be terminated, the fault code will be uploaded, and the reason for the abnormal calibration will be prompted.
[0130] 10. Automatic calibration: When the host computer receives the message sent back by the charger and it shows that the previous command was executed normally, it will send the voltage calibration command again. After receiving the corresponding command, the charger will upload the internal voltage of the charger after the ADC sampling coefficient correction. If the voltage at this time is consistent with the voltage uploaded by the electronic load communication, it will proceed to the next step. If the charger executes abnormally, the calibration will be terminated, the fault code will be uploaded, and the reason for the abnormal calibration will be prompted.
[0131] 11. The automatic calibration host computer receives a message from the charger that shows that the previous command was executed normally, and the communication sends a command message to the electronic load to set the output state (OFF) of the load.
[0132] 12. After receiving the corresponding communication message command sent back by the electronic load, the upper computer of automatic calibration sends the electronic load a command to switch to CV mode.
[0133] 13. Automatic calibration After receiving the corresponding communication message command sent back by the electronic load, the host computer sends the calibration load voltage to the electronic load according to the CV load voltage requested by the charger.
[0134] 14. Automatic calibration: The host computer receives the message sent back by the electronic load and shows that the previous command is executed normally. The communication sends a command message to the electronic load to set the output state (ON).
[0135] 15. After receiving the corresponding communication message command sent back by the electronic load, the automatic calibration host computer determines whether the execution of the charger current calibration command is less than 3 times. If it is less than 3 times, the current calibration command will be sent in sequence. If the above command is executed, the communication will send the charger current coefficient calibration instruction message. If the current is not calibrated normally in 3 times, the host computer interface will display the calibration abnormality and the cause of the calibration error. If the message uploaded by the charger shows that the calibration is successful in one of the 3 calibrations, the calibration process will be exited immediately and the device calibration will be prompted to be successful.
[0136] The above description is only the preferred embodiment of the present invention, which does not limit the protection scope of the present invention. For those skilled in the art, the present invention can be modified and varied in various ways. Within the spirit and principle of the present invention, any change, modification, replacement, integration and parameter change of these embodiments by conventional substitution or capable of achieving the same function without departing from the principle and spirit of the present invention shall fall within the protection scope of the present invention.
Claims
1. A method for automatic calibration of charger voltage and current based on multiple communication types, characterized in that: The following steps are involved: S1: Connect the device, including: S1.1: Connect the charger's communication signal line to the corresponding communication level conversion device, and then connect the communication level conversion device to the automatic calibration host computer via a USB cable; S1.2: Connect the communication line of the electronic load to the automatic calibration host computer via USB; S2: The automatic calibration host computer sends a command to the electronic load and charger, and the electronic load and charger respond and start charger calibration; The S2 comprises the following steps: S2.1: voltage calibration; S2.2: voltage coefficient calibration; S2.3: Current calibration; S2.4: Current coefficient calibration.
2. A method for automatic calibration of charger voltage and current based on multiple communication types as claimed in claim 1, characterized in that The specific steps of S2.1 are as follows: S2.1.1: Automatic calibration: The host computer sends relevant instructions, and the electronic load is set to CC mode with 0.5A load; S2.1.2: The communication sends a voltage calibration command to the charger. After receiving the command, the charger determines whether the current voltage meets the preset value. If so, the actual voltage of the first reference point is written into the internal Flash of the charger. S2.1.3: The communication sends a voltage calibration command to the charger. After receiving the command, the charger determines that the current voltage meets the preset value. If it meets the preset value, the actual voltage of the second reference point is written into the internal Flash of the charger. S2.1.4: After receiving the command, the charger will calculate the PWM value of the control voltage after linear fitting, and the charger outputs the expected voltage.
3. A method for automatic calibration of charger voltage and current based on multiple communication types as claimed in claim 2, characterized in that The specific steps of S2.2 are as follows: S2.2.1: Communication sends a voltage coefficient calibration command to the charger to match the charger ADC sampling coefficient, so that the output voltage of the charger matches the voltage displayed by the electronic load; S2.2.2: Is the internal voltage of the charger consistent with the voltage displayed by the electronic load? If so, the communication sends a voltage calibration instruction to the charger to compare the internal voltage of the charger with the voltage displayed by the electronic load. If not, return to the step. S2.2.3: The communication sends a command to the electronic load to set the output state (OFF) of the load.
4. A method for automatic calibration of charger voltage and current based on multiple communication types as claimed in claim 3, characterized in that The specific steps of S2.3 are as follows: S2.3.1: Communicate and send an instruction to the electronic load to switch to CV mode; S2.3.2: CV load voltage according to the charger request; S2.3.3: Communicate and send the setting calibration load voltage to the electronic load; S2.3.4: The electronic load is set to the load output state (on) under communication.
5. A method for automatic calibration of charger voltage and current based on multiple communication types as claimed in claim 4, characterized in that : The specific steps of S2.4 are as follows: S2.4.1: Communication sends voltage coefficient calibration instructions to the charger to match the charger ADC sampling coefficient, so that the output voltage of the charger matches the voltage displayed by the electronic load S2.4.2: Communicate and send a current calibration instruction to the charger to calibrate the charger output current; S2.4.3 determines whether the current output current is the expected value based on the communication feedback result of the charger. If so, it prompts that the calibration is completed. If not, return to step S2.3.2 and execute again.
6. A method for automatic calibration of charger voltage and current based on multiple communication types as claimed in claim 5, characterized in that : In S2.1, the PWM value of the control voltage is used as the horizontal coordinate, and the output voltage of the charger is used as the vertical coordinate, that is, the coordinates of the current first point are marked as (x0, y0); after the charger receives the first voltage command sent by the calibration host computer running on the PC, it first writes the actual voltage value y0 on the electronic load corresponding to the current PWM value x0 into the flash storage area inside the charger, and the charger's MCU adjusts the PWM value to x1. When the voltage PWM is adjusted, the charger output voltage will also change to near the predefined y1.
7. A method for automatic calibration of charger voltage and current based on multiple communication types as claimed in claim 6, characterized in that : In S2.1, if the automatic calibration host computer sends a voltage calibration command for the second time, after the charger correctly interprets it according to the preset communication protocol, the charger's MCU will execute and write the actual output voltage value corresponding to the PWM value x1 into the internal Flash.
8. A method for automatic calibration of charger voltage and current based on multiple communication types as claimed in claim 7, characterized in that : In S2.1: If the automatic calibration host sends a voltage calibration command for the third time, the charger will read out the actual voltage values y0, y1 corresponding to the PWM values x0, x1 previously written into its own Flash after the charger correctly interprets it according to the preset communication protocol, and perform a linear fitting operation to obtain two reference points (x0, y0) and (x1, y1). From the point-line equation we can get: Slope: k = (y1-y0) / (x1-x0) Y-intercept: b = y0-k*x0 The fitting curve equation is: y=k*x+b (y is the voltage value to be output, and x is the corresponding voltage PWM value); After calculating the fitted linear curve, the charger's MCU performs linear operations based on the required output reference voltage value and calculates the required voltage PWM to ensure the required constant voltage output; If the automatic calibration host computer sends a voltage calibration command for the fourth time, the charger will perform calculations according to the steps in claim 7 after correctly parsing it according to the preset communication protocol, and re-output to verify whether the output is correct.
9. A method for automatic calibration of charger voltage and current based on multiple communication types as claimed in claim 8, characterized in that : In S2.2: Correct the error of the ADC data collected by the charger, and use the coefficient K variable to correct the voltage collected by the ADC, that is, the actual voltage value = ADC sampling value * coefficient K; The charger uses its own ADC output sampling circuit to obtain the real-time charger voltage, and uses the ADC sampling circuit voltage divider resistor to obtain the initial coefficient K0. The error correction of the sampling coefficient can be completed by the following calculation relationship: Charger internal ADC sampling voltage * sampling correction voltage coefficient K = electronic load voltage * initial sampling coefficient K0 In the above calculation, the sampling correction coefficient K is unknown, and the corresponding coefficient can be obtained through calculation.
10. A method for automatic calibration of charger voltage and current based on multiple communication types as claimed in claim 9, characterized in that : In S2.2: If the automatic calibration host computer sends a voltage coefficient calibration command, the charger will parse it correctly according to the preset communication protocol and then write the corresponding voltage coefficient into the charger's internal Flash for permanent reading after the above calculation, thus realizing power-off preservation.
11. A method for automatic calibration of charger voltage and current based on multiple communication types as claimed in claim 10, characterized in that :S2.3 After receiving the current calibration command from the calibration host computer, the charger converges the current electronic load current data in the command with the current sampled by the charger itself, and gradually makes the current value sampled by the ADC inside the charger close to the electronic load current value by slightly adjusting the PWM value of the output current. At the same time, the corresponding control current PWM value is written into the internal Flash to achieve power-off preservation.
12. A method for automatic calibration of charger voltage and current based on multiple communication types as claimed in claim 11, characterized in that In S2.4, the charger uses its own ADC output sampling circuit to obtain the real-time charger current, and the initial coefficient K0 is obtained through the ADC sampling circuit voltage divider resistor. The error correction of the sampling correction coefficient K can be completed by the following calculation relationship: The internal ADC sampling current of the charger * sampling correction coefficient K = electronic load current * initial sampling coefficient K0; In the above calculation, only the sampling correction current coefficient K is unknown, and the corresponding coefficient can be obtained through calculation; If the automatic calibration host computer sends a voltage coefficient calibration command, the charger will parse it correctly according to the preset communication protocol and then write the corresponding current coefficient into the charger's internal Flash for permanent reading after the above calculation, thus realizing power-off preservation.
Citation Information
Cited By
Signal calibration system and method applied to plasma etching machine
CN122172093A