Voltage detection circuit, voltage detection method, chip and electronic equipment

By designing a voltage detection circuit, using the combination of a comparison module and a detection module, accurately detecting the voltage to be detected and outputting a power-off signal when necessary, the problem that the existing voltage detection circuit cannot detect overvoltage and is susceptible to noise is solved, and the problem of the existing voltage detection circuit cannot detect overvoltage and is easily affected by noise is realized. Accuracy and protection effect of voltage detection.

CN118914639APending Publication Date: 2024-11-08BEIJING ESWIN COMPUTING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411000562.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

Existing voltage detection circuits cannot accurately detect overvoltage, and are prone to output incorrect power-off signals due to noise, resulting in damage to devices and circuits or incorrect detection.

Method used

A voltage detection circuit is designed to obtain the voltage to be detected with the first reference voltage and the second reference voltage by the comparison module, generate a prejudgment electric signal, and the detection module determines the voltage detection result based on the duration of the prejudgment electric signal, only Output a power-off signal when the duration exceeds the threshold to avoid noise influence.

Benefits of technology

Accurate detection of overvoltage and low voltage is achieved, error detection caused by noise is avoided, and protection of devices and circuits is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118914639A_ABST
    Figure CN118914639A_ABST
Patent Text Reader

Abstract

The invention discloses a voltage detection circuit, a voltage detection method, a chip and electronic equipment, and belongs to the technical field of electronic information. The circuit comprises a comparison module and a detection module which are connected with each other. The comparison module is used for acquiring a to-be-detected voltage, a first reference voltage and a second reference voltage, comparing the to-be-detected voltage with the first reference voltage and the second reference voltage, generating a pre-judgment electric signal according to a comparison result, and transmitting the pre-judgment electric signal to the detection module; and the detection module is used for acquiring a pre-judgment electric signal, and determining a voltage detection result according to the duration of the pre-judgment electric signal under the condition that the pre-judgment electric signal indicates that the to-be-detected voltage is greater than the first reference voltage or smaller than the second reference voltage. According to the invention, whether the to-be-detected voltage is too high or too low can be determined, and under the condition that the to-be-detected voltage is too high or too low, an accurate voltage detection result is determined according to the too high or too low duration of the to-be-detected voltage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic information technology, and in particular to a voltage detection circuit, a voltage detection method, a chip and an electronic device. Background Art

[0002] A voltage detection circuit is a subcircuit used to detect the voltage in a circuit. It can be used to detect whether there is an abnormal voltage in the circuit that exceeds a certain range, and protect other subcircuits or devices in the circuit from being affected by the abnormal voltage. Summary of the invention

[0003] The present application provides a voltage detection circuit, a voltage detection method, a chip and an electronic device, which can be used to achieve accurate voltage detection. The technical solution is as follows:

[0004] On the one hand, the present application provides a voltage detection circuit, which includes a comparison module and a detection module connected to each other; the comparison module is used to obtain a voltage to be detected, a first reference voltage and a second reference voltage, compare the voltage to be detected with the first reference voltage and the second reference voltage respectively, generate a pre-judgment electrical signal according to the comparison result, and transmit the pre-judgment electrical signal to the detection module, wherein the first reference voltage is greater than the second reference voltage; the detection module is used to obtain the pre-judgment electrical signal, and when the pre-judgment electrical signal indicates that the voltage to be detected is greater than the first reference voltage or the voltage to be detected is less than the second reference voltage, determine the voltage detection result according to the duration of the pre-judgment electrical signal.

[0005] In a possible implementation, the detection module is further configured to output a power-off signal when the voltage detection result shows that the voltage to be detected is abnormal, and the power-off signal is used to protect a device connected to the circuit.

[0006] In a possible implementation, the detection module includes a timer; the timer is used to determine that the voltage detection result is that the voltage to be detected is abnormal when the duration is greater than or equal to a duration threshold.

[0007] In a possible implementation, the detection module also includes an oscillator, which is connected to a timer; the oscillator is used to transmit a periodic signal to the timer; and the timer is further used to determine the duration of the pre-determined electrical signal based on the periodic signal.

[0008] In one possible implementation, the comparison result includes a first comparison result and a second comparison result, and the comparison module includes a first voltage comparator, a second voltage comparator and a logic gate, and the logic gate is respectively connected to the first voltage comparator and the second voltage comparator; the first voltage comparator is used to compare the voltage to be detected with the first reference voltage to obtain a first comparison result, and transmit the first comparison result to the logic gate; the second voltage comparator is used to compare the voltage to be detected with the second reference voltage to obtain a second comparison result, and transmit the second comparison result to the logic gate; the logic gate is used to obtain the first comparison result and the second comparison result, and generate a pre-judgment electrical signal according to the first comparison result and the second comparison result.

[0009] In one possible implementation, the circuit also includes a first decoder (DEC) and a second decoder, both of which are connected to the comparison module; the first decoder is used to obtain a first control signal and multiple reference voltages, and select a first reference voltage from multiple reference voltages according to the first control signal; the second decoder is used to obtain a second control signal and multiple reference voltages, and select a second reference voltage from multiple reference voltages according to the second control signal.

[0010] On the other hand, a voltage detection method is provided, which is applied to a voltage detection circuit, the circuit including a comparison module and a detection module connected to each other, the method including: obtaining a voltage to be detected, a first reference voltage, and a second reference voltage through the comparison module, comparing the voltage to be detected with the first reference voltage and the second reference voltage respectively, generating a pre-judgment electrical signal according to the comparison result, transmitting the pre-judgment electrical signal to the detection module, the first reference voltage being greater than the second reference voltage; obtaining the pre-judgment electrical signal through the detection module, and determining the voltage detection result according to the duration of the pre-judgment electrical signal when the pre-judgment electrical signal indicates that the voltage to be detected is greater than the first reference voltage or the voltage to be detected is less than the second reference voltage.

[0011] In one possible implementation, when a pre-judgment electrical signal indicates that the voltage to be detected is greater than a first reference voltage or the voltage to be detected is less than a second reference voltage, after determining the voltage detection result according to the duration of the pre-judgment electrical signal, it also includes: when the voltage detection result is that the voltage to be detected is abnormal, the detection module outputs a power-off signal, and the power-off signal is used to protect devices connected to the circuit.

[0012] In one possible implementation, the detection module includes a timer; when a pre-judgment electrical signal indicates that the voltage to be detected is greater than a first reference voltage or the voltage to be detected is less than a second reference voltage, the voltage detection result is determined according to the duration of the pre-judgment electrical signal, including: determining, by the timer, that the voltage detection result is that the voltage to be detected is abnormal when the duration is greater than or equal to a duration threshold.

[0013] In one possible implementation, the detection module also includes an oscillator, which is connected to a timer; when the pre-judgment electrical signal indicates that the voltage to be detected is greater than the first reference voltage or the voltage to be detected is less than the second reference voltage, before determining the voltage detection result based on the duration of the pre-judgment electrical signal, it also includes: transmitting a periodic signal to the timer through the oscillator; determining the duration of the pre-judgment electrical signal through the timer based on the periodic signal.

[0014] In a possible implementation, the comparison result includes a first comparison result and a second comparison result, and the comparison module includes a first voltage comparator, a second voltage comparator and a logic gate, and the logic gate is respectively connected to the first voltage comparator and the second voltage comparator; the voltage to be detected is respectively compared with the first reference voltage and the second reference voltage, and a pre-judgment electrical signal is generated according to the comparison result, including: comparing the voltage to be detected and the first reference voltage through the first voltage comparator to obtain a first comparison result, and transmitting the first comparison result to the logic gate; comparing the voltage to be detected and the second reference voltage through the second voltage comparator to obtain a second comparison result, and transmitting the second comparison result to the logic gate; obtaining the first comparison result and the second comparison result through the logic gate, and generating a pre-judgment electrical signal according to the first comparison result and the second comparison result.

[0015] In one possible implementation, the circuit also includes a first decoder and a second decoder, and the first decoder and the second decoder are both connected to the comparison module; the method also includes: a first decoder, used to obtain a first control signal and multiple reference voltages, and select a first reference voltage from multiple reference voltages according to the first control signal; a second decoder, used to obtain a second control signal and multiple reference voltages, and select a second reference voltage from multiple reference voltages according to the second control signal.

[0016] On the other hand, a chip is provided, which includes any possible voltage detection circuit as described above.

[0017] On the other hand, an electronic device is provided, which includes any possible voltage detection circuit as described above.

[0018] The technical solution provided by this application brings at least the following beneficial effects:

[0019] The voltage to be detected is compared with the second reference voltage and the first reference voltage to determine whether the voltage to be detected is too high or too low. If the voltage to be detected is too high or too low, a more accurate voltage detection result is determined based on the duration of the voltage to be detected being too high or too low. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1 It is a schematic diagram of a voltage detection circuit provided by the related technology;

[0022] Figure 2 is a schematic diagram of a voltage detection circuit provided in an embodiment of the present application;

[0023] Figure 3 is a schematic diagram of a voltage regulator and a voltage divider circuit provided in an embodiment of the present application;

[0024] Figure 4 is a schematic diagram of another voltage detection circuit provided in an embodiment of the present application;

[0025] Figure 5 is a schematic diagram of a bandgap reference voltage source and a voltage divider circuit provided in an embodiment of the present application;

[0026] Figure 6 is a schematic diagram of a first decoder provided in an embodiment of the present application;

[0027] Figure 7 is a schematic diagram of a second decoder provided in an embodiment of the present application;

[0028] Figure 8 is a schematic diagram of another voltage detection circuit provided in an embodiment of the present application;

[0029] Fig. 9 It is a schematic diagram of the effect of a voltage detection circuit provided in an embodiment of the present application;

[0030] Fig.10 It is a flow chart of a voltage detection method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0031] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0032] After receiving the power signal from the battery power source, the PMIC (Power Management Integrated Circuit) manages and adjusts the received power signal and outputs a stable voltage. The voltage regulator is a device used for voltage stabilization inside the PMIC. The voltage regulator receives power from the PMIC and generates and provides a stable voltage inside the PMIC.

[0033] For example, in a chip integrating a PMIC and a DDIC (Display Driver Integrated Circuit), the PMIC may output a stable voltage generated by a voltage regulator to the DDIC, so that the DDIC operates according to the stable voltage.

[0034] Since the voltage generated by the voltage regulator is the basis for the operation of other devices and circuits in the chip, and the size of the voltage generated by the voltage regulator can affect the working performance of other devices and circuits in the chip, it is necessary to detect the voltage generated by the voltage regulator to promptly detect abnormalities in the voltage generated by the voltage regulator to avoid malfunctions of other devices and circuits due to unstable or abnormal voltage generated by the voltage regulator.

[0035] See also Figure 1 , shows a voltage detection circuit provided by the related art. The voltage detection circuit compares the voltage VREG (voltage-regulator) generated by the voltage regulator with the lower reference voltage VREF_DN (voltage-reference-down) through a comparator to detect VREG. When VREG is less than VREF_DN, it means that VREG is already lower than the normal level and VREG is abnormal, and a power-off signal (power off signal) is output to make the circuits and devices based on VREG stop working based on the abnormal VREG to protect the circuits and devices based on VREG from damage caused by the abnormal VREG. For example, after obtaining the power-off signal, the DDIC performs the display shutdown sequence operation and stops the display drive.

[0036] However, the voltage detection circuit provided by the related art cannot detect overvoltage, which refers to a voltage that exceeds the maximum rated voltage that a circuit or device can withstand. Therefore, when the voltage generated by the voltage regulator is too large, the voltage detection circuit cannot respond in time and output a power-off signal, causing the devices and circuits that work based on the voltage generated by the voltage regulator to work based on the excessive electrical signal generated by the voltage regulator, resulting in damage to these devices and circuits.

[0037] In addition, the voltage detection circuit provided by the related art immediately outputs a power-off signal when detecting that the voltage generated by the voltage regulator is lower than the normal level. However, since the noise of the comparator in the process of comparing the voltages may affect the instantaneous value of the voltage generated by the voltage regulator or the lower reference voltage, the voltage detection result is inaccurate. Therefore, the voltage detection circuit may erroneously output a power-off signal when the voltage generated by the voltage regulator is normal, affecting the normal operation of the devices and circuits that work based on the voltage generated by the voltage regulator. Alternatively, the voltage detection circuit may fail to detect the abnormality of the voltage generated by the voltage regulator due to the influence of noise, causing the devices and circuits that work based on the voltage generated by the voltage regulator to work based on the abnormal voltage, causing damage.

[0038] An embodiment of the present application provides a voltage detection circuit, which may also be referred to as a voltage detection and protection circuit (voltage detect and protect circuit), which can detect overvoltage and low voltage that may cause circuit damage, and will not be affected by erroneous instantaneous values, and the voltage detection result is accurate.

[0039] See also Figure 2 , shows a schematic diagram of the structure of a voltage detection circuit provided in an embodiment of the present application. The voltage detection circuit provided in an embodiment of the present application comprises a comparison module 11 and a detection module 12 which are connected to each other.

[0040] Among them, the comparison module 11 is used to obtain the voltage to be detected, the first reference voltage and the second reference voltage, and the first reference voltage is greater than the second reference voltage. For example, the first reference voltage is the upper limit voltage of the reference range, and the second reference voltage is the lower limit voltage of the reference range. The reference range is the voltage range that enables the circuits and devices based on the voltage to be detected to work normally. The comparison module 11 is also used to compare the voltage to be detected with the first reference voltage and the second reference voltage respectively, generate a pre-judgment electrical signal according to the comparison result, and transmit the pre-judgment electrical signal to the detection module 12; the detection module 12 is used to obtain the pre-judgment electrical signal, and when the pre-judgment electrical signal indicates that the voltage to be detected is greater than the first reference voltage or the voltage to be detected is less than the second reference voltage, the voltage detection result is determined according to the duration of the pre-judgment electrical signal.

[0041] Below, the process of voltage detection performed by the voltage detection circuit provided in the embodiment of the present application is described to illustrate the composition and principle of the voltage detection circuit.

[0042] The voltage to be detected obtained by the comparison module 11 can be various voltages output by the front end of the voltage detection circuit. In the embodiment of the present application, the front end of the voltage detection circuit is a regulator as an example to illustrate the process of obtaining the voltage to be detected. If the front end of the voltage detection circuit is a regulator, the voltage to be detected obtained by the voltage detection circuit can be generated based on the voltage output by the regulator.

[0043] See also Figure 3 , showing a schematic diagram of a voltage regulator and a voltage divider circuit. The voltage regulator stabilizes the received input signal, and the stabilized voltage is input to the voltage divider connected to the voltage regulator. The voltage divider includes a resistor string, and the resistor string includes M resistors (Resistance, R), where M is an integer greater than or equal to 2. The resistor string includes but is not limited to Figure 3 The stabilized voltage is input into the resistor string, and the stabilized voltage is divided by the M resistors in the resistor string.

[0044] The voltage to be detected in the present application can be a voltage obtained by dividing the stabilized voltage, for example Figure 3 VREG is drawn between R21 and R22 in the resistor string. When the M resistors in the resistor string have the same resistance value and the voltage to be detected is the voltage of the high potential end of the grounded resistor, the magnitude of the voltage to be detected may be 1 / M of the stabilized voltage.

[0045] The voltage to be detected is transmitted to the comparison module 11, and the comparison module 11 obtains the voltage to be detected by receiving the voltage to be detected output by the front end. In addition, the comparison module 11 also needs to obtain a first reference voltage and a second reference voltage for detecting the voltage to be detected.

[0046] The embodiment of the present application does not limit the manner in which the comparison module 11 obtains the first reference voltage and the second reference voltage. For example, the comparison module 11 can obtain the first reference voltage and the second reference voltage by receiving the first reference voltage and the second reference voltage transmitted by the front end. The magnitudes of the first reference voltage and the second reference voltage can be the magnitudes of the default settings, or can be set based on experience or circuit requirements.

[0047] Alternatively, see Figure 4 The schematic diagram of the voltage detection circuit shown in FIG. 1 may further include a first decoder 131 and a second decoder 132, both of which are connected to the comparison module 11. The first decoder 131 may obtain a first control signal and a plurality of reference voltages, and select a first reference voltage from the plurality of reference voltages according to the first control signal.

[0048] The plurality of reference voltages may be generated and transmitted by a bandgap reference voltage source and a voltage divider circuit connected to the first decoder 131. Figure 5 , shows a schematic diagram of a bandgap reference voltage source and a voltage divider circuit. The bandgap reference voltage source generates a bandgap reference voltage (Voltage-Bandgap Reference, VBGR), and VBGR is connected to the voltage divider via multiple resistors (e.g. Figure 5 R11, R12, ..., R1N) in the circuit divides the voltage to obtain multiple reference voltages (Voltage-Reference, VREF). For example, multiple reference voltages are Figure 5 Among them, VREF1, VREF2, ..., VREFN, the multiple reference voltages have different sizes.

[0049] The plurality of reference voltages are input to the first decoder 131, and are used for the first decoder 131 to select a first reference voltage therefrom. In addition, the input to the first decoder 131 also includes a first control signal, and the first control signal is used to control the first decoder 131 to select a corresponding first reference voltage.

[0050] Multiple reference voltages are transmitted to the first decoder 131 through different input pins on the first decoder 131. Therefore, the principle of the first decoder 131 determining the output first reference voltage according to the first control signal is as follows: the input pin corresponding to the first reference voltage is determined by the first control signal, so that the circuit between the input pin and the output pin for outputting the first reference voltage is turned on, and the reference voltage transmitted to the first decoder 131 through the input pin can be output to the outside through the output pin, and the output signal is the first reference voltage selected by the first decoder 131 from the multiple reference voltages.

[0051] For example, the number of multiple reference voltages received by the first decoder 131 is 10, and the 10 reference voltages are reference voltage 1 to reference voltage 10 respectively. Reference voltage 1 to reference voltage 10 are respectively input into the first decoder 131 through input pin 1 to input pin 10, and the first decoder 131 outputs the first reference voltage through output pin 11.

[0052] If the first control signal indicates that the circuit between input pin 7 and output pin 11 is turned on, the first decoder 131 controls the conduction between the various circuits in the first decoder 131 based on the first control signal, so that the circuit between input pin 7 and output pin 11 is turned on, while the circuits between input pin 1-input pin 6, input pin 8-input pin 10 and output pin 11 are not turned on. Therefore, the first reference voltage output through output pin 11 is the reference voltage 7 input to the first decoder 131 through input pin 7, thereby realizing the selection of the first reference voltage.

[0053] See also Figure 6 , shows a schematic diagram of a first decoder 131 provided in an embodiment of the present application. The first decoder 131 receives VREF1, VREF2, ..., VREFN transmitted by the bandgap reference voltage source and the voltage divider circuit, and receives a first control signal VREF_UP_SET. If VREF_UP_SET indicates that the circuit between the input pin corresponding to VREF2 and the output pin corresponding to VREF_UP in the first decoder 131 is turned on, so that the first decoder 131 can output VREF2, VREF2 is the first reference voltage selected by the first decoder 131.

[0054] In the embodiment of the present application, the first control signal can be determined based on the detection requirements or the performance of the circuit. For example, if a device or circuit that works based on the voltage to be detected is damaged when it receives a voltage exceeding 100V (volts), the first control signal should instruct the first decoder 131 to select a reference voltage less than or equal to 100V and close to 100V as the first reference voltage. In this case, the first control signal can be determined based on this characteristic of the circuit.

[0055] Correspondingly, the second decoder 132 can obtain the second control signal and multiple reference voltages, and select the second reference voltage from the multiple reference signals according to the second control signal. The relevant process can refer to the process of the first decoder 131 obtaining multiple reference voltages and the first control signal, and the process of the first decoder 131 selecting the first reference voltage from the multiple reference voltages according to the first control signal, which will not be repeated here.

[0056] See also Figure 7 , shows a schematic diagram of a second decoder 132 provided in an embodiment of the present application. The second decoder 132 receives VREF1, VREF2, ..., VREFN transmitted by the bandgap reference voltage source and the voltage divider circuit, and receives a second control signal VREF_DN_SET. If VREF_DN_SET indicates that the circuit between the input pin corresponding to VREFN and the output pin corresponding to VREF_DN in the second decoder 132 is turned on, so that the second decoder 132 can output VREFN, VREFN is the second reference voltage selected by the second decoder 132.

[0057] In the embodiment of the present application, the second control signal can be determined based on the detection requirements or the performance of the circuit. For example, if the device or circuit connected to the voltage detection circuit cannot work properly when receiving a voltage lower than 50V, the second control signal should instruct the second decoder 132 to select a reference voltage greater than or equal to 50V and close to 50V as the second reference voltage. In this case, the second control signal can be determined based on this characteristic of the circuit.

[0058] If the types or compositions of devices and circuits operating based on the voltage to be detected are different, the first control signal and the second control signal may also be different, so that the first decoder 131 and the second decoder 132 can select the first reference voltage and the second reference voltage suitable for devices and circuits operating based on the voltage to be detected according to different first control signals and second control signals, so as to achieve more accurate voltage detection based on the first reference voltage and the second reference voltage.

[0059] After acquiring the voltage to be detected, the first reference voltage and the second reference voltage, the comparison module 11 can compare the voltage to be detected, the first reference voltage and the second reference voltage to obtain a comparison result. Optionally, the comparison result may include a first comparison result and a second comparison result, the first comparison result being a comparison result between the voltage to be detected and the first reference voltage, and the second comparison result being a comparison result between the voltage to be detected and the second reference voltage.

[0060] The first comparison result and the second comparison result may be generated by different devices in the comparison module 11. For example, see Figure 4 The comparison module 11 may include a first voltage comparator 111, a second voltage comparator 112 and a logic gate 113, and the logic gate 113 is connected to the first voltage comparator 111 and the second voltage comparator 112 respectively.

[0061] The first voltage comparator 111 can compare the voltage to be detected with the first reference voltage to obtain a first comparison result. The first comparison result can be a digital signal, and the digital signal can be, for example, a high level signal or a low level signal. The first comparison result is used to indicate the magnitude relationship between the voltage to be detected and the first reference voltage, and the content indicated by the first comparison result is related to the processing logic of the first voltage comparator 111.

[0062] For example, the processing logic of the first voltage comparator 111 can be: compare the voltage to be detected and the first reference voltage. If the voltage to be detected is less than the first reference voltage, the first comparison result output by the first voltage comparator 111 is a high-level signal; if the voltage to be detected is greater than or equal to the first reference voltage, the first comparison result output by the first voltage comparator 111 is a low-level signal.

[0063] In this case, if the first comparison result is a high level signal, the first comparison result indicates that the voltage to be detected is less than the first reference voltage, and if the first comparison result is a low level signal, the first comparison result indicates that the voltage to be detected is greater than or equal to the first reference voltage. After the first voltage comparator 111 generates the first comparison result, the first comparison result can be transmitted to the logic gate 113, so that the logic gate 113 generates a pre-judgment electrical signal according to the first comparison result.

[0064] Accordingly, the second voltage comparator 112 can compare the voltage to be detected with the second reference voltage to obtain a second comparison result. The second comparison result can also be a digital signal, and the second comparison result is used to indicate the magnitude relationship between the voltage to be detected and the second reference voltage. The content indicated by the second comparison result is related to the processing logic of the second voltage comparator 112.

[0065] For example, the processing logic of the second voltage comparator 112 can be: compare the voltage to be detected and the second reference voltage. If the voltage to be detected is greater than the second reference voltage, the second comparison result output by the second voltage comparator 112 is a high-level signal; if the voltage to be detected is less than or equal to the second reference voltage, the second comparison result output by the second voltage comparator 112 is a low-level signal.

[0066] In this case, if the second comparison result is a high level signal, the second comparison result indicates that the voltage to be detected is greater than the second reference voltage, and if the second comparison result is a low level signal, the second comparison result indicates that the signal to be detected is less than or equal to the second reference voltage. After the second voltage comparator 112 generates the second comparison result, it can transmit the second comparison result to the logic gate 113, so that the logic gate 113 generates a pre-judgment electrical signal according to the second comparison result.

[0067] The logic gate 113 obtains the first comparison result and the second comparison result by receiving the first comparison result transmitted by the first voltage comparator 111 and the second comparison result transmitted by the second voltage comparator 112. Then, the logic gate 113 can generate a pre-judgment electrical signal according to the first comparison result and the second comparison result.

[0068] The embodiment of the present application does not limit the type of the logic gate 113, and the logic gate 113 may be an AND gate, a NOT gate, an OR gate, an AND-OR gate, and a combination of one or more of an AND-NOT gate. The manner in which the logic gate 113 generates a pre-judgment electrical signal according to the first comparison result and the second comparison result is related to the type of the logic gate 113. For example, if the logic gate 113 is an AND gate, the logic gate 113 may perform AND processing on the first comparison result and the second comparison result to obtain a pre-judgment electrical signal.

[0069] The pre-judgment electrical signal generated by the logic gate 113 according to the first comparison result and the second comparison result may be a digital signal, and the pre-judgment electrical signal may indicate the magnitude relationship between the voltage to be detected, the first reference voltage, and the second reference voltage.

[0070] For example, if the logic gate 113 is an AND gate, when the pre-judgment electrical signal is a low-level signal, it means that at least one of the first comparison result and the second comparison result is a low-level signal. Since the first reference voltage is greater than the second reference voltage in the embodiment of the present application, the pre-judgment electrical signal being a low level can indicate that the voltage to be detected is greater than or equal to the first reference voltage or the voltage to be detected is less than or equal to the second reference voltage. If the pre-judgment electrical signal is a high-level signal, it means that both the first comparison result and the second comparison result are high-level signals, and the pre-judgment electrical signal indicates that the voltage to be detected is greater than the second reference voltage and the voltage to be detected is less than the first reference voltage.

[0071] After the comparison module 11 generates the pre-judgment electrical signal, it can transmit the pre-judgment electrical signal to the detection module 12, and then the detection module 12 can obtain the pre-judgment electrical signal. The detection module 12 determines the voltage detection result according to the content indicated by the obtained pre-judgment electrical signal and the duration of the pre-judgment electrical signal.

[0072] When the pre-judgment electrical signal indicates that the voltage to be detected is greater than the second reference voltage and less than the first reference voltage, the detection module 12 determines that the voltage to be detected is within the normal range. No matter how long the pre-judgment electrical signal lasts, the voltage detection result can be determined that the voltage to be detected is normal.

[0073] When the pre-judgment electrical signal indicates that the signal to be detected is greater than the first reference voltage or the voltage to be detected is less than the second reference voltage, the detection module 12 can start timing the duration of the pre-judgment electrical signal. Figure 4 The detection module 12 may include a timer 121, and the timer 121 may record the duration of the pre-judgment electrical signal when the pre-judgment electrical signal indicates that the voltage to be detected is greater than the second reference voltage and the voltage to be detected is less than the second reference voltage.

[0074] The embodiment of the present application does not limit the manner in which the timer 121 records the duration of the pre-determined electrical signal. For example, see Figure 4 The detection module 12 may further include an oscillator 122 , and the oscillator 122 is connected to the timer 121 .

[0075] The oscillator 122 can transmit a periodic signal to the timer 121. The periodic signal can also be called a clock (CLK) signal. After the oscillator 122 completes an oscillation at a specified frequency, it can transmit the periodic signal to the timer. Therefore, the timer 121 can receive the periodic signal transmitted by the oscillator 122, and determine the duration of the pre-determined electrical signal based on the periodic signal. The size of the periodic signal is not limited in the embodiments of the present application.

[0076] The timer 121 can start timing based on the periodic signal when the received pre-judgment electrical signal is an electrical signal indicating that the voltage to be detected is greater than the first reference voltage or the voltage to be detected is less than the second reference voltage, and stop timing and reset when the received pre-judgment electrical signal indicates that the voltage to be detected is less than or equal to the first reference voltage and greater than or equal to the second reference voltage. The number of periodic signals received by the timer between starting and stopping timing can reflect the duration of the pre-judgment electrical signal. For example, the oscillation period of the oscillator 122 is 10ms (milliseconds). If the timer 121 receives 10 periodic signals during the process of the pre-judgment electrical signal remaining unchanged, the duration of the pre-judgment electrical signal is 100ms.

[0077] The timer 121 can not only record the duration of the pre-judgment electric signal, but also determine the voltage detection result according to the duration and the duration threshold. Among them, the duration threshold can be statically configured, and can also be set by a duration threshold control signal. For example, the timer 121 can receive a duration threshold control signal, and set the duration threshold according to the duration indicated by the duration threshold control signal. The duration threshold can also be indicated by the relationship with the periodic signal, for example, the duration threshold is 20ms, then the duration threshold is the duration of the timer 121 receiving 2 periodic signals.

[0078] The pre-judgment electrical signal indicates that the voltage to be detected is greater than the first reference voltage or the voltage to be detected is lower than the second reference voltage, which means that the voltage to be detected is beyond the normal range. If the duration of the pre-judgment electrical signal is greater than or equal to the duration threshold, for example, during the duration of the pre-judgment electrical signal, the number of periodic signals received by the timer 121 reaches or exceeds the number indicated by the duration threshold, which means that the pre-judgment electrical signal is not obtained due to noise, then the timer 121 can determine that the voltage detection result is that the voltage to be detected is abnormal.

[0079] If the duration of the pre-judgment electrical signal is less than the duration threshold, it means that the pre-judgment electrical signal may be obtained due to noise, or the pre-judgment electrical signal has changed, and the voltage to be detected may have been converted into a normal signal. Then, the timer 121 can determine that the voltage detection result is that the voltage to be detected is normal, and reset the timing result of the timer 121.

[0080] In a possible implementation, a counter is deployed in the timer 121, so that it can be determined by countdown whether the duration exceeds the duration threshold. For example, the countdown duration of the timer 121 can be configured to be the duration of receiving 100 periodic signals, that is, the initial value of the counter is set to 100. When the pre-judgment electrical signal received by the timer 121 is an electrical signal indicating that the voltage to be detected is greater than the first reference voltage or the voltage to be detected is less than the second reference voltage, the timing starts, and the value of the counter is reduced by 1 each time the timer 121 receives a periodic signal.

[0081] If the pre-judgment electrical signal changes before the counter value decreases to 0, the timer 121 can generate a reset signal to reset the timing result of the timer 121, and the counter value is restored to 100. The timer 121 generates a reset signal, which means that the voltage detection result determined by the timer 121 indicates that the voltage to be detected is normal. If the pre-judgment electrical signal does not change before the counter value decreases to 0, the timer 121 generates a power-off signal, which means that the voltage detection result determined by the timer 121 indicates that the voltage to be detected is abnormal.

[0082] In an embodiment of the present application, when the voltage detection result is that the voltage to be detected is abnormal, the timer 121 can output a power-off signal so that the device or circuit working based on the voltage to be detected stops working based on the abnormal voltage to be detected, thereby protecting the circuit and each device.

[0083] Furthermore, in the embodiment of the present application, when the pre-judgment electrical signal indicates that the voltage to be detected is beyond the normal range, the power-off signal is not output immediately. Instead, the voltage detection result is determined to be that the voltage to be detected is abnormal and a power-off signal is output only when the duration of the pre-judgment electrical signal is greater than or equal to the duration threshold, thereby implementing voltage protection and avoiding false detection due to noise.

[0084] See also Figure 8 , shows a schematic diagram of a voltage detection circuit provided by an embodiment of the present application. Figure 8 An example and Fig. 9The effect diagram of the voltage detection circuit shown in the figure illustrates the principle of the voltage detection circuit. The first reference voltage VREF_UP obtained by the first voltage comparator 111 in the comparison module 11 is 1.2V, and the second reference voltage VREF_DN obtained by the second voltage comparator 112 is 1.0V. VREF_UP and VREF_DN are set based on VREF_UP_SET and VREF_DN_SET respectively. If the stabilized voltage is 2.0V~2.4V, the voltage to be detected VREG after voltage division by the resistor string including two resistors in the voltage divider connected to the regulator is 1.0V~1.2V, which is between the first reference voltage and the second reference voltage. The first comparison result output by the first voltage comparator 111 is a high-level signal, and the second comparison result output by the second voltage comparator 112 is a high-level signal. The pre-judgment electrical signal after the logic gate 113 performs an AND operation on the first comparison result and the second comparison result is a high-level signal, indicating that the voltage to be detected VREG is less than the first reference voltage VREF_UP, and the voltage to be detected VREG is greater than the second reference voltage VREF_DN, then the determined voltage detection result is that the voltage to be detected is normal.

[0085] If the voltage after stabilization is lower than 2.0V or higher than 2.4V, the voltage to be detected VREG after the voltage divider connected to the voltage regulator is lower than 1.0V or higher than 1.2V, and is not between the first reference voltage and the second reference voltage, then the first comparison result output by the first voltage comparator 111 is a low level signal, or the second comparison result output by the second voltage comparator 112 is a low level signal, then the pre-judgment electrical signal after the logic gate 113 performs an AND operation on the first comparison result and the second comparison result is a low level signal, indicating that the voltage to be detected VREG is greater than the first reference voltage VREF_UP, or the voltage to be detected VREG is less than the second reference voltage VREF_DN. The timer 121 in the detection module 12 receives the low level pre-judgment electrical signal and starts timing (time on). If the duration of the pre-judgment electrical signal is less than the duration threshold (the duration of the oscillator 122 transmitting 100 cycle signals) set based on the duration threshold control signal TIME_SRT, it is determined that the voltage to be detected is normal, and the timing of the timer 121 is reset.

[0086] If the duration of the pre-judgment electrical signal exceeds the duration threshold set based on the duration threshold control signal TIME_SRT, the voltage detection result is determined to be that the voltage to be detected is abnormal, and the timer 121 outputs a power-off signal to achieve abnormal detection.

[0087] Referring to Table 1 below, a comparison of voltage detection results determined by the voltage detection circuits provided in the related art and the embodiments of the present application according to different voltages to be detected is shown, and the reference range in Table 1 is 2.0V to 2.4V.

[0088] Table 1

[0089] Voltage to be detected Related technologies Embodiments of the present application 1.8V Abnormal voltage to be detected Abnormal voltage to be detected 1.9V Abnormal voltage to be detected Abnormal voltage to be detected 2.0V The voltage to be tested is normal The voltage to be tested is normal 2.1V The voltage to be tested is normal The voltage to be tested is normal 2.2V The voltage to be tested is normal The voltage to be tested is normal 2.3V The voltage to be tested is normal The voltage to be tested is normal 2.4V The voltage to be tested is normal The voltage to be tested is normal 2.5V The voltage to be tested is normal Abnormal voltage to be detected 2.6V The voltage to be tested is normal Abnormal voltage to be detected

[0090] Based on Table 1, it can be seen that the embodiment of the present application can not only detect the voltage to be detected that is lower than the normal value, but also detect the voltage to be detected that is higher than the normal value, thereby obtaining accurate and precise voltage detection results.

[0091] In an exemplary embodiment, a voltage detection method is also provided, which can be applied to the above-mentioned voltage detection circuit, see Fig.10 The method includes but is not limited to the following steps 1001-1002.

[0092] In step 1001, a voltage to be detected, a first reference voltage and a second reference voltage are obtained through a comparison module, the voltage to be detected is compared with the first reference voltage and the second reference voltage respectively, a pre-judgment electrical signal is generated according to the comparison result, and the pre-judgment electrical signal is transmitted to the detection module, and the first reference voltage is greater than the second reference voltage.

[0093] In one possible implementation, the comparison result includes a first comparison result and a second comparison result, and the comparison module includes a first voltage comparator, a second voltage comparator and a logic gate, and the logic gate is respectively connected to the first voltage comparator and the second voltage comparator; the voltage to be detected is respectively compared with the first reference voltage and the second reference voltage, and a pre-judgment electrical signal is generated according to the comparison result, including: comparing the voltage to be detected and the first reference voltage through the first voltage comparator to obtain a first comparison result, and transmitting the first comparison result to the logic gate; comparing the voltage to be detected and the second reference voltage through the second voltage comparator to obtain a second comparison result, and transmitting the second comparison result to the logic gate; obtaining the first comparison result and the second comparison result through the logic gate, and generating a pre-judgment electrical signal according to the first comparison result and the second comparison result.

[0094] Optionally, the circuit also includes a first decoder and a second decoder, and the first decoder and the second decoder are both connected to the comparison module; the method also includes: obtaining a first control signal and multiple reference voltages through the first decoder, and selecting a first reference voltage from multiple reference voltages according to the first control signal; obtaining a second control signal and multiple reference voltages through the second decoder, and selecting a second reference voltage from multiple reference voltages according to the second control signal.

[0095] In step 1002, a pre-judgment electrical signal is obtained through the detection module. When the pre-judgment electrical signal indicates that the voltage to be detected is greater than the first reference voltage or the voltage to be detected is less than the second reference voltage, the voltage detection result is determined according to the duration of the pre-judgment electrical signal.

[0096] Among them, when the pre-judgment electrical signal indicates that the voltage to be detected is greater than the first reference voltage or the voltage to be detected is less than the second reference voltage, after determining the voltage detection result according to the duration of the pre-judgment electrical signal, the method also includes: through the detection module, when the voltage detection result is that the voltage to be detected is abnormal, outputting a power-off signal, and the power-off signal is used to protect devices connected to the circuit.

[0097] Optionally, the detection module includes a timer; when the pre-judgment electrical signal indicates that the voltage to be detected is greater than the first reference voltage or the voltage to be detected is less than the second reference voltage, the voltage detection result is determined according to the duration of the pre-judgment electrical signal, including: determining through the timer that the voltage detection result is that the voltage to be detected is abnormal when the duration is greater than or equal to a duration threshold.

[0098] In one possible implementation, the detection module also includes an oscillator, which is connected to a timer; when the pre-judgment electrical signal indicates that the voltage to be detected is greater than the first reference voltage or the voltage to be detected is less than the second reference voltage, before determining the voltage detection result based on the duration of the pre-judgment electrical signal, it also includes: transmitting a periodic signal to the timer through the oscillator; determining the duration of the pre-judgment electrical signal through the timer based on the periodic signal.

[0099] The process and beneficial effects of the voltage detection method provided in the embodiment of the present application can be referred to the above-mentioned relevant description of the voltage detection circuit, which will not be repeated here.

[0100] In an exemplary embodiment, a chip is further provided, and the chip includes any possible voltage detection circuit described above.

[0101] In an exemplary embodiment, an electronic device is further provided. The electronic device includes any possible voltage detection circuit described above.

[0102] It should be noted that the terms "first", "second", etc. (if any) in the specification and claims of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0103] It should be noted that the device provided in the above embodiment only uses the division of the above functional modules as an example to implement its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and their specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0104] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions. For example, the signals and voltages involved in this application are obtained with full authorization.

[0105] It should be understood that the "plurality" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0106] The above description is only an exemplary embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A voltage detection circuit, characterized in that: The circuit comprises a comparison module and a detection module connected to each other; The comparison module is used to obtain a voltage to be detected, a first reference voltage and a second reference voltage, compare the voltage to be detected with the first reference voltage and the second reference voltage respectively, generate a pre-judgment electrical signal according to the comparison result, and transmit the pre-judgment electrical signal to the detection module, wherein the first reference voltage is greater than the second reference voltage; The detection module is used to obtain the pre-judgment electrical signal, and determine the voltage detection result according to the duration of the pre-judgment electrical signal when the pre-judgment electrical signal indicates that the voltage to be detected is greater than the first reference voltage or the voltage to be detected is less than the second reference voltage.

2. The circuit according to claim 1, characterized in that The detection module includes a timer; The timer is used to determine, when the duration is greater than or equal to a duration threshold, that the voltage detection result indicates that the voltage to be detected is abnormal.

3. The circuit according to claim 2, characterized in that The detection module further includes an oscillator, and the oscillator is connected to the timer; The oscillator is used to transmit a periodic signal to the timer; The timer is further used to determine the duration of the pre-determined electrical signal according to the periodic signal.

4. The circuit according to any one of claims 1 to 3, characterized in that: The comparison result includes a first comparison result and a second comparison result, and the comparison module includes a first voltage comparator, a second voltage comparator and a logic gate, and the logic gate is connected to the first voltage comparator and the second voltage comparator respectively; The first voltage comparator is used to compare the voltage to be detected with the first reference voltage to obtain the first comparison result, and transmit the first comparison result to the logic gate; The second voltage comparator is used to compare the voltage to be detected with the second reference voltage to obtain the second comparison result, and transmit the second comparison result to the logic gate; The logic gate is used to obtain the first comparison result and the second comparison result, and generate the pre-judgment electrical signal according to the first comparison result and the second comparison result.

5. The circuit according to any one of claims 1 to 4, characterized in that: The circuit further comprises a first decoder and a second decoder, wherein the first decoder and the second decoder are both connected to the comparison module; The first decoder is used to obtain a first control signal and a plurality of reference voltages, and select the first reference voltage from the plurality of reference voltages according to the first control signal; The second decoder is used to obtain a second control signal and the multiple reference voltages, and select the second reference voltage from the multiple reference voltages according to the second control signal.

6. A voltage detection method, characterized in that: The method is applied to a voltage detection circuit, the circuit comprising a comparison module and a detection module connected to each other, and the method comprises: Acquire a voltage to be detected, a first reference voltage, and a second reference voltage through the comparison module, compare the voltage to be detected, the first reference voltage, and the second reference voltage, generate a pre-judgment electrical signal according to the comparison result, transmit the pre-judgment electrical signal to the detection module, and the first reference voltage is greater than the second reference voltage; The pre-judgment electrical signal is acquired through the detection module. When the pre-judgment electrical signal indicates that the voltage to be detected is greater than the first reference voltage or the voltage to be detected is less than the second reference voltage, the voltage detection result is determined according to the duration of the pre-judgment electrical signal.

7. The method according to claim 6, characterized in that The detection module includes a timer and an oscillator, and the oscillator is connected to the timer; before determining the voltage detection result according to the duration of the pre-determined electrical signal, the method further includes: transmitting a periodic signal to the timer via the oscillator; The duration of the pre-determined electrical signal is determined by the timer according to the periodic signal.

8. The method according to claim 6 or 7, characterized in that: The comparison result includes a first comparison result and a second comparison result, and the comparison module includes a first voltage comparator, a second voltage comparator and a logic gate, and the logic gate is connected to the first voltage comparator and the second voltage comparator respectively; The step of comparing the voltage to be detected, the first reference voltage and the second reference voltage, and generating a pre-determination electrical signal according to the comparison result, comprises: Comparing the voltage to be detected with the first reference voltage by the first voltage comparator to obtain the first comparison result, and transmitting the first comparison result to the logic gate; Comparing the voltage to be detected with the second reference voltage by the second voltage comparator to obtain the second comparison result, and transmitting the second comparison result to the logic gate; The first comparison result and the second comparison result are obtained through the logic gate, and the pre-judgment electrical signal is generated according to the first comparison result and the second comparison result.

9. A chip, characterized in that: The chip includes the voltage detection circuit as described in any one of claims 1-5.

10. An electronic device, characterized in that: The electronic device comprises the voltage detection circuit as described in any one of claims 1-5.