[go: up one dir, main page]

CN118914639A - Voltage detection circuit, voltage detection method, chip and electronic equipment - Google Patents

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

Info

Publication number
CN118914639A
CN118914639A CN202411000562.6A CN202411000562A CN118914639A CN 118914639 A CN118914639 A CN 118914639A CN 202411000562 A CN202411000562 A CN 202411000562A CN 118914639 A CN118914639 A CN 118914639A
Authority
CN
China
Prior art keywords
voltage
detected
comparison result
reference voltage
electrical signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202411000562.6A
Other languages
Chinese (zh)
Inventor
李优滥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Eswin Computing Technology Co Ltd
Original Assignee
Beijing Eswin Computing 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 Beijing Eswin Computing Technology Co Ltd filed Critical Beijing Eswin Computing Technology Co Ltd
Priority to CN202411000562.6A priority Critical patent/CN118914639A/en
Publication of CN118914639A publication Critical patent/CN118914639A/en
Pending legal-status Critical Current

Links

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/0084Arrangements for measuring currents or voltages or for indicating presence or sign thereof measuring voltage only
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R1/00Details of instruments or arrangements of the types included in groups G01R5/00 - G01R13/00 and G01R31/00
    • G01R1/30Structural combination of electric measuring instruments with basic electronic circuits, e.g. with amplifier
    • 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
    • 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/16576Circuits 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 comparing DC or AC voltage with one threshold

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Measurement Of Current Or Voltage (AREA)

Abstract

本申请公开了电压检测电路、电压检测方法、芯片及电子设备,属于电子信息技术领域。电路包括互相连接的比较模块和检测模块;比较模块用于获取待检测电压、第一参考电压和第二参考电压,将待检测电压分别与第一参考电压和第二参考电压进行比较,根据比较结果生成预判断电信号,向检测模块传输预判断电信号;检测模块用于获取预判断电信号,在预判断电信号指示待检测电压大于第一参考电压或待检测电压小于第二参考电压的情况下,根据预判断电信号的持续时长,确定电压检测结果。本申请能够确定待检测电压是否过高或过低,并在待检测电压过高或过低的情况下,根据待检测电压过高或过低的时长确定出准确的电压检测结果。

The present application discloses a voltage detection circuit, a voltage detection method, a chip and an electronic device, and belongs to the field of electronic information technology. The circuit 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; 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, the voltage detection result is determined according to the duration of the pre-judgment electrical signal. The present application can determine whether the voltage to be detected is too high or too low, and when the voltage to be detected is too high or too low, an accurate voltage detection result can be determined according to the duration of the voltage to be detected being too high or too low.

Description

电压检测电路、电压检测方法、芯片及电子设备Voltage detection circuit, voltage detection method, chip and electronic device

技术领域Technical Field

本申请涉及电子信息技术领域,特别涉及一种电压检测电路、电压检测方法、芯片及电子设备。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

电压检测(voltage detect)电路是一种用于检测电路中电压大小的子电路,可以用于检测电路中是否存在大小超出一定范围的异常电压,保护电路中的其他子电路或器件不受异常电压的影响。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

本申请提供了一种电压检测电路、电压检测方法、芯片及电子设备,可用于实现准确的电压检测。技术方案如下: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:

一方面,本申请提供了一种电压检测电路,电路包括互相连接的比较模块和检测模块;比较模块,用于获取待检测电压、第一参考电压和第二参考电压,将待检测电压分别与第一参考电压和第二参考电压进行比较,根据比较结果生成预判断电信号,向检测模块传输预判断电信号,第一参考电压大于第二参考电压;检测模块,用于获取预判断电信号,在预判断电信号指示待检测电压大于第一参考电压或待检测电压小于第二参考电压的情况下,根据预判断电信号的持续时长,确定电压检测结果。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.

在一种可能的实现方式中,检测模块,还用于在电压检测结果为待检测电压异常的情况下,输出断电信号,断电信号用于保护与电路连接的器件。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.

在一种可能的实现方式中,检测模块包括定时器定时器(timer);定时器,用于在持续时长大于或等于时长阈值的情况下,确定电压检测结果为待检测电压异常。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.

在一种可能的实现方式中,检测模块还包括振荡器,振荡器与定时器连接;振荡器,用于向定时器传输周期信号;定时器,还用于根据周期信号确定预判断电信号的持续时长。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.

在一种可能的实现方式中,比较结果包括第一比较结果和第二比较结果,比较模块包括第一电压比较器、第二电压比较器和逻辑门,逻辑门分别与第一电压比较器和第二电压比较器连接;第一电压比较器,用于比较待检测电压和第一参考电压,得到第一比较结果,向逻辑门传输第一比较结果;第二电压比较器,用于比较待检测电压和第二参考电压,得到第二比较结果,向逻辑门传输第二比较结果;逻辑门,用于获取第一比较结果和第二比较结果,根据第一比较结果和第二比较结果,生成预判断电信号。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.

在一种可能的实现方式中,电路还包括第一解码器(decoder,DEC)和第二解码器,第一解码器和第二解码器均与比较模块连接;第一解码器,用于获取第一控制信号和多个参考电压,根据第一控制信号在多个参考电压中选择第一参考电压;第二解码器,用于获取第二控制信号和多个参考电压,根据第二控制信号在多个参考电压中选择第二参考电压。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.

另一方面,提供了一种电压检测方法,方法应用于电压检测电路,电路包括互相连接的比较模块和检测模块,方法包括:通过比较模块获取待检测电压、第一参考电压和第二参考电压,将待检测电压分别与第一参考电压和第二参考电压进行比较,根据比较结果生成预判断电信号,向检测模块传输预判断电信号,第一参考电压大于第二参考电压;通过检测模块获取预判断电信号,在预判断电信号指示待检测电压大于第一参考电压或待检测电压小于第二参考电压的情况下,根据预判断电信号的持续时长,确定电压检测结果。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.

在一种可能的实现方式中,在预判断电信号指示待检测电压大于第一参考电压或待检测电压小于第二参考电压的情况下,根据预判断电信号的持续时长,确定电压检测结果之后,还包括:通过检测模块在电压检测结果为待检测电压异常的情况下,输出断电信号,断电信号用于保护与电路连接的器件。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.

在一种可能的实现方式中,检测模块包括定时器;在预判断电信号指示待检测电压大于第一参考电压或待检测电压小于第二参考电压的情况下,根据预判断电信号的持续时长,确定电压检测结果,包括:通过定时器在持续时长大于或等于时长阈值的情况下,确定电压检测结果为待检测电压异常。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.

在一种可能的实现方式中,检测模块还包括振荡器,振荡器与定时器连接;在预判断电信号指示待检测电压大于第一参考电压或待检测电压小于第二参考电压的情况下,根据预判断电信号的持续时长,确定电压检测结果之前,还包括:通过振荡器向定时器传输周期信号;通过定时器根据周期信号确定预判断电信号的持续时长。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.

在一种可能的实现方式中,比较结果包括第一比较结果和第二比较结果,比较模块包括第一电压比较器、第二电压比较器和逻辑门,逻辑门分别与第一电压比较器和第二电压比较器连接;将待检测电压分别与第一参考电压和第二参考电压进行比较,根据比较结果生成预判断电信号,包括:通过第一电压比较器比较待检测电压和第一参考电压,得到第一比较结果,向逻辑门传输第一比较结果;通过第二电压比较器比较待检测电压和第二参考电压,得到第二比较结果,向逻辑门传输第二比较结果;通过逻辑门获取第一比较结果和第二比较结果,根据第一比较结果和第二比较结果,生成预判断电信号。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.

在一种可能的实现方式中,电路还包括第一解码器和第二解码器,第一解码器和第二解码器均与比较模块连接;方法还包括:第一解码器,用于获取第一控制信号和多个参考电压,根据第一控制信号在多个参考电压中选择第一参考电压;第二解码器,用于获取第二控制信号和多个参考电压,根据第二控制信号在多个参考电压中选择第二参考电压。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.

另一方面,提供了一种芯片,该芯片包括上述的任一种可能的电压检测电路。On the other hand, a chip is provided, which includes any possible voltage detection circuit as described above.

另一方面,提供了一种电子设备,该电子设备包括上述的任一种可能的电压检测电路。On the other hand, an electronic device is provided, which includes any possible voltage detection circuit as described above.

本申请提供的技术方案至少带来如下有益效果:The technical solution provided by this application brings at least the following beneficial effects:

将待检测电压与第二参考电压和第一参考电压进行比较,确定待检测电压是否过高或过低,并在待检测电压过高或过低的情况下,根据待检测电压过高或过低的持续时长,确定出更加准确的电压检测结果。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

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。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.

图1是相关技术提供的一种电压检测电路的示意图;FIG1 is a schematic diagram of a voltage detection circuit provided by the related art;

图2是本申请实施例提供的一种电压检测电路的示意图;FIG2 is a schematic diagram of a voltage detection circuit provided in an embodiment of the present application;

图3是本申请实施例提供的一种稳压器和分压器电路的示意图;FIG3 is a schematic diagram of a voltage regulator and a voltage divider circuit provided in an embodiment of the present application;

图4是本申请实施例提供的另一种电压检测电路的示意图;FIG4 is a schematic diagram of another voltage detection circuit provided in an embodiment of the present application;

图5是本申请实施例提供的一种带隙参考电压源和分压器电路的示意图;FIG5 is a schematic diagram of a bandgap reference voltage source and a voltage divider circuit provided in an embodiment of the present application;

图6是本申请实施例提供的一种第一解码器的示意图;FIG6 is a schematic diagram of a first decoder provided in an embodiment of the present application;

图7是本申请实施例提供的一种第二解码器的示意图;FIG7 is a schematic diagram of a second decoder provided in an embodiment of the present application;

图8是本申请实施例提供的又一种电压检测电路的示意图;FIG8 is a schematic diagram of another voltage detection circuit provided in an embodiment of the present application;

图9是本申请实施例提供的一种电压检测电路的效果示意图;FIG9 is a schematic diagram showing the effect of a voltage detection circuit provided in an embodiment of the present application;

图10是本申请实施例提供的一种电压检测方法的流程示意图。FIG. 10 is a flow chart of a voltage detection method provided in an embodiment of the present application.

具体实施方式DETAILED DESCRIPTION

为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。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 with reference to the accompanying drawings.

PMIC(Power Management Integrated Circuit,电源管理集成电路)从电池电源接收到电源电信号之后,对接收到的电源电信号进行管理和调整,并输出稳定的电压。稳压器是PMIC内部用于稳压的器件,稳压器通过接收PMIC供电并在PMIC内部产生和提供稳定的电压。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.

例如,在集成有PMIC和DDIC(Display Driver Integrated Circuit,显示驱动集成电路)的芯片中,PMIC可以向DDIC输出通过稳压器产生的稳定的电压,使得DDIC根据稳定的电压工作。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.

由于稳压器产生的电压是芯片中其他器件和电路工作的基础,且稳压器产生的电压的大小能够影响芯片中其他器件和电路的工作性能,因而需要对稳压器产生的电压进行检测,及时发现稳压器产生的电压的异常,避免其他器件和电路因为稳压器产生的电压不稳定或异常发生故障。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.

参见图1,示出了相关技术提供的一种电压检测电路。该电压检测电路通过比较器对稳压器产生的电压VREG(voltage-regulator)和较低的参考电压VREF_DN(voltage-reference-down)进行比较,实现对VREG的检测。当VREG小于VREF_DN,代表VREG已经低于正常水平,VREG异常,则输出断电信号(power off signal),以使得基于VREG工作的电路和器件停止基于异常的VREG工作,以保护基于VREG工作的电路和器件免受异常的VREG造成的损害。例如,DDIC在获取到断电信号后,执行显示关闭序列的操作,停止显示驱动。Referring to FIG. 1 , a voltage detection circuit provided by the related art is shown. 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 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.

然而相关技术提供的电压检测电路无法检测出过电压,过电压是指超出电路或器件能够承受的最大额定电压的水平的电压。因而在稳压器产生的电压过大时,电压检测电路无法及时响应并输出断电信号,使得基于稳压器产生的电压工作的器件和电路基于稳压器产生的过大的电信号工作,导致这些器件和电路损坏。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.

此外,相关技术提供的电压检测电路在检测到稳压器产生的电压低于正常水平时,立即输出断电信号,但是由于比较器在对电压进行比较的过程中,噪音会影响稳压器产生的电压或较低的参考电压的瞬时值,导致电压检测结果不准确,因而电压检测电路可能在稳压器产生的电压正常时错误地输出断电信号,影响基于稳压器产生的电压工作的器件和电路的正常运行。或者,电压检测电路也可能由于噪音的影响无法检测出稳压器产生的电压的异常,导致基于稳压器产生的电压工作的器件和电路基于异常电压工作,造成损坏。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.

本申请实施例提供了一种电压检测电路,电压检测电路也可以称为电压检测和保护电路(voltage detect and protect circuit),能够检测出过电压以及可能引起电路损坏的低电压,并且不会受到错误的瞬时值的影响,电压检测结果准确。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.

参见图2,示出了本申请实施例提供的一种电压检测电路的结构示意图。本申请实施例提供的电压检测电路包括互相连接的比较模块11和检测模块12。2 , which shows a schematic diagram of a voltage detection circuit according to an embodiment of the present application. The voltage detection circuit according to an embodiment of the present application comprises a comparison module 11 and a detection module 12 which are connected to each other.

其中,比较模块11用于获取待检测电压、第一参考电压和第二参考电压,第一参考电压大于第二参考电压。例如,第一参考电压是参考范围的上限电压,第二参考电压是参考范围的下限电压,参考范围即为能够使得基于待检测电压工作的电路和器件正常工作的电压范围。比较模块11还用于将待检测电压分别与第一参考电压和第二参考电压进行比较,根据比较结果生成预判断电信号,向检测模块12传输预判断电信号;检测模块12用于获取预判断电信号,在预判断电信号指示待检测电压大于第一参考电压或待检测电压小于第二参考电压的情况下,根据预判断电信号的持续时长,确定电压检测结果。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.

下面,对本申请实施例提供的电压检测电路进行电压检测的过程进行说明,以说明电压检测电路的组成以及原理。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.

比较模块11获取的待检测电压可以为电压检测电路前端输出的各类电压,本申请实施例暂以电压检测电路的前端为稳压器(regulator)为例,对获取待检测电压的过程进行说明。电压检测电路的前端为稳压器,则电压检测电路获取的待检测电压可以基于稳压器输出的电压产生。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.

参见图3,示出了一种稳压器和分压器电路的示意图。稳压器对接收到的输入信号进行稳压,稳压后的电压输入与稳压器连接的分压器。分压器包括电阻串,电阻串包括M个电阻(Resistance,R),M为大于等于2的整数。电阻串包括但不限于图3中示出的R21和R22。稳压后的电压输入电阻串,由电阻串中的M个电阻对稳压后的电压进行分压。Referring to FIG3 , a schematic diagram of a voltage regulator and a voltage divider circuit is shown. The voltage regulator stabilizes the received input signal, and the stabilized voltage is input into a 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 R21 and R22 shown in FIG3 . The stabilized voltage is input into the resistor string, and the stabilized voltage is divided by the M resistors in the resistor string.

本申请中的待检测电压可以是稳压后的电压经分压后的电压,例如图3中在R21和R22之间引出的VREG。在电阻串中的M个电阻的阻值相同,且待检测电压为接地的电阻的高电势端的电压的情况下,待检测电压的大小可以为稳压后的电压的1/M。The voltage to be detected in the present application may be a voltage after the voltage is stabilized and then divided, such as VREG drawn between R21 and R22 in FIG3. When the resistance values of the M resistors in the resistor string are the same and the voltage to be detected is the voltage of the high potential end of the resistor connected to the ground, the magnitude of the voltage to be detected may be 1/M of the voltage after the voltage is stabilized.

待检测电压传输至比较模块11,比较模块11通过接收前端输出的待检测电压,实现待检测电压的获取。此外,比较模块11还需要获取用于对待检测电压进行检测的第一参考电压和第二参考电压。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.

本申请实施例对于比较模块11获取第一参考电压和第二参考电压的方式不做限定,示例性地,比较模块11可以通过接收前端传输的第一参考电压和第二参考电压,实现第一参考电压和第二参考电压的获取。第一参考电压和第二参考电压的大小可以为默认设置的大小,也可以基于经验或电路需求设定。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.

可选地,参见图4示出的电压检测电路的示意图,电压检测电路还可以包括第一解码器131和第二解码器132,第一解码器131和第二解码器132均与比较模块11连接。第一解码器131可以获取第一控制信号和多个参考电压,并根据第一控制信号在多个参考电压中选择第一参考电压。Optionally, referring to the schematic diagram of the voltage detection circuit shown in FIG4 , the voltage detection circuit 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.

其中,多个参考电压可以由与第一解码器131连接的带隙参考(BandgapReference)电压源和分压器电路生成并传输。参见图5,示出了一种带隙参考电压源和分压器电路的示意图。带隙参考电压源生成带隙参考电压(Voltage-Bandgap Reference,VBGR),VBGR经由分压器中的多个电阻(例如图5中的R11、R12、…、R1N)分压,得到多个参考电压(Voltage-Reference,VREF)。多个参考电压例如为图5中的VREF1、VREF2、…、VREFN,多个参考电压的大小不同。Among them, multiple reference voltages can be generated and transmitted by a bandgap reference (BandgapReference) voltage source and a voltage divider circuit connected to the first decoder 131. Referring to FIG5, a schematic diagram of a bandgap reference voltage source and a voltage divider circuit is shown. The bandgap reference voltage source generates a bandgap reference voltage (Voltage-Bandgap Reference, VBGR), and VBGR is divided by multiple resistors in the voltage divider (for example, R11, R12, ..., R1N in FIG5) to obtain multiple reference voltages (Voltage-Reference, VREF). For example, the multiple reference voltages are VREF1, VREF2, ..., VREFN in FIG5, and the multiple reference voltages are different in size.

多个参考电压为第一解码器131的输入,用于第一解码器131从中选择第一参考电压。另外,第一解码器131的输入还包括第一控制信号,第一控制信号用于控制第一解码器131选择相应的第一参考电压。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.

多个参考电压通过第一解码器131上的不同的输入引脚传输至第一解码器131,因而第一解码器131根据第一控制信号确定输出的第一参考电压的原理为:通过第一控制信号确定与第一参考电压对应的输入引脚,使得该输入引脚与用于输出第一参考电压的输出引脚之间的电路导通,通过该输入引脚传输至第一解码器131的参考电压即可通过输出引脚向外输出,输出的信号即为第一解码器131在多个参考电压中选择的第一参考电压。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.

例如,第一解码器131接收到的多个参考电压的数量为10个,10个参考电压分别为参考电压1-参考电压10,参考电压1-参考电压10分别通过输入引脚1-输入引脚10输入第一解码器131,第一解码器131通过输出引脚11输出第一参考电压。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.

第一控制信号如果指示输入引脚7与输出引脚11之间的电路导通,第一解码器131基于第一控制信号控制第一解码器131中的各个电路之间的导通情况,使得输入引脚7与输出引脚11之间的电路导通,而输入引脚1-输入引脚6、输入引脚8-输入引脚10与输出引脚11之间的电路均不导通,因而通过输出引脚11输出的第一参考电压即为通过输入引脚7输入至第一解码器131的参考电压7,从而实现第一参考电压的选择。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.

参见图6,示出了本申请实施例提供的一种第一解码器131的示意图。第一解码器131接收带隙参考电压源和分压器电路传输的VREF1、VREF2、…、VREFN,并接收第一控制信号VREF_UP_SET。如果VREF_UP_SET指示第一解码器131中VREF2对应的输入引脚与VREF_UP对应的输出引脚之间的电路导通,使得第一解码器131能够输出VREF2,VREF2即为第一解码器131选择的第一参考电压。Referring to FIG. 6 , a schematic diagram of a first decoder 131 provided in an embodiment of the present application is shown. 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.

在本申请实施例中,第一控制信号可以基于检测需求或电路的性能确定。例如,如果基于待检测电压工作的器件或电路接收到超过100V(伏特)的电压时会发生损坏,则第一控制信号应该指示第一解码器131选择小于等于100V且接近100V的参考电压作为第一参考电压,在此种情况下,可以根据电路的这一特性确定第一控制信号。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.

相应的,第二解码器132可以获取第二控制信号和多个参考电压,并根据第二控制信号在多个参考信号中选择第二参考电压。相关过程可以参照第一解码器131获取多个参考电压和第一控制信号的过程,以及第一解码器131根据第一控制信号在多个参考电压中选择第一参考电压的过程,此处不再赘述。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.

参见图7,示出了本申请实施例提供的一种第二解码器132的示意图。第二解码器132接收带隙参考电压源和分压器电路传输的VREF1、VREF2、…、VREFN,并接收第二控制信号VREF_DN_SET。如果VREF_DN_SET指示第二解码器132中VREFN对应的输入引脚与VREF_DN对应的输出引脚之间的电路导通,使得第二解码器132能够输出VREFN,VREFN即为第二解码器132选择的第二参考电压。Referring to FIG. 7 , a schematic diagram of a second decoder 132 provided in an embodiment of the present application is shown. 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.

在本申请实施例中,第二控制信号可以基于检测需求或电路的性能确定。例如,如果与电压检测电路连接的器件或电路接收到低于50V的电压时无法正常工作,则第二控制信号应该指示第二解码器132选择大于等于50V且接近50V的参考电压作为第二参考电压,在此种情况下,可以根据电路的这一特性确定第二控制信号。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.

基于待检测电压工作的器件和电路的类型或组成不同,则第一控制信号和第二控制信号也可以不同,以使得第一解码器131和第二解码器132能够根据不同的第一控制信号和第二控制信号,选择适用于基于待检测电压工作的器件和电路的第一参考电压和第二参考电压,以根据该第一参考电压和第二参考电压,实现更加精准的电压检测。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.

比较模块11在获取到待检测电压、第一参考电压和第二参考电压之后,可以比较待检测电压、第一参考电压和第二参考电压,得到比较结果。可选地,比较结果可以包括第一比较结果和第二比较结果,第一比较结果为待检测电压与第一参考电压的比较结果,第二比较结果为待检测电压与第二参考电压的比较结果。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.

第一比较结果和第二比较结果可以分别由比较模块11中的不同器件生成。示例性地,参见图4,比较模块11可以包括第一电压比较器111、第二电压比较器112和逻辑门113,逻辑门113分别与第一电压比较器111和第二电压比较器112连接。The first comparison result and the second comparison result may be generated by different devices in the comparison module 11. For example, referring to Fig. 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.

其中,第一电压比较器111可以比较待检测电压和第一参考电压,得到第一比较结果。第一比较结果可以为数字信号,数字信号例如可以为高电平信号或低电平信号。第一比较结果用于指示待检测电压与第一参考电压的大小关系,第一比较结果指示的内容与第一电压比较器111的处理逻辑相关。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.

例如,第一电压比较器111的处理逻辑可以为:比较待检测电压和第一参考电压,如果待检测电压小于第一参考电压,则第一电压比较器111输出的第一比较结果为高电平信号;如果待检测电压大于等于第一参考电压,则第一电压比较器111输出的第一比较结果为低电平信号。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.

在此种情况下,如果第一比较结果为高电平信号,第一比较结果指示待检测电压小于第一参考电压,如果第一比较结果为低电平信号,则第一比较结果指示待检测电压大于或等于第一参考电压。第一电压比较器111生成第一比较结果之后,可以向逻辑门113传输第一比较结果,以用于逻辑门113根据第一比较结果生成预判断电信号。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.

相应的,第二电压比较器112可以比较待检测电压和第二参考电压,得到第二比较结果。第二比较结果也可以为数字信号,第二比较结果用于指示待检测电压与第二参考电压的大小关系,第二比较结果指示的内容与第二电压比较器112的处理逻辑相关。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.

例如,第二电压比较器112的处理逻辑可以为:比较待检测电压和第二参考电压,如果待检测电压大于第二参考电压,则第二电压比较器112输出的第二比较结果为高电平信号;如果待检测电压小于等于第二参考电压,则第二电压比较器112输出的第二比较结果为低电平信号。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.

在此种情况下,如果第二比较结果为高电平信号,则第二比较结果指示待检测电压大于第二参考电压,如果第二比较结果为低电平信号,则第二比较结果指示待检测信号小于或等于第二参考电压。第二电压比较器112生成第二比较结果之后,可以向逻辑门113传输第二比较结果,以用于逻辑门113根据第二比较结果生成预判断电信号。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.

逻辑门113通过接收第一电压比较器111传输的第一比较结果和第二电压比较器112传输的第二比较结果,实现第一比较结果和第二比较结果的获取。而后逻辑门113可以根据第一比较结果和第二比较结果,生成预判断电信号。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.

本申请实施例对于逻辑门113的类型不做限定,逻辑门113可以为与门、非门、或门、与或门以及与非门中的一种或多种组合,逻辑门113根据第一比较结果和第二比较结果生成预判断电信号的方式与逻辑门113的类型相关。比如,如果逻辑门113为一个与门,则逻辑门113可以对第一比较结果和第二比较结果进行与处理,得到预判断电信号。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.

逻辑门113根据第一比较结果和第二比较结果生成的预判断电信号可以为数字信号,预判断电信号能够指示待检测电压、第一参考电压和第二参考电压的大小关系。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.

例如,如果逻辑门113为与门,当预判断电信号为低电平信号,则代表第一比较结果和第二比较结果中存在至少一个比较结果为低电平信号。由于本申请实施例中第一参考电压大于第二参考电压,所以预判断电信号为低电平可以指示待检测电压大于等于第一参考电压或待检测电压小于等于第二参考电压。而如果预判断电信号为高电平信号,则代表第一比较结果和第二比较结果均为高电平信号,则预判断电信号指示待检测电压大于第二参考电压且待检测电压小于第一参考电压。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.

比较模块11生成预判断电信号之后,可以向检测模块12传输预判断电信号,而后检测模块12可以获取到预判断电信号。检测模块12根据获取到的预判断电信号所指示的内容以及预判断电信号的持续时长,确定电压检测结果。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.

在预判断电信号指示待检测电压大于第二参考电压且待检测电压小于第一参考电压的情况下,检测模块12确定待检测电压属于正常范围,则无论预判断电信号的持续时长为多长,均可以确定电压检测结果为待检测电压正常。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.

在预判断电信号指示待检测信号大于第一参考电压或待检测电压小于第二参考电压的情况下,检测模块12可以开启对预判断电信号的持续时长的计时。参见图4,检测模块12可以包括定时器121,定时器121可以在预判断电信号指示待检测电压大于第二参考电压且待检测电压小于第二参考电压的情况下,对预判断电信号的持续时长进行记录。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. Referring to FIG4 , the detection module 12 can include a timer 121, and the timer 121 can 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.

本申请实施例对于定时器121记录预判断电信号的持续时长的方式不做限定,示例性地,参见图4,检测模块12还可以包括振荡器122,振荡器122与定时器121连接。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. By way of example, referring to FIG. 4 , the detection module 12 may further include an oscillator 122 , which is connected to the timer 121 .

振荡器122可以向定时器121传输周期信号,周期信号也可以称为时钟(clock,CLK)信号,振荡器122按照指定频率完成一次的振荡之后,即可向定时器传输周期信号,因而定时器121可以接收振荡器122传输的周期信号,并根据周期信号确定预判断电信号的持续时长,周期信号的大小本申请实施例不做限定。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.

定时器121可以在接收到的预判断电信号为指示待检测电压大于第一参考电压或待检测电压小于第二参考电压的电信号时开始基于周期信号进行计时,并在接收到的预判断电信号为指示待检测电压小于等于第一参考电压且大于等于第二参考电压时停止计时,并复位。在开始计时和停止计时之间定时器接收到的周期信号的数量,即可反应预判断电信号的持续时长。例如,振荡器122的振荡周期为10ms(毫秒),如果在预判断电信号持续不变的过程中,定时器121接收到了10个周期信号,则预判断电信号的持续时长为100ms。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.

定时器121不仅可以记录预判断电信号的持续时长,还可以根据持续时长和时长阈值,确定电压检测结果。其中,时长阈值可以为静态配置的,也可以通过时长阈值控制信号进行设置。例如,定时器121可以接收时长阈值控制信号,并根据时长阈值控制信号指示的时长设置时长阈值。时长阈值也可以通过与周期信号的关系指示,比如,时长阈值为20ms,则时长阈值为定时器121接收到2个周期信号的时长。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.

预判断电信号指示待检测电压大于第一参考电压或待检测电压低于第二参考电压,代表待检测电压超出正常范围,且如果该预判断电信号的持续时长大于或等于时长阈值,例如在预判断电信号持续的时间内,定时器121接收到的周期信号的数量达到或超过时长阈值指示的数量,代表预判断电信号并不是由于噪音影响得到,则定时器121可以确定电压检测结果为待检测电压异常。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.

而如果该预判断电信号的持续时长小于时长阈值,代表预判断电信号可能是由于噪音影响得到,或者预判断电信号已经发生了改变,则待检测电压可能已经转变为正常信号,则定时器121可以确定电压检测结果为待检测电压正常,并对定时器121的计时结果进行复位。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.

在一种可能的实现方式中,定时器121内部署有计数器,因而可以通过倒计时的方式,判断持续时长是否超过时长阈值。例如,可以为定时器121配置倒计时的时长为接收到100个周期信号的时长,也即是将计数器的初始值设置为100。在定时器121接收到的预判断电信号为指示待检测电压大于第一参考电压或待检测电压小于第二参考电压的电信号时,开始计时,定时器121每接收到一个周期信号,计数器的值减1。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.

如果在计数器的值减小至0之前,预判断电信号发生了改变,则定时器121可以生成复位信号,对定时器121的计时结果进行复位,计数器的值恢复为100。定时器121生成复位信号,代表定时器121确定的电压检测结果指示待检测电压正常。而如果计数器的值减小至0之前,预判断电信号没有发生改变,则定时器121生成断电信号,代表定时器121确定的电压检测结果指示待检测电压异常。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.

在本申请实施例中,在电压检测结果为待检测电压异常的情况下,定时器121可以输出断电信号,以使得基于待检测电压工作的器件或电路停止基于异常的待检测电压工作,实现对电路与各个器件的保护。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.

并且,本申请实施例在预判断电信号指示待检测电压超出正常范围的情况下,并不立刻输出断电信号,而是在预判断电信号的持续时长大于或等于时长阈值的情况下,才会确定电压检测结果为待检测电压异常并输出断电信号,实现电压保护(voltageprotect),避免因噪音的影响导致的误检测。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.

参见图8,示出了本申请实施例提供的一种电压检测电路的示意图。下面结合图8的一个举例以及图9示出的电压检测电路的效果示意图,对该电压检测电路的原理进行说明。比较模块11中的第一电压比较器111获取到的第一参考电压VREF_UP为1.2V,第二电压比较器112获取到的第二参考电压VREF_DN为1.0V,VREF_UP和VREF_DN分别基于VREF_UP_SET和VREF_DN_SET设置。如果稳压后的电压为2.0V~2.4V,则经过稳压器连接的分压器中包括两个电阻的电阻串分压之后的待检测电压VREG为1.0V~1.2V,属于第一参考电压和第二参考电压之间,则第一电压比较器111输出的第一比较结果为高电平信号,第二电压比较器112输出的第二比较结果为高电平信号,则逻辑门113对第一比较结果和第二比较结果进行与运算之后的预判断电信号为高电平信号,指示待检测电压VREG小于第一参考电压VREF_UP,且待检测电压VREG大于第二参考电压VREF_DN,则确定的电压检测结果为待检测电压正常(normal)。Referring to FIG8 , a schematic diagram of a voltage detection circuit provided in an embodiment of the present application is shown. The principle of the voltage detection circuit is described below in conjunction with an example of FIG8 and an effect schematic diagram of the voltage detection circuit shown in FIG9 . 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, and 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.

而如果稳压后的电压低于2.0V或高于2.4V,则经过稳压器连接的分压器分压之后的待检测电压VREG低于1.0V或高于1.2V,不属于第一参考电压和第二参考电压之间,则第一电压比较器111输出的第一比较结果为低电平信号,或第二电压比较器112输出的第二比较结果为低电平信号,则逻辑门113对第一比较结果和第二比较结果进行与运算之后的预判断电信号为低电平信号,指示待检测电压VREG大于第一参考电压VREF_UP,或待检测电压VREG小于第二参考电压VREF_DN。检测模块12内的定时器121接收到低电平的预判断电信号,开启计时(time on)。如果该预判断电信号的持续时长小于基于时长阈值控制信号TIME_SRT设置的时长阈值(振荡器122传输100个周期信号的时长),则确定电压检测结果为待检测电压正常,计时器121的计时重置。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.

如果该预判断电信号的持续时长超出基于时长阈值控制信号TIME_SRT设置的时长阈值,则确定的电压检测结果为待检测电压异常(abnormal),定时器121输出断电信号,实现异常检测。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.

参见如下的表1,示出了相关技术和本申请实施例提供的电压检测电路根据不同的待检测电压确定的电压检测结果的对比,表1中参考范围为2.0V~2.4V。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.

表1Table 1

待检测电压Voltage to be detected 相关技术Related technologies 本申请实施例Embodiments of the present application 1.8V1.8V 待检测电压异常Abnormal voltage to be detected 待检测电压异常Abnormal voltage to be detected 1.9V1.9V 待检测电压异常Abnormal voltage to be detected 待检测电压异常Abnormal voltage to be detected 2.0V2.0V 待检测电压正常The voltage to be tested is normal 待检测电压正常The voltage to be tested is normal 2.1V2.1V 待检测电压正常The voltage to be tested is normal 待检测电压正常The voltage to be tested is normal 2.2V2.2V 待检测电压正常The voltage to be tested is normal 待检测电压正常The voltage to be tested is normal 2.3V2.3V 待检测电压正常The voltage to be tested is normal 待检测电压正常The voltage to be tested is normal 2.4V2.4V 待检测电压正常The voltage to be tested is normal 待检测电压正常The voltage to be tested is normal 2.5V2.5V 待检测电压正常The voltage to be tested is normal 待检测电压异常Abnormal voltage to be detected 2.6V2.6V 待检测电压正常The voltage to be tested is normal 待检测电压异常Abnormal voltage to be detected

基于表1可知,本申请实施例不仅能够检测出低于正常值的待检测电压,还能够检测出高于正常值的待检测电压,得到准确且精细的电压检测结果。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.

在示例性实施例中,还提供了一种电压检测方法,该方法能够应用于上述的电压检测电路,参见图10,该方法包括但不限于如下的步骤1001-步骤1002。In an exemplary embodiment, a voltage detection method is further provided. The method can be applied to the above-mentioned voltage detection circuit. Referring to FIG. 10 , the method includes but is not limited to the following steps 1001 to 1002 .

在步骤1001中,通过比较模块获取待检测电压、第一参考电压和第二参考电压,将待检测电压分别与第一参考电压和第二参考电压进行比较,根据比较结果生成预判断电信号,向检测模块传输预判断电信号,第一参考电压大于第二参考电压。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.

在一种可能的实现方式中,比较结果包括第一比较结果和第二比较结果,比较模块包括第一电压比较器、第二电压比较器和逻辑门,逻辑门分别与第一电压比较器和第二电压比较器连接;将待检测电压分别与第一参考电压和第二参考电压进行比较,根据比较结果生成预判断电信号,包括:通过第一电压比较器比较待检测电压和第一参考电压,得到第一比较结果,向逻辑门传输第一比较结果;通过第二电压比较器比较待检测电压和第二参考电压,得到第二比较结果,向逻辑传输第二比较结果;通过逻辑门获取第一比较结果和第二比较结果,根据第一比较结果和第二比较结果,生成预判断电信号。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.

可选地,电路还包括第一解码器和第二解码器,第一解码器和第二解码器均与比较模块连接;方法还包括:通过第一解码器获取第一控制信号和多个参考电压,根据第一控制信号在多个参考电压中选择第一参考电压;通过第二解码器获取第二控制信号和多个参考电压,根据第二控制信号在多个参考电压中选择第二参考电压。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.

在步骤1002中,通过检测模块获取预判断电信号,在预判断电信号指示待检测电压大于第一参考电压或待检测电压小于第二参考电压的情况下,根据预判断电信号的持续时长,确定电压检测结果。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.

其中,在预判断电信号指示待检测电压大于第一参考电压或待检测电压小于第二参考电压的情况下,根据预判断电信号的持续时长,确定电压检测结果之后,方法还包括:通过检测模块在电压检测结果为待检测电压异常的情况下,输出断电信号,断电信号用于保护与电路连接的器件。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.

可选地,检测模块包括定时器;在预判断电信号指示待检测电压大于第一参考电压或待检测电压小于第二参考电压的情况下,根据预判断电信号的持续时长,确定电压检测结果,包括:通过定时器在持续时长大于或等于时长阈值的情况下,确定电压检测结果为待检测电压异常。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.

在一种可能的实现方式中,检测模块还包括振荡器,振荡器与定时器连接;在预判断电信号指示待检测电压大于第一参考电压或待检测电压小于第二参考电压的情况下,根据预判断电信号的持续时长,确定电压检测结果之前,还包括:通过振荡器向定时器传输周期信号;通过定时器根据周期信号确定预判断电信号的持续时长。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.

本申请实施例提供的电压检测方法的过程以及有益效果可以参照上述对电压检测电路的相关说明,此处不再赘述。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.

在示例性实施例中,还提供了一种芯片,芯片包括上述的任意一种可能的电压检测电路。In an exemplary embodiment, a chip is further provided, and the chip includes any possible voltage detection circuit described above.

在示例性实施例中,还提供了一种电子设备,电子设备包括上述的任意一种可能的电压检测电路。In an exemplary embodiment, an electronic device is further provided. The electronic device includes any possible voltage detection circuit described above.

需要说明的是,本申请的说明书和权利要求书中的术语“第一”、“第二”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。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.

需要说明的是,上述实施例提供的装置在实现其功能时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的装置与方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。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.

需要说明的是,本申请所涉及的信息(包括但不限于用户设备信息、用户个人信息等)、数据(包括但不限于用于分析的数据、存储的数据、展示的数据等)以及信号,均为经用户授权或者经过各方充分授权的,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。例如,本申请中涉及到的信号和电压都是在充分授权的情况下获取的。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.

应当理解的是,在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。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.

以上所述仅为本申请的示例性实施例,并不用以限制本申请,凡在本申请的原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。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 (10)

1.一种电压检测电路,其特征在于,所述电路包括互相连接的比较模块和检测模块;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.根据权利要求1所述的电路,其特征在于,所述检测模块包括定时器;2. The circuit according to claim 1, characterized in that the detection module comprises 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.根据权利要求2所述的电路,其特征在于,所述检测模块还包括振荡器,所述振荡器与所述定时器连接;3. The circuit according to claim 2, characterized in that the detection module further comprises 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.根据权利要求1-3任一所述的电路,其特征在于,所述比较结果包括第一比较结果和第二比较结果,所述比较模块包括第一电压比较器、第二电压比较器和逻辑门,所述逻辑门分别与所述第一电压比较器和第二电压比较器连接;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, 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.根据权利要求1-4任一所述的电路,其特征在于,所述电路还包括第一解码器和第二解码器,所述第一解码器和所述第二解码器均与所述比较模块连接;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.一种电压检测方法,其特征在于,所述方法应用于电压检测电路,所述电路包括互相连接的比较模块和检测模块,所述方法包括: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 the voltage to be detected, the first reference voltage and the 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.根据权利要求6所述的方法,其特征在于,所述检测模块包括定时器和振荡器,所述振荡器与所述定时器连接;所述根据所述预判断电信号的持续时长,确定电压检测结果之前,还包括:7. The method according to claim 6, characterized in that the detection module comprises 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 comprises: 通过所述振荡器向所述定时器传输周期信号;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.根据权利要求6或7所述的方法,其特征在于,所述比较结果包括第一比较结果和第二比较结果,所述比较模块包括第一电压比较器、第二电压比较器和逻辑门,所述逻辑门分别与所述第一电压比较器和第二电压比较器连接;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, 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.一种芯片,其特征在于,所述芯片包括如权利要求1-5任一所述的电压检测电路。9. A chip, characterized in that the chip comprises the voltage detection circuit according to any one of claims 1-5. 10.一种电子设备,其特征在于,所述电子设备包括如权利要求1-5任一所述的电压检测电路。10. An electronic device, characterized in that the electronic device comprises the voltage detection circuit according to any one of claims 1 to 5.
CN202411000562.6A 2024-07-24 2024-07-24 Voltage detection circuit, voltage detection method, chip and electronic equipment Pending CN118914639A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411000562.6A CN118914639A (en) 2024-07-24 2024-07-24 Voltage detection circuit, voltage detection method, chip and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411000562.6A CN118914639A (en) 2024-07-24 2024-07-24 Voltage detection circuit, voltage detection method, chip and electronic equipment

Publications (1)

Publication Number Publication Date
CN118914639A true CN118914639A (en) 2024-11-08

Family

ID=93297150

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411000562.6A Pending CN118914639A (en) 2024-07-24 2024-07-24 Voltage detection circuit, voltage detection method, chip and electronic equipment

Country Status (1)

Country Link
CN (1) CN118914639A (en)

Similar Documents

Publication Publication Date Title
US7639052B2 (en) Power-on-reset circuitry
JP5948447B2 (en) Method and apparatus for supply voltage glitch detection in monolithic integrated circuit devices
US9941875B2 (en) Testing of power on reset (POR) and unmaskable voltage monitors
US20140354334A1 (en) Circuit and method of adjusting system clock in low voltage detection, and low voltage reset circuit
US8054125B2 (en) Charge pump with low power, high voltage protection circuitry
US7420791B1 (en) Fault signature system for power management integrated circuits
US7741870B2 (en) Multi-function input terminal
US8228099B2 (en) System for detecting a reset condition in an electronic circuit
US8184488B2 (en) Systems and methods for controlling integrated circuit operation with below ground pin voltage
CN107210296A (en) Self-inductance measurement reverse-current protection is switched
US8330505B2 (en) Protection circuit for driving capacitive loads
CN108693906B (en) Voltage regulator
CN217469914U (en) Power-on reset circuit
CN118914639A (en) Voltage detection circuit, voltage detection method, chip and electronic equipment
US7394729B2 (en) Time constant based fixed parameter assignment
CN105629028B (en) Detect supply voltage surging method and circuit of single-chip integrated device
JP2830799B2 (en) Semiconductor integrated circuit device
TWI852490B (en) LED control chip, method and multi-channel backlight system
TWI900198B (en) Attack detection circuit and attack detection method
US11641160B1 (en) Power providing circuit and power providing method thereof
CN111090054B (en) Detection circuit and detection method for confirming MCU working power supply voltage
TWI664785B (en) Protection circuit applied to electronic device and associated protection method
US11892521B2 (en) Semiconductor device with contact check circuitry
CN110704347B (en) Protection circuit for electronic device and related protection method
TW202427218A (en) Pull-up voltage detection circuit and pull-up rail voltage selection method

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