CN112415257B - Voltage detection circuit and electronic equipment - Google Patents

Voltage detection circuit and electronic equipment Download PDF

Info

Publication number
CN112415257B
CN112415257B CN202011156027.1A CN202011156027A CN112415257B CN 112415257 B CN112415257 B CN 112415257B CN 202011156027 A CN202011156027 A CN 202011156027A CN 112415257 B CN112415257 B CN 112415257B
Authority
CN
China
Prior art keywords
voltage
comparator
output
resistor
circuit
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.)
Active
Application number
CN202011156027.1A
Other languages
Chinese (zh)
Other versions
CN112415257A (en
Inventor
王守帅
沈润渊
刘云龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Visual Technology Co Ltd
Original Assignee
Hisense Visual 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 Hisense Visual Technology Co Ltd filed Critical Hisense Visual Technology Co Ltd
Priority to CN202011156027.1A priority Critical patent/CN112415257B/en
Publication of CN112415257A publication Critical patent/CN112415257A/en
Application granted granted Critical
Publication of CN112415257B publication Critical patent/CN112415257B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R19/00Arrangements for measuring currents or voltages or for indicating presence or sign thereof
    • G01R19/165Indicating that current or voltage is either above or below a predetermined value or within or outside a predetermined range of values
    • G01R19/16566Circuits and arrangements for comparing voltage or current with one or several thresholds and for indicating the result not covered by subgroups G01R19/16504, G01R19/16528, G01R19/16533
    • G01R19/1659Circuits and arrangements for comparing voltage or current with one or several thresholds and for indicating the result not covered by subgroups G01R19/16504, G01R19/16528, G01R19/16533 to indicate that the value is within or outside a predetermined range of values (window)
    • G01R19/16595Circuits and arrangements for comparing voltage or current with one or several thresholds and for indicating the result not covered by subgroups G01R19/16504, G01R19/16528, G01R19/16533 to indicate that the value is within or outside a predetermined range of values (window) with multi level indication

Landscapes

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

Abstract

The embodiment of the application provides a voltage detection circuit and electronic equipment, wherein the voltage detection circuit only comprises a first voltage regulating circuit, a second voltage regulating circuit, a subtracter, a comparator and a controller, wherein the first voltage regulating circuit is connected in series with a voltage source to be detected and a first end of the comparator; the second voltage regulating circuit is connected in series with the voltage source to be measured and the first input end of the subtracter; the second input end of the subtracter is connected with the voltage source to be detected, and the output end of the subtracter is connected with the second end of the comparator; when the voltage of the voltage source to be detected is detected, the controller firstly adjusts the output voltage of the second voltage adjusting circuit into the first voltage, then continuously adjusts the output voltage of the first voltage adjusting circuit until the output level of the comparator is switched, and then the voltage value range of the voltage source to be detected is determined according to the output voltage of the first voltage adjusting circuit before and after the output level of the comparator is switched and the first voltage, and the cost is lower.

Description

Voltage detection circuit and electronic equipment
Technical Field
The embodiment of the application relates to the technical field of voltage detection, in particular to a voltage detection circuit and electronic equipment.
Background
In daily life, many electronic devices are powered by a built-in battery for the convenience of users. For the battery, as the usage time increases, the amount of electricity decreases, which also causes the output voltage to decrease, and when the output voltage of the battery is lower than a certain value, the battery cannot continue to supply power to the electronic device.
At present, in order to detect the battery voltage, a special voltage detection sensor is generally required to be arranged in the electronic equipment, or a special voltage detection chip is required to be arranged for realizing the detection, so that the cost is required to be high.
For some cheap electronic devices, such as infrared remote controllers, children toys, electronic watches, etc., there is usually no function of detecting the voltage of the battery due to cost considerations, so that the user cannot know the voltage of the battery when using such electronic devices, and therefore cannot replace or charge the battery in time, which affects the use of the user.
Disclosure of Invention
The embodiment of the application provides a voltage detection circuit and electronic equipment, which can realize the detection of battery voltage and have lower cost.
In a first aspect, an embodiment of the present application provides a voltage detection circuit, which includes a first voltage regulation circuit, a second voltage regulation circuit, a subtractor, a comparator, and a controller;
the first voltage regulating circuit is connected between a voltage source to be measured and the first end of the comparator in series;
the second voltage regulating circuit is connected in series between the voltage source to be detected and the first input end of the subtracter;
the second input end of the subtracter is connected with the voltage source to be detected, and the output end of the subtracter is connected with the second end of the comparator;
the controller is respectively connected with the output end of the comparator, the first voltage regulating circuit and the second voltage regulating circuit, and is configured to:
adjusting an output voltage of the second voltage adjusting circuit to a first voltage;
adjusting the output voltage of the first voltage adjusting circuit until the output level of the comparator is switched from a high level to a low level or from the low level to the high level;
and calculating the voltage value range of the voltage source to be detected according to the output voltage of the first voltage regulating circuit before the output level of the comparator is switched, the output voltage of the first voltage regulating circuit after the output level of the comparator is switched and the first voltage.
In a possible design, the first voltage regulating circuit includes a first adjustable resistor, and an adjustment control terminal of the first adjustable resistor is connected to the controller.
In one possible embodiment, the controller is configured to:
and adjusting the resistance value of the first adjustable resistor by using the adjusting control end of the first adjustable resistor until the output level of the comparator is switched from a high level to a low level or from the low level to the high level.
In one possible design, the second adjusting circuit includes a zener diode and a second adjustable resistor;
the voltage source to be tested is grounded through the voltage stabilizing diode, the negative electrode of the voltage stabilizing diode is connected with the second adjustable resistor, and the adjusting control end of the second adjustable resistor is connected with the controller.
In a possible design, the voltage output by the cathode of the zener diode is a stable voltage with a preset magnitude.
In one possible embodiment, the controller is configured to:
and adjusting the resistance value of the second adjustable resistor by using the adjusting control end of the second adjustable resistor so as to enable the output voltage of the second voltage adjusting circuit to be the first voltage.
In one possible embodiment, the controller is configured to:
calculating the voltage value range of the voltage source to be measured by the following method:
V2+V<VCC<V1+V
wherein, V1Representing the output voltage, V, of the first voltage regulating circuit before switching of the output level of the comparator2And the voltage value is represented by V, and VCC is represented by VCC.
In a possible design, when the voltage of the first terminal of the comparator is greater than the voltage of the second terminal of the comparator, the output level of the comparator is at a high level, and when the voltage of the first terminal of the comparator is less than the voltage of the second terminal of the comparator, the output level of the comparator is at a low level.
In a possible design, the voltage detection circuit further includes a first resistor, a second resistor, a third resistor, and a fourth resistor; the first resistor, the second resistor, the third resistor and the fourth resistor have the same resistance value;
the first resistor is connected in series between the second voltage regulating circuit and the first input end of the subtracter;
the second resistor is connected between the voltage source to be detected and the second input end of the subtracter in series;
the first end of the third resistor is connected with the second input end of the subtracter, and the second end of the third resistor is grounded;
and a first end of the fourth resistor is connected with a first input end of the subtracter, and a second end of the fourth resistor is connected with an output end of the subtracter.
In a second aspect, embodiments of the present application provide an electronic device including the voltage detection circuit as provided in the first aspect.
According to the voltage detection circuit and the electronic device provided by the embodiment of the application, the voltage detection circuit only comprises a first voltage regulating circuit, a second voltage regulating circuit, a subtracter, a comparator and a controller, wherein the first voltage regulating circuit is connected in series with a voltage source to be detected and a first end of the comparator; the second voltage regulating circuit is connected in series with the voltage source to be measured and the first input end of the subtracter; the second input end of the subtracter is connected with the voltage source to be detected, and the output end of the subtracter is connected with the second end of the comparator; when the voltage of the voltage source to be detected is detected, the controller firstly adjusts the output voltage of the second voltage adjusting circuit into the first voltage, then continuously adjusts the output voltage of the first voltage adjusting circuit until the output level of the comparator is switched, and then the voltage value range of the voltage source to be detected can be determined according to the output voltage of the first voltage adjusting circuit before and after the output level of the comparator is switched and the first voltage. The voltage detection circuit can enable the input voltage of one input end of the comparator and the voltage source to be detected to be in a fixed difference value by adopting the subtracter, and can determine the voltage value of the voltage source to be detected by adjusting the input voltage of the other input end of the comparator according to the output level of the comparator, thereby effectively simplifying the structure and the detection process of the voltage detection circuit and reducing the cost of the voltage detection circuit.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments of the present application or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without inventive exercise.
Fig. 1 is a block diagram of a configuration of an electronic device 100 provided in an exemplary embodiment of the present application;
FIG. 2 is a first schematic diagram illustrating a voltage detection circuit according to an exemplary embodiment of the present disclosure;
fig. 3 is a schematic structural diagram ii of a voltage detection circuit provided in an exemplary embodiment of the present application;
fig. 4 is a schematic structural diagram three of a voltage detection circuit provided in an exemplary embodiment of the present application;
fig. 5 is a schematic flowchart illustrating steps of a voltage detection method according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, 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 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, in the claims, and in the drawings of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Currently, in order to detect the battery voltage, a special voltage detection circuit is usually configured in the electronic device, or a special voltage detection chip is configured to detect the battery voltage, for example, based on an Analog-to-Digital Converter (ADC) module.
Referring to fig. 1, fig. 1 is a first schematic structural diagram of a voltage detection circuit provided in an exemplary embodiment of the present application.
The voltage detection circuit comprises a voltage source VCC to be detected, a reference voltage VREF and an ADC module, wherein the voltage source VCC to be detected and the reference voltage VREF are connected with two input ends of the ADC module, and the reference voltage VREF is a fixed value; the ADC module calculates the voltage value of the voltage source VCC to be measured through the time when the charging and discharging of the voltage source VCC to be measured reaches the reference voltage VREF.
Because the voltage detection circuit in the related art usually includes a complicated detection element with high cost, for some cheap electronic devices, the function of detecting the voltage of the battery is usually not provided due to cost considerations, so that a user cannot know the voltage of the battery when using the electronic devices, and the battery cannot be replaced or charged in time, which affects the use of the user.
In order to solve the above technical problem, an embodiment of the present application provides a low-cost voltage detection circuit, which can effectively detect a voltage of a voltage source.
The voltage detection circuit can be applied to various electronic devices.
For example, the electronic device may be a remote controller, which can communicate with other external devices through infrared protocol communication, bluetooth protocol communication, ZigBee (ZigBee) protocol communication, or other short-range communication, and is used to control the external devices through wireless or other wired methods. The user can input user instructions through keys on the remote controller, voice input, control panel input, etc. to control the external device. Such as: the user can input corresponding control instructions through a volume up-down key, a channel control key, an up/down/left/right moving key, a voice input key, a menu key, a startup and shutdown key and the like on the remote controller to realize the function of controlling the display equipment.
For example, the electronic device may also be a smart device, such as a mobile terminal, an electronic toy, a game machine, a wearable device, and the like.
Referring to fig. 2, a block diagram of the configuration of the electronic device 100 according to an exemplary embodiment is illustrated in fig. 2. As shown in fig. 2, the electronic device 100 includes a controller 110, a communicator 130, a user input/output interface 140, a memory 190, and a power supply 180.
The controller 110 includes a processor 112, a RAM 113 and a ROM 114, a communication interface, and a communication bus. The controller 110 is used to control the operation of the electronic device 100, as well as the communication and coordination among the internal components and the external and internal data processing functions.
The communicator 130 enables communication of control signals and data signals with external devices under the control of the controller 110. Such as: and sending the received user input signal to the external equipment. The communicator 130 may include at least one of a WIFI module 131, a bluetooth module 132, an NFC module 133, and the like.
A user input/output interface 140, wherein the input interface includes at least one of a microphone 141, a touch pad 142, a sensor 143, a key 144, a camera 145, and the like. Such as: the user can realize the user instruction input function through actions such as voice, touch, gestures, pressing and the like, and the input interface converts the received analog signals into digital signals and converts the digital signals into corresponding instruction signals to be sent to the external equipment.
The output interface includes an interface that transmits the received user instruction to the outside of the display. In some embodiments, it may be an infrared interface or a radio frequency interface. Such as: when the infrared signal interface is used, a user input instruction needs to be converted into an infrared control signal according to an infrared control protocol, and the infrared control signal is sent to external equipment through an infrared sending module. The following steps are repeated: when the radio frequency signal interface is used, a user input instruction needs to be converted into a digital signal, then the digital signal is modulated according to a radio frequency control signal modulation protocol, and then the digital signal is sent to external display equipment through a radio frequency sending terminal.
A memory 190 for storing various operation programs, data and applications for driving and controlling the electronic device 100 under the control of the controller 110. The memory 190 may store various control signal commands input by a user.
And a power supply 180 for providing operating power support for the electrical components of the electronic device 100 under the control of the controller 110. The power supply 180 may be powered by a battery and associated control circuitry.
In some embodiments, the electronic device 100 is provided with a voltage detection trigger button, and when a user triggers the voltage detection trigger button, a voltage detection circuit in the electronic device 100 may be triggered to operate, so as to output a power supply voltage of the electronic device 100.
In other embodiments, the electronic device 100 may also automatically trigger the voltage detection circuit to operate at preset time intervals or after a preset time period of operation of the electronic device.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a voltage detection circuit provided in an exemplary embodiment of the present application, and in a possible implementation, the voltage detection circuit includes: a first voltage regulating circuit 21, a second voltage regulating circuit 22, a subtractor 23, a comparator 24, and a controller. Wherein:
the first voltage regulating circuit 21 is connected in series between a voltage source to be measured VCC and a first terminal of the comparator 24.
The second voltage regulating circuit 22 is connected in series between the voltage source to be measured VCC and the first input terminal of the subtractor 23.
A second input terminal of the subtractor 23 is connected to the voltage source VCC to be measured, and an output terminal of the subtractor 23 is connected to a second terminal of the comparator 24.
The controller is connected to the output terminal OUT of the comparator 24, the first voltage regulating circuit 21, and the second voltage regulating circuit 22, respectively.
In some possible embodiments, the controller in the voltage detection circuit may be the controller 110 shown in fig. 2.
In detecting the voltage of the voltage source to be measured VCC, the controller is configured to:
adjusting the output voltage of the second voltage adjusting circuit 22 to a first voltage; adjusting the output voltage of the first voltage adjusting circuit 21 until the output level of the comparator 24 switches from a high level to a low level, or from a low level to a high level; the voltage value range of the voltage source VCC to be measured is calculated based on the output voltage of the first voltage adjusting circuit 21 before the output level of the comparator 24 is switched, the output voltage of the first voltage adjusting circuit 21 after the output level of the comparator 24 is switched, and the first voltage.
The subtractor 23 may perform subtraction between the voltage value output by the voltage source to be measured and the voltage value output by the second voltage regulating circuit 22, and output a difference between the voltage value output by the voltage source to be measured and the voltage value output by the second voltage regulating circuit 22.
The comparator 24 may compare two data items input in two input terminals thereof, determine a magnitude relationship therebetween, and output a low level or a high level according to a comparison result.
For example, in some embodiments, when the voltage of the first terminal of the comparator 24 is greater than the voltage of the second terminal of the comparator, the output level of the comparator 24 is high, and when the voltage of the first terminal of the comparator 24 is less than the voltage of the second terminal of the comparator, the output level of the comparator 24 is low.
For better understanding of the embodiment of the present application, when performing voltage detection, assuming that the output level of the comparator 24 is at a high level when the output voltage of the second voltage adjusting circuit 22 is adjusted to the first voltage V, the output level of the comparator 24 can be switched from a high level to a low level by gradually adjusting the output voltage of the first voltage adjusting circuit 21.
In the embodiment of the present application, it is assumed that the output voltage of the first voltage regulating circuit 21 is regulated from V1Adjusted to V2The output level of the comparator 24 is just switched from the high level to the low level. V is represented when the output level of the comparator 24 is high level1VCC-V; when the output level of the comparator 24 is low, V is represented2< VCC-V, where VCC represents the voltage to be measuredThe voltage value of the source.
The voltage value range of the voltage source to be detected can be obtained through calculation:
V2+V<VCC<V1+V
the voltage detection circuit provided by the embodiment of the application only comprises the first voltage regulation circuit 21, the second voltage regulation circuit 22, the subtractor 23, the comparator 24 and the controller, when the voltage of the voltage source to be detected is detected, the controller firstly regulates the output voltage of the second voltage regulation circuit 22 into the first voltage, then continuously regulates the output voltage of the first voltage regulation circuit 21 until the output level of the comparator 24 is switched, and then determines the voltage value range of the voltage source to be detected according to the output voltage of the first voltage regulation circuit 21 and the first voltage before and after the output level of the comparator 24 is switched. The voltage detection circuit can enable the input voltage of one input end of the comparator 24 to be at a fixed difference value with the voltage source to be detected by adopting the subtracter 23, and can determine the voltage value of the voltage source to be detected by adjusting the input voltage of the other input end of the comparator 24 and according to the output level of the comparator 24, thereby effectively simplifying the structure and the detection process of the voltage detection circuit and reducing the cost of the voltage detection circuit.
Based on the content described in the foregoing embodiments, referring to fig. 4, fig. 4 is a schematic structural diagram three of a voltage detection circuit provided in an exemplary embodiment of the present application.
In one possible embodiment of the present application, the first voltage regulating circuit 21 includes a first adjustable resistor R7, and a regulation control terminal of the first adjustable resistor R7 is connected to a controller (not shown in fig. 4).
In some embodiments, the controller may adjust the resistance of the first adjustable resistor R7 via an adjustment control terminal of the first adjustable resistor R7.
The second adjusting circuit 22 includes a zener diode D and a second adjustable resistor R2, and the voltage source VCC to be measured is grounded through the resistor R1 and the zener diode D, so that the voltage output by the negative electrode of the zener diode D is a stable voltage with a preset magnitude. The cathode of the zener diode D is connected to the second adjustable resistor R2, and the adjustment control terminal of the second adjustable resistor R2 is connected to the controller (not shown in fig. 4).
In some embodiments, the controller may adjust the second adjustable resistance R2 via an adjustment control terminal of the second adjustable resistance R2.
In some embodiments, the first adjustable resistor R7 and the second adjustable resistor R2 may be circuits with adjustable resistance, which are formed by connecting a plurality of resistors in series and parallel, or may be other devices with adjustable resistance, such as a sliding rheostat, a thermistor, a voltage dependent resistor, a potentiometer, and the like.
In addition, the voltage detection circuit further includes a first resistor R3, a second resistor R4, a third resistor R5 and a fourth resistor R6.
The first resistor R3, the second resistor R4, the third resistor R5 and the fourth resistor R63 have the same resistance; the first resistor R3 is connected in series between the second voltage regulating circuit 21 and the first input terminal of the subtractor 23, and in particular, between the second adjustable resistor R2 and the first input terminal of the subtractor 23.
The second resistor R4 is connected in series between the voltage source VCC to be measured and the second input terminal of the subtractor 23.
A first terminal of the third resistor R5 is connected to a second input terminal of the subtractor 23, and a second terminal is grounded.
A first terminal of the fourth resistor R6 is connected to a first input terminal of the subtractor 23, and a second terminal is connected to an output terminal of the subtractor 23.
As shown in fig. 4, in one possible embodiment of the present application, the voltage of the first terminal of the comparator 24 is denoted as VP, and the voltage of the second terminal of the comparator 24 is denoted as VN, then when VP > VN, the output terminal OUT of the comparator 24 outputs high level, and when VP < VN, the output terminal OUT of the comparator 24 outputs low level.
The first end of the comparator 24 is connected to the voltage source VCC to be measured through the first adjustable resistor R7, and the relationship between the voltage VP and the voltage VCC to be measured can be set as: VP ═ x VCC.
In some embodiments, the magnitude of x may be varied by adjusting the resistance of the first adjustable resistor R7.
The voltage source VCC to be measured is connected with the ground through the R1 and the voltage stabilizing diode D, so that the voltage VN1 of the cathode of the voltage stabilizing diode D can be kept at a stable voltage value. For example, for an infrared remote controller, a dry battery is generally used for power supply, and when the voltage of a plurality of batteries is 3V at full charge, VN1 can be set to 1.3V.
After passing through the second adjustable resistor R2, the voltage relationship between the output voltage VN2 and VN1 of the second voltage adjusting circuit 21 can be set as follows: VN2 is y VN 1.
In some embodiments, the magnitude of y may be varied by adjusting the resistance of the second adjustable resistor R2.
Since the resistances of the first resistor R3, the second resistor R4, the third resistor R5 and the fourth resistor R63 are the same, after being processed by the subtractor 23, the relationship between the voltage VN at the second end of the comparator 24 and the voltage source VCC to be measured is as follows: VN is VCC-VN2 VCC-y VN 1.
In one possible embodiment, the specific procedure of voltage detection is as follows:
first, the resistance of the second adjustable resistor R2 is fixed, and the output voltage VN2 of the second voltage regulating circuit 21 is determined.
It is assumed that the number of adjustable steps of the resistance value of the second adjustable resistor R2 is 8, and the relationship between each step of the resistance value of the second adjustable resistor R2 and the output voltage VN2 of the second voltage regulating circuit 21 is shown in table 1:
table 1: correspondence table of each gear of R2 resistance value and VN2
Figure BDA0002742799290000091
Figure BDA0002742799290000101
In this embodiment, if the resistance of the second adjustable resistor R2 is adjusted to the 2 nd gear, the output voltage VN2 of the second voltage adjusting circuit 21 may be determined to be b VN 1. At this time, VN is VCC-b VN 1.
And secondly, adjusting the resistance value of the first adjustable resistor R7 until the output level of the comparator 24 changes.
In this embodiment, if the output level of the comparator 24 is a high level after the resistance value of the second adjustable resistor R2 is fixed, which indicates that VP is greater than VN, at this time, the resistance value of the first adjustable resistor R7 may be gradually decreased until the output level of the comparator 24 is switched from the high level to the low level; if the output level of the comparator 24 is low after the resistance value of the second adjustable resistor R2 is fixed, it indicates that VP is less than VN, and at this time, the resistance value of the first adjustable resistor R7 may be gradually increased until the output level of the comparator 24 is switched from low to high.
In some possible embodiments, it is assumed that the adjustable steps of the resistance value of the first adjustable resistor R7 are 32, and the relationship between each step of the resistance value of the first adjustable resistor R7 and x is shown in table 2:
table 2: corresponding relation table of each gear of R7 resistance value and x
Gear position Value of x Gear position Value of x Gear position Value of x Gear position Value of x
1 0 9 0.267 17 0.533 25 0.8
2 0.033 10 0.3 18 0.567 26 0.833
3 0.067 11 0.333 19 0.6 27 0.867
4 0.1 12 0.367 20 0.633 28 0.9
5 0.133 13 0.4 21 0.667 29 0.933
6 0.167 14 0.433 22 0.7 30 0.967
7 0.2 15 0.467 23 0.733 31 1
8 0.233 16 0.5 24 0.767 32
If the output level of the comparator 24 is changed from high level to low level when the resistance of the first adjustable resistor R7 is adjusted from the 17 th gear to the 16 th gear, it indicates that VP < VN.
Since the output level of the comparator 24 is high before the output level of the comparator is switched, at this time: VP > VN, VP-0.533 VCC, VN-VCC-b VN 1.
Namely: 0.533VCC > VCC-b VN1, VCC < (b VN 1)/0.467.
When the output level of the comparator is switched, the output level of the comparator 24 is low, and at this time: VP < VN, VP-0.5 VCC, VN-VCC-b VN 1.
Namely: 0.5VCC < VCC-b VN1, VCC > (b VN 1)/0.5.
Obtaining the voltage value range of the voltage source to be measured according to the relation as follows:
(b*VN1)/0.5<VCC<(b*VN1)/0.467
it is understood that, in some embodiments, by reducing the resistance value interval between the first adjustable resistor R7 and each shift position of the second adjustable resistor R2, the range of the detected voltage value may also be reduced, which may be specifically selected according to the actual detection accuracy of the electronic device, and is not limited in this embodiment.
The voltage detection circuit that this application embodiment provided, when detecting the voltage of the voltage source that awaits measuring, the controller is earlier with the output voltage regulation of second voltage regulating circuit for first voltage, then make the input voltage of an input of comparator and be in a fixed difference between the voltage source that awaits measuring through the subtracter, then constantly adjust the output voltage of first voltage regulating circuit, switch until the output level of comparator, then can be according to the output voltage and the above-mentioned first voltage of the first voltage regulating circuit of output level back before taking place to switch, come to determine the voltage value scope of the voltage source that awaits measuring. The voltage detection circuit and the detection method thereof effectively simplify the structure and the detection process of the voltage detection circuit, and therefore the cost of the voltage detection circuit can be reduced.
Based on the content described in the foregoing embodiments, the present application further provides a voltage detection method, which is applied to the voltage detection circuit. Wherein:
the voltage detection circuit comprises a first voltage regulating circuit, a second voltage regulating circuit, a subtracter, a comparator and a controller; the first voltage regulating circuit is connected in series between a voltage source to be measured and the first end of the comparator; the second voltage regulating circuit is connected in series between the voltage source to be measured and the first input end of the subtracter; the second input end of the subtracter is connected with the voltage source to be detected, and the output end of the subtracter is connected with the second end of the comparator; the controller is respectively connected with the output end of the comparator, the first voltage regulating circuit and the second voltage regulating circuit. The specific structure of the voltage detection circuit can refer to the content described in fig. 3 or fig. 4 in the above embodiments of the present application, and is not repeated herein.
In a possible implementation manner, referring to fig. 5, fig. 5 is a schematic flow chart illustrating steps of a voltage detection method provided in an embodiment of the present application, where the voltage detection method includes:
and S501, adjusting the output voltage of the second voltage adjusting circuit to be the first voltage.
And S502, adjusting the output voltage of the first voltage adjusting circuit until the output level of the comparator is switched from high level to low level or from low level to high level.
S503, calculating the voltage value range of the voltage source to be measured according to the output voltage of the first voltage regulating circuit before the output level of the comparator is switched, the output voltage of the first voltage regulating circuit after the output level of the comparator is switched and the first voltage.
The subtractor can perform subtraction operation on the voltage value output by the voltage source to be detected and the voltage value output by the second voltage regulating circuit, and output a difference value between the voltage value output by the voltage source to be detected and the voltage value output by the second voltage regulating circuit.
The comparator may compare two items of data input in its two input terminals, determine a magnitude relationship therebetween, and output a low level or a high level according to a comparison result.
For example, in some embodiments, when the voltage of the first terminal of the comparator is greater than the voltage of the second terminal of the comparator, the output level of the comparator is at a high level, and when the voltage of the first terminal of the comparator is less than the voltage of the second terminal of the comparator, the output level of the comparator is at a low level.
For better understanding of the embodiment of the present application, when performing voltage detection, assuming that the output level of the comparator is at a high level when the output voltage of the second voltage regulating circuit is regulated to the first voltage V, the output level of the comparator can be switched from the high level to a low level by gradually regulating the output voltage of the first voltage regulating circuit.
In the embodiment of the present application, it is assumed that the output voltage of the first voltage regulating circuit is regulated from V1Adjusted to V2The output level of the comparator switches from high to low just. When the output level of the comparator is high level, it represents V1VCC-V; when the output level of the comparator is low, V is represented2< VCC-V, where VCC represents the voltage value of the voltage source under test.
The voltage value range of the voltage source to be detected can be obtained through calculation:
V2+V<VCC<V1+V
in some possible embodiments, the first voltage regulating circuit includes a first adjustable resistor, and an adjustment control terminal of the first adjustable resistor is connected to the controller. In this embodiment, the resistance of the first adjustable resistor may be adjusted by using the adjustment control end of the first adjustable resistor until the output level of the comparator is switched from a high level to a low level, or from the low level to the high level.
In some possible embodiments, the second adjusting circuit includes a zener diode and a second adjustable resistor; the voltage source to be tested is grounded through the voltage stabilizing diode, the cathode of the voltage stabilizing diode is connected with the second adjustable resistor, and the adjusting control end of the second adjustable resistor is connected with the controller. The voltage output by the cathode of the voltage stabilizing diode is a stable voltage with a preset magnitude. In this embodiment, the resistance of the second adjustable resistor may be adjusted by using the adjustment control terminal of the second adjustable resistor, so that the output voltage of the second voltage adjusting circuit is the first voltage.
According to the voltage detection method provided by the embodiment of the application, the subtracter is adopted, so that the input voltage of one input end of the comparator and the voltage source to be detected are in a fixed difference value, the input voltage of the other input end of the comparator is adjusted, and the voltage value of the voltage source to be detected can be determined according to the output level of the comparator, so that the structure and the detection process of the voltage detection circuit are effectively simplified, and the cost of the voltage detection circuit can be reduced.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A voltage detection circuit is characterized by comprising a first voltage regulating circuit, a second voltage regulating circuit, a subtracter, a comparator and a controller;
the first voltage regulating circuit is connected between a voltage source to be measured and the first end of the comparator in series;
the second voltage regulating circuit is connected in series between the voltage source to be detected and the first input end of the subtracter;
the second input end of the subtracter is connected with the voltage source to be detected, and the output end of the subtracter is connected with the second end of the comparator;
the controller is respectively connected with the output end of the comparator, the first voltage regulating circuit and the second voltage regulating circuit, and is configured to:
adjusting an output voltage of the second voltage adjusting circuit to a first voltage;
adjusting the output voltage of the first voltage adjusting circuit until the output level of the comparator is switched from a high level to a low level or from the low level to the high level;
and calculating the voltage value range of the voltage source to be detected according to the output voltage of the first voltage regulating circuit before the output level of the comparator is switched, the output voltage of the first voltage regulating circuit after the output level of the comparator is switched and the first voltage.
2. The voltage detection circuit of claim 1, wherein the first voltage regulation circuit comprises a first adjustable resistor, and an adjustment control terminal of the first adjustable resistor is connected to the controller.
3. The voltage detection circuit of claim 2, wherein the controller is configured to:
and adjusting the resistance value of the first adjustable resistor by using the adjusting control end of the first adjustable resistor until the output level of the comparator is switched from a high level to a low level or from the low level to the high level.
4. The voltage detection circuit according to any one of claims 1-3, wherein the second voltage regulating circuit comprises a zener diode and a second adjustable resistor;
the voltage source to be tested is grounded through the voltage stabilizing diode, the negative electrode of the voltage stabilizing diode is connected with the second adjustable resistor, and the adjusting control end of the second adjustable resistor is connected with the controller.
5. The voltage detection circuit of claim 4, wherein the voltage output by the negative terminal of the zener diode is a regulated voltage of a predetermined magnitude.
6. The voltage detection circuit of claim 4, wherein the controller is configured to:
and adjusting the resistance value of the second adjustable resistor by using the adjusting control end of the second adjustable resistor so as to enable the output voltage of the second voltage adjusting circuit to be the first voltage.
7. The voltage detection circuit of claim 4, wherein the controller is configured to:
calculating the voltage value range of the voltage source to be measured by the following method:
V2+V<VCC<V1+V
wherein, V1Representing the output voltage, V, of the first voltage regulating circuit before switching of the output level of the comparator2And the voltage value is represented by V, and VCC is represented by VCC.
8. The voltage detection circuit of claim 7, wherein the output level of the comparator is high when the voltage of the first terminal of the comparator is greater than the voltage of the second terminal of the comparator, and the output level of the comparator is low when the voltage of the first terminal of the comparator is less than the voltage of the second terminal of the comparator.
9. The voltage detection circuit of claim 1, further comprising a first resistor, a second resistor, a third resistor, and a fourth resistor; the first resistor, the second resistor, the third resistor and the fourth resistor have the same resistance value;
the first resistor is connected in series between the second voltage regulating circuit and the first input end of the subtracter;
the second resistor is connected between the voltage source to be detected and the second input end of the subtracter in series;
the first end of the third resistor is connected with the second input end of the subtracter, and the second end of the third resistor is grounded;
and a first end of the fourth resistor is connected with a first input end of the subtracter, and a second end of the fourth resistor is connected with an output end of the subtracter.
10. An electronic device characterized by comprising the voltage detection circuit according to any one of claims 1 to 9.
CN202011156027.1A 2020-10-26 2020-10-26 Voltage detection circuit and electronic equipment Active CN112415257B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011156027.1A CN112415257B (en) 2020-10-26 2020-10-26 Voltage detection circuit and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011156027.1A CN112415257B (en) 2020-10-26 2020-10-26 Voltage detection circuit and electronic equipment

Publications (2)

Publication Number Publication Date
CN112415257A CN112415257A (en) 2021-02-26
CN112415257B true CN112415257B (en) 2022-04-22

Family

ID=74840209

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011156027.1A Active CN112415257B (en) 2020-10-26 2020-10-26 Voltage detection circuit and electronic equipment

Country Status (1)

Country Link
CN (1) CN112415257B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03279870A (en) * 1990-03-29 1991-12-11 Advantest Corp Comparator circuit
JP2001238450A (en) * 2000-02-21 2001-08-31 Hitachi Ltd Power converter
JP2012078090A (en) * 2010-09-30 2012-04-19 Mitsumi Electric Co Ltd Current/voltage detection circuit and current control circuit
CN106771517A (en) * 2016-11-30 2017-05-31 惠州Tcl移动通信有限公司 A kind of mobile terminal and its display screen over-current detecting method and system
CN206725126U (en) * 2017-04-15 2017-12-08 深圳市容亮电子有限公司 Electrical parameter measuring device with self-checking function
CN109991462A (en) * 2019-04-08 2019-07-09 美芯晟科技(北京)有限公司 Voltage detecting circuit, method and system
CN210465557U (en) * 2019-04-30 2020-05-05 成都新欣神风电子科技有限公司 Voltage monitoring alarm device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102004036352B4 (en) * 2004-05-27 2007-10-25 Atmel Germany Gmbh Circuit for current measurement and current monitoring and their use for a functional unit

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03279870A (en) * 1990-03-29 1991-12-11 Advantest Corp Comparator circuit
JP2001238450A (en) * 2000-02-21 2001-08-31 Hitachi Ltd Power converter
JP2012078090A (en) * 2010-09-30 2012-04-19 Mitsumi Electric Co Ltd Current/voltage detection circuit and current control circuit
CN106771517A (en) * 2016-11-30 2017-05-31 惠州Tcl移动通信有限公司 A kind of mobile terminal and its display screen over-current detecting method and system
CN206725126U (en) * 2017-04-15 2017-12-08 深圳市容亮电子有限公司 Electrical parameter measuring device with self-checking function
CN109991462A (en) * 2019-04-08 2019-07-09 美芯晟科技(北京)有限公司 Voltage detecting circuit, method and system
CN210465557U (en) * 2019-04-30 2020-05-05 成都新欣神风电子科技有限公司 Voltage monitoring alarm device

Also Published As

Publication number Publication date
CN112415257A (en) 2021-02-26

Similar Documents

Publication Publication Date Title
US7728558B2 (en) Systems and methods for selectively changing current limit of a battery controller
US10951973B2 (en) Headset, terminal, and control method
US8742731B2 (en) Voltage conversion circuit and charging device employing the same
CN103901352B (en) Show the method and device of battery of mobile terminal remaining capacity
CN103855772A (en) Mobile terminal and charging control method of mobile terminal
US8624425B2 (en) Voltage adjustment system
CN105098871A (en) Portable device and method for controlling charging current thereof
CN112415257B (en) Voltage detection circuit and electronic equipment
EP3910354B1 (en) Power supply on-off detection circuit, method, apparatus and storage medium
CN201957128U (en) Cellphone capable of controlling temperature and humidity of air conditioner
US20170222453A1 (en) Device, apparatus and method for supporting multi-battery quick charge
WO2017071528A1 (en) Electronic device and charging method therefor
US20230088905A1 (en) Electronic device and operation method thereof
CN106663848B (en) Charging method and mobile terminal
CN102563800A (en) Air-conditioning temperature and humidity control mobile terminal
KR20150001386A (en) Sensor signal processing device and readout integrated circuit comprising the sensor signal processing device
CN105024681A (en) Touch detection circuit capable of adjusting sensitivity and range
JPH11187587A (en) Charge control circuit
US20040097275A1 (en) Cordless telephone
WO2006098533A1 (en) Analog-to-digital conversion measuring apparatus
JP5937364B2 (en) Charging device, charging method, and electronic device
WO2023191338A1 (en) Multi-channel soft-sensor-based interface device, and operating method
CN212849962U (en) Charger with body temperature detection function
CN210835035U (en) Resistance-capacitance integrated measuring circuit of universal meter
CN213990241U (en) Charging equipment of wireless earphone and wireless earphone assembly

Legal Events

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