Voltage calibration methods, apparatus, equipment, storage media and program products

By calculating the voltage compensation value and dividing the voltage compensation interval in the ADC interface of the communication module, the problem of low voltage detection accuracy of the ADC interface is solved, and adaptive calibration and high-precision voltage detection are realized.

CN119010904BActive Publication Date: 2025-10-31LINKZHILIAN (CHONGQING) TECH CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411021824.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-29
Publication Date
2025-10-31
Estimated Expiration
2044-07-29

AI Technical Summary

Technical Problem

In voltage detection, the ADC interface of the communication module suffers from reduced accuracy due to differences in internal resistance and external voltage divider circuit resistance, resulting in different charge-discharge curves and resistance accuracy deviations. Existing calibration methods lack universality and cannot meet user needs.

Method used

By calculating voltage compensation values, the voltage range is updated into multiple voltage compensation intervals, each with a corresponding voltage compensation value, thereby achieving voltage gradient calibration and improving detection accuracy and precision.

Benefits of technology

It achieves adaptive calibration of the ADC interface of the communication module, which is suitable for various scenarios, improves the accuracy and precision of voltage detection, and meets user needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119010904B_ABST
    Figure CN119010904B_ABST
Patent Text Reader

Abstract

This application relates to the field of Internet of Things (IoT) technology, and in particular to a voltage calibration method, apparatus, device, storage medium, and program product. The method includes: acquiring the detection voltage of the analog-to-digital converter (ADC) interface of a communication module when the power supply voltage of the voltage divider resistor circuit is a first voltage; calculating a voltage compensation value based on the detection voltage and the first voltage; updating the first voltage to a second voltage according to a first voltage difference when the voltage compensation value meets the compensation requirements, and returning to the above steps until it is determined that the voltage compensation value under the second voltage does not meet the compensation requirements; and determining a voltage compensation range based on the second voltage. By calculating the voltage compensation value under the first voltage and the corresponding voltage compensation range, the input voltage range of the power supply voltage is divided into multiple voltage compensation ranges, achieving voltage gradient calibration of the ADC interface, improving the accuracy and precision of the calibration results, and meeting user needs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet of Things (IoT) technology, and in particular to a voltage calibration method, apparatus, device, storage medium, and program product. Background Technology

[0002] The analog-to-digital converter (ADC) interface is one of the essential peripheral interfaces of a communication module, used for voltage detection of the terminal equipment associated with the module. The input voltage range of the ADC interface in a communication module is relatively small. When the power supply voltage exceeds the ADC interface input voltage, a voltage divider resistor circuit needs to be designed around the communication module to ensure proper voltage detection. However, due to internal resistance within the ADC interface on the chip side of the communication module, variations in the charging and discharging curves of the external voltage divider resistor circuit, and resistance accuracy deviations, designing a voltage divider resistor circuit around the communication module can easily reduce voltage detection accuracy. Therefore, to improve accuracy, adaptive calibration of the detection voltage of the ADC interface of the communication module is necessary. Summary of the Invention

[0003] This application is made in view of the above-mentioned problems and provides a voltage calibration method, apparatus, device, storage medium, and program product.

[0004] According to one aspect of this application, a voltage calibration method is provided, comprising:

[0005] When the power supply voltage of the voltage divider resistor circuit is the first voltage, the detection voltage of the analog-to-digital converter interface of the communication module is obtained. The analog-to-digital converter interface is connected to the voltage divider resistor circuit, which is used to detect the voltage of the terminal device to which the communication module belongs.

[0006] Calculate the voltage compensation value based on the detected voltage and the first voltage;

[0007] If the voltage compensation value is determined to meet the compensation requirements, the first voltage is updated to the second voltage according to the first voltage difference, and the process returns to the step of obtaining the detection voltage of the analog-to-digital converter interface of the communication module when the power supply voltage of the voltage divider resistor circuit is the first voltage, until it is determined that the voltage compensation value under the second voltage does not meet the compensation requirements, and the voltage compensation range of the voltage compensation value is determined based on the second voltage.

[0008] Furthermore, the voltage calibration method according to one aspect of this application also includes:

[0009] The voltage divider resistor circuit includes a first resistor and a second resistor; the first resistor is configured with a first resistance value accuracy, and the second resistor is configured with a second resistance value accuracy.

[0010] Obtain the detection voltage of the analog-to-digital converter interface of the communication module, including:

[0011] Based on the first resistance value accuracy and the second resistance value accuracy, all resistance combinations of the first resistor and the second resistor are determined, wherein the resistance values ​​of the first resistor and / or the second resistor are different in any two sets of resistance combinations;

[0012] The detection voltage of the analog-to-digital converter interface at each of the resistor combinations is obtained respectively;

[0013] Based on the detected voltage and the first voltage, a voltage compensation value is calculated, including:

[0014] Calculate the difference between the detected voltage and the first voltage for each of the resistor combinations;

[0015] The average of the differences corresponding to each of the resistor combinations is calculated to obtain the voltage compensation value.

[0016] Furthermore, the voltage calibration method according to one aspect of this application also includes:

[0017] Determining that the voltage compensation value meets the compensation requirements includes:

[0018] If the voltage compensation value is determined to be greater than the preset compensation threshold, a target resistance accuracy is selected from the first resistance accuracy and the second resistance accuracy, wherein the resistance accuracy of the resistor corresponding to the target resistance accuracy is greater than the standard accuracy of the resistor.

[0019] According to the preset accuracy difference, the target resistance accuracy is reduced to the third resistance accuracy, and the process returns to the step of determining all resistance combinations of the first resistor and the second resistor based on the first resistance accuracy and the second resistance accuracy, until the voltage compensation value is less than or equal to the compensation threshold, and the voltage compensation value is determined to meet the compensation requirements.

[0020] Furthermore, the voltage calibration method according to one aspect of this application also includes:

[0021] Determining the voltage compensation range based on the second voltage includes:

[0022] According to the second voltage difference, the second voltage is updated to the third voltage, and the process returns to the step of obtaining the detection voltage of the analog-to-digital converter interface of the communication module when the power supply voltage of the voltage divider resistor circuit is the first voltage, until the voltage compensation value meets the compensation requirement; the second voltage difference is less than the first voltage difference, and the change direction corresponding to the second voltage difference is opposite to the change direction corresponding to the first voltage difference;

[0023] In the case of a defined target voltage compensation interval, the voltage compensation interval is determined based on the boundary voltage of the last defined voltage compensation interval in the target voltage compensation interval and the third voltage.

[0024] In the absence of the target voltage compensation range, the voltage compensation range is determined based on the boundary voltage of the power supply voltage and the third voltage.

[0025] Furthermore, the voltage calibration method according to one aspect of this application also includes:

[0026] Before determining that the voltage compensation value is greater than a preset compensation threshold, the method further includes:

[0027] If the voltage compensation range is determined to be the first voltage compensation range of the power supply voltage of the voltage divider resistor circuit, the compensation threshold is determined to be the error value configured by the user.

[0028] If the voltage compensation interval is not the first voltage compensation interval, the compensation threshold is determined to be the sum of the earliest voltage compensation value determined in the process of determining the voltage compensation interval and the compensation difference configured by the user.

[0029] Furthermore, the voltage calibration method according to one aspect of this application also includes:

[0030] After determining the voltage compensation range of the voltage compensation value based on the first voltage and the second voltage, the method further includes:

[0031] When the voltage of the terminal device to which the communication module belongs is detected based on the voltage divider resistor circuit, the target voltage compensation range to which the current power supply voltage of the voltage divider resistor circuit belongs and the target voltage compensation value of the target voltage compensation range are obtained; and the current detection voltage of the analog-to-digital converter interface of the terminal device is obtained.

[0032] Calculate the current detected voltage and the target voltage compensation value to obtain the actual detected voltage of the analog-to-digital converter interface of the terminal device;

[0033] Based on the comparison results of the actual detected voltage and the voltage range of the current power supply voltage, the voltage detection result of the terminal device under the power supply voltage is obtained.

[0034] According to another aspect of this application, a voltage calibration device is provided, comprising:

[0035] The acquisition module is used to acquire the detection voltage of the analog-to-digital converter interface of the communication module when the power supply voltage of the voltage divider resistor circuit is a first voltage. The analog-to-digital converter interface is connected to the voltage divider resistor circuit, which is used to detect the voltage of the terminal device to which the communication module belongs.

[0036] The calculation module is used to calculate the voltage compensation value based on the detected voltage and the first voltage;

[0037] The update module is used to update the first voltage to the second voltage according to the first voltage difference when it is determined that the voltage compensation value meets the compensation requirements, and return to the step of obtaining the detection voltage of the analog-to-digital converter interface of the communication module when the power supply voltage of the voltage divider resistor circuit is the first voltage, until it is determined that the voltage compensation value under the second voltage does not meet the compensation requirements.

[0038] The interval division module is used to determine the voltage compensation interval of the voltage compensation value based on the second voltage.

[0039] According to another aspect of this application, a computer device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method of one aspect above.

[0040] According to another aspect of this application, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the method of one aspect described above.

[0041] According to another aspect of this application, a computer program product is provided, including a computer program that, when executed by a processor, implements the method of the above-described aspect.

[0042] As will be described in detail below, a voltage calibration method, apparatus, device, storage medium, and program product according to embodiments of this application calculate a voltage compensation value under a first voltage. If the voltage compensation value meets the compensation requirements, the first voltage is updated to a second voltage. The update method can be based on increasing or decreasing a first voltage difference. Each update calculates the voltage compensation value under the new voltage until the voltage compensation value no longer meets the compensation requirements. Then, a voltage compensation range is determined based on the second voltage at this point. According to the above method, the input voltage range of the power supply voltage can be divided into one or more voltage compensation ranges, each with a corresponding voltage compensation value. This achieves gradient calibration of the analog-to-digital converter interface detection voltage, improving the accuracy and precision of the calibration results and meeting user needs.

[0043] It should be understood that both the foregoing general description and the following detailed description are exemplary and intended to provide further illustration of the claimed technology. Attached Figure Description

[0044] The above and other objects, features, and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof. In the accompanying drawings, the same reference numerals generally represent the same components or steps.

[0045] Figure 1 This is a flowchart illustrating a voltage calibration method according to an embodiment of this application.

[0046] Figure 2 This is a system configuration diagram illustrating a voltage calibration method according to an embodiment of this application.

[0047] Figure 3 This is a diagram illustrating the configuration of a calibration plate according to an embodiment of this application.

[0048] Figure 4 This is a flowchart illustrating yet another voltage calibration method according to an embodiment of this application.

[0049] Figure 5 This is a schematic diagram of the structure of a voltage calibration device according to an embodiment of this application.

[0050] Figure 6 This is a schematic diagram of the structure of a computer device according to an embodiment of this application.

[0051] Figure 7 This is a schematic diagram illustrating a computer program product according to an embodiment of this application. Detailed Implementation

[0052] To make the objectives, technical solutions, and advantages of this application more apparent, exemplary embodiments according to this application will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments of this application. It should be understood that this application is not limited to the exemplary embodiments described herein.

[0053] The analog-to-digital converter (ADC) interface is one of the essential peripheral interfaces of a communication module, used for voltage detection of the terminal equipment associated with the module. The input voltage range of the ADC interface in a communication module is relatively small. When the power supply voltage exceeds the ADC interface input voltage, a voltage divider resistor circuit needs to be designed around the communication module to ensure proper voltage detection. However, due to internal resistance within the ADC interface on the chip side of the communication module, variations in the charging and discharging curves of the external voltage divider resistor circuit, and resistance accuracy deviations, designing a voltage divider resistor circuit around the communication module can easily reduce voltage detection accuracy. Therefore, to improve accuracy, adaptive calibration of the detection voltage of the ADC interface of the communication module is necessary.

[0054] Most existing calibration methods can only perform targeted calibration of the communication module of the terminal device. Such calibration methods are not universal and cannot adaptively calibrate the detection voltage of the ADC interface of the communication module. If the voltage value of the communication module of the terminal device being tested by the user changes or the resistance value of the voltage divider circuit changes, it will seriously affect the accuracy and precision of the test results and fail to meet the user's requirements.

[0055] The above description, with reference to the accompanying drawings, illustrates a voltage calibration method, apparatus, device, storage medium, and program product according to embodiments of this application. The method calculates a voltage compensation value under a first voltage. If the voltage compensation value meets the compensation requirements, the first voltage is updated to a second voltage. The update can be performed by increasing or decreasing the first voltage difference. Each update calculates the voltage compensation value under the new voltage until the voltage compensation value no longer meets the compensation requirements. Then, the voltage compensation range is determined based on the second voltage at this point. This method is not limited to any particular communication module model and can be used in various application scenarios, exhibiting universality. According to this method, the input voltage range of the power supply voltage can be divided into one or more voltage compensation ranges, each with a corresponding voltage compensation value. This achieves voltage gradient calibration, improving the accuracy and precision of the calibration results and meeting user needs.

[0056] To facilitate understanding of this embodiment, a voltage calibration method disclosed in this application will first be described in detail. The execution subject of the voltage calibration method provided in this application embodiment is generally a computer device with certain computing capabilities. This computer device may include, for example, a terminal device, a server, or other processing devices. The terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, an in-vehicle device, a wearable device, etc. In some possible implementations, the voltage calibration method can be implemented by a processor calling computer-readable instructions stored in memory.

[0057] System configuration reference for the voltage calibration method in this embodiment Figure 2 The system includes a cloud platform, a voltage regulator, a control console, and a calibration board. The control console is the main execution unit, used to control the operation of the calibration system. The cloud platform is used to send and receive information between the user terminal and the calibration board. The voltage regulator provides power to the voltage divider circuit. The calibration board houses the communication module, controls the resistance value of the voltage divider circuit, and outputs the detection voltage of the ADC interface of the communication module. The configuration diagram of the calibration board is shown below. Figure 3 As shown, the system includes a communication module, digital potentiometer chip 1, digital potentiometer chip 2, and a UART-to-USB circuit. Digital potentiometer chip 1 is connected to the I2C1 interface of the communication module and is used to adjust the resistance value of the first resistor in the voltage divider circuit. Digital potentiometer chip 2 is connected to the I2C2 interface of the communication module and is used to adjust the resistance value of the second resistor in the voltage divider circuit. The UART-to-USB circuit is used for communication modules without a USB interface, connecting the calibration board and the control console to enable communication between them.

[0058] like Figure 1 The diagram shows a flowchart of a voltage calibration method provided in an embodiment of this application. The method includes steps 1-3:

[0059] Step 1: With the power supply voltage of the voltage divider resistor circuit at the first voltage, obtain the detection voltage of the analog-to-digital converter interface of the communication module.

[0060] The analog-to-digital converter interface is connected to a voltage divider resistor circuit, which is used to detect the voltage of the terminal equipment to which the communication module belongs. The voltage divider resistor circuit includes a first resistor and a second resistor; the first resistor is configured with a first resistance value accuracy, and the second resistor is configured with a second resistance value accuracy.

[0061] It should be noted that the first voltage can be selected based on the voltage range configured by the user. For example, if the user-configured voltage range is 3.2V to 4V, then the first voltage can be any voltage value within the range of 3.2V to 4V (inclusive). The formula for calculating the detection voltage is: Vdet = V ADC / R2×(R1+R2), where Vdet is the detection voltage, V ADC R1 is the detected value of the input voltage of the analog-to-digital converter interface, R2 is the resistance value of the first resistor, and R3 is the resistance value of the second resistor.

[0062] Step 1 specifically includes the following steps:

[0063] Step 1-1: Based on the first resistance value accuracy and the second resistance value accuracy, determine all resistance combinations of the first resistor and the second resistor, where the resistance values ​​of the first resistor and / or the second resistor are different in any two resistance combinations.

[0064] Assuming the resistance of the first resistor is R1 and its accuracy is x%, and the resistance of the second resistor is R2 and its accuracy is y%, then all possible combinations of the first and second resistors are: (R1, R2), (R1, R2*(1-y%)), (R1, R2*(1+y%)), (R1*(1-x%), R2), (R1*(1-x%), R2*(1-y%)), (R1*(1-x%), R2*(1+y%)), (R1*(1+x%), R2), (R1*(1+x%), R2*(1-y%)), (R1*(1+x%), R2*(1+y%)). Specifically, for example, if the first resistor has a resistance of 100K and a first resistance value accuracy of 5%, and the second resistor has a resistance of 200K and a second resistance value accuracy of 5%, then all possible combinations of the first and second resistors can include the following 9 types: (100K, 200K), (100K, 190K), (100K, 210K), (95K, 200K), (95K, 190K), (95K, 210K), (105K, 200K), (105K, 190K), (105K, 210K).

[0065] Steps 1-2: Obtain the detection voltage of the analog-to-digital converter interface under each resistor combination.

[0066] Specifically, the formula for calculating the detection voltage is: Vdet = V ADC / R2×(R1+R2), where Vdet is the detection voltage, V ADC R1 is the detected input voltage value of the analog-to-digital converter interface, R2 is the resistance value of the first resistor, and R1 is the resistance value of the second resistor. It should be noted that V... ADCThe specific values ​​can be obtained directly from the analog-to-digital converter interface; taking the resistor combination (95K, 200K) as an example, R1 = 95K and R2 = 200K.

[0067] Step 2: Calculate the voltage compensation value based on the detected voltage and the first voltage.

[0068] Specifically, in conjunction with step 1, the voltage compensation value can be calculated based on the detected voltage under one of the resistor combinations; alternatively, it can be calculated based on the detected voltage under several resistor combinations, for example, by removing the maximum and minimum values ​​from the nine detected voltages and averaging the remaining detected voltages to obtain the voltage compensation value. This embodiment provides another preferred solution, specifically including the following steps:

[0069] Step 2-1: Calculate the difference between each detection voltage and the first voltage.

[0070] Combining with step 1, assuming the first voltage is 3.2V, and the nine detection voltages are V1 to V9, calculate the differences between V1 to V9 and 3.2V in turn to obtain nine differences.

[0071] Step 2-2: Calculate the mean of the difference to obtain the voltage compensation value.

[0072] The average of the nine differences is used as the voltage compensation value.

[0073] Step 3: If the voltage compensation value meets the compensation requirements, update the first voltage to the second voltage according to the first voltage difference, and return to execute steps 1-2 until it is determined that the voltage compensation value under the second voltage does not meet the compensation requirements. Determine the voltage compensation range of the voltage compensation value based on the second voltage.

[0074] Assuming the power supply voltage range is Vmin to Vmax, if the first voltage is Vmin and the first voltage difference is ΔV1, update the first voltage to the second voltage, i.e., the second voltage is (Vmin + ΔV1); if the first voltage is Vmax and the first voltage difference is ΔV1, update the first voltage to the second voltage, i.e., the second voltage is (Vmax - ΔV1). Specifically, for example, if the power supply voltage range is 3.2 to 4V, the first voltage is 3.2V and the first voltage difference is 0.1V, update the first voltage to the second voltage, i.e., the second voltage is 3.2V + 0.1V = 3.3V; or, if the first voltage is 4V and the first voltage difference is 0.1V, update the first voltage to the second voltage, i.e., the second voltage is 4V - 0.1V = 3.9V. After updating the first voltage to the second voltage, return to steps 1-2 and recalculate the voltage compensation value. Taking a second voltage of 3.3V as an example, if the voltage compensation value under the second voltage of 3.3V meets the compensation requirements, the second voltage can be updated to 3.3V + 0.1V = 3.4V. Then, return to steps 1-2 and recalculate the voltage compensation value until it is determined that the voltage compensation value under the second voltage does not meet the compensation requirements.

[0075] When the voltage compensation value under the second voltage does not meet the compensation requirements, the second voltage is updated to the third voltage according to the second voltage difference ΔV2. For example, when the second voltage is (Vmin + ΔV1), the third voltage is (Vmin + ΔV1 - ΔV2); when the second voltage is (Vmax - ΔV1), the third voltage is (Vmax - ΔV1 + ΔV2). Then, steps 1-2 are returned to continue until the voltage compensation value meets the compensation requirements. The second voltage difference ΔV2 is less than the first voltage difference ΔV1, and the direction of change corresponding to the second voltage difference ΔV2 is opposite to the direction of change corresponding to the first voltage difference ΔV1. Specifically, taking a second voltage of 3.3V as an example, assuming a second voltage difference of 0.01V (0.01V < 0.1V), if updating the first voltage based on the first voltage difference is additive (e.g., the second voltage is 3.2V + 0.1V = 3.3V), then updating the second voltage based on the second voltage difference is subtractive (e.g., the third voltage is 3.3V - 0.01V = 3.29V). Taking subtraction based on the second voltage difference as an example, updating the second voltage to the third voltage involves successively decreasing the second voltage by 0.01V. Each time it decreases, steps 1-2 are returned to recalculate the voltage compensation value until it is determined that the voltage compensation value under the third voltage meets the compensation requirements. Assuming that when the third voltage decreases to 3.27V, the voltage compensation value meets the compensation requirements, then one of the boundary values ​​of the voltage compensation interval is 3.27V.

[0076] The voltage range is 3.2V to 4V. If the calculated voltage compensation value is used to divide the first voltage compensation interval, and there is no target voltage compensation interval (an already divided voltage compensation interval), the voltage compensation interval is determined based on the boundary voltage and the third voltage of the power supply voltage. In this embodiment, the voltage compensation interval is 3.2V to 3.27V. If the calculated voltage compensation value is not used to divide the first voltage compensation interval, and there is an already divided target voltage compensation interval, the voltage compensation interval is determined based on the boundary voltage and the third voltage of the last voltage compensation interval obtained in the target voltage compensation interval. Assuming the target voltage compensation interval is 3.2V to 3.27V, and the third voltage is finally determined to be 3.35V, then the voltage compensation interval is 3.28V to 3.35V, where 3.28V = 3.27V + 0.01V, 3.27V is the boundary voltage of the target voltage compensation interval, and 0.01V is the second voltage difference. This embodiment only provides a detailed process for dividing the voltage compensation interval starting from the left boundary (3.2V) when the voltage range is 3.2 to 4V. The process for dividing the voltage compensation interval starting from the right boundary (4V) is only different in terms of addition and subtraction algorithms, and will not be described in detail in this embodiment.

[0077] Specifically, in this embodiment, the voltage compensation value can be determined to meet the compensation requirements based on the following conditions:

[0078] Case 1: If the voltage compensation value is determined to be less than or equal to the preset compensation threshold, then the voltage compensation value is determined to meet the compensation requirements.

[0079] Scenario 2: If the voltage compensation value is determined to be greater than the preset compensation threshold, a target resistance accuracy is selected from the first and second resistance accuracy. The resistance accuracy corresponding to the target accuracy is greater than the standard accuracy of the resistor. The target resistance accuracy is reduced to a third resistance accuracy according to the preset accuracy difference, and steps 1-2 are returned until the voltage compensation value is less than or equal to the compensation threshold, confirming that the voltage compensation value meets the compensation requirements. Here, "standard accuracy of the resistor" refers to the commonly used minimum accuracy of the resistor. Resistors on the market are generally configured with commonly used minimum accuracy, such as 1%, 3%, 5%, etc. This embodiment does not limit the "standard accuracy of the resistor" and allows selection based on actual needs.

[0080] Case 3: Cases 1 and 2 can be applied to the case where the voltage compensation interval is the first voltage compensation interval of the power supply voltage of the voltage divider resistor circuit. If it is determined that the voltage compensation interval is not the first voltage compensation interval of the power supply voltage of the voltage divider resistor circuit, that is, at least one voltage compensation interval has been divided. Assuming that the first voltage compensation interval has been divided, the second voltage compensation interval is being calculated. If it is determined that the voltage compensation value at this time is not equal to the voltage compensation value of the first voltage compensation interval, it is determined that the voltage compensation value meets the compensation requirements.

[0081] It should be noted that the following steps are included before step 3:

[0082] Determine whether the voltage compensation range of the calculated voltage compensation value is the first voltage compensation range of the power supply voltage. If it is determined that the voltage compensation range is the first voltage compensation range of the power supply voltage of the voltage divider resistor circuit, determine the compensation threshold as the error value configured by the user.

[0083] If the voltage compensation interval is not the first voltage compensation interval, the compensation threshold is determined as the sum of the earliest determined voltage compensation value and the compensation difference configured by the user during the determination of the voltage compensation interval. Combining step 1, the power supply voltage range is 3.2–4V. Based on the voltage compensation value, 3.2–4V is divided into multiple voltage compensation intervals for gradient calibration. Assuming that 3.2–3.6V has been determined as the first voltage compensation interval, the boundary voltage of the second voltage compensation interval is 3.6V + ΔV2, where ΔV2 is the second voltage difference. Assuming ΔV2 is 0.01V, the boundary voltage of the second voltage compensation interval is 3.61V. The voltage compensation value calculated at 3.61V is the earliest determined voltage compensation value. If the voltage compensation value is 23mV and the compensation difference configured by the user is 2mV, then the compensation threshold at this time is 25mV. Assuming that 3.8 to 4V has been determined as the first voltage compensation range, then the boundary voltage of the second voltage compensation range is 3.8V - ΔV2 = 3.79V. The voltage compensation value calculated at 3.79V is the earliest determined voltage compensation value. If the voltage compensation value is 22mV and the compensation difference configured by the user is 2mV, then the compensation threshold at this time is 24mV.

[0084] Based on this, a detailed explanation of scenario 2 is provided.

[0085] (1) Assuming the first resistance accuracy is 1%, the second resistance accuracy is 5%, the standard accuracy of the first resistor is 1%, and the standard accuracy of the second resistor is 1%, the target resistance accuracy is the second resistance accuracy. The accuracy difference is 4%. The target resistance accuracy is reduced to the third resistance accuracy. Specifically, the second resistance accuracy can be reduced directly from 5% to 1%, or it can be reduced from 5% to 4%, 3%...1% successively. Each time the second resistance accuracy is reduced, steps 1-2 should be returned until the voltage compensation value is less than or equal to the compensation threshold. The voltage compensation value is then determined to meet the compensation requirements. The first and second resistance accuracies at this point are the final accuracy values. If the voltage compensation value is still greater than the preset compensation threshold after the second resistance accuracy is reduced to 1% (at which point the first and second resistance accuracies have reached the standard accuracy and cannot be reduced further), it indicates that the current conditions cannot meet the calibration requirements. It is recommended to change the resistance value or error value (i.e., the compensation threshold).

[0086] (2) Assuming the accuracy of the first resistance value is 3%, the accuracy of the second resistance value is 5%, the standard accuracy of the first resistor is 1%, and the standard accuracy of the second resistor is 1%, then both the accuracy of the first resistance value and the accuracy of the second resistance value are greater than the standard accuracy. The target resistance value accuracy can be the accuracy of the first resistance value and / or the accuracy of the second resistance value. That is, the accuracy of the first resistance value and the accuracy of the second resistance value can be reduced simultaneously, or only one of them can be reduced (taking the accuracy of the first resistance value as an example). The specific situation is as follows:

[0087] (2-1) The target resistance accuracy is the first resistance accuracy and the second resistance accuracy.

[0088] At the same time, reduce the accuracy of the first resistance value and the accuracy of the second resistance value. At this time, the accuracy difference of the first resistance value is 2% and the accuracy difference of the second resistance value is 4%. The specific rules for reducing the accuracy of the first resistance value and the accuracy of the second resistance value can be referred to (1). Each time the accuracy of the first resistance value and the accuracy of the second resistance value are reduced, the execution steps 1-2 should be returned until the voltage compensation value is less than or equal to the compensation threshold. It is determined that the voltage compensation value meets the compensation requirements. At this time, the accuracy of the first resistance value and the accuracy of the second resistance value are the final accuracy values. If the accuracy of the first resistance value and the accuracy of the second resistance value are both reduced to 1% (at this time, the accuracy of the first resistance value and the accuracy of the second resistance value have reached the standard accuracy and cannot be reduced further), and the voltage compensation value is still greater than the preset compensation threshold, it means that the current conditions cannot meet the calibration requirements. It is recommended to change the resistance value or error value (i.e., the compensation threshold).

[0089] (2-2) The target resistance accuracy is either the first resistance accuracy or the second resistance accuracy.

[0090] At this point, the accuracy difference of the first resistance value is 2%, and the accuracy difference of the second resistance value is 4%. We can first reduce one of them (taking the target resistance value accuracy as the first resistance value accuracy as an example). If the voltage compensation value is still greater than the preset compensation threshold after the first resistance value accuracy is reduced to 1%, then the second resistance value accuracy is taken as the target resistance value accuracy, and the second resistance value accuracy is reduced. We return to steps 1-2 until the voltage compensation value is less than or equal to the compensation threshold, and the voltage compensation value is determined to meet the compensation requirements. At this time, the first resistance value accuracy (1%) and the second resistance value accuracy are the final accuracy values. If the voltage compensation value is still greater than the preset compensation threshold after the second resistance value accuracy is reduced to 1%, it means that the current conditions cannot meet the calibration requirements. It is recommended to change the resistance value or error value (i.e., the compensation threshold).

[0091] In a preferred embodiment of this application, after step 3, the method further includes:

[0092] Step 4-1: When the voltage of the terminal device to which the communication module belongs is detected based on the voltage divider resistor circuit, the target voltage compensation range to which the current power supply voltage of the voltage divider resistor circuit belongs and the target voltage compensation value of the target voltage compensation range are obtained; and the current detection voltage of the analog-to-digital converter interface of the terminal device is obtained.

[0093] For example, the user-configured terminal device has a detection voltage (i.e., power supply voltage) range of 3.2 to 4V with an error value of 30mV. The first resistor has a resistance of 200K and a first resistance value accuracy of 3%. The second resistor has a resistance of 400K and a second resistance value accuracy of 3%. Assuming the current power supply voltage is 3.2V, the target voltage compensation value of the target voltage compensation range to which the current power supply voltage belongs is 20mV, and the current detection voltage is 3.17V.

[0094] Step 4-2: Calculate the compensation value between the current detection voltage and the target voltage to obtain the actual detection voltage of the analog-to-digital converter interface of the terminal device.

[0095] Combining step 4-1, the current detected voltage is 3.17V, the target voltage compensation value is 20mV, and the actual detected voltage is 3.17V + 20mV = 3.19V.

[0096] Step 4-3: Based on the comparison results of the actual detected voltage and the current power supply voltage range, obtain the voltage detection result of the terminal device under the power supply voltage.

[0097] Specifically, the current power supply voltage is 3.2V, the error value is 30mV, and the voltage range of the current power supply voltage is 3.17~3.23V. Comparing the actual detected voltage of 3.19V with the voltage range of 3.17~3.23V, the comparison result shows that the actual detected voltage of 3.19V is within the voltage range of the current power supply voltage. Therefore, the voltage detection result of the terminal device under the 3.2V power supply voltage is that the operating status is good.

[0098] It should be noted that if the actual detection voltage calculated in step 4-2 is not within the voltage range of 3.17 to 3.23V, for example, if it is 3.16V, then the voltage detection result of the terminal device under the 3.2V power supply voltage will be that it cannot operate or the operation effect is poor.

[0099] like Figure 4 The diagram shows a flowchart of a voltage calibration method provided in an embodiment of this application. The method includes steps S1-11:

[0100] S1: Obtain the model information and circuit information of the communication module configured by the user.

[0101] The circuit information includes: the range of the detection voltage Vmin to Vmax, the resistance value R1 of the first resistor and the accuracy of the first resistor x%, the resistance value R2 of the second resistor and the accuracy of the second resistor y%, and the voltage detection error value Va. The corresponding communication module is loaded on the calibration board, and calibration begins.

[0102] For example, the input voltage V of the ADC interface of the communication module ADC The voltage range is 0 to 1.2V, the detection voltage (power supply voltage) range is 3.4V to 4.2V, R1 is 620K and the first resistor accuracy is 5%, R2 is 220K and the second resistor accuracy is 5%, and the voltage detection error value Va is 20mV.

[0103] S2: Configure the power supply voltage to the first voltage.

[0104] The control console controls the output voltage of the regulated power source. Specifically, the first voltage can be any voltage value between 3.4V and 4.2V. In this embodiment, the preferred first voltage is 3.4V.

[0105] S3: Obtain the detection voltage of the ADC interface under various resistor combinations.

[0106] The formula for calculating the detection voltage is: Vdet = V ADC / R2*(R1+R2), where Vdet is the detection voltage, V ADC R1 is the detected value of the input voltage of the analog-to-digital converter interface, R2 is the resistance value of the first resistor, and R1 is the resistance value of the second resistor. For example, Vdet is calculated to be 3.415V when the resistor combination is (620K, 220K).

[0107] The resistor combination in this embodiment (i.e., the combination of R1 and R2) includes: (620K, 220K), (620K, 231K), (620K, 209K), (651K, 220K), (651K, 231K), (651K, 209K), (589K, 220K), (589K, 231K), (589K, 209K). The detection voltages of the ADC interface under each resistor combination are calculated sequentially according to the above calculation formula.

[0108] S4: Calculate the voltage compensation value based on the detection voltage and the first voltage. <on

[0109] Specifically, it includes the following step process:

[0110] S4.1 Calculate the difference Verror between each detection voltage and the first voltage.

[0111] For example, the first voltage is 3.4V, and the detection voltage calculated under the resistor combination (620K, 220K) is 3.415V. Verror1 = |Vdet - Vout| = |3.415 - 3.4| = 15mV, where Vdet represents the detection voltage and Vout represents the first voltage.

[0112] Referring to the above calculation process, the remaining 8 differences Verror are calculated sequentially: Verror2 = 10mV, Verror3 = 18mV, Verror4 = 12mV, Verror5 = 13mV, Verror6 = 22mV, Verror7 = 25mV, Verror8 = 28mV, Verror9 = 21mV.

[0113] S4.2 Calculate the average value of the differences to obtain the voltage compensation value.

[0114] Specifically, the voltage compensation value Vcal = ∑|Verror| / 9 = 18mV.

[0115] S5: Determine that the voltage compensation value meets the compensation requirements.

[0116] Specifically, compare the voltage compensation value Vcal with the error value Va configured by the user. The voltage compensation value Vcal = 18mV, Va = 20mV, Vcal < Va. Determine that the voltage compensation value meets the compensation requirements, and there is no need to reduce the accuracy of the first resistance value and the second resistance value. Continue to execute the following steps.

[0117] S6: Update the first voltage to the second voltage according to the first voltage difference.

[0118] Specifically, in this embodiment, we assume the first voltage difference ΔV1 = 0.1V, and the initial second voltage is 3.5V. Under a 3.5V power supply voltage, we iterate through the above 9 resistor combinations, calculating the difference Verror for each combination. If all differences Verror are less than or equal to the error value Va, the second voltage is updated to 3.6V. We repeat the process of iterating through the above 9 resistor combinations and calculating the difference Verror for each combination until at least one difference Verror is greater than the error value Va. It should be noted that the formula for calculating the difference Verror in this step is: Verror = |Vd - Vout|, where Vd is the sum of the detection voltage Vdet and the voltage compensation value Vcal. Specifically, in this embodiment, under a 3.5V voltage, when iterating to (589K, 231K), Verror = 25mV > Va = 20mV, therefore the second voltage is determined to be 3.5V.

[0119] S7: Update the second voltage to the third voltage according to the second voltage difference.

[0120] Specifically, in this embodiment, the second voltage difference ΔV2 = 0.01V is assumed, and the initial third voltage is 3.5V - 0.01V = 3.49V. At a power supply voltage of 3.49V, the above nine resistor combinations are iterated, and the difference Verror for each combination is calculated. If at least one difference Verror is greater than the error value Va, the third voltage is successively decreased by 0.01V. This process of iterating through the nine resistor combinations and calculating the difference Verror for each combination is repeated until all differences Verror are less than or equal to the error value Va. Specifically, in this embodiment, when the third voltage is updated to 3.45V, all differences Verror are less than or equal to the error value Va; therefore, the third voltage is determined to be 3.45V.

[0121] S8: Determine the voltage compensation range for the voltage compensation value.

[0122] Specifically, the voltage compensation value calculated in this study is Vcal = 18mV, corresponding to a voltage compensation range of 3.4V to 3.45V.

[0123] It should be noted that this embodiment calculates the first voltage compensation range. Therefore, one of the boundary voltages of the voltage compensation range can be obtained according to the detection voltage range configured by the user. Taking this embodiment as an example, the calibration starts from 3.4V, so the voltage compensation range is 3.4V to 3.45V. If the calibration starts from 4.2V, and the final calculated third voltage is assumed to be 4.13V, then the voltage compensation range is 4.13V to 4.2V.

[0124] S9: Determine the power supply voltage for the next calibration round based on the boundary voltage of the voltage compensation interval.

[0125] Taking this embodiment as an example, the voltage compensation range is 3.4V to 3.45V. Therefore, the power supply voltage (first voltage) for the next calibration round can be 3.45V + ΔV2 = 3.46V. Repeat steps S2-S8 until the maximum voltage Vmax = 4.2V is reached. It should be noted that during the repetition of S5, determining whether the voltage compensation value meets the compensation requirement is no longer done by comparing the voltage compensation value with the error value Va, but by comparing the voltage compensation value with the voltage compensation value from the previous calibration round (e.g., 18mV). If the two voltage compensation values ​​are different, then the voltage compensation value can be determined to meet the compensation requirement.

[0126] It should also be noted that in S6 and S7, the second and third voltages are determined by comparing the difference Verror with the error value Va. When repeating S6 and S7, a compensation threshold can be determined based on the voltage compensation value and a preset compensation difference. The second and third voltages are then determined by comparing the difference Verror with the compensation threshold. For example, if the voltage compensation value is 25mV, the compensation difference is 2mV, and the compensation threshold is 27mV, when repeating S6 and S7, the difference Verror is compared to see if it is greater than 27mV to determine the second and third voltages for this calibration round. The compensation difference can also be 0. The compensation difference can be the same or different for each calibration round; this embodiment does not impose any restrictions.

[0127] S10: Obtain the calibration parameter script.

[0128] The calibration parameter script includes the defined voltage compensation ranges and the corresponding voltage compensation values ​​for each range. Taking this embodiment as an example, the calibration parameter script is as follows: voltage compensation value Vcal = 18mV for the voltage compensation range (3.4V~3.45V); voltage compensation value Vcal = 25mV for the voltage compensation range (3.46V~3.55V); voltage compensation value Vcal = 30mV for the voltage compensation range (3.56V~3.6V); ... voltage compensation value Vcal = 100mV for the voltage compensation range (4.1V~4.2V).

[0129] S11: Perform voltage detection on the terminal equipment to which the communication module belongs.

[0130] When performing voltage detection on the terminal equipment, the resistance value and accuracy of the voltage divider resistor circuit are the final resistance value and accuracy determined during the calibration process. Assuming the current power supply voltage is 3.5V, the specific steps include:

[0131] S11.1 Obtain the target voltage compensation range to which the current power supply voltage of the voltage divider resistor circuit belongs, and the target voltage compensation value of the target voltage compensation range.

[0132] According to the power supply voltage and calibration parameter script, the target voltage compensation range of 3.5V is (3.46V~3.55V), and the target voltage compensation value Vcal is 25mV.

[0133] S11.2 Calculate the current detection voltage and the target voltage compensation value to obtain the actual detection voltage of the analog-to-digital converter interface of the terminal device.

[0134] Specifically, if the current power supply voltage is 3.5V and the error value Va is 20mV, then the current power supply voltage range is 3.48V to 3.52V. If the current detection voltage Vdet is 3.46V, then the actual detection voltage is 3.46V + 25mV = 3.485V; if the current detection voltage Vdet is 3.53V, then the actual detection voltage is 3.53V - 25mV = 3.505V.

[0135] S11.3 Based on the comparison results of the voltage range between the actual detected voltage and the current power supply voltage, the voltage detection result of the terminal device under the current power supply voltage is obtained.

[0136] The voltage detection result of the terminal device under the current power supply voltage is obtained by determining whether the actual detected voltage falls within the voltage range of the current power supply voltage. For example, if the actual detected voltage falls within the voltage range of the power supply voltage, it can be said that the terminal device is operating well under the current power supply voltage. It should be noted that if the current detected voltage Vdet is 3.51V (falling within 3.48V to 3.52V), the current detected voltage Vdet can be directly used as the actual detected voltage. Alternatively, the current detected voltage Vdet and the voltage compensation value Vcal can be added and subtracted sequentially. If one of the calculation results is within the voltage range of 3.48V to 3.52V, then the terminal device can be considered to be operating well under the current power supply voltage of 3.5V.

[0137] According to another aspect of the embodiments of this application, a voltage calibration device is provided, such as... Figure 5 As shown, the device includes:

[0138] The acquisition module 101 is used to acquire the detection voltage of the analog-to-digital converter interface of the communication module when the power supply voltage of the voltage divider resistor circuit is a first voltage. The analog-to-digital converter interface is connected to the voltage divider resistor circuit, which is used to detect the voltage of the terminal device to which the communication module belongs.

[0139] The calculation module 102 is used to calculate a voltage compensation value based on the detected voltage and the first voltage.

[0140] The update module 103 is used to update the first voltage to the second voltage according to the first voltage difference when it is determined that the voltage compensation value meets the compensation requirements, and return to the step of obtaining the detection voltage of the analog-to-digital converter interface of the communication module when the power supply voltage of the voltage divider resistor circuit is the first voltage, until it is determined that the voltage compensation value under the second voltage does not meet the compensation requirements.

[0141] The interval division module 104 is used to determine the voltage compensation interval of the voltage compensation value based on the second voltage.

[0142] In one or more embodiments, the acquisition module 101 is used for:

[0143] Based on the first resistance value accuracy and the second resistance value accuracy, all resistance combinations of the first resistor and the second resistor are determined, wherein the resistance values ​​of the first resistor and / or the second resistor are different in any two sets of resistance combinations;

[0144] The detection voltage of the analog-to-digital converter interface at each of the resistor combinations is obtained respectively.

[0145] In one or more embodiments, the computing module 102 is used for:

[0146] Calculate the difference between each of the detected voltages and the first voltage;

[0147] The average of the differences is calculated to obtain the voltage compensation value.

[0148] The voltage calibration device is further configured to: when it is determined that the voltage compensation value is greater than a preset compensation threshold, select a target resistance accuracy from the first resistance accuracy and the second resistance accuracy, wherein the resistance accuracy of the resistor corresponding to the target resistance accuracy is greater than the standard accuracy of the resistor;

[0149] According to the preset accuracy difference, the target resistance accuracy is reduced to the third resistance accuracy, and the process returns to the step of determining all resistance combinations of the first resistor and the second resistor based on the first resistance accuracy and the second resistance accuracy, until the voltage compensation value is less than or equal to the compensation threshold, and the voltage compensation value is determined to meet the compensation requirements.

[0150] In one or more embodiments, the interval division module 104 is used for:

[0151] According to the second voltage difference, the second voltage is updated to the third voltage, and the process returns to the step of obtaining the detection voltage of the analog-to-digital converter interface of the communication module when the power supply voltage of the voltage divider resistor circuit is the first voltage, until the voltage compensation value meets the compensation requirement; the second voltage difference is less than the first voltage difference, and the change direction corresponding to the second voltage difference is opposite to the change direction corresponding to the first voltage difference;

[0152] In the case of a defined target voltage compensation interval, the voltage compensation interval is determined based on the boundary voltage of the last defined voltage compensation interval in the target voltage compensation interval and the third voltage.

[0153] In the absence of the target voltage compensation range, the voltage compensation range is determined based on the boundary voltage of the power supply voltage and the third voltage.

[0154] The voltage calibration device is further configured to: before determining that the voltage compensation value is greater than a preset compensation threshold, include:

[0155] If the voltage compensation range is determined to be the first voltage compensation range of the power supply voltage of the voltage divider resistor circuit, the compensation threshold is determined to be the error value configured by the user.

[0156] If the voltage compensation interval is not the first voltage compensation interval, the compensation threshold is determined to be the sum of the earliest voltage compensation value determined in the process of determining the voltage compensation interval and the compensation difference configured by the user.

[0157] The voltage calibration device is further configured to: after determining the voltage compensation range of the voltage compensation value based on the first voltage and the second voltage, include:

[0158] When the voltage of the terminal device to which the communication module belongs is detected based on the voltage divider resistor circuit, the target voltage compensation range to which the current power supply voltage of the voltage divider resistor circuit belongs and the target voltage compensation value of the target voltage compensation range are obtained; and the current detection voltage of the analog-to-digital converter interface of the terminal device is obtained.

[0159] Calculate the current detected voltage and the target voltage compensation value to obtain the actual detected voltage of the analog-to-digital converter interface of the terminal device;

[0160] Based on the comparison results of the voltage range between the actual detected voltage and the current power supply voltage, the voltage detection result of the terminal device under the current power supply voltage is obtained.

[0161] The voltage calibration device for heterogeneous networks provided in this application embodiment and the voltage calibration method provided in this application embodiment are based on the same inventive concept and have the same beneficial effects as the methods they employ, operate, or implement.

[0162] This application also provides a computer device for performing the voltage calibration method described above. Please refer to... Figure 6 It illustrates a schematic diagram of a computer device provided by some embodiments of this application. For example... Figure 6 As shown, the computer device 8 includes: a processor 800, a memory 801, a bus 802, and a communication interface 803. The processor 800, the communication interface 803, and the memory 801 are connected via the bus 802. The memory 801 stores a computer program that can run on the processor 800. When the processor 800 runs the computer program, it executes the voltage calibration method provided in any of the foregoing embodiments of this application.

[0163] The memory 801 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this device network element and at least one other network element is achieved through at least one communication interface 803 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc.

[0164] Bus 802 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. The memory 801 is used to store programs. After receiving an execution instruction, the processor 800 executes the program. The voltage calibration method disclosed in any of the foregoing embodiments of this application can be applied to the processor 800, or implemented by the processor 800.

[0165] The processor 800 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 800 or by instructions in software form. The processor 800 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPTA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 801. Processor 800 reads the information in memory 801 and, in conjunction with its hardware, completes the steps of the above method.

[0166] The computer device provided in this application embodiment and the voltage calibration method provided in this application embodiment are based on the same inventive concept and have the same beneficial effects as the methods they adopt, operate or implement.

[0167] This application also provides a computer-readable storage medium corresponding to the voltage calibration method provided in the foregoing embodiments. The computer-readable storage medium is an optical disc, on which a computer program (i.e., a computer program product) is stored. When the computer program is run by a processor, it executes the voltage calibration method provided in any of the foregoing embodiments.

[0168] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical and magnetic storage media, which will not be elaborated here.

[0169] The computer-readable storage medium provided in the above embodiments of this application and the voltage calibration method provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the applications stored therein.

[0170] This application also provides a computer program product; please refer to [reference needed]. Figure 7 The computer program product 600 carries program code, namely computer program 601. The instructions included in the computer program 601 can be used to execute the steps of the voltage calibration method described in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.

[0171] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0172] The basic principles of this application have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this application are merely examples and not limitations, and should not be considered as essential features of each embodiment of this application. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the application to the necessity of employing the aforementioned specific details for implementation.

[0173] The block diagrams of devices, apparatuses, devices, and systems involved in this application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.

[0174] Additionally, as used herein, the “or” used in a list of items beginning with “at least one” indicates a separate list, such that a list of, for example, “at least one of A, B, or C” means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word “exemplary” does not imply that the described example is preferred or better than other examples.

[0175] It should also be noted that in the system and method of this application, the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered as equivalent solutions of this application.

[0176] Various changes, substitutions, and modifications can be made to the technology described herein without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims is not limited to the specific aspects of the processes, machines, manufactures, events, means, methods, and actions described above. Currently existing or later-developed processes, machines, manufactures, events, means, methods, or actions that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein can be utilized. Therefore, the appended claims include such processes, machines, manufactures, events, means, methods, or actions within their scope.

[0177] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this application. Therefore, this application is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0178] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this application to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.

Claims

1. A voltage calibration method, characterized in that, include: When the power supply voltage of the voltage divider resistor circuit is a first voltage, the detection voltage of the analog-to-digital converter interface of the communication module is obtained. The analog-to-digital converter interface is connected to the voltage divider resistor circuit, which is used to detect the voltage of the terminal device to which the communication module belongs. The voltage divider resistor circuit includes a first resistor and a second resistor. The first resistor is configured with a first resistance value accuracy, and the second resistor is configured with a second resistance value accuracy. The acquisition of the detection voltage of the analog-to-digital converter interface of the communication module includes: Based on the first resistance value accuracy and the second resistance value accuracy, all resistance combinations of the first resistor and the second resistor are determined, wherein the resistance values ​​of the first resistor and / or the second resistor are different in any two sets of resistance combinations; The detection voltage of the analog-to-digital converter interface at each of the resistor combinations is obtained respectively; Calculate the voltage compensation value based on the detected voltage and the first voltage; The calculation of the voltage compensation value based on the detected voltage and the first voltage includes: Calculate the difference between the detected voltage and the first voltage for each resistor combination; calculate the average of the differences for each resistor combination to obtain the voltage compensation value; If the voltage compensation value is determined to meet the compensation requirements, the first voltage is updated to the second voltage according to the first voltage difference, and the process returns to the step of obtaining the detection voltage of the analog-to-digital converter interface of the communication module when the power supply voltage of the voltage divider resistor circuit is the first voltage, until it is determined that the voltage compensation value under the second voltage does not meet the compensation requirements, and the voltage compensation range of the voltage compensation value is determined based on the second voltage.

2. The voltage calibration method according to claim 1, characterized in that, Determining that the voltage compensation value meets the compensation requirements includes: If the voltage compensation value is determined to be greater than the preset compensation threshold, a target resistance accuracy is selected from the first resistance accuracy and the second resistance accuracy, wherein the resistance accuracy of the resistor corresponding to the target resistance accuracy is greater than the standard accuracy of the resistor. According to the preset accuracy difference, the target resistance accuracy is reduced to the third resistance accuracy, and the process returns to the step of determining all resistance combinations of the first resistor and the second resistor based on the first resistance accuracy and the second resistance accuracy, until the voltage compensation value is less than or equal to the compensation threshold, and the voltage compensation value is determined to meet the compensation requirements.

3. The voltage calibration method according to claim 1, characterized in that, Determining the voltage compensation range based on the second voltage includes: According to the second voltage difference, the second voltage is updated to the third voltage, and the process returns to the step of obtaining the detection voltage of the analog-to-digital converter interface of the communication module when the power supply voltage of the voltage divider resistor circuit is the first voltage, until the voltage compensation value meets the compensation requirement; the second voltage difference is less than the first voltage difference, and the change direction corresponding to the second voltage difference is opposite to the change direction corresponding to the first voltage difference; In the case of a defined target voltage compensation interval, the voltage compensation interval is determined based on the boundary voltage of the last defined voltage compensation interval in the target voltage compensation interval and the third voltage. In the absence of the target voltage compensation range, the voltage compensation range is determined based on the boundary voltage of the power supply voltage and the third voltage.

4. The voltage calibration method according to claim 2, characterized in that, Before determining that the voltage compensation value is greater than a preset compensation threshold, the method further includes: If the voltage compensation range is determined to be the first voltage compensation range of the power supply voltage of the voltage divider resistor circuit, the compensation threshold is determined to be the error value configured by the user. If the voltage compensation interval is not the first voltage compensation interval, the compensation threshold is determined to be the sum of the earliest voltage compensation value determined in the process of determining the voltage compensation interval and the compensation difference configured by the user.

5. The voltage calibration method according to claim 1, characterized in that, After determining the voltage compensation range of the voltage compensation value based on the first voltage and the second voltage, the method further includes: When the voltage of the terminal device to which the communication module belongs is detected based on the voltage divider resistor circuit, the target voltage compensation range to which the current power supply voltage of the voltage divider resistor circuit belongs and the target voltage compensation value of the target voltage compensation range are obtained; and the current detection voltage of the analog-to-digital converter interface of the terminal device is obtained. Calculate the current detected voltage and the target voltage compensation value to obtain the actual detected voltage of the analog-to-digital converter interface of the terminal device; Based on the comparison results of the voltage range between the actual detected voltage and the current power supply voltage, the voltage detection result of the terminal device under the current power supply voltage is obtained.

6. A voltage calibration device, characterized in that, include: The acquisition module is used to acquire the detection voltage of the analog-to-digital converter interface of the communication module when the power supply voltage of the voltage divider resistor circuit is a first voltage. The analog-to-digital converter interface is connected to the voltage divider resistor circuit, which is used to perform voltage detection on the terminal device to which the communication module belongs. The voltage divider resistor circuit includes a first resistor and a second resistor. The first resistor is configured with a first resistance value accuracy, and the second resistor is configured with a second resistance value accuracy. The acquisition of the detection voltage of the analog-to-digital converter interface of the communication module includes: Based on the first resistance value accuracy and the second resistance value accuracy, all resistance combinations of the first resistor and the second resistor are determined, wherein the resistance values ​​of the first resistor and / or the second resistor are different in any two sets of resistance combinations; The detection voltage of the analog-to-digital converter interface at each of the resistor combinations is obtained respectively; The calculation module is used to calculate a voltage compensation value based on the detected voltage and the first voltage; wherein, calculating the voltage compensation value based on the detected voltage and the first voltage includes: Calculate the difference between the detected voltage and the first voltage for each resistor combination; calculate the average of the differences for each resistor combination to obtain the voltage compensation value; The update module is used to update the first voltage to the second voltage according to the first voltage difference when it is determined that the voltage compensation value meets the compensation requirements, and return to the step of obtaining the detection voltage of the analog-to-digital converter interface of the communication module when the power supply voltage of the voltage divider resistor circuit is the first voltage, until it is determined that the voltage compensation value under the second voltage does not meet the compensation requirements. The interval division module is used to determine the voltage compensation interval of the voltage compensation value based on the second voltage.

7. A computer device, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 5.

9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Power supply adjusting method and device, storage medium and image signal generator

    CN115993865A

  • Bus voltage compensation method and device of motor and terminal equipment

    CN117458939A