CN115267312A - ADC voltage detection compensation method, device, equipment and storage medium - Google Patents

ADC voltage detection compensation method, device, equipment and storage medium Download PDF

Info

Publication number
CN115267312A
CN115267312A CN202210919691.XA CN202210919691A CN115267312A CN 115267312 A CN115267312 A CN 115267312A CN 202210919691 A CN202210919691 A CN 202210919691A CN 115267312 A CN115267312 A CN 115267312A
Authority
CN
China
Prior art keywords
voltage
current
line loss
sampling
backlight brightness
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210919691.XA
Other languages
Chinese (zh)
Other versions
CN115267312B (en
Inventor
余庆悦
莫云杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yuanfeng Technology Co Ltd
Original Assignee
Yuanfeng Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yuanfeng Technology Co Ltd filed Critical Yuanfeng Technology Co Ltd
Priority to CN202210919691.XA priority Critical patent/CN115267312B/en
Publication of CN115267312A publication Critical patent/CN115267312A/en
Application granted granted Critical
Publication of CN115267312B publication Critical patent/CN115267312B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R19/00Arrangements for measuring currents or voltages or for indicating presence or sign thereof
    • G01R19/25Arrangements for measuring currents or voltages or for indicating presence or sign thereof using digital measurement techniques
    • G01R19/2503Arrangements for measuring currents or voltages or for indicating presence or sign thereof using digital measurement techniques for measuring voltage only, e.g. digital volt meters (DVM's)
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R19/00Arrangements for measuring currents or voltages or for indicating presence or sign thereof
    • G01R19/25Arrangements for measuring currents or voltages or for indicating presence or sign thereof using digital measurement techniques
    • G01R19/2506Arrangements for conditioning or analysing measured signals, e.g. for indicating peak values ; Details concerning sampling, digitizing or waveform capturing
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R35/00Testing or calibrating of apparatus covered by the other groups of this subclass
    • G01R35/005Calibrating; Standards or reference devices, e.g. voltage or resistance standards, "golden" references

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Control Of Indicators Other Than Cathode Ray Tubes (AREA)

Abstract

The invention discloses an ADC voltage detection compensation method, device, equipment and storage medium. The ADC voltage detection compensation method comprises the following steps: establishing a corresponding relation among backlight brightness, sampling voltage and line loss voltage; acquiring current backlight brightness; acquiring a current sampling voltage; determining a current line loss voltage based on the current backlight brightness, the current sampling voltage and the corresponding relationship; determining a current supply voltage based on the current sampled voltage and the current line loss voltage. By adopting the scheme, the problems that voltage drop values under different backlight brightness are different, and voltage detection values obtained by compensating fixed voltage drop values during voltage collection are still not accurate enough are solved, and the current power supply voltage obtained by adopting the method is relatively accurate.

Description

ADC voltage detection compensation method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of voltage detection, in particular to an ADC voltage detection compensation method, device, equipment and storage medium.
Background
The streaming media rearview mirror has a function of adjusting backlight brightness, the brighter the backlight is, the larger the backlight current is, the larger the overall current is, and according to ohm law, the voltage U = I × R, (R is a resistance, I is a current), and in the case of a fixed resistance value, the larger the current is, the larger the voltage U is, so that in the case of a fixed resistance value R of a power line, the larger the current on the power line is, the larger the voltage drop on the power line is, that is, the larger the line loss is, and thus, the inaccurate ADC voltage detection is caused. Because the line loss and the voltage drop on a power line have a certain mathematical relationship, most of the current methods use a 12V power supply as a reference, calculate the line loss and the voltage drop when the 12V power supply is used under a fixed brightness, and compensate a fixed line loss and voltage drop value when an ADC acquires voltage so as to obtain a final voltage detection value. However, the current is different at different backlight brightness, so the voltage drop value is also different, and the final voltage detection value obtained by compensating the fixed voltage drop value is still not accurate enough.
Disclosure of Invention
The invention provides an ADC voltage detection compensation method, device, equipment and storage medium, which are used for solving the problems that voltage drop values under different backlight brightness are different, and voltage detection values obtained by compensating fixed voltage drop values during voltage acquisition are still not accurate enough.
According to an aspect of the present invention, there is provided an ADC voltage detection compensation method including:
establishing a corresponding relation among backlight brightness, sampling voltage and line loss voltage;
acquiring current backlight brightness;
acquiring a current sampling voltage;
determining a current line loss voltage based on the current backlight brightness, the current sampling voltage and the corresponding relationship;
determining a current supply voltage based on the current sampled voltage and the current line loss voltage.
In an optional embodiment of the present invention, the establishing a corresponding relationship between the backlight brightness, the sampling voltage, and the line loss voltage includes:
acquiring an input analog voltage;
acquiring backlight brightness;
adjusting the analog voltage based on the backlight brightness, and recording a sampling voltage corresponding to the analog voltage;
determining line loss voltage based on the analog voltage and the sampling voltage corresponding to the analog voltage;
and associating the backlight brightness, the sampling voltage and the line loss voltage to form a corresponding relation.
In an alternative embodiment of the invention, the method further comprises:
dividing the backlight brightness into a plurality of brightness levels;
correspondingly, after the obtaining of the backlight brightness, the method further includes:
determining the brightness level corresponding to the backlight brightness;
correspondingly, the adjusting the analog voltage based on the backlight brightness and recording a sampling voltage corresponding to the analog voltage includes:
adjusting the analog voltage based on the brightness level, and recording a sampling voltage corresponding to the analog voltage;
correspondingly, the associating the backlight brightness, the sampling voltage and the line loss voltage to form a corresponding relationship includes:
and associating the brightness grade, the sampling voltage and the line loss voltage to form a corresponding relation.
In an optional embodiment of the present invention, the adjusting the analog voltage based on the brightness level and recording a sampling voltage corresponding to the analog voltage includes:
based on the current brightness level, when the analog voltage is in a first voltage range, the analog voltage is adjusted by a first step value, when the analog voltage is in a second voltage range, the analog voltage is adjusted by a second step value, and a sampling voltage corresponding to the analog voltage is recorded.
In an alternative embodiment of the invention, the first voltage range comprises a high voltage threshold range comprising a high voltage threshold and a low voltage threshold range comprising a low voltage threshold;
the first step value is less than the second step value.
In an optional embodiment of the present invention, the determining a current line loss voltage based on the current backlight brightness, the current sampling voltage, and the correspondence includes:
determining a current brightness level based on the current backlight brightness;
and determining the line loss voltage corresponding to the current sampling voltage under the current brightness level based on the current brightness level, the current sampling voltage and the corresponding relation, and determining the line loss voltage as the current line loss voltage.
In an optional embodiment of the present invention, the determining a line loss voltage based on the analog voltage and a sampling voltage corresponding to the analog voltage includes:
determining line loss voltage based on the difference value of the analog voltage and the sampling voltage corresponding to the analog voltage;
and/or, said determining a current supply voltage based on said current sampled voltage and said current line loss voltage comprises:
determining a current supply voltage based on a sum of the current sampled voltage and the current line loss voltage.
According to another aspect of the present invention, there is provided a power supply voltage detection apparatus including:
the data establishing module is used for establishing the corresponding relation among the backlight brightness, the sampling voltage and the line loss voltage;
the brightness acquisition module is used for acquiring the current backlight brightness;
the voltage acquisition module is used for acquiring the current sampling voltage;
a line loss determining module, configured to determine a current line loss voltage based on the current backlight brightness, the current sampling voltage, and the corresponding relationship;
a voltage determination module to determine a current supply voltage based on the current sampled voltage and the current line loss voltage.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the first and the second end of the pipe are connected with each other,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the ADC voltage detection compensation method according to any of the embodiments of the present invention when executed.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the ADC voltage detection compensation method according to any one of the embodiments of the present invention when the computer instructions are executed.
According to the technical scheme of the embodiment of the invention, the current backlight brightness is obtained by establishing the corresponding relation among the backlight brightness, the sampling voltage and the line loss voltage, the current sampling voltage is obtained, the current line loss voltage is determined based on the current backlight brightness, the current sampling voltage and the corresponding relation, and finally the current power supply voltage is determined based on the current sampling voltage and the current line loss voltage. In the real vehicle environment, the current screen brightness and the battery voltage both have uncertainty, so the scheme adopts the method of calibrating line loss voltages under different brightness and different sampling voltages in advance, namely establishing the corresponding relation among backlight brightness, sampling voltage and line loss voltage, then in actual use, determining the current line loss voltage based on the current backlight brightness, the current sampling voltage and the corresponding relation, and compensating the current sampling voltage to obtain the current power supply voltage. The problem that voltage drop values under different backlight brightness are different, and voltage detection values obtained by compensating fixed voltage drop values when ADC voltage is collected are still not accurate enough is solved, and the current power supply voltage obtained by the method is accurate.
It should be understood that the statements in this section are not intended to identify key or critical features of the embodiments of the present invention, nor are they intended to limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of an ADC voltage detection compensation method according to an embodiment of the present invention;
fig. 2 is a flowchart of an ADC voltage detection compensation method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a power supply voltage detection apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device implementing the ADC voltage detection compensation method according to the embodiment of the present invention.
Wherein: 61. a data establishing module; 62. a brightness acquisition module; 63. a voltage acquisition module; 64. a line loss determining module; 65. a voltage determination module.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in other sequences than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
Fig. 1 is a flowchart of an ADC voltage detection compensation method according to an embodiment of the present invention, where the method is applicable to a situation of backlight voltage detection of a streaming media rearview mirror, and the method can be executed by a power supply voltage detection device, where the power supply voltage detection device can be implemented in a form of hardware and/or software, and the power supply voltage detection device can be configured in the streaming media rearview mirror. As shown in fig. 1, the method includes:
and S110, establishing a corresponding relation among the backlight brightness, the sampling voltage and the line loss voltage.
The line loss voltages corresponding to different sampling voltages are different under different backlight brightness, and the corresponding relationship is the corresponding relationship among the backlight brightness, the sampling voltage and the line loss voltage. Specifically, the streaming media rearview mirror may have an MCU therein, and the correspondence may be fixed as a code written in the MCU.
And S120, acquiring the current backlight brightness.
The current backlight brightness refers to the current backlight brightness value of the tested product. In this embodiment, the product to be tested may be a streaming media rearview mirror. Since the duty ratio of the PWM value represents the average voltage, the average voltage across the LEDs corresponding to the backlight changes when the duty ratio changes, and thus the current flowing through the LEDs corresponding to the backlight changes, and the luminance of the backlight changes. The current backlight brightness can be reflected by the PWM value.
And S130, acquiring the current sampling voltage.
The current sampling voltage is a voltage value obtained when the ADC value of the current power supply voltage of the streaming media rearview mirror is sampled, that is, the ADC voltage.
And S140, determining the current line loss voltage based on the current backlight brightness, the current sampling voltage and the corresponding relation.
The line loss generally refers to line loss, and the line loss is referred to as line loss for short. Is the energy loss resulting from the transmission of electrical energy through the transmission line. The streaming media rearview mirror has the functions of brightness adjustment and automatic backlight, namely the current backlight brightness is closely related to the environment, the current of the whole machine is in direct proportion to the backlight current, namely the brighter the backlight is, the larger the current is, and meanwhile, according to the ohm law: u = I × R, the larger the power line loss. Therefore, the current line loss voltage can be accurately determined based on the current backlight brightness, the current sampling voltage and the correspondence relationship established in advance.
And S150, determining the current power supply voltage based on the current sampling voltage and the current line loss voltage.
The current line loss voltage reflects the current line loss, and the current sampling voltage reflects the voltage sampled after the line loss is removed, so that the current power supply voltage can be conveniently determined through the current sampling voltage and the current line loss voltage. Specifically, the determining the current power supply voltage based on the current sampling voltage and the current line loss voltage includes: and determining the current power supply voltage based on the sum of the current sampling voltage and the current line loss voltage, namely, the current power supply voltage can be obtained by adding the current sampling voltage and the current line loss voltage.
According to the scheme, the current backlight brightness is obtained by establishing the corresponding relation among the backlight brightness, the sampling voltage and the line loss voltage, the current sampling voltage is obtained, the current line loss voltage is determined based on the current backlight brightness, the current sampling voltage and the corresponding relation, and finally the current power supply voltage is determined based on the current sampling voltage and the current line loss voltage. In an actual vehicle environment, the current screen brightness and the battery voltage both have uncertainty, so the scheme adopts the line loss voltage under different brightness and different sampling voltages which are calibrated in advance, namely, the corresponding relation among the backlight brightness, the sampling voltage and the line loss voltage is established, then in actual use, the current line loss voltage is determined based on the current backlight brightness, the current sampling voltage and the corresponding relation, and the current sampling voltage is compensated to obtain the current power supply voltage. The problem that voltage drop values under different backlight brightness are different, and voltage detection values obtained by compensating fixed voltage drop values when ADC voltage is collected are still not accurate enough is solved, and the current power supply voltage obtained by the method is accurate.
Example two
Fig. 2 is a flowchart of an ADC voltage detection compensation method according to a second embodiment of the present invention, where optionally, the establishing a corresponding relationship between the backlight brightness, the sampling voltage, and the line loss voltage includes: acquiring an input analog voltage; acquiring backlight brightness; adjusting the analog voltage based on the backlight brightness, and recording a sampling voltage corresponding to the analog voltage; determining line loss voltage based on the analog voltage and the sampling voltage corresponding to the analog voltage; and associating the backlight brightness, the sampling voltage and the line loss voltage to form a corresponding relation. Based on this, as shown in fig. 2, the method includes:
and S210, acquiring the input analog voltage.
The analog voltage can be input by simulating the voltage of the battery through the direct-current adjustable voltage-stabilized source.
And S220, acquiring backlight brightness.
The backlight brightness refers to a PWM value of the backlight.
And S230, adjusting the analog voltage based on the backlight brightness, and recording a sampling voltage corresponding to the analog voltage.
When the backlight brightness is different, even if the analog voltage is the same, the line loss may still be different, and the obtained sampling voltage is also different. When the products emitting backlight are different, the adjustment ranges of the corresponding voltages are different, so that the analog voltage can be adjusted within the range of the working voltage of the actual product emitting backlight according to the actual product emitting backlight when the analog voltage is adjusted.
And S240, determining line loss voltage based on the analog voltage and the sampling voltage corresponding to the analog voltage.
Since the analog voltage is a voltage actually output, the sampling voltage is a sampled voltage, and the line loss voltage reflects a line loss, the line loss voltage can be conveniently determined based on the analog voltage and the sampling voltage corresponding to the analog voltage. In a specific embodiment, the determining a line loss voltage based on the analog voltage and a sampling voltage corresponding to the analog voltage includes: and determining line loss voltage based on the difference value of the analog voltage and the sampling voltage corresponding to the analog voltage. By the method, the line loss voltage can be obtained only by obtaining the analog voltage and the sampling voltage corresponding to the analog voltage and subtracting the corresponding sampling voltage from the analog voltage.
And S250, associating the backlight brightness, the sampling voltage and the line loss voltage to form a corresponding relation.
When the backlight brightness is different, even if the analog voltage is the same, the line loss may still be different, and the obtained sampling voltage is also different. Therefore, by simulating the line loss voltages corresponding to different sampling voltages under different backlight brightness and associating the line loss voltages with the sampling voltages, a corresponding relation can be formed.
And S260, acquiring the current backlight brightness.
And S270, acquiring the current sampling voltage.
And S280, determining the current line loss voltage based on the current backlight brightness, the current sampling voltage and the corresponding relation.
And S290, determining the current power supply voltage based on the current sampling voltage and the current line loss voltage.
According to the scheme, the backlight brightness is obtained by obtaining the input analog voltage, the analog voltage is adjusted based on the backlight brightness, the sampling voltage corresponding to the analog voltage is recorded, the line loss voltage is determined based on the analog voltage and the sampling voltage corresponding to the analog voltage, and finally the backlight brightness, the sampling voltage and the line loss voltage are associated to form a corresponding relation. The corresponding relation can be conveniently established.
In an alternative embodiment of the invention, the method further comprises:
the backlight brightness is divided into several brightness levels.
Correspondingly, after the obtaining of the backlight brightness, the method further includes:
and determining the brightness level corresponding to the backlight brightness.
Correspondingly, the adjusting the analog voltage based on the backlight brightness and recording a sampling voltage corresponding to the analog voltage includes:
and adjusting the analog voltage based on the brightness level, and recording a sampling voltage corresponding to the analog voltage.
Correspondingly, the associating the backlight brightness, the sampling voltage and the line loss voltage to form a corresponding relationship includes:
and associating the brightness grade, the sampling voltage and the line loss voltage to form a corresponding relation.
The mode of dividing the backlight brightness into a plurality of brightness levels is to divide the PWM values in different ranges into different brightness levels, that is, the range of the PWM value corresponding to each brightness level is different, specifically, each level changes a specific PWM value, so that the brightness level corresponding to the backlight brightness can be determined. For example, the backlight brightness level is divided into 50 levels, each level is changed by two 2 PWM values, and the brightness level of the backlight can be known by knowing the PWM value of the backlight brightness. Since the line loss value is not greatly different in the case where the PWM value difference of the backlight luminance is not large, the calibration amount can be reduced by dividing the backlight luminance into different luminance levels.
Adjusting the analog voltage based on the brightness level refers to adjusting the voltage output by the dc adjustable voltage-stabilized power supply to gradually change within the range of the working voltage of the actual product emitting the backlight, and the gradual change mode may be different according to different use requirements, which is not specifically limited herein.
And associating the brightness grade, the sampling voltage and the line loss voltage to form a corresponding relation, namely obtaining the corresponding relation of the brightness grade, the sampling voltage and the line loss voltage. In a specific embodiment, the correspondence relationship may be presented by a table, for example, the line loss voltage corresponding to a certain sampling voltage at a certain brightness level is recorded in the table.
On the basis of the foregoing embodiment, the determining a current line loss voltage based on the current backlight luminance, the current sampling voltage, and the correspondence includes:
determining a current brightness level based on the current backlight brightness.
And determining the line loss voltage corresponding to the current sampling voltage under the current brightness level based on the current brightness level, the current sampling voltage and the corresponding relation, and determining the line loss voltage as the current line loss voltage.
By means of the mode, under the condition that the current backlight brightness is determined, the current brightness grade can be conveniently determined according to the current backlight brightness, and then the current line loss voltage is determined.
In an optional embodiment of the present invention, the adjusting the analog voltage based on the brightness level and recording a sampling voltage corresponding to the analog voltage includes:
based on the current brightness level, when the analog voltage is in a first voltage range, the analog voltage is adjusted by a first step value, when the analog voltage is in a second voltage range, the analog voltage is adjusted by a second step value, and a sampling voltage corresponding to the analog voltage is recorded.
When the ranges of the analog voltages are different, the required accuracy is different. For example, for general vehicle-mounted products, a vehicle manufacturer has protection that requires high voltage and low voltage, taking a streaming media rearview mirror product as an example, the vehicle manufacturer requires that a normal operating voltage is 9-16V, and considering a voltage hysteresis region, a low voltage threshold designed in general software is 8.5V, that is, when the MCU detects that a battery sampling voltage is less than 8.5V, the MCU needs to enter a low voltage protection state, and similarly, when the high voltage protection also detects that the sampling voltage is higher than 16.5V, the MCU needs to enter a high voltage protection state. When the current is in the threshold interval of high and low voltages, the sampling error caused by the power line loss easily causes the false triggering of the high and low voltage protection of the streaming media rearview mirror. Therefore, the accuracy is required to be high in the threshold value section of high and low pressures. By dividing different voltage ranges and adjusting the analog voltage by different stepping values, data redundancy can be prevented and the calibration quantity is reduced.
On the basis of the above embodiment, the first voltage range includes a high voltage threshold range and a low voltage threshold range, the high voltage threshold range includes a high voltage threshold, and the low voltage threshold range includes a low voltage threshold; the first step value is less than the second step value.
The high-voltage threshold range refers to an interval range near the high-voltage threshold including the high-voltage threshold, for example, when the high-voltage threshold is 16V, the high-voltage threshold range may be 15-17V, and of course, according to the difference in accuracy, the high-voltage threshold range may also be 14.5V-17.5V, and the high-voltage threshold range is not specifically limited herein, and only needs to be near the high-voltage threshold. The low pressure threshold range refers to a range around a low pressure threshold including the low pressure threshold, for example, when the low pressure threshold is 9V, the low pressure threshold range may be 7-10V, 8-10V, etc., and the low pressure threshold range may be included in different sizes according to different use requirements as long as the range is around the low pressure threshold.
And when the first stepping value is smaller than the second stepping value, the voltage regulating speed is lower. For example, when the high voltage threshold is 16V and the low voltage threshold is 9V, the high voltage threshold range may be determined as 15-17V, the low voltage threshold range may be determined as 7-10V, and in the voltage ranges of 7-10V and 15-17V, the analog voltage is increased in steps of 0.2V, and in other interval ranges, the voltage is increased in steps of 1V. For example, in the range of 7-10V, the DC adjustable power supply is adjusted and changed to 7V- >7.2V- >7.4V.
As mentioned above, many products have high-low voltage protection, in the interval near the high-low voltage threshold, if the voltage error that samples is caused because of the line loss voltage, then cause high-low voltage protection false triggering easily, through adopting less step value adjustment analog voltage to mark in high-voltage threshold scope and low-voltage threshold scope, can be better effectively avoid because the sampling error that the power line loss caused, cause the high-low voltage protection false triggering of streaming media rear-view mirror. And the data can be simplified, and the calibration workload is reduced.
For example, when the input power voltage is 9V, if the correspondence between the brightness and the voltage is not determined in the above manner, and it is determined that different current line loss voltages compensate for the current sampling voltage, it is assumed that:
the current backlight brightness is 10 PWM, the current of the whole machine is probably about 0.3A at the moment, the line loss voltage on a power line is about 0.2V, the numerical value of the sampling voltage detected by the ADC is 8.8V at the moment, the numerical value is larger than the 8.5V low-voltage protection threshold value set by software, and the whole machine works normally. The current backlight brightness is 100PWM, the current of the whole machine is probably about 1.5A at the moment, the line loss voltage on a power line is probably up to 1.0V, the data of the sampling voltage detected by the ADC is 8.0V at the moment, the data is far less than the 8.5V low-voltage protection threshold value set by software, and the whole machine is in a low-voltage protection state. And the actual voltage is 9V, the false triggering is carried out, and the low-voltage abnormal protection is entered.
When the corresponding relation between the brightness and the voltage is determined by adopting the mode, and different current line loss voltages are determined to compensate the current sampling voltage according to the corresponding relation, which is established in advance, of the backlight brightness, the sampling voltage and the line loss voltage, the line loss voltage under the backlight brightness of the current environment is obtained through inquiry, the current actual input voltage, namely the current power supply voltage, can be obtained accurately, and the situation that the current input voltage is triggered by mistake to enter high-low voltage abnormal protection is ensured.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a power supply voltage detection apparatus according to a third embodiment of the present invention.
As shown in fig. 3, the apparatus includes:
and the data establishing module 61 is used for establishing the corresponding relation among the backlight brightness, the sampling voltage and the line loss voltage.
And a brightness obtaining module 62, configured to obtain the current backlight brightness.
And a voltage obtaining module 63, configured to obtain the current sampling voltage.
And a line loss determining module 64, configured to determine a current line loss voltage based on the current backlight brightness, the current sampling voltage, and the corresponding relationship.
A voltage determination module 65 configured to determine a current power supply voltage based on the current sampled voltage and the current line loss voltage.
Optionally, the data establishing module 61 includes a voltage obtaining sub-module, a brightness obtaining sub-module, a voltage adjusting sub-module, a line loss determining sub-module, and a forming sub-module.
And the voltage acquisition submodule is used for acquiring the input analog voltage.
And the brightness acquisition submodule is used for acquiring the backlight brightness.
And the voltage adjusting submodule is used for adjusting the analog voltage based on the backlight brightness and recording the sampling voltage corresponding to the analog voltage.
And the line loss determining submodule is used for determining line loss voltage based on the analog voltage and the sampling voltage corresponding to the analog voltage.
And forming a sub-module for correlating the backlight brightness, the sampling voltage and the line loss voltage to form a corresponding relation.
Optionally, the power supply voltage detection apparatus further includes a dividing module and a level determining module.
And the dividing module is used for dividing the backlight brightness into a plurality of brightness levels.
And the grade determining module is used for determining the brightness grade corresponding to the backlight brightness.
Correspondingly, the voltage adjusting submodule is further configured to adjust the analog voltage based on the brightness level, and record a sampling voltage corresponding to the analog voltage.
Correspondingly, a submodule is formed and is further used for associating the brightness level, the sampling voltage and the line loss voltage to form a corresponding relation.
Optionally, the voltage adjusting sub-module is further configured to adjust the analog voltage by a first step value when the analog voltage is in a first voltage range, adjust the analog voltage by a second step value when the analog voltage is in a second voltage range, and record a sampling voltage corresponding to the analog voltage based on the current brightness level.
Optionally, the first voltage range includes a high voltage threshold range and a low voltage threshold range, the high voltage threshold range includes a high voltage threshold, and the low voltage threshold range includes a low voltage threshold.
The first step value is less than the second step value.
Optionally, the line loss determining module 64 includes a current level determining sub-module and a current line loss determining sub-module.
And the current level determining submodule is used for determining the current brightness level based on the current backlight brightness.
And the current line loss determining submodule is used for determining the line loss voltage corresponding to the current sampling voltage under the current brightness level based on the current brightness level, the current sampling voltage and the corresponding relation and determining the line loss voltage as the current line loss voltage.
Optionally, the line loss determining submodule is further configured to determine a line loss voltage based on a difference between the analog voltage and a sampling voltage corresponding to the analog voltage.
Optionally, the voltage determining module 65 is further configured to determine the current power supply voltage based on a sum of the current sampling voltage and the current line loss voltage.
The power supply voltage detection device provided by the embodiment of the invention can execute the ADC voltage detection compensation method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
Example four
FIG. 4 shows a schematic block diagram of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from a storage unit 18 into the Random Access Memory (RAM) 13. In the RAM13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM12, and the RAM13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to the bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The processor 11 performs the various methods and processes described above, such as the ADC voltage detection compensation method.
In some embodiments, the ADC voltage detection compensation method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as the memory unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM12 and/or the communication unit 19. When the computer program is loaded into RAM13 and executed by processor 11, one or more steps of the ADC voltage detection compensation method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the ADC voltage detection compensation method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. An ADC voltage detection compensation method, comprising:
establishing a corresponding relation among backlight brightness, sampling voltage and line loss voltage;
acquiring current backlight brightness;
acquiring a current sampling voltage;
determining a current line loss voltage based on the current backlight brightness, the current sampling voltage and the corresponding relationship;
determining a current supply voltage based on the current sampled voltage and the current line loss voltage.
2. The ADC voltage detection compensation method of claim 1, wherein said establishing a corresponding relationship among backlight brightness, sampling voltage and line loss voltage comprises:
acquiring an input analog voltage;
acquiring backlight brightness;
adjusting the analog voltage based on the backlight brightness, and recording a sampling voltage corresponding to the analog voltage;
determining line loss voltage based on the analog voltage and the sampling voltage corresponding to the analog voltage;
and associating the backlight brightness, the sampling voltage and the line loss voltage to form a corresponding relation.
3. The ADC voltage detection compensation method of claim 2, further comprising:
dividing the backlight brightness into a plurality of brightness levels;
correspondingly, after the obtaining of the backlight brightness, the method further includes:
determining the brightness level corresponding to the backlight brightness;
correspondingly, the adjusting the analog voltage based on the backlight brightness and recording a sampling voltage corresponding to the analog voltage includes:
adjusting the analog voltage based on the brightness level, and recording a sampling voltage corresponding to the analog voltage;
correspondingly, the associating the backlight brightness, the sampling voltage and the line loss voltage to form a corresponding relationship includes:
and associating the brightness grade, the sampling voltage and the line loss voltage to form a corresponding relation.
4. The ADC voltage detection compensation method of claim 3, wherein the adjusting the analog voltage based on the brightness level and recording a sampling voltage corresponding to the analog voltage comprises:
based on the current brightness level, when the analog voltage is in a first voltage range, the analog voltage is adjusted by a first step value, when the analog voltage is in a second voltage range, the analog voltage is adjusted by a second step value, and a sampling voltage corresponding to the analog voltage is recorded.
5. The ADC voltage detection compensation method of claim 4 wherein the first voltage range comprises a high voltage threshold range and a low voltage threshold range, the high voltage threshold range comprising a high voltage threshold and the low voltage threshold range comprising a low voltage threshold;
the first step value is less than the second step value.
6. The ADC voltage detection compensation method of claim 3, wherein said determining a current line loss voltage based on said current backlight brightness, said current sampling voltage and said correspondence comprises:
determining a current brightness level based on the current backlight brightness;
and determining the line loss voltage corresponding to the current sampling voltage under the current brightness level based on the current brightness level, the current sampling voltage and the corresponding relation, and determining the line loss voltage as the current line loss voltage.
7. The ADC voltage detection compensation method of claim 2, wherein the determining a line loss voltage based on the analog voltage and a sampling voltage corresponding to the analog voltage comprises:
determining line loss voltage based on the difference value of the analog voltage and the sampling voltage corresponding to the analog voltage;
and/or, said determining a current supply voltage based on said current sampled voltage and said current line loss voltage comprises:
determining a current supply voltage based on a sum of the current sample voltage and the current line loss voltage.
8. A power supply voltage detection apparatus, comprising:
the data establishing module is used for establishing the corresponding relation among the backlight brightness, the sampling voltage and the line loss voltage;
the brightness acquisition module is used for acquiring the current backlight brightness;
the voltage acquisition module is used for acquiring the current sampling voltage;
a line loss determining module, configured to determine a current line loss voltage based on the current backlight brightness, the current sampling voltage, and the corresponding relationship;
and the voltage determining module is used for determining the current power supply voltage based on the current sampling voltage and the current line loss voltage.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the ADC voltage detection compensation method of any one of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to perform the ADC voltage detection compensation method of any one of claims 1-7 when executed.
CN202210919691.XA 2022-08-02 2022-08-02 ADC voltage detection compensation method, device, equipment and storage medium Active CN115267312B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210919691.XA CN115267312B (en) 2022-08-02 2022-08-02 ADC voltage detection compensation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210919691.XA CN115267312B (en) 2022-08-02 2022-08-02 ADC voltage detection compensation method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115267312A true CN115267312A (en) 2022-11-01
CN115267312B CN115267312B (en) 2023-08-08

Family

ID=83746492

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210919691.XA Active CN115267312B (en) 2022-08-02 2022-08-02 ADC voltage detection compensation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115267312B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104575406A (en) * 2015-02-09 2015-04-29 京东方科技集团股份有限公司 Method for driving backlight plate as well as time sequence controller and backlight driving plate
CN107507579A (en) * 2017-08-18 2017-12-22 上海中兴软件有限责任公司 A kind of screen backlight control and method to set up, device, multi-screen terminal and storage medium
CN108682391A (en) * 2018-05-03 2018-10-19 昆山国显光电有限公司 Display panel, display device and preparation method
CN109410847A (en) * 2018-11-21 2019-03-01 惠科股份有限公司 A kind of backlight control circuit and control method
CN111341272A (en) * 2018-12-29 2020-06-26 Tcl集团股份有限公司 Backlight control method, system, terminal and computer readable storage medium
CN111415629A (en) * 2020-04-28 2020-07-14 Tcl华星光电技术有限公司 Display device driving method and display device
CN111415630A (en) * 2020-04-28 2020-07-14 Tcl华星光电技术有限公司 Display device driving method and display device
CN113470581A (en) * 2021-07-08 2021-10-01 北京京东方显示技术有限公司 Method and device for controlling backlight brightness of display, electronic equipment and storage medium
US20210349350A1 (en) * 2020-05-11 2021-11-11 Tcl China Star Optoelectronics Technology Co., Ltd. Backlight module and display panel
CN114553192A (en) * 2022-03-23 2022-05-27 广东大普通信技术股份有限公司 Clock chip frequency compensation method and device, electronic equipment and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104575406A (en) * 2015-02-09 2015-04-29 京东方科技集团股份有限公司 Method for driving backlight plate as well as time sequence controller and backlight driving plate
CN107507579A (en) * 2017-08-18 2017-12-22 上海中兴软件有限责任公司 A kind of screen backlight control and method to set up, device, multi-screen terminal and storage medium
CN108682391A (en) * 2018-05-03 2018-10-19 昆山国显光电有限公司 Display panel, display device and preparation method
CN109410847A (en) * 2018-11-21 2019-03-01 惠科股份有限公司 A kind of backlight control circuit and control method
CN111341272A (en) * 2018-12-29 2020-06-26 Tcl集团股份有限公司 Backlight control method, system, terminal and computer readable storage medium
CN111415629A (en) * 2020-04-28 2020-07-14 Tcl华星光电技术有限公司 Display device driving method and display device
CN111415630A (en) * 2020-04-28 2020-07-14 Tcl华星光电技术有限公司 Display device driving method and display device
US20210349350A1 (en) * 2020-05-11 2021-11-11 Tcl China Star Optoelectronics Technology Co., Ltd. Backlight module and display panel
CN113470581A (en) * 2021-07-08 2021-10-01 北京京东方显示技术有限公司 Method and device for controlling backlight brightness of display, electronic equipment and storage medium
CN114553192A (en) * 2022-03-23 2022-05-27 广东大普通信技术股份有限公司 Clock chip frequency compensation method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN115267312B (en) 2023-08-08

Similar Documents

Publication Publication Date Title
CN102478636B (en) Electric quantity detection method and device for battery
US10142116B2 (en) Inspection device and method for powered devices in a power over Ethernet system
CN110888065B (en) Battery pack state of charge correction method and device
CN110991761B (en) Heat supply load prediction method and device
CN113671379B (en) Method and medium for determining remaining battery life and movie and television lamp equipment
CN115267312B (en) ADC voltage detection compensation method, device, equipment and storage medium
CN112946482A (en) Battery voltage estimation method, device, equipment and storage medium based on model
CN115792583A (en) Test method, device, equipment and medium for vehicle gauge chip
CN107659466B (en) System and method for quantifying and calculating throughput capacity service level of cloud system
CN108988340B (en) Method and device for reducing line loss and server
CN114200315A (en) Method and device for predicting remaining charging time, electronic equipment and storage medium
CN115712322B (en) Proportional valve chip adjusting method and device, electronic equipment and medium
US20160061910A1 (en) Electronic device and detection method of power capacity
CN117233509A (en) Method, equipment and medium for determining fog voltage
CN110389947A (en) A kind of blacklist generation method, device, equipment and medium
CN117150325B (en) Processing method, device, equipment and medium for abnormal residual error data
CN115148161B (en) Automatic backlight adjustment method, device, equipment and storage medium
CN115542238B (en) Method and device for detecting out-of-tolerance meter
CN116840715A (en) Method, device and system for detecting power consumption of battery of electronic equipment
CN114965878A (en) Oxygen sensor detection method, system, electronic equipment and storage medium
CN115454847A (en) Pressure testing method and device, electronic equipment and storage medium
CN117452169A (en) Avalanche voltage detection method, device, equipment and medium
CN116304945A (en) Waveform data processing method and device, electronic equipment and storage medium
CN115511123A (en) Method, device and medium for determining quantity of spare parts
CN116691341A (en) Vehicle speed adjusting method, device, equipment and storage medium based on vehicle accelerator

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant