CN112444668A - Voltage detection method, device, equipment and medium - Google Patents

Voltage detection method, device, equipment and medium Download PDF

Info

Publication number
CN112444668A
CN112444668A CN202011072639.2A CN202011072639A CN112444668A CN 112444668 A CN112444668 A CN 112444668A CN 202011072639 A CN202011072639 A CN 202011072639A CN 112444668 A CN112444668 A CN 112444668A
Authority
CN
China
Prior art keywords
voltage
point
stored
reference voltage
storage
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.)
Pending
Application number
CN202011072639.2A
Other languages
Chinese (zh)
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.)
Shanghai Chunmi Electronics Technology Co Ltd
Original Assignee
Shanghai Chunmi Electronics 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 Shanghai Chunmi Electronics Technology Co Ltd filed Critical Shanghai Chunmi Electronics Technology Co Ltd
Priority to CN202011072639.2A priority Critical patent/CN112444668A/en
Publication of CN112444668A publication Critical patent/CN112444668A/en
Pending legal-status Critical Current

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)

Abstract

The invention discloses a voltage detection method, which comprises the following steps: acquiring a preset voltage slope, and reading a storage single-point voltage stored in a target storage address and a reference voltage corresponding to the storage single-point voltage; acquiring the current sampling voltage of a sampling port in a voltage division circuit; and calculating the current input voltage in the voltage division circuit according to the stored single-point voltage, the reference voltage, the current sampling voltage and the preset voltage slope. The peripheral voltage division circuit applied in the voltage detection process is simple and low in cost, and can accurately detect the current input voltage. Further, a voltage detection apparatus, a computer device and a storage medium are proposed.

Description

Voltage detection method, device, equipment and medium
Technical Field
The present invention relates to the field of voltage detection technologies, and in particular, to a voltage detection method, apparatus, device, and medium.
Background
Various heating products have higher requirements on temperature control at the beginning of design, and a plurality of products for electromagnetic heating or hot plate heating are required to realize power accuracy, so that the detection of the current power grid voltage is very important. In the household appliance industry, due to the limitation of cost, a voltage sampling circuit is generally simple in design, mainly realized by dividing voltage through resistors, and the current power grid voltage is calculated by reading an AD voltage value and looking up a table. However, the error existing in the calculation is difficult to avoid by the conventional voltage detection method, and the voltage error obtained by sampling often reaches 5V or even 10V, so that the control of the heating power cannot be strictly controlled when electromagnetic heating or hot plate heating is performed, and the working performance of the product is correspondingly greatly reduced.
Disclosure of Invention
In view of the above, it is necessary to provide a voltage detection method, apparatus, device, and medium for accurately detecting a voltage in view of the above problems.
A method of voltage detection, the method comprising:
acquiring a preset voltage slope, and reading a storage single-point voltage stored in a target storage address and a reference voltage corresponding to the storage single-point voltage;
acquiring the current sampling voltage of a sampling port in a voltage division circuit;
and calculating the current input voltage in the voltage division circuit according to the stored single-point voltage, the reference voltage, the current sampling voltage and the preset voltage slope.
In one embodiment, before the reading the voltage of the storage single point stored in the target storage address and the reference voltage corresponding to the voltage of the storage single point, the method further includes:
judging whether a stored value stored under the target storage address comprises a reference voltage corresponding to the stored single-point voltage or not;
and if the stored value stored in the target storage address does not comprise the reference voltage corresponding to the stored single-point voltage, determining the default voltage value of the system as the reference voltage corresponding to the stored single-point voltage.
In one embodiment, after obtaining the current sampling voltage of the sampling port in the voltage dividing circuit, the method further includes:
judging whether the current working state is a factory debugging state or not;
if the current working state is the factory debugging state, correcting the error reference voltage in the reference voltage according to the preset voltage slope and the stored single-point voltage;
and if the current working state is not the factory debugging state, executing the step of calculating the current input voltage in the voltage division circuit according to the stored single-point voltage, the reference voltage, the current sampling voltage and the preset voltage slope.
In one embodiment, the correcting the error reference voltage in the reference voltage according to the preset voltage slope and the stored single-point voltage includes:
acquiring standard storage single-point voltage in the storage single-point voltage and standard reference voltage corresponding to the standard storage single-point voltage;
calculating the standard reference voltage of all the storage single-point voltages according to the standard reference voltage, the standard single-point voltage and the preset voltage slope;
calculating a voltage difference value between the reference voltage corresponding to the same storage single-point voltage and the standard reference voltage, and taking the reference voltage of which the voltage difference value is greater than a preset voltage difference value in the reference voltages as an error reference voltage;
and correcting the error reference voltage by using the standard reference voltage corresponding to the error reference voltage.
In one embodiment, the calculating a current input voltage in the voltage divider circuit according to the stored single-point voltage, the reference voltage, the current sampling voltage and the preset voltage slope includes:
selecting any one of the storage single-point voltages as a target storage single-point voltage, and acquiring a target reference voltage corresponding to the target storage single-point voltage;
and calculating a relative floating voltage according to the target reference voltage, the current sampling voltage and the preset voltage slope, and calculating the current input voltage in the voltage division circuit according to the relative floating voltage and the target storage single-point voltage.
In one embodiment, calculating a relative floating voltage according to the target reference voltage, the current sampling voltage and the preset voltage slope includes:
calculating a relative voltage difference value of the target reference voltage and the current sampling voltage;
multiplying the relative voltage difference value by the preset voltage slope to obtain the relative floating voltage;
the calculating the current input voltage in the voltage dividing circuit according to the relative floating voltage and the target storage single-point voltage comprises:
and calculating the addition value of the relative floating voltage and the target storage single-point voltage, and taking the addition value as the current input voltage in the voltage division circuit.
A voltage detection apparatus, the apparatus comprising:
the first acquisition module is used for acquiring a preset voltage slope and reading a storage single-point voltage stored in a target storage address and a reference voltage corresponding to the storage single-point voltage;
the second acquisition module is used for acquiring the current sampling voltage of a sampling port in the voltage division circuit;
and the calculation module is used for calculating the current input voltage in the voltage division circuit according to the stored single-point voltage, the reference voltage, the current sampling voltage and the preset voltage slope.
In one embodiment, the apparatus further comprises:
the data storage judging module is used for judging whether the stored value stored under the target storage address comprises a reference voltage corresponding to the stored single-point voltage or not; and if the stored value stored in the target storage address does not comprise the reference voltage corresponding to the stored single-point voltage, determining the default voltage value of the system as the reference voltage corresponding to the stored single-point voltage.
A computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
acquiring a preset voltage slope, and reading a storage single-point voltage stored in a target storage address and a reference voltage corresponding to the storage single-point voltage;
acquiring the current sampling voltage of a sampling port in a voltage division circuit;
and calculating the current input voltage in the voltage division circuit according to the stored single-point voltage, the reference voltage, the current sampling voltage and the preset voltage slope.
A voltage detection apparatus comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of:
acquiring a preset voltage slope, and reading a storage single-point voltage stored in a target storage address and a reference voltage corresponding to the storage single-point voltage;
acquiring the current sampling voltage of a sampling port in a voltage division circuit;
and calculating the current input voltage in the voltage division circuit according to the stored single-point voltage, the reference voltage, the current sampling voltage and the preset voltage slope.
The invention provides a voltage detection method, a device, equipment and a medium, which are used for calculating the current input voltage in a voltage division circuit based on a stored single-point voltage, a reference voltage, a current sampling voltage and a preset voltage slope.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Wherein:
FIG. 1 is a schematic flow chart illustrating a voltage detection method according to a first embodiment;
FIG. 2 is a linear diagram of storing a single point voltage and a reference voltage in one embodiment;
FIG. 3 is a current diagram of a voltage divider circuit in one embodiment;
FIG. 4 is a flowchart illustrating a voltage detection method according to a second embodiment;
FIG. 5 is a schematic structural diagram of a voltage detection device according to an embodiment;
fig. 6 is a block diagram showing the structure of a voltage detection device in one embodiment.
Detailed Description
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.
As shown in fig. 1, fig. 1 is a schematic flow chart of a voltage detection method in a first embodiment, where the steps provided by the voltage detection method in the first embodiment include:
and 102, acquiring a preset voltage slope, and reading the storage single-point voltage stored in the target storage address and a reference voltage corresponding to the storage single-point voltage.
The preset voltage slope is a value obtained by voltage detection equipment according to circuit parameter simulation of the voltage division circuit and is recorded as slope K. The storage single-point voltage is a predetermined specific voltage value, and is usually closer to the voltage of the utility grid, for example, the set storage single-point voltage includes: 260V, 255V, 250V, etc. After one of the storage single-point voltages is used as the input voltage of the voltage division circuit, the AD value of the reference voltage corresponding to the storage single-point voltage can be acquired at the IO port of the single chip microcomputer of the voltage division circuit. As shown in fig. 2, fig. 2 is a linear diagram of a single-point voltage and a reference voltage. The abscissa represents one of the voltage test points, for example, when the abscissa is 1, the voltage of the selected memory cell is 260V, when the abscissa is 2, the voltage of the selected memory cell is 255V, and so on. The ordinate indicates the AD value of the sampled reference voltage. Illustratively, when the voltage of the single point is stored to be 260V, the reference voltage obtained by sampling is 3367; when the voltage of a single point is stored to be 255V, the reference voltage obtained by sampling is 3305. Furthermore, the storage single-point voltage and the reference voltage are stored under a target storage address correspondingly, so that the storage single-point voltage and the reference voltage can be directly called in the subsequent detection of the current input voltage.
And 104, acquiring the current sampling voltage of a sampling port in the voltage division circuit.
As shown in fig. 3, fig. 3 is a current diagram of the voltage divider circuit. When the voltage of the commercial power grid is detected, the voltage of the commercial power grid is used as the current input voltage of the voltage dividing circuit to be connected into the circuit, the diode D1 rectifies the current input voltage, and then the rectified current input voltage is divided through the resistors R3, R4 and R5, so that the divided voltage is within a voltage range which can be allowed to be sampled by the sampling single chip microcomputer. And then, filtering a direct current voltage signal within 5V to an IO port of the singlechip through an electrolytic capacitor, and sampling the direct current voltage signal by a sampling chip to obtain the current sampling voltage which is recorded as V _ ad.
And 106, calculating the current input voltage in the voltage division circuit according to the stored single-point voltage, the reference voltage, the current sampling voltage and the preset voltage slope.
In one embodiment, any one of the storage single-point voltages is selected as a target storage single-point Voltage, which is referred to as Voltage. And acquiring a target reference voltage corresponding to the target storage single-point voltage, and recording the target reference voltage as benchmark voltage. First, a relative floating voltage is calculated according to a target reference voltage, a current sampling voltage and a preset voltage slope. Specifically, a relative voltage difference between the target reference voltage and the current sampling voltage is calculated, and then the product of the relative voltage difference and a preset voltage slope is obtained to obtain a relative floating voltage which is recorded as (V _ ad-benchmark voltage) multiplied by K. And secondly, calculating the current input voltage in the voltage division circuit according to the relative floating voltage and the target storage single-point voltage. Specifically, the sum of the relative floating voltage and the target single-point storage voltage is calculated, and the sum is used as the current input voltage in the voltage dividing circuit. The above calculation process is formulated as:
Vin=Voltage+(V_ad-BenchmarkVoltage)×K
in one embodiment, the predetermined voltage slope K is 0.078684, and the sampled current sample voltage is 2800. When the selected target storage single-point voltage is 220V, the corresponding target reference voltage is 2864, and Vin is calculated to be 220+ (2800) -2864 × 0.078684 ≈ 214.96. When the selected target storage single-point voltage is 215V, the corresponding target reference voltage is 2736, and Vin is 215+ (2800) -2736) × 0.078684 ≈ 215.04. And the current input voltage actually used as the test input is 215V, it can be seen that the error between the calculated current input voltage and the actual current input voltage is small. In the actual voltage detection process, the present embodiment can ensure that the voltage detection error is within ± 1V, so that the present embodiment can more accurately detect the current input voltage.
According to the voltage detection method, the current input voltage in the voltage division circuit is calculated based on the stored single-point voltage, the reference voltage, the current sampling voltage and the preset voltage slope.
As shown in fig. 4, fig. 4 is a schematic flow chart of a voltage detection method in a second embodiment, where the voltage detection method in the second embodiment includes the steps of:
step 402, determining whether the stored value stored in the target memory address includes a reference voltage corresponding to the stored single-point voltage. If the stored value stored in the target memory address does not include the reference voltage corresponding to the stored single-point voltage, step 404 is executed to determine the default voltage value of the system as the reference voltage corresponding to the stored single-point voltage.
In this step, a data preparation step before the current input voltage detection is performed is required to ensure that the reference voltage corresponding to each preset storage single node is stored under the target storage address of the voltage detection device. If the stored value stored in the target storage address does not include the reference voltage corresponding to the storage single-point voltage, a default output value obtained after the voltage divider circuit simulates and inputs the storage single-point voltage can be assigned to the reference voltage corresponding to each storage single-point voltage. If the stored value stored at the target memory address includes the reference voltage corresponding to the stored single-point voltage, step 406 can be directly performed.
Step 406, obtaining a preset voltage slope, and reading the storage single-point voltage stored in the target storage address and a reference voltage corresponding to the storage single-point voltage.
And step 408, acquiring the current sampling voltage of the sampling port in the voltage division circuit.
In a specific implementation scenario, the steps 406-408 are substantially the same as the steps 102-104 provided by the voltage detection method in the first embodiment, and are not repeated herein.
Step 410, determine whether the current working status is factory debug status. If the current working state is the factory debugging state, go to step 412; if the current operating status is not the factory debug status, go to step 414.
When voltage detection is carried out for the first time after voltage detection equipment leaves a factory, calibration and adjustment of basic voltage are needed, and therefore accuracy of data calling of the voltage detection equipment during subsequent voltage detection of a city network is guaranteed. In the factory debug state, the storage single point voltage and the base voltage at the target storage address are adjustable, and step 412 can be executed; if not, the storage single-point voltage and the base voltage at the target storage address can be locked, so as to ensure that the step 414 can only be directly executed.
In step 412, the error reference voltage in the reference voltage is corrected according to the preset voltage slope and the stored single-point voltage.
In one embodiment, a standard storage single-point voltage in the storage single-point voltages and a standard reference voltage corresponding to the standard storage single-point voltage are obtained first. Illustratively, the selected standard memory single-point voltage is 220V, the standard reference voltage is 2864, and the preset voltage slope is 0.078684. Further, the standard reference voltage of all the stored single-point voltages is calculated according to the standard reference voltage, the standard single-point voltage and the preset voltage slope. Taking the single-point voltage stored as 260V for example, the standard reference voltage calculated is about 3372.36 (calculated from 2864+ 40/0.078684). And then calculating the voltage difference value between the reference voltage corresponding to the same storage single-point voltage and the standard reference voltage, and taking the reference voltage of which the voltage difference value is greater than the preset voltage difference value in the reference voltages as an error reference voltage. For example, if the preset voltage difference is set to 10, and the current stored value of the reference voltage of the stored single-point voltage of 260V is 3367, the voltage difference when the stored single-point voltage of 260V is about 5.36, because the voltage difference is smaller than the preset voltage difference, the reference voltage corresponding to the stored single-point voltage is not the error reference voltage. If the current stored value of the reference voltage of the stored single-point voltage of 260V is 3362, the voltage difference value is about 10.36 when the stored single-point voltage of 260V is taken, and the reference voltage corresponding to the stored single-point voltage is the error reference voltage because the voltage difference value is greater than the preset voltage difference value. Finally, the error reference voltage is corrected by the standard reference voltage corresponding to the error reference voltage, namely, 3372.36 is used for correcting 3362.
And step 414, calculating the current input voltage in the voltage dividing circuit according to the stored single-point voltage, the reference voltage, the current sampling voltage and the preset voltage slope.
In a specific implementation scenario, step 414 is substantially the same as step 106 provided by the voltage detection method in the first embodiment, and is not described herein again.
In one embodiment, as shown in fig. 5, there is provided a voltage detection apparatus including:
the first acquisition module is used for acquiring a preset voltage slope and reading the storage single-point voltage stored in the target storage address and the reference voltage corresponding to the storage single-point voltage;
the second acquisition module is used for acquiring the current sampling voltage of a sampling port in the voltage division circuit;
and the calculation module is used for calculating the current input voltage in the voltage division circuit according to the stored single-point voltage, the reference voltage, the current sampling voltage and the preset voltage slope.
According to the voltage detection device, the current input voltage in the voltage division circuit is calculated based on the stored single-point voltage, the reference voltage, the current sampling voltage and the preset voltage slope.
In one embodiment, the apparatus further comprises: the data storage judging module is used for judging whether the stored value stored under the target storage address comprises a reference voltage corresponding to the stored single-point voltage; and if the stored value stored under the target storage address does not comprise the reference voltage corresponding to the stored single-point voltage, determining the default voltage value of the system as the reference voltage corresponding to the stored single-point voltage.
In one embodiment, the voltage detection apparatus further includes: a state judgment module for: judging whether the current working state is a factory debugging state or not; if the current working state is a factory debugging state, correcting the error reference voltage in the reference voltage according to a preset voltage slope and a stored single-point voltage; and if the current working state is not the factory debugging state, executing the step of calculating the current input voltage in the voltage division circuit according to the stored single-point voltage, the reference voltage, the current sampling voltage and the preset voltage slope.
In an embodiment, the state determining module is further specifically configured to: acquiring standard storage single-point voltage in the storage single-point voltage and standard reference voltage corresponding to the standard storage single-point voltage; calculating the standard reference voltage of all the stored single-point voltages according to the standard reference voltage, the standard single-point voltage and a preset voltage slope; calculating a voltage difference value between a reference voltage corresponding to the same storage single-point voltage and a standard reference voltage, and taking the reference voltage of which the voltage difference value is greater than a preset voltage difference value in the reference voltages as an error reference voltage; and correcting the error reference voltage by using the standard reference voltage corresponding to the error reference voltage.
In one embodiment, the calculation module is further specifically configured to: selecting any one of the storage single-point voltages as a target storage single-point voltage, and acquiring a target reference voltage corresponding to the target storage single-point voltage; and calculating the relative floating voltage according to the target reference voltage, the current sampling voltage and the preset voltage slope, and calculating the current input voltage in the voltage division circuit according to the relative floating voltage and the target storage single-point voltage.
In one embodiment, the calculation module is further specifically configured to: calculating a relative voltage difference value between the target reference voltage and the current sampling voltage; multiplying the relative voltage difference value by a preset voltage slope to obtain a relative floating voltage; and calculating the addition value of the relative floating voltage and the target storage single-point voltage, and taking the addition value as the current input voltage in the voltage division circuit.
Fig. 6 shows an internal structural view of the voltage detection device in one embodiment. As shown in fig. 6, the voltage detection apparatus includes a processor, a memory, and a network interface connected through a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the voltage detection apparatus stores an operating system and may further store a computer program that, when executed by the processor, causes the processor to implement the voltage detection method. The internal memory may also have a computer program stored therein, which when executed by the processor, causes the processor to perform the voltage detection method. It will be understood by those skilled in the art that the structure shown in fig. 6 is a block diagram of only a portion of the structure relevant to the present application, and does not constitute a limitation on the voltage detection device to which the present application is applied, and a particular voltage detection device may include more or less components than those shown in the drawings, or combine certain components, or have a different arrangement of components.
A voltage detection apparatus comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the following steps when executing the computer program: acquiring a preset voltage slope, and reading a storage single-point voltage stored in a target storage address and a reference voltage corresponding to the storage single-point voltage; acquiring the current sampling voltage of a sampling port in a voltage division circuit; and calculating the current input voltage in the voltage division circuit according to the stored single-point voltage, the reference voltage, the current sampling voltage and the preset voltage slope.
In one embodiment, before reading the voltage of the storage single point stored in the target storage address and the reference voltage corresponding to the voltage of the storage single point, the method further includes: judging whether a stored value stored under a target storage address comprises a reference voltage corresponding to a stored single-point voltage or not; and if the stored value stored under the target storage address does not comprise the reference voltage corresponding to the stored single-point voltage, determining the default voltage value of the system as the reference voltage corresponding to the stored single-point voltage.
In one embodiment, after obtaining the current sampling voltage of the sampling port in the voltage dividing circuit, the method further includes: judging whether the current working state is a factory debugging state or not; if the current working state is a factory debugging state, correcting the error reference voltage in the reference voltage according to a preset voltage slope and a stored single-point voltage; and if the current working state is not the factory debugging state, executing the step of calculating the current input voltage in the voltage division circuit according to the stored single-point voltage, the reference voltage, the current sampling voltage and the preset voltage slope.
In one embodiment, correcting the error reference voltage in the reference voltage according to the preset voltage slope and the stored single-point voltage comprises: acquiring standard storage single-point voltage in the storage single-point voltage and standard reference voltage corresponding to the standard storage single-point voltage; calculating the standard reference voltage of all the stored single-point voltages according to the standard reference voltage, the standard single-point voltage and a preset voltage slope; calculating a voltage difference value between a reference voltage corresponding to the same storage single-point voltage and a standard reference voltage, and taking the reference voltage of which the voltage difference value is greater than a preset voltage difference value in the reference voltages as an error reference voltage; and correcting the error reference voltage by using the standard reference voltage corresponding to the error reference voltage.
In one embodiment, calculating a current input voltage in the voltage divider circuit according to the stored single-point voltage, the reference voltage, the current sampling voltage and a preset voltage slope includes: selecting any one of the storage single-point voltages as a target storage single-point voltage, and acquiring a target reference voltage corresponding to the target storage single-point voltage; and calculating the relative floating voltage according to the target reference voltage, the current sampling voltage and the preset voltage slope, and calculating the current input voltage in the voltage division circuit according to the relative floating voltage and the target storage single-point voltage.
In one embodiment, calculating the relative floating voltage according to the target reference voltage, the current sampling voltage and the preset voltage slope includes: calculating a relative voltage difference value between the target reference voltage and the current sampling voltage; multiplying the relative voltage difference value by a preset voltage slope to obtain a relative floating voltage; calculating the current input voltage in the voltage dividing circuit according to the relative floating voltage and the target storage single-point voltage, and the method comprises the following steps: and calculating the addition value of the relative floating voltage and the target storage single-point voltage, and taking the addition value as the current input voltage in the voltage division circuit.
A computer-readable storage medium storing a computer program which, when executed by a processor, performs the steps of: acquiring a preset voltage slope, and reading a storage single-point voltage stored in a target storage address and a reference voltage corresponding to the storage single-point voltage; acquiring the current sampling voltage of a sampling port in a voltage division circuit; and calculating the current input voltage in the voltage division circuit according to the stored single-point voltage, the reference voltage, the current sampling voltage and the preset voltage slope.
In one embodiment, before reading the voltage of the storage single point stored in the target storage address and the reference voltage corresponding to the voltage of the storage single point, the method further includes: judging whether a stored value stored under a target storage address comprises a reference voltage corresponding to a stored single-point voltage or not; and if the stored value stored under the target storage address does not comprise the reference voltage corresponding to the stored single-point voltage, determining the default voltage value of the system as the reference voltage corresponding to the stored single-point voltage.
In one embodiment, after obtaining the current sampling voltage of the sampling port in the voltage dividing circuit, the method further includes: judging whether the current working state is a factory debugging state or not; if the current working state is a factory debugging state, correcting the error reference voltage in the reference voltage according to a preset voltage slope and a stored single-point voltage; and if the current working state is not the factory debugging state, executing the step of calculating the current input voltage in the voltage division circuit according to the stored single-point voltage, the reference voltage, the current sampling voltage and the preset voltage slope.
In one embodiment, correcting the error reference voltage in the reference voltage according to the preset voltage slope and the stored single-point voltage comprises: acquiring standard storage single-point voltage in the storage single-point voltage and standard reference voltage corresponding to the standard storage single-point voltage; calculating the standard reference voltage of all the stored single-point voltages according to the standard reference voltage, the standard single-point voltage and a preset voltage slope; calculating a voltage difference value between a reference voltage corresponding to the same storage single-point voltage and a standard reference voltage, and taking the reference voltage of which the voltage difference value is greater than a preset voltage difference value in the reference voltages as an error reference voltage; and correcting the error reference voltage by using the standard reference voltage corresponding to the error reference voltage.
In one embodiment, calculating a current input voltage in the voltage divider circuit according to the stored single-point voltage, the reference voltage, the current sampling voltage and a preset voltage slope includes: selecting any one of the storage single-point voltages as a target storage single-point voltage, and acquiring a target reference voltage corresponding to the target storage single-point voltage; and calculating the relative floating voltage according to the target reference voltage, the current sampling voltage and the preset voltage slope, and calculating the current input voltage in the voltage division circuit according to the relative floating voltage and the target storage single-point voltage.
In one embodiment, calculating the relative floating voltage according to the target reference voltage, the current sampling voltage and the preset voltage slope includes: calculating a relative voltage difference value between the target reference voltage and the current sampling voltage; multiplying the relative voltage difference value by a preset voltage slope to obtain a relative floating voltage; calculating the current input voltage in the voltage dividing circuit according to the relative floating voltage and the target storage single-point voltage, and the method comprises the following steps: and calculating the addition value of the relative floating voltage and the target storage single-point voltage, and taking the addition value as the current input voltage in the voltage division circuit.
It should be noted that the voltage detection method, the voltage detection apparatus, the voltage detection device and the computer-readable storage medium belong to a general inventive concept, and the contents in the embodiments of the voltage detection method, the voltage detection apparatus, the voltage detection device and the computer-readable storage medium are mutually applicable.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of voltage detection, the method comprising:
acquiring a preset voltage slope, and reading a storage single-point voltage stored in a target storage address and a reference voltage corresponding to the storage single-point voltage;
acquiring the current sampling voltage of a sampling port in a voltage division circuit;
and calculating the current input voltage in the voltage division circuit according to the stored single-point voltage, the reference voltage, the current sampling voltage and the preset voltage slope.
2. The method of claim 1, further comprising, before the reading the voltage of the single storage point stored in the target memory address and the reference voltage corresponding to the voltage of the single storage point, the steps of:
judging whether a stored value stored under the target storage address comprises a reference voltage corresponding to the stored single-point voltage or not;
and if the stored value stored in the target storage address does not comprise the reference voltage corresponding to the stored single-point voltage, determining the default voltage value of the system as the reference voltage corresponding to the stored single-point voltage.
3. The method of claim 1, further comprising, after obtaining a current sample voltage of a sample port in the voltage divider circuit:
judging whether the current working state is a factory debugging state or not;
if the current working state is the factory debugging state, correcting the error reference voltage in the reference voltage according to the preset voltage slope and the stored single-point voltage;
and if the current working state is not the factory debugging state, executing the step of calculating the current input voltage in the voltage division circuit according to the stored single-point voltage, the reference voltage, the current sampling voltage and the preset voltage slope.
4. The method of claim 3, wherein the correcting the error reference voltage in the reference voltage according to the preset voltage slope and the stored single-point voltage comprises:
acquiring standard storage single-point voltage in the storage single-point voltage and standard reference voltage corresponding to the standard storage single-point voltage;
calculating the standard reference voltage of all the storage single-point voltages according to the standard reference voltage, the standard single-point voltage and the preset voltage slope;
calculating a voltage difference value between the reference voltage corresponding to the same storage single-point voltage and the standard reference voltage, and taking the reference voltage of which the voltage difference value is greater than a preset voltage difference value in the reference voltages as an error reference voltage;
and correcting the error reference voltage by using the standard reference voltage corresponding to the error reference voltage.
5. The method of claim 1, wherein calculating the current input voltage in the voltage divider circuit according to the stored single-point voltage, the reference voltage, the current sampling voltage and the preset voltage slope comprises:
selecting any one of the storage single-point voltages as a target storage single-point voltage, and acquiring a target reference voltage corresponding to the target storage single-point voltage;
and calculating a relative floating voltage according to the target reference voltage, the current sampling voltage and the preset voltage slope, and calculating the current input voltage in the voltage division circuit according to the relative floating voltage and the target storage single-point voltage.
6. The method of claim 5, wherein calculating a relative floating voltage from the target reference voltage, the current sample voltage, and the preset voltage slope comprises:
calculating a relative voltage difference value of the target reference voltage and the current sampling voltage;
multiplying the relative voltage difference value by the preset voltage slope to obtain the relative floating voltage;
the calculating the current input voltage in the voltage dividing circuit according to the relative floating voltage and the target storage single-point voltage comprises:
and calculating the addition value of the relative floating voltage and the target storage single-point voltage, and taking the addition value as the current input voltage in the voltage division circuit.
7. A voltage detection apparatus, comprising:
the first acquisition module is used for acquiring a preset voltage slope and reading a storage single-point voltage stored in a target storage address and a reference voltage corresponding to the storage single-point voltage;
the second acquisition module is used for acquiring the current sampling voltage of a sampling port in the voltage division circuit;
and the calculation module is used for calculating the current input voltage in the voltage division circuit according to the stored single-point voltage, the reference voltage, the current sampling voltage and the preset voltage slope.
8. The voltage detection apparatus according to claim 7, further comprising:
the data storage judging module is used for judging whether the stored value stored under the target storage address comprises a reference voltage corresponding to the stored single-point voltage or not; and if the stored value stored in the target storage address does not comprise the reference voltage corresponding to the stored single-point voltage, determining the default voltage value of the system as the reference voltage corresponding to the stored single-point voltage.
9. A computer-readable storage medium, storing a computer program which, when executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 6.
10. A voltage detection apparatus comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method of any one of claims 1 to 6.
CN202011072639.2A 2020-10-09 2020-10-09 Voltage detection method, device, equipment and medium Pending CN112444668A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011072639.2A CN112444668A (en) 2020-10-09 2020-10-09 Voltage detection method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011072639.2A CN112444668A (en) 2020-10-09 2020-10-09 Voltage detection method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN112444668A true CN112444668A (en) 2021-03-05

Family

ID=74736364

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011072639.2A Pending CN112444668A (en) 2020-10-09 2020-10-09 Voltage detection method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN112444668A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005300295A (en) * 2004-04-09 2005-10-27 Matsushita Electric Ind Co Ltd Dc voltage detecting circuit equipped with noise reduction processing function
JP2006242610A (en) * 2005-03-01 2006-09-14 Fuji Electric Device Technology Co Ltd Single power source voltage measuring circuit
CN206725726U (en) * 2017-04-15 2017-12-08 深圳市容亮电子有限公司 A kind of voltage check device of large-size machine
CN107656235A (en) * 2017-10-31 2018-02-02 国网冀北电力有限公司电力科学研究院 A kind of measurement apparatus and method of computation chip reference voltage
CN108663622A (en) * 2017-03-30 2018-10-16 深圳市理邦精密仪器股份有限公司 Battery voltage measuring circuit and voltage measurement system
CN110907691A (en) * 2019-12-05 2020-03-24 中国人民解放军92942部队 Wide-range direct-current voltage measuring device based on resistance voltage division time-sharing sampling self-calibration

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005300295A (en) * 2004-04-09 2005-10-27 Matsushita Electric Ind Co Ltd Dc voltage detecting circuit equipped with noise reduction processing function
JP2006242610A (en) * 2005-03-01 2006-09-14 Fuji Electric Device Technology Co Ltd Single power source voltage measuring circuit
CN108663622A (en) * 2017-03-30 2018-10-16 深圳市理邦精密仪器股份有限公司 Battery voltage measuring circuit and voltage measurement system
CN206725726U (en) * 2017-04-15 2017-12-08 深圳市容亮电子有限公司 A kind of voltage check device of large-size machine
CN107656235A (en) * 2017-10-31 2018-02-02 国网冀北电力有限公司电力科学研究院 A kind of measurement apparatus and method of computation chip reference voltage
CN110907691A (en) * 2019-12-05 2020-03-24 中国人民解放军92942部队 Wide-range direct-current voltage measuring device based on resistance voltage division time-sharing sampling self-calibration

Similar Documents

Publication Publication Date Title
CN109857974B (en) Life evaluation method and device
CN108333526B (en) Battery capacity detection method and device
CN109726909B (en) Energy efficiency evaluation method and device, readable medium and electronic equipment
CN108830456B (en) Sensitive equipment and power grid voltage sag compatibility analysis method and device
CN113901675B (en) Electronic component service life prediction method and device, computer equipment and storage medium
CN112415403B (en) Battery self-discharge test method and device, storage medium and equipment
CN113406477A (en) PCBA test method, system, computer equipment and storage medium
CN112444668A (en) Voltage detection method, device, equipment and medium
CN109856483B (en) Reliability evaluation method and device for key device of MMC power module
CN113835016B (en) DDR chip limit performance test method, test device, equipment and storage medium
CN110794258B (en) Electric circuit sparking detection method, device, equipment and storage medium
CN109212451B (en) Voltage loss fault monitoring method and device based on three-phase four-wire meter measuring equipment
CN110736909B (en) Semiconductor device package inspection method, computer device, and readable storage medium
CN108616315B (en) Power amplifier output power detection method and device, computer equipment and storage medium
CN109508387B (en) Atlas renaming method and device, computer equipment and storage medium
CN117391019B (en) Simulation test method, device, equipment and medium for EMI power filter
CN112230062B (en) Method for obtaining static impedance of motor, motor monitoring system, equipment and medium
CN114578104B (en) Signal test probe, system and method
CN111679112B (en) Electric energy meter electricity stealing type judging method and device, computer equipment and storage medium
CN112748186B (en) Method and device for detecting water content of piezoresistor, control equipment and medium
CN111696612B (en) Data reading method, device and medium for nonvolatile memory
CN116559758A (en) Parameter correction system and method for chemical composition equipment
CN113688024A (en) Method and device for realizing automatic test of slave disk performance and computer equipment
CN116301762A (en) Hall chip programming method, programming controller and Hall chip programming system
CN113267679A (en) Phase signal detection/control method, circuit, control device and medium

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
CB02 Change of applicant information

Address after: Room 01-04, 1st floor, No.2 Lane 60, Naxian Road, Pudong New Area pilot Free Trade Zone, Shanghai 201203

Applicant after: Chunmi Technology (Shanghai) Co.,Ltd.

Address before: Room 01-04, 1st floor, Lane 60, Naxian Road, Pudong New Area, Shanghai, 201203

Applicant before: SHANGHAI CHUNMI ELECTRONICS TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information