CN111025008A - Voltage detection method and device - Google Patents

Voltage detection method and device Download PDF

Info

Publication number
CN111025008A
CN111025008A CN201911406302.8A CN201911406302A CN111025008A CN 111025008 A CN111025008 A CN 111025008A CN 201911406302 A CN201911406302 A CN 201911406302A CN 111025008 A CN111025008 A CN 111025008A
Authority
CN
China
Prior art keywords
voltage
circuit
resistor
division circuit
digital quantity
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
CN201911406302.8A
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.)
Shenzhen Neoway Technology Co Ltd
Original Assignee
Shenzhen Neoway 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 Shenzhen Neoway Technology Co Ltd filed Critical Shenzhen Neoway Technology Co Ltd
Priority to CN201911406302.8A priority Critical patent/CN111025008A/en
Publication of CN111025008A publication Critical patent/CN111025008A/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)
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R15/00Details of measuring arrangements of the types provided for in groups G01R17/00 - G01R29/00, G01R33/00 - G01R33/26 or G01R35/00
    • G01R15/08Circuits for altering the measuring range
    • G01R15/09Autoranging circuits

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Measurement Of Current Or Voltage (AREA)

Abstract

The application discloses a voltage detection method and a device, and the method comprises the following steps: acquiring a voltage to be detected, wherein the voltage to be detected is an analog quantity; when the voltage to be detected is smaller than a preset switching threshold value, processing the voltage to be detected through a first voltage division circuit of the conduction device to obtain the output voltage of the first voltage division circuit; then, performing analog-to-digital conversion to obtain a first digital quantity; processing the first digital quantity according to the attenuation coefficient of the first voltage division circuit to obtain a voltage value of the voltage to be detected; when the voltage to be detected is greater than or equal to a preset switching threshold value, a first voltage division circuit and a switching circuit of the device are respectively conducted to form a second voltage division circuit so as to process the voltage to be detected, and output voltage of the second voltage division circuit is obtained; then, carrying out analog-to-digital conversion to obtain a second digital quantity; and reading the switching signal of the switching circuit and processing the second digital quantity according to the switching signal to obtain the voltage value of the voltage to be detected. The embodiment of the application can realize simple, quick and low-cost detection of the voltage.

Description

Voltage detection method and device
Technical Field
The present application relates to the field of signal acquisition, and in particular, to a voltage detection method and apparatus.
Background
With the development of the internet of things technology, the collected voltage of the storage battery in the vehicle is often transmitted to a background server through a wireless communication technology, and the judgment and analysis of the running state or the fault condition of the subsequent vehicle are assisted.
Currently, in the case of high voltage, the voltage at the acquisition terminal needs to be divided into several ranges to be measured due to the limitation of the resolution of the ADC converter inside the acquisition device. When voltage is collected, the collection amount is read from a default gear, namely the lowest range, through an ADC (analog to digital converter), when the collection amount is judged to exceed the current gear through data processing, the gain of the adjustable gain amplifier is controlled and adjusted to gradually increase the range of the circuit, the operation is continuously executed until the read collection amount is in the current range, and finally the collection amount is processed and calculated.
Although the method can realize accurate measurement of the collected terminal voltage, on one hand, the method has complex and complicated control logic, and for circuits with multiple ranges, system software needs to judge once from a low range to a high range; on the other hand, the cost is high, the occupied area is large, and devices such as a plurality of active devices, such as operational amplifiers and analog switches, adopted in the acquisition device are high in cost and occupy a large area of a PCB.
Disclosure of Invention
The embodiment of the application discloses a voltage detection method and a voltage detection device, which reduce the implementation cost and the device volume of the voltage detection device and realize simple, quick and low-cost voltage detection.
In a first aspect, an embodiment of the present application provides an apparatus for voltage detection, where the apparatus includes: the ADC analog-to-digital converter comprises a voltage divider, an ADC analog-to-digital converter and a controller, wherein the output end of the voltage divider is connected with the input end of the ADC analog-to-digital converter, and the controller is respectively connected with the voltage divider and the output end of the ADC analog-to-digital converter; the voltage divider comprises a first voltage dividing circuit and a switching circuit, and the first voltage dividing circuit is coupled with the switching circuit; the voltage divider is used for acquiring a voltage to be detected, and the voltage to be detected is analog quantity; when the voltage to be detected is smaller than a preset switching threshold value, the first voltage division circuit is switched on, the ADC is configured to perform analog-to-digital conversion calculation on the output voltage of the first voltage division circuit to obtain a first digital quantity, where the first digital quantity is a digital quantity of the output voltage of the first voltage division circuit; the controller is used for processing the first digital quantity according to an attenuation coefficient of a first voltage division circuit to obtain a voltage value of the voltage to be detected, wherein the attenuation coefficient of the first voltage division circuit is a fixed ratio of the voltage value of the output voltage of the first voltage division circuit to the voltage value of the voltage to be detected; under the condition that the voltage to be detected is greater than or equal to a preset switching threshold value, the first voltage division circuit and the switching circuit are respectively conducted to form a second voltage division circuit, the ADC is configured to perform analog-to-digital conversion on the output voltage of the second voltage division circuit to obtain a second digital quantity, where the second digital quantity is a digital quantity of the output voltage of the second voltage division circuit; the controller is used for reading the switching signal of the switching circuit and processing the second digital quantity according to the switching signal to obtain the voltage value of the voltage to be detected.
Based on the first aspect, in a possible embodiment, the controller is specifically configured to: reading a switching signal of the switching circuit and a second digital quantity output by the ADC, wherein the second digital quantity is a digital quantity of an output voltage of the second voltage division circuit; finding the attenuation coefficient of the second voltage division circuit according to the switching signal of the switching circuit, wherein the attenuation coefficient of the second voltage division circuit is a fixed ratio of the voltage value of the output voltage of the second voltage division circuit to the voltage value of the voltage to be detected; and processing the second digital quantity according to the attenuation coefficient of the second voltage division circuit to obtain the voltage value of the voltage to be detected.
Based on the first aspect, in a possible embodiment, the attenuation coefficient of the second voltage dividing circuit is smaller than the attenuation coefficient of the first voltage dividing circuit.
Based on the first aspect, in a possible embodiment, the first voltage dividing circuit includes a first resistor and a second resistor, the first resistor is connected in series with the second resistor, the switching circuit includes a third resistor, a fourth resistor, a fifth resistor, a first voltage regulator tube and a first switching element, a second end of the third resistor is connected to a first end of the first switching element, a third end of the first switching element is grounded, a second end of the first switching element is connected to a second end of the fifth resistor, a first end of the fifth resistor is connected to a second end of the fourth resistor and a first end of the first voltage regulator tube, a second end of the first voltage regulator tube is grounded, and a first end of the fourth resistor and a first end of the third resistor are connected to a first end of the first resistor and a second end of the first resistor, respectively.
Based on the first aspect, in a possible embodiment, the switching signal of the switching circuit is determined according to the conductive state of the first switching element and the gate signal of the first switching element.
Based on the first aspect, in a possible embodiment, the switching signal of the switching circuit is determined according to the conductive state of the first switching element and the base signal of the first switching element.
Based on the first aspect, in a possible embodiment, the apparatus further includes an impedance transformer, an input of the impedance transformer is connected to the output of the voltage divider, an output of the impedance transformer is connected to the input of the ADC analog-to-digital converter, the impedance transformer is configured to perform impedance transformation processing on the output voltage of the voltage divider to ensure voltage division accuracy of the voltage divider, and the output voltage of the impedance transformer is equal to the output voltage of the voltage divider; the controller is used for performing analog-to-digital conversion calculation on the output voltage of the first voltage division circuit after the impedance conversion processing to obtain a first digital quantity; the controller is further configured to perform analog-to-digital conversion calculation on the output voltage of the second voltage division circuit after the impedance conversion processing to obtain a second digital quantity.
By implementing the embodiment of the application, after the voltage to be detected is input into the voltage divider of the voltage detection device, the hardware can automatically select the proper voltage dividing circuit for voltage division, so that the complicated range adjustment control is avoided, the use of active devices such as an operational amplifier and an analog switch is reduced, the implementation cost of the voltage detection circuit is reduced, the size of a PCB (printed circuit board) of the voltage detection circuit is also reduced, and the simple, rapid and low-cost detection of the voltage is realized.
In a second aspect, an embodiment of the present application provides a voltage detection method, where the method includes: acquiring a voltage to be detected, wherein the voltage to be detected is an analog quantity; under the condition that the voltage to be detected is smaller than a preset switching threshold value, processing the voltage to be detected by conducting a first voltage division circuit of the voltage detection device to obtain the output voltage of the first voltage division circuit; performing analog-to-digital conversion calculation on the output voltage of the first voltage division circuit to obtain a first digital quantity, wherein the first digital quantity is a digital quantity of the output voltage of the first voltage division circuit; processing the first digital quantity according to an attenuation coefficient of a first voltage division circuit to obtain a voltage value of the voltage to be detected, wherein the attenuation coefficient of the first voltage division circuit is a fixed ratio of the voltage value of the output voltage of the first voltage division circuit to the voltage value of the voltage to be detected; under the condition that the voltage to be detected is greater than or equal to a preset switching threshold value, a first voltage division circuit and a switching circuit of the voltage detection device are respectively conducted to form a second voltage division circuit so as to process the voltage to be detected, and the output voltage of the second voltage division circuit is obtained; performing analog-to-digital conversion calculation on the output voltage of the second voltage division circuit to obtain a second digital quantity, wherein the second digital quantity is the digital quantity of the output voltage of the second voltage division circuit; and reading a switching signal of the switching circuit and processing the second digital quantity according to the switching signal to obtain a voltage value of the voltage to be detected.
Based on the second aspect, in a possible embodiment, the reading the switching signal of the switching circuit and processing the second digital quantity according to the switching signal to obtain the voltage value of the voltage to be detected includes: reading a switching signal of the switching circuit and a second digital quantity output by the ADC, wherein the second digital quantity is a digital quantity of an output voltage of the second voltage division circuit; finding the attenuation coefficient of the second voltage division circuit according to the switching signal of the switching circuit, wherein the attenuation coefficient of the second voltage division circuit is a fixed ratio of the voltage value of the output voltage of the second voltage division circuit to the voltage value of the voltage to be detected; and processing the second digital quantity according to the attenuation coefficient of the second voltage division circuit to obtain the voltage value of the voltage to be detected.
Based on the second aspect, in a possible embodiment, the attenuation coefficient of the second voltage dividing circuit is smaller than the attenuation coefficient of the first voltage dividing circuit.
In a possible embodiment, based on the second aspect, the first voltage dividing circuit comprises a first resistor and a second resistor, the first resistor is connected with the second resistor in series, the switching circuit comprises a third resistor, a fourth resistor, a fifth resistor, a first voltage regulator tube and a first switch element, a second end of the third resistor is connected with a first end of the first switch element, a third end of the first switch element is grounded, the second end of the first switch element is connected with the second end of the fifth resistor, the first end of the fifth resistor is respectively connected with the second end of the fourth resistor and the first end of the first voltage regulator tube, the second end of the first voltage regulator tube is grounded, and the first end of the fourth resistor and the first end of the third resistor are respectively connected with the first end of the first resistor and the second end of the first resistor.
Based on the second aspect, in a possible embodiment, the switching signal of the switching circuit is determined according to the conductive state of the first switching element and the gate signal of the first switching element.
Based on the second aspect, in a possible embodiment, the switching signal of the switching circuit is determined according to the conductive state of the first switching element and the base signal of the first switching element.
Based on the second aspect, in a possible embodiment, before the performing an analog-to-digital conversion calculation on the output voltage of the first voltage division circuit to obtain the first digital quantity, the method further includes: the impedance conversion processing is performed on the output voltage of the first voltage division circuit to ensure the voltage division accuracy of the first voltage division circuit, and the performing analog-to-digital conversion calculation on the output voltage of the first voltage division circuit to obtain a first digital quantity includes: performing analog-to-digital conversion calculation on the output voltage of the first voltage division circuit subjected to the impedance conversion processing to obtain a first digital quantity; before the analog-to-digital conversion calculation of the output voltage of the second voltage division circuit to obtain the second digital quantity, the method further includes: performing impedance conversion processing on the output voltage of the second voltage division circuit to ensure the voltage division accuracy of the second voltage division circuit, wherein performing analog-to-digital conversion calculation on the output voltage of the second voltage division circuit to obtain a second digital quantity includes: and performing analog-to-digital conversion calculation on the output voltage of the second voltage division circuit subjected to the impedance conversion processing to obtain a second digital quantity.
In a third aspect, the present application provides a computer-readable storage medium storing program code for execution by an apparatus, the program code comprising instructions for performing the method of any one of the possible implementations of the second aspect.
In a fourth aspect, the present application provides a computer program software product, which includes program instructions, and when the computer software product is executed by an apparatus, the apparatus executes the method of the second aspect. The computer software product may be a software installation package which, in case it is required to use the method provided by any of the possible designs of the second aspect described above, may be downloaded and executed on a device to implement the method of the second aspect.
By implementing the embodiment of the application, the appropriate voltage division circuit can be automatically switched according to the size of the voltage to be detected by adding the plurality of switching circuits, so that the complicated range adjustment control is avoided, the use of active devices such as operational amplifiers and analog switches is reduced, the implementation cost of the voltage detection circuit is reduced, the size of a PCB (printed circuit board) of the voltage detection circuit is also reduced, and the simple, quick and low-cost detection of the voltage is realized.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, 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 block diagram of a voltage detection component of the prior art;
fig. 2 is a schematic structural diagram of an apparatus for voltage detection according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of a voltage detection method according to an embodiment of the present application;
fig. 4 is a specific circuit diagram of a voltage divider according to an embodiment of the present application;
fig. 5 is a schematic diagram illustrating a current flow in a specific circuit of the voltage divider according to the embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, 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 application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
It is to be understood that the terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only, and is not intended to be limiting of the application. As used in the examples of this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
In the prior art, a voltage acquisition circuit includes a fixed voltage division circuit, an adjustable gain amplification circuit, an impedance conversion circuit, and an ADC analog-to-digital converter. The fixed voltage division circuit generally uses a precise resistor to divide voltage, the adjustable gain amplifying circuit uses an operational amplifier and an analog switch to form a program-controlled adjustable gain amplifier, the fixed voltage division circuit and the adjustable gain amplifying circuit are combined to obtain voltage ranges corresponding to different range gears, the impedance conversion circuit uses operational amplifier characteristics to convert an acquisition end into a low impedance signal, and the ADC analog-to-digital converter converts analog quantity of the acquired voltage into corresponding digital quantity.
When the system collects voltage, referring to fig. 1, the system starts from a default lowest range gear, and sequentially passes through a fixed voltage division circuit, an adjustable gain amplification circuit and an impedance conversion circuit, when the ADC determines that the current collected voltage is close to the current default gear, an indication signal is sent to the software system to control the adjustable gain amplification circuit to change gain and further increase the voltage range, the above steps are continuously executed until the voltage of the collection end is within the appropriate voltage range, and finally the ADC processes the collected quantity. Therefore, the control logic for judging whether the current collected voltage is in the proper range by the system software is complex, the judgment needs to be carried out step by step from the low range to the high range, the cost of a plurality of active devices such as operational amplifiers and analog switches in the adjustable gain amplifying circuit is high, and the occupied area of a PCB is large.
The embodiment of the application provides a voltage detection method, which can realize the automatic switching of the measuring range in a voltage detection circuit according to the range of the collected terminal voltage, simultaneously reduce the use of active devices such as operational amplifiers and analog switches, reduce the implementation cost of the voltage detection circuit, reduce the size of a PCB (printed circuit board), and realize the simple, quick and low-cost collection of the voltage.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a voltage detection apparatus provided in an embodiment of the present application, where the voltage detection apparatus 10 at least includes a voltage divider 11, an ADC analog-to-digital converter 12, a controller 13, a memory 14, and a display screen 15, where an input end of the voltage divider 11 receives a voltage to be detected, an output end of the voltage divider 11 is electrically connected to an input end of the controller 13 and an input end of the ADC analog-to-digital converter 12, an output end of the ADC analog-to-digital converter 12 is electrically connected to an input end of the controller 13, and the controller 13 is further connected to the display screen 15 and the memory 14. In some possible embodiments, the voltage detection apparatus 10 may further include an impedance transformer 16, an input terminal of the impedance transformer 16 is electrically connected to the output terminal of the voltage divider 11, and an output terminal of the impedance transformer 16 is electrically connected to the input terminal of the ADC analog-to-digital converter 12.
The voltage divider 11 is composed of a first voltage dividing circuit and a switching circuit, wherein the first voltage dividing circuit is composed of a plurality of resistors, the switching circuit is composed of a plurality of resistors, a voltage regulator tube and a switching element, the switching element may be a field effect transistor (e.g., an N-MOS transistor) or a triode (e.g., an NPN triode), and the first voltage dividing circuit is coupled to the switching circuit. The voltage divider 11 is configured to perform voltage reduction processing on a to-be-detected voltage according to an attenuation coefficient corresponding to a circuit that is turned on after an input end receives the to-be-detected voltage, so that an output voltage of the voltage divider 11 meets a voltage input range of a post-stage circuit, for example, the ADC analog-to-digital converter 12.
ADC 12 refers to an electronic device that converts an analog signal to a digital signal. In the embodiment of the present application, the ADC 12 is used to convert the analog signal of the output voltage of the voltage divider 11 into the digital signal of the output voltage, the conversion process generally includes 4 processes of sampling, holding, quantizing and encoding, and the ADC 12 itself has a reference analog quantity as a conversion standard, so that the obtained digital signal only represents the magnitude of the analog signal of the output voltage of the voltage divider 11 relative to the reference analog quantity, and the analog signal of the output voltage of the voltage divider 11 is within the range represented by the reference analog quantity of the ADC 12.
The Display screen 15 is used for displaying the voltage value of the voltage to be detected, which is obtained by the controller 13 through calculation, and may be a Liquid Crystal Display (LCD), an Organic or inorganic Light-emitting diode (OLED), an Active Matrix Organic Light-emitting diode (AMOLED), or the like.
The impedance converter 16 uses an operational amplifier as a voltage follower, realizes impedance conversion or buffering by using the characteristics of infinite input impedance and small output impedance of an operational amplifier, reflects the power transmission relationship between an input circuit and a subsequent output circuit, and obtains the maximum transmission power when the circuit realizes impedance matching, thereby ensuring the voltage division precision of the voltage divider 11.
The controller 13 may be formed by one or more general-purpose processors, such as a Central Processing Unit (CPU), a Micro Control Unit (MCU), or a combination of a CPU, an MCU, and a hardware chip. The hardware chip may be an Application-specific integrated Circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a Field-Programmable Gate Array (FPGA), a General Array Logic (GAL), or any combination thereof.
The Memory 14 may include a Volatile Memory (Volatile Memory), such as a Random Access Memory (RAM); the Memory 14 may also include a Non-volatile Memory (Non-volatile Memory), such as a Read-Only Memory (ROM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, HDD), or a Solid-State Drive (SSD); the memory 14 may also comprise a combination of the above categories. The memory 14 may store program algorithms and data, wherein the stored program algorithms include: a calculation algorithm of the voltage to be detected at the input end, an initialization program for starting up the device and the like; the stored data includes: attenuation coefficients of different conducting branches of the voltage divider, a voltage range of an input end of the ADC and the like. In the embodiment of the present application, the controller 13 is specifically configured to call the program code and the program data in the memory 14 to calculate and obtain the voltage value corresponding to the voltage to be detected received at the input end connected to the voltage divider 11 according to the digital signal output by the ADC analog-to-digital converter 12, so as to implement the method described in the embodiment of fig. 3.
It should be noted that the ADC 12 may exist independently from the controller 12, and in some possible embodiments, the ADC 12 may also be integrated inside the controller 12, and the application is not limited in particular.
Referring to fig. 3, based on the above-mentioned apparatus, a voltage detection method provided by the embodiment of the present application is described below, which includes, but is not limited to, the following steps:
and S101, acquiring a voltage to be detected.
In the embodiment of the application, the input end of the voltage detection device is connected with a storage battery of an automobile or an electric vehicle. The battery, which can be understood as a battery, is usually used as an energy source of the vehicle, and converts electric energy into mechanical energy to move through a controller, a motor and other components so as to control the current to change the speed of the vehicle. Taking electric as an example, the voltage of a battery of an electric vehicle is proportional to the performance, i.e., the higher the voltage, the higher the power, the higher the speed and the power, and the larger the battery capacity, the longer the endurance, and the longer the distance that can be traveled, so from the technical content, the higher the voltage, the better the performance and the economy of the electric vehicle. The battery voltage of the common automobiles is 12v, 24v, 48v and the like, and the battery voltage of the electric automobiles can be 48v, 64v, 74v, 80v or other values.
It should be noted that the voltage to be detected is received by the input terminal of the voltage detection device, and the voltage to be detected exists in the form of an analog quantity.
S102, obtaining the output voltage and the switching signal of the voltage divider according to the relation between the voltage to be detected and a preset switching threshold value.
In an embodiment of the application, under the condition that the voltage to be detected is smaller than the preset switching threshold, the first voltage division circuit is turned on, the voltage division circuit of the voltage divider defaults to be the first voltage division circuit, the switching circuit is not turned on, the switching signal of the switching circuit is still an initial value, the voltage to be detected is attenuated after passing through the first voltage division circuit, and the fixed ratio of the output voltage of the first voltage division circuit to the voltage to be detected is the attenuation coefficient of the first voltage division circuit.
In another embodiment of the application, when the voltage to be detected is greater than or equal to the preset switching threshold, the first voltage division circuit and the switching circuit are respectively turned on to form a second voltage division circuit, the switching circuit is turned on, the switching signal corresponding to the switching circuit changes, the voltage to be detected is attenuated after passing through the second voltage division circuit, and the fixed ratio of the output voltage of the second voltage division circuit to the voltage to be detected is the attenuation coefficient of the second voltage division circuit.
The preset switching threshold is a minimum voltage value when the switching circuit is in the on state. For example, if the voltage range corresponding to the first voltage division circuit is 0-10v, and the voltage range corresponding to the second voltage division circuit is 10v-20v, in this case, the preset switching threshold is 10v, and the preset switching threshold is determined according to parameters of each element in the switching circuit.
It should be noted that, a circuit formed by the first voltage dividing circuit and the switching circuit is called a voltage divider, and referring to fig. 4, a specific circuit in the voltage divider in the present application is described below by taking fig. 4 as an example.
Before describing the connection mode of a specific circuit, the directions of various components in the circuit are defined, and for electronic devices such as resistors, voltage-regulator tubes and the like in the circuit, if the connection directions of two ends are up-down connection, the end positioned on the upper side of the electronic device is called a first end, and the end positioned on the lower side of the electronic device is called a second end; if the connection direction of the two ends is left-right connection, the end positioned on the left side of the electronic device is called a first end, and the end positioned on the right side is called a second end; for a triode or an MOS tube, three ends of the triode are respectively a base electrode, a collector electrode and an emitter electrode, and three ends of the MOS tube are respectively a grid electrode, a drain electrode and a source electrode.
As shown in fig. 4, the specific circuit of the voltage divider includes a first voltage dividing circuit and a switching circuit, wherein the first voltage dividing circuit includes a first resistor and a second resistor, the switching circuit includes a resistor, a zener diode and a switching element, the switching element may be an NPN transistor or an N-MOS transistor, and the switching circuit is coupled to the first voltage dividing circuit.
The specific connection of the circuit in the voltage divider is as follows: the input end of the acquisition circuit is used for receiving a voltage to be detected, the input end is connected with the first end of a first resistor R1, the second end of a first resistor R1 is connected with the first end of a third resistor R3, the second end of the third resistor R3 is connected with the drain electrode of a first field effect transistor Q1, the source electrode of the first field effect transistor Q1 is directly grounded, the grid electrode of the first field effect transistor is connected with the second end of a fifth resistor R5, the first end of the fifth resistor R5 is also connected with the cathode of a first voltage regulator tube D1, the second end of a fourth resistor R4 is connected together, the first end of a fourth resistor R4 is connected with the input end of the acquisition circuit and the first end of a first resistor R1, the anode of a first voltage regulator tube D1 is directly grounded, the first end of a second resistor R2 is connected with the first end of a third resistor R3, the second end of a first resistor R1 and the input end of a post-stage circuit, and the second end of the second resistor R2 is directly grounded. As described above, the first voltage dividing circuit is composed of the first resistor R1 and the second resistor R2, the most composed resistor of the other components shown in fig. 3 is referred to as a switching circuit, the connection shape of the switching circuit is similar to "H" type, and the switching element in the switching circuit shown in fig. 3 is a field effect transistor (e.g., N-MOS transistor).
In some possible embodiments, if the switching element is a transistor (e.g., NPN transistor), the connection of the switching element in the corresponding switching resistor is transformed into: the base electrode of the triode is connected with the second end of the fifth resistor R5, the collector electrode of the triode is connected with the second end of the third resistor R3, and the emitter electrode of the triode is directly grounded.
In the embodiment of the application, when the switching element Q1 is an N-MOS transistor, the switching signal of the switching circuit is determined according to the gate signal of the N-MOS transistor and the conduction state of the N-MOS transistor; when the switching element Q1 is an NPN transistor, the switching signal of the switching circuit is determined based on the base signal of the NPN transistor and the conduction state of the NPN transistor. The switching signal of the switching circuit represents a certain voltage dividing circuit currently turned on by the voltage divider, and a change of the switching signal indicates a switching of the voltage dividing circuit in the current voltage divider, for example, a switching of the first voltage dividing circuit to the second voltage dividing circuit is understood to also indicate a switching of a voltage range corresponding to the voltage dividing circuit.
The working principle of the circuit in the voltage divider is as follows: assuming that the maximum threshold of the voltage which can be shared and corresponds to the first voltage dividing circuit is 10v, when the voltage to be detected received by the input end of the circuit is less than or equal to 10v, the switching circuit is in a non-conducting state, that is, a voltage regulator tube D1 in the switching circuit is in a cut-off state, and the switching element Q1 is in a cut-off state, as shown in (1) in fig. 5, at this time, the conducting branch is a branch in which current sequentially passes through the first resistor R1 and the second resistor R2 from the input end to ground, the output voltage of the voltage dividing circuit is the voltage at two ends of the second resistor R2, and in this case, the branch only including the first resistor R1 and the second resistor R2 is also called as the first voltage; when the voltage to be detected received by the input end of the circuit is greater than 10v, that is, the voltage exceeds the maximum threshold of the voltage corresponding to the first voltage dividing circuit, at this time, the voltage regulator tube D1 is in a reverse breakdown state, the switching element Q1 (for example, an N-MOS tube) is in a conduction state (that is, the voltage difference between the gate and the source of the N-MOS tube meets the requirement of the conduction threshold), that is, the corresponding switching circuit is in a conduction state, as shown in (2) in fig. 5, at this time, the conducted branch is that current is shunted after passing through the first resistor R1, one part of the current passes through the second resistor R2 to the ground, the other part of the current passes through the third resistor R3 to the ground, and the output voltage of the voltage dividing circuit is. In this case, the branch including the first resistor R1, the second resistor R2 and the third resistor R3 is also called a second voltage divider circuit, and therefore, when the voltage to be detected is greater than the voltage maximum threshold corresponding to the first voltage divider circuit, the conduction of the switching circuit causes the circuit of the voltage divider to be converted from the first voltage divider circuit to the second voltage divider circuit.
In the specific implementation, the switching element Q1, for example, an N-MOS transistor, is selected such that the on-resistance in the N-MOS transistor is as small as possible to reduce the leakage current, and the first resistor, the second resistor, and the third resistor for sharing the voltage are selected such that the temperature drift is as high as 0.1% and 100 ppm/degree c with high accuracy as possible.
It should be noted that, no matter the first voltage dividing circuit or the second voltage dividing circuit after the switching circuit is turned on, the output voltage of the voltage divider is always the voltage across the second resistor R2, and it can be understood that the function of the voltage divider is to use the corresponding attenuation coefficient in the circuit to step down the voltage to be detectedSo that the output voltage of the voltage divider meets the input voltage range of the subsequent ADC, the attenuation factor is determined according to the parameters of the resistors in the circuit. The output voltage of the voltage divider must therefore be less than the voltage to be detected. For example, for the first voltage divider circuit, the attenuation coefficient is
Figure BDA0002348732050000091
For the second voltage dividing circuit, the second resistor R2 is connected in parallel with the third resistor R3 and then connected in series with the first resistor R1, so the attenuation coefficient is
Figure BDA0002348732050000092
It is understood that the attenuation coefficient is in the range of (0, 1).
It is understood that the specific circuit of the voltage divider in fig. 4 of the present application is only exemplified by two ranges (i.e., the first voltage divider circuit and the second voltage divider circuit), and in some possible embodiments, the range of the voltage divider circuit can be increased by increasing the number of the switching circuits. The number of the switching circuits can be set according to actual use requirements, and the application is not particularly limited.
It should be noted that the subsequent circuit may be an input terminal of a circuit corresponding to the ADC analog-to-digital converter, and directly performs analog-to-digital conversion processing on an analog quantity corresponding to the output voltage at the two ends of the second resistor R2. In some possible embodiments, the subsequent circuit may also be an impedance converter, and perform impedance conversion processing on the analog quantity corresponding to the output voltage at the two ends of the second resistor R2, because the impedance converter uses an operational amplifier as a voltage follower, the output voltage of the impedance converter is equal to the input voltage of the impedance converter, and the impedance converter realizes a buffering effect of the circuit by using the characteristics of infinite input impedance and small output impedance of the operational amplifier, so as to ensure the voltage division accuracy of the voltage divider.
And S103, performing analog-to-digital conversion on the output voltage of the voltage divider to obtain a digital quantity of the output voltage of the voltage divider.
In the embodiment of the application, the ADC performs analog-to-digital conversion on the output voltage of the voltage divider to obtain a digital quantity corresponding to the digital voltage. It should be noted that, in general, the ADC has a fixed input reference voltage range, and the output voltage of the voltage divider after the voltage to be detected in the front-stage circuit is processed by the corresponding attenuation coefficient in the voltage divider is within the input reference voltage range of the ADC, so that the ADC can express the output voltage of the voltage divider as a corresponding digital quantity, and the digital quantity of the output voltage of the voltage divider is the output quantity of the ADC.
In some possible embodiments, some controllers are integrated with ADC, and the function of the ADC can be used only by connecting corresponding ADC pins to the controller. In some possible embodiments, some controllers do not have an integrated ADC inside, and a separate ADC chip needs to be connected, and the separate ADC chip generally reserves an interface for communicating with the controller, and the controller is connected with an external ADC through the communication interface to read a conversion value of the ADC chip.
It should be noted that, whether the ADC is integrated inside the controller or the ADC chip is not played independently from the controller, the ADC chip has a resolution index, and the common resolution is 8 bits, 10 bits, 12 bits, 16 bits or 24 bits, which is to represent bit, and is the smallest unit in the computer, and eight bits are one byte. The better the number of bits of resolution of the ADC digital-to-analog converter, the more accurate its measured voltage. For convenience of description, the ADC digital-to-analog converter may be simplified as an ADC module or ADC in the following description.
For example, assuming that a voltage signal of 0-5v is measured, for an ADC module with a resolution of 8 bits (representing a range of 0-255), when the input voltage is 0, the ADC module converts to obtain a number of 0; when the input voltage is 5v, the ADC module obtains 255 digits after conversion; for an ADC module with the resolution of 12 bits (the represented range is 0-4095), when the input voltage is 0, the ADC module obtains a number of 0 after conversion; when the input voltage is 5v, the ADC module obtains a number of 4095 after conversion, and it is easy to know that for an ADC with a resolution of 8 bits, each increment of the obtained number by 1 represents that the actually increased voltage is 0.0195v (namely 5 divided by 256); for an ADC with a resolution of 12 bits, each increase of 1 in the resulting number represents an actual increase of 0.0012v (i.e. 5 divided by 4096). Specifically, if the voltage measured specifically is 0.015v, the obtained number is 1 for the ADC with a resolution of 8 bits, that is, the measured voltage is considered to be 0.0195 v; whereas for an ADC with a resolution of 12 bits, the resulting number is 12 or 13, with the voltage corresponding to the number 12 being 0.0147v (i.e. 12 × 5/4096) and the voltage corresponding to the number 13 being 0.0159v (i.e. 13 × 5/4096), it can be seen that the ADC with a resolution of 12 is significantly more accurate than the voltage measured by the ADC with a resolution of 8.
The embodiment of the present application does not specifically limit the number of resolution bits used by the ADC.
And S104, calculating the voltage value of the voltage to be detected according to the switching signal and the digital quantity of the output voltage of the voltage divider.
In the embodiment of the application, the voltage divider performs voltage reduction processing on the voltage to be detected received by the input end according to a certain attenuation coefficient, so that the output voltage of the voltage divider meets the input reference voltage range of the ADC, the ADC performs analog-to-digital conversion on the output voltage of the voltage divider to obtain a corresponding digital quantity, and the digital quantity represents the size of the output voltage of the voltage divider relative to the input reference voltage range. The controller reads the digital quantity output by the ADC and the switching signal after the switching circuit of the voltage divider is conducted, finds the attenuation coefficient corresponding to the pre-stored switching signal in the memory according to the switching signal of the switching circuit, and finally performs simple calculation by combining the attenuation coefficient, the digital quantity output by the ADC and the input reference voltage range of the ADC, so that the voltage value of the voltage to be detected received by the input end of the voltage divider can be obtained, and the obtained voltage value is displayed on the display screen.
It should be noted that, the attenuation coefficients corresponding to the voltage dividing circuits in the voltage divider and the input reference voltage range of the ADC analog-to-digital converter may be pre-stored in the memory for the controller to call.
In one embodiment, the input reference voltage range of the ADC is 0-5v, the resolution of the ADC is 8 bits, and assuming that the voltage range corresponding to the first voltage division network of the voltage divider is 0-20v, the voltage range corresponding to the second voltage division network is 20v-40v, and the input voltage of the voltage divider is 13v, in the range corresponding to the first voltage division network, the output digital quantity of the ADC is 166, the controller finds out that the attenuation coefficient corresponding to the first voltage division network is 0.25, and calculating to obtain the voltage value of the output voltage of the ADC to be 3.24v (namely 166 × 5/256) according to the digital quantity output by the ADC and the input reference voltage range (0-5v) of the ADC, and obtaining the voltage value of the voltage to be detected at the input end of the voltage divider to be 12.96 (namely 3.24/0.25) by combining the attenuation coefficient.
In one embodiment, the input reference voltage range of the ADC is 0-5V, the resolution of the ADC is 8 bits, and assuming that the voltage range corresponding to the first voltage division network of the voltage divider is 0-20V, the voltage range corresponding to the second voltage division network is 20V-40V, and the input voltage of the voltage divider is 39V, in the range corresponding to the second voltage division network, the output digital quantity of the ADC is 200, the controller finds out that the attenuation coefficient corresponding to the second voltage division network is 0.1 according to the read switching signal, and calculating to obtain the voltage value of the output voltage of the ADC to be 3.906v (namely 200 × 5/256) according to the digital quantity output by the ADC and the input reference voltage range (0-5v) of the ADC, and obtaining the voltage value of the voltage to be detected at the input end of the voltage divider to be 39.06v (namely 3.906/0.1) by combining the attenuation coefficient.
It should be noted that the attenuation coefficient is determined according to each resistance parameter in the voltage dividing network corresponding to the turned-on circuit in the voltage divider, and no matter what range of the voltage to be detected received by the input end of the voltage divider is, the parameter of the resistance used for voltage division in the circuit can be set so that the output voltage of the voltage divider is within a fixed voltage range, and the input reference voltage range of the ADC analog-to-digital converter includes the fixed voltage range.
It can be seen that, by implementing the embodiment of the application, the hardware circuit for automatically switching the range is added to replace the existing adjustable gain amplifier, so that the automatic switching of the corresponding range of the voltage divider in the voltage detection device can be realized according to the size of the voltage to be detected, and meanwhile, the use of active devices such as an operational amplifier and an analog switch is reduced, thereby not only reducing the implementation cost of the voltage detection circuit, but also reducing the volume of a PCB (printed circuit board) of the voltage detection circuit, and realizing the simple, rapid and low-cost detection of the voltage.
The method provided by the implementation of the present application is further described below in some specific application scenarios.
In an application scenario of the application, a user wants to detect the voltage of a storage battery in a vehicle, assuming that the current voltage of the storage battery in the vehicle is 12v, if the device for detecting the voltage provided by the application is adopted, the input end of the device is electrically connected with the storage battery in the vehicle, assuming that the attenuation coefficient of a first voltage division network of a voltage divider in the device is 0.25, the voltage range of the first voltage division network is 0-20v, the resolution of an ADC is 8, and the input reference voltage range is 0-5v, the current voltage value of the storage battery calculated by displaying on a display screen of the device is 12.04 v.
In another application scenario of the present application, a user wants to detect a voltage of a battery in a vehicle, assuming that a current voltage of the battery in the vehicle is 24v, if the apparatus for detecting a voltage provided by the present application is adopted, an input end of the apparatus is electrically connected to the battery in the vehicle, assuming that a voltage range of a first voltage division network of a voltage divider in the apparatus is 0-20v, a voltage range of a second voltage division network is 20v-40v and an attenuation coefficient of the second voltage division network is 0.1, a resolution of an ADC analog-to-digital converter is 8, and an input reference voltage range is 0-5v, the current voltage value of the battery calculated by displaying on a display screen of the apparatus is 24.02 v.
In another application scenario of the present application, a voltage that a user wants to detect a voltage of a battery in a vehicle, assuming that a current voltage of the battery in the vehicle is 48v, if the apparatus for detecting a voltage provided by the present application is adopted, an input end of the apparatus is electrically connected to the battery in the vehicle, assuming that a voltage range of a first voltage division network of a voltage divider in the apparatus is 0-20v, a voltage range of a second voltage division network is 20v-40v, a voltage range of a third voltage division network is 40v-60v, an attenuation coefficient of the third voltage division network is 0.083, a resolution of an ADC analog-to-digital converter is 8, and an input reference voltage range is 0-5v, then displaying on a display screen of the apparatus that a calculated current voltage value of the battery is 48.00 v.
Embodiments of the present application also provide a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any one of the methods as described in the above method embodiments.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package, the computer comprising an electronic device.
It should be noted that all or part of the steps in the methods of the above embodiments may be implemented by hardware instructions of a program, and the program may be stored in a computer-readable storage medium, where the storage medium includes a Read-Only Memory (ROM), a Random Access Memory (RAM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), a One-time Programmable Read-Only Memory (OTPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), an optical disc (EEPROM), a compact disc-Read-Only Memory (CD-ROM), or other disc memories, A tape memory, or any other medium readable by a computer that can be used to carry or store data.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to related descriptions of other embodiments for parts that are not described in detail in a certain embodiment.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a device (which may be a personal computer, a server, or a network device, a robot, a controller, a chip, a robot, etc.) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: u disk, removable hard disk, read only memory, random access memory, magnetic or optical disk, etc. for storing program codes.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. An apparatus for voltage detection, the apparatus comprising: the ADC analog-to-digital converter comprises a voltage divider, an ADC analog-to-digital converter and a controller, wherein the output end of the voltage divider is connected with the input end of the ADC analog-to-digital converter, and the controller is respectively connected with the voltage divider and the output end of the ADC analog-to-digital converter; the voltage divider comprises a first voltage dividing circuit and a switching circuit, and the first voltage dividing circuit is coupled with the switching circuit;
the voltage divider is used for acquiring a voltage to be detected, and the voltage to be detected is analog quantity;
when the voltage to be detected is smaller than a preset switching threshold value, the first voltage division circuit is switched on, the ADC is configured to perform analog-to-digital conversion calculation on the output voltage of the first voltage division circuit to obtain a first digital quantity, where the first digital quantity is a digital quantity of the output voltage of the first voltage division circuit; the controller is used for processing the first digital quantity according to an attenuation coefficient of a first voltage division circuit to obtain a voltage value of the voltage to be detected, wherein the attenuation coefficient of the first voltage division circuit is a fixed ratio of the voltage value of the output voltage of the first voltage division circuit to the voltage value of the voltage to be detected;
under the condition that the voltage to be detected is greater than or equal to a preset switching threshold value, the first voltage division circuit and the switching circuit are respectively conducted to form a second voltage division circuit, the ADC is configured to perform analog-to-digital conversion on the output voltage of the second voltage division circuit to obtain a second digital quantity, where the second digital quantity is a digital quantity of the output voltage of the second voltage division circuit; the controller is used for reading the switching signal of the switching circuit and processing the second digital quantity according to the switching signal to obtain the voltage value of the voltage to be detected.
2. The apparatus of claim 1, wherein the controller is specifically configured to:
reading a switching signal of the switching circuit and a second digital quantity output by the ADC, wherein the second digital quantity is a digital quantity of an output voltage of the second voltage division circuit;
finding the attenuation coefficient of the second voltage division circuit according to the switching signal of the switching circuit, wherein the attenuation coefficient of the second voltage division circuit is a fixed ratio of the voltage value of the output voltage of the second voltage division circuit to the voltage value of the voltage to be detected;
and processing the second digital quantity according to the attenuation coefficient of the second voltage division circuit to obtain the voltage value of the voltage to be detected.
3. The apparatus of claim 2, wherein the attenuation coefficient of the second voltage divider circuit is less than the attenuation coefficient of the first voltage divider circuit.
4. The apparatus of claim 3, wherein the first voltage divider circuit comprises a first resistor and a second resistor, the first resistor is connected with the second resistor in series, the switching circuit comprises a third resistor, a fourth resistor, a fifth resistor, a first voltage regulator tube and a first switch element, a second end of the third resistor is connected with a first end of the first switch element, a third end of the first switch element is grounded, the second end of the first switch element is connected with the second end of the fifth resistor, the first end of the fifth resistor is respectively connected with the second end of the fourth resistor and the first end of the first voltage regulator tube, the second end of the first voltage regulator tube is grounded, and the first end of the fourth resistor and the first end of the third resistor are respectively connected with the first end of the first resistor and the second end of the first resistor.
5. The apparatus according to any one of claims 1-4, further comprising an impedance transformer, an input terminal of the impedance transformer being connected to the output terminal of the voltage divider, an output terminal of the impedance transformer being connected to the input terminal of the ADC, the impedance transformer being configured to perform an impedance transformation process on the output voltage of the voltage divider to ensure the voltage division accuracy of the voltage divider, the output voltage of the impedance transformer being equal to the output voltage of the voltage divider;
the controller is used for performing analog-to-digital conversion calculation on the output voltage of the first voltage division circuit after the impedance conversion processing to obtain a first digital quantity;
the controller is further configured to perform analog-to-digital conversion calculation on the output voltage of the second voltage division circuit after the impedance conversion processing to obtain a second digital quantity.
6. A voltage detection method is applied to a voltage detection device, and is characterized by comprising the following steps:
acquiring a voltage to be detected, wherein the voltage to be detected is an analog quantity;
under the condition that the voltage to be detected is smaller than a preset switching threshold value, processing the voltage to be detected by conducting a first voltage division circuit of the voltage detection device to obtain the output voltage of the first voltage division circuit; performing analog-to-digital conversion calculation on the output voltage of the first voltage division circuit to obtain a first digital quantity, wherein the first digital quantity is a digital quantity of the output voltage of the first voltage division circuit; processing the first digital quantity according to an attenuation coefficient of a first voltage division circuit to obtain a voltage value of the voltage to be detected, wherein the attenuation coefficient of the first voltage division circuit is a fixed ratio of the voltage value of the output voltage of the first voltage division circuit to the voltage value of the voltage to be detected;
under the condition that the voltage to be detected is greater than or equal to a preset switching threshold value, a first voltage division circuit and a switching circuit of the voltage detection device are respectively conducted to form a second voltage division circuit so as to process the voltage to be detected, and the output voltage of the second voltage division circuit is obtained; performing analog-to-digital conversion calculation on the output voltage of the second voltage division circuit to obtain a second digital quantity, wherein the second digital quantity is the digital quantity of the output voltage of the second voltage division circuit; and reading a switching signal of the switching circuit and processing the second digital quantity according to the switching signal to obtain a voltage value of the voltage to be detected.
7. The method according to claim 6, wherein the reading of the switching signal of the switching circuit and the processing of the second digital quantity according to the switching signal to obtain the voltage value of the voltage to be detected comprises:
reading a switching signal of the switching circuit and a second digital quantity output by the ADC, wherein the second digital quantity is a digital quantity of an output voltage of the second voltage division circuit;
finding the attenuation coefficient of the second voltage division circuit according to the switching signal of the switching circuit, wherein the attenuation coefficient of the second voltage division circuit is a fixed ratio of the voltage value of the output voltage of the second voltage division circuit to the voltage value of the voltage to be detected;
and processing the second digital quantity according to the attenuation coefficient of the second voltage division circuit to obtain the voltage value of the voltage to be detected.
8. The method of claim 7, wherein the attenuation coefficient of the second voltage divider circuit is less than the attenuation coefficient of the first voltage divider circuit.
9. The method of claim 8, wherein the first voltage divider circuit comprises a first resistor and a second resistor, the first resistor is connected with the second resistor in series, the switching circuit comprises a third resistor, a fourth resistor, a fifth resistor, a first voltage regulator tube and a first switch element, a second end of the third resistor is connected with a first end of the first switch element, a third end of the first switch element is grounded, the second end of the first switch element is connected with the second end of the fifth resistor, the first end of the fifth resistor is respectively connected with the second end of the fourth resistor and the first end of the first voltage regulator tube, the second end of the first voltage regulator tube is grounded, and the first end of the fourth resistor and the first end of the third resistor are respectively connected with the first end of the first resistor and the second end of the first resistor.
10. The method according to any one of claims 6 to 9,
before the analog-to-digital conversion calculation of the output voltage of the first voltage division circuit to obtain the first digital quantity, the method further comprises: the impedance conversion processing is performed on the output voltage of the first voltage division circuit to ensure the voltage division accuracy of the first voltage division circuit, and the performing analog-to-digital conversion calculation on the output voltage of the first voltage division circuit to obtain a first digital quantity includes:
performing analog-to-digital conversion calculation on the output voltage of the first voltage division circuit subjected to the impedance conversion processing to obtain a first digital quantity;
before the analog-to-digital conversion calculation of the output voltage of the second voltage division circuit to obtain the second digital quantity, the method further includes: performing impedance conversion processing on the output voltage of the second voltage division circuit to ensure the voltage division accuracy of the second voltage division circuit, wherein performing analog-to-digital conversion calculation on the output voltage of the second voltage division circuit to obtain a second digital quantity includes:
and performing analog-to-digital conversion calculation on the output voltage of the second voltage division circuit subjected to the impedance conversion processing to obtain a second digital quantity.
CN201911406302.8A 2019-12-31 2019-12-31 Voltage detection method and device Pending CN111025008A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911406302.8A CN111025008A (en) 2019-12-31 2019-12-31 Voltage detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911406302.8A CN111025008A (en) 2019-12-31 2019-12-31 Voltage detection method and device

Publications (1)

Publication Number Publication Date
CN111025008A true CN111025008A (en) 2020-04-17

Family

ID=70196476

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911406302.8A Pending CN111025008A (en) 2019-12-31 2019-12-31 Voltage detection method and device

Country Status (1)

Country Link
CN (1) CN111025008A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111707949A (en) * 2020-05-26 2020-09-25 联创汽车电子有限公司 Voltage detection device and voltage detection method
CN114036879A (en) * 2021-11-08 2022-02-11 中国商用飞机有限责任公司北京民用飞机技术研究中心 Analog signal acquisition circuit design method, acquisition method and device
CN114582299A (en) * 2022-03-24 2022-06-03 Tcl华星光电技术有限公司 Polar plate voltage regulating circuit and method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4747061A (en) * 1986-03-17 1988-05-24 Westinghouse Electric Corp. Automatic transfer switch for a wide range of source voltage
CN1052951A (en) * 1989-12-29 1991-07-10 三星电子株式会社 The automatic range selector of digital multimeter measuring instrument
CN2337574Y (en) * 1998-09-04 1999-09-08 中国科学院测量与地球物理研究所 Aerial gravity surveying strip chart recorder
CN102353830A (en) * 2011-06-09 2012-02-15 河北工业大学 Peak voltage digital display meter
CN103033677A (en) * 2012-12-15 2013-04-10 安徽工程大学 Range self-adaptation type digital voltmeter and measurement method thereof
CN106872748A (en) * 2015-12-13 2017-06-20 李福来 Insulation Resistance Tester high voltage controllable power supply and range switch circuit
CN207601158U (en) * 2017-12-08 2018-07-10 深圳市英威腾电气股份有限公司 A kind of detection circuit and its microprocessor of voltage and current analog signals

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4747061A (en) * 1986-03-17 1988-05-24 Westinghouse Electric Corp. Automatic transfer switch for a wide range of source voltage
CN1052951A (en) * 1989-12-29 1991-07-10 三星电子株式会社 The automatic range selector of digital multimeter measuring instrument
CN2337574Y (en) * 1998-09-04 1999-09-08 中国科学院测量与地球物理研究所 Aerial gravity surveying strip chart recorder
CN102353830A (en) * 2011-06-09 2012-02-15 河北工业大学 Peak voltage digital display meter
CN103033677A (en) * 2012-12-15 2013-04-10 安徽工程大学 Range self-adaptation type digital voltmeter and measurement method thereof
CN106872748A (en) * 2015-12-13 2017-06-20 李福来 Insulation Resistance Tester high voltage controllable power supply and range switch circuit
CN207601158U (en) * 2017-12-08 2018-07-10 深圳市英威腾电气股份有限公司 A kind of detection circuit and its microprocessor of voltage and current analog signals

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111707949A (en) * 2020-05-26 2020-09-25 联创汽车电子有限公司 Voltage detection device and voltage detection method
CN114036879A (en) * 2021-11-08 2022-02-11 中国商用飞机有限责任公司北京民用飞机技术研究中心 Analog signal acquisition circuit design method, acquisition method and device
CN114582299A (en) * 2022-03-24 2022-06-03 Tcl华星光电技术有限公司 Polar plate voltage regulating circuit and method
CN114582299B (en) * 2022-03-24 2023-02-07 Tcl华星光电技术有限公司 Polar plate voltage regulating circuit and method

Similar Documents

Publication Publication Date Title
CN111025008A (en) Voltage detection method and device
CN108287633B (en) Calibration method and device of pressure sensor
CN106706153B (en) A kind of processing method of low temperature temperature-sensitive resistance-temperature characteristic data
CN104698276A (en) Resistor verifying system
CN112688687A (en) Method and device for acquiring physical information to be tested, computer equipment and storage medium
CN111504491B (en) Data processing method, temperature detection circuit and electronic equipment
CN114499521A (en) Signal calibration method and device, computer equipment and storage medium
CN111736104A (en) Current detection calibration method and device and display device
CN110967662A (en) Calibration method of DC leakage current sensor for insulation monitoring of DC system
WO2020155068A1 (en) Current measuring device, method, and apparatus
CN117331377A (en) Configuration method, configuration device, electronic equipment and storage medium
CN103592883A (en) DSP (Digital Signal Processor) based multipath precise programmable resistance module and control method thereof
CN215728610U (en) Test system
CN114235275B (en) Calibration method and device of pressure sensor and electronic equipment
CN115372885A (en) Metering terminal precision correction method and device, electronic equipment and storage medium
CN105824000A (en) Method for calibrating output board card
CN214333884U (en) Signal acquisition circuit and signal processing system
CN211124351U (en) Multifunctional data acquisition unit based on simulation and digital acquisition
CN212646965U (en) Single-point calibration circuit structure realized by built-in resistance network of digital multimeter
CN102435333A (en) Temperature detection method and device
CN219107428U (en) ADC correction circuit
CN113447881A (en) Measuring method and device of intelligent electric energy meter and terminal equipment
CN105823938A (en) Method for detecting state of output board card
CN112793473A (en) Temperature acquisition circuit and method, battery management system and electric vehicle
CN219714570U (en) Temperature measuring circuit

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200417