Voltage peak detection circuit and electronic equipment
By designing a voltage peak detection circuit, using comparator and controllable switch to control the charging and discharging of energy storage components, the peak voltage is accurately detected, and the problem of large power consumption and poor accuracy of customized modules in the prior art is solved. It is suitable for First wave detection in ultrasonic measurement.
Patent Information
- Application Number
- CN202210393463.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-15
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2042-04-15
AI Technical Summary
In the existing first wave detection method, the customized module consumes a large power and has poor detection accuracy, making it difficult to accurately detect peak voltages.
Design a voltage peak detection circuit, including a power supply unit, a controllable switch, an energy storage element and a comparator, control the opening and closing of the controllable switch through the comparator output enable signal, realize the charging and discharging of the energy storage element, and use the first The voltage changes with the voltage to be measured and the voltage peak is recorded.
It realizes accurate detection of voltage peaks, reduces power consumption, improves detection accuracy, and is suitable for first-wave detection in ultrasonic measurement.
Smart Images

Figure CN115032441B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to electronic circuit technology, and in particular to a voltage peak detection circuit and electronic equipment. Background Art
[0002] With the development of science and technology, ultrasonic detection technology is more and more widely used in daily life. Ultrasonic detection technology is based on the transmission and reception of ultrasonic signals, which are converted from electrical signals on transducers. Among them, an important part is the first wave detection of the transducer. For example, according to the detected first wave, the parameters of the transducer can be adjusted, for example, the reference level can be converted to the zero-crossing voltage.
[0003] An existing first wave detection method is an analog detection method, which specifically includes: measuring the voltage amplitude through a customized module to obtain the peak voltage, and then converting the peak voltage into a digital quantity through an analog-to-digital converter to adjust the reference level.
[0004] However, the customized module in the above solution consumes a large amount of power and has poor detection accuracy, so how to achieve accurate peak detection becomes an urgent problem to be solved. Summary of the invention
[0005] The present application provides a voltage peak detection circuit and an electronic device for accurately detecting a voltage peak.
[0006] In a first aspect, the present application provides a voltage peak detection circuit, comprising: a power supply unit, a first controllable switch, an energy storage element, a comparator and an output unit; the output end of the power supply unit is connected to the first end of the first controllable switch, the second end of the first controllable switch is connected to the first end of the energy storage element, and the second end of the energy storage element is grounded; the first input end of the comparator receives a voltage to be measured, the second input end of the comparator is connected to the first end of the energy storage element, and the output end of the comparator is connected to the third end of the first controllable switch; the output unit is connected to the first end of the energy storage element, and is used to output a first voltage at the first end of the energy storage element; wherein the third end of the first controllable switch is a control end; when the first controllable switch is closed, the power supply unit charges the energy storage element, and the first voltage changes with the voltage to be measured; when the current voltage to be measured is not less than the first voltage, the comparator outputs an enable signal of a first state, which is used to control the first controllable switch to close; when the current voltage to be measured is less than the first voltage, the comparator outputs an enable signal of a second state, which is used to control the first controllable switch to be disconnected; when the first controllable switch is disconnected, the energy storage element stops charging, and the first voltage remains unchanged.
[0007] Furthermore, the voltage peak detection circuit also includes: a second controllable switch; the first end of the second controllable switch is connected to the second input end of the comparator, the second end of the second controllable switch is connected to the first end of the energy storage element, and the third end of the second controllable switch is used to close or open according to different states of the sampling clock signal; the sampling clock signal is used to control the second controllable switch to close during the detection period and to open at the end of the detection period; wherein the third end of the second controllable switch is a control end.
[0008] Furthermore, the power supply unit includes a current source circuit; and the energy storage element is a capacitor.
[0009] Further, the current source circuit includes: a first transistor, a second transistor and a resistor; the first end of the first transistor is connected to the first end of the second transistor, the second end of the first transistor and the second end of the second transistor are commonly connected to VDD, the third end of the first transistor is connected to one end of the resistor and the first end of the first transistor, the other end of the resistor is grounded, and the third end of the second transistor is connected to the first end of the first controllable switch; wherein the first end of the first transistor and the first end of the second transistor are both control ends.
[0010] Further, the first transistor includes a first MOS tube, and the second transistor includes a second MOS tube; the gate of the first MOS tube is connected to the gate of the second MOS tube, the source of the first MOS tube and the source of the second MOS tube are commonly connected to VDD, the drain of the first MOS tube is connected to one end of the resistor and the gate of the first MOS tube, the other end of the resistor is grounded, and the drain of the second MOS tube is connected to the first end of the first controllable switch.
[0011] Furthermore, the first transistor further includes a first triode, and the second transistor further includes a second triode;
[0012] The base of the first transistor is connected to the base of the second transistor, the emitter of the first transistor and the emitter of the second transistor are commonly connected to VDD, the collector of the first transistor is connected to one end of the resistor and the base of the first transistor, the other end of the resistor is grounded, and the collector of the second transistor is connected to the first end of the first controllable switch.
[0013] Furthermore, the current source circuit also includes: a third controllable switch; the resistor is connected in series with the third controllable switch and is grounded through the third controllable switch; the third controllable switch is used to close or open according to different states of the first start signal, and the first start signal is used to control the third controllable switch to close when the voltage peak detection circuit is working and to open when the voltage peak detection circuit stops working.
[0014] Furthermore, the current source circuit also includes: a third transistor; the third end of the third transistor is connected to the second end of the first transistor, and the second end of the third transistor is connected to the third end of the first transistor; the first end of the third transistor receives the first start signal, and is used to close or open according to different states of the first start signal, and the first start signal is used to control the third transistor to be turned off when the voltage peak detection circuit is working and to be turned on when the voltage peak detection circuit stops working; wherein the first end of the third transistor is the control end.
[0015] Further, the third transistor includes a third MOS tube; the drain of the third MOS tube is connected to the second end of the first transistor, and the source of the third MOS tube is connected to the third end of the first transistor; the gate of the third MOS tube receives the first start signal, and is used to close or open according to different states of the first start signal, and the first start signal is used to control the third MOS tube to be turned off when the voltage peak detection circuit is working and to be turned on when the voltage peak detection circuit stops working.
[0016] Further, the third transistor further includes a third triode; the collector of the third triode is connected to the second end of the first transistor, and the emitter of the third triode is connected to the third end of the first transistor;
[0017] The base of the third transistor receives the first start signal and is used to close or open according to different states of the first start signal. The first start signal is used to control the third transistor to be turned off when the voltage peak detection circuit is working and to be turned on when the voltage peak detection circuit stops working.
[0018] Furthermore, the voltage peak detection circuit also includes: a first controllable element; one end of the first controllable element is connected to the first end of the energy storage element, and the other end of the first controllable element is grounded; the control end of the first controllable element receives a second start signal, which is used to close or open according to different states of the second start signal, and the second start signal is used to control the first controllable element to be turned off when the voltage peak detection circuit is working and to be turned on when the voltage peak detection circuit stops working.
[0019] Furthermore, the voltage peak detection circuit also includes: a second controllable element; one end of the second controllable element is connected to the output end of the comparator, and the other end of the second controllable element is grounded; the control end of the second controllable element receives a third start signal, which is used to close or open according to different states of the third start signal, and the third start signal is used to control the second controllable element to be turned off when the voltage peak detection circuit is working and to be turned on when the voltage peak detection circuit stops working.
[0020] Furthermore, the voltage peak detection circuit also includes: a shaping circuit; the output end of the comparator is connected to the control end of the first controllable switch through the shaping circuit; the shaping circuit is used to shape the enable signal output by the comparator and transmit the shaped enable signal to the control end of the first controllable switch.
[0021] Furthermore, the shaping circuit includes: a series structure composed of an even number of inverters connected in series, the input end of the series structure is connected to the output end of the comparator, and the output end of the series structure is connected to the control end of the first controllable switch.
[0022] In a second aspect, the present application provides an electronic device, comprising a voltage peak detection circuit as described in any one of the first aspect.
[0023] In the voltage peak detection circuit provided by the present application, the comparator outputs an enable signal of different states according to the comparison result between the current measured signal and the first voltage. When the measured voltage is not less than the first voltage, the first controllable switch is controlled to be closed, at which time the energy storage element is charged, and the first voltage changes with the measured voltage; when the measured voltage is less than the first voltage, the first controllable switch is controlled to be disconnected, at which time the energy storage element stops charging, so the first voltage remains unchanged. The scheme of the present application utilizes that when the first voltage changes with the measured voltage, the first voltage at the current moment can characterize the law of the measured voltage at the previous moment. Therefore, if the measured voltage is less than the first voltage, it means that the first voltage has reached the peak value and will begin to decrease subsequently. Therefore, the current first voltage is the peak voltage. At this time, the peak voltage is recorded by controlling the first controllable switch to be disconnected, thereby realizing accurate detection of the peak voltage. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0025] Figure 1 A schematic diagram of the structure of a voltage peak detection circuit provided in Embodiment 1 of the present application;
[0026] Figure 2 is a schematic diagram of a voltage waveform;
[0027] Figure 3a A schematic diagram of the structure of a voltage peak detection circuit provided in Embodiment 2 of the present application;
[0028] Figure 3b This is an example diagram of a working sequence in an embodiment of the present application;
[0029] Figure 4a A schematic diagram of the structure of a voltage peak detection circuit provided in Embodiment 3 of the present application;
[0030] Figure 4b A structural schematic diagram of a current source circuit;
[0031] Figure 5 A schematic diagram of the structure of a voltage peak detection circuit provided in Embodiment 4 of the present application;
[0032] Figure 6 A schematic diagram of the structure of a voltage peak detection circuit provided in Embodiment 5 of the present application;
[0033] Figure 7 This is a schematic diagram of the structure of the voltage peak detection circuit provided in Example 6 of the present application.
[0034] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0035] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0036] The terms "first", "second", "third", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so that the implementation of the application described herein, for example, can be implemented in an order other than those illustrated or described herein.
[0037] With the advancement of science and technology, ultrasonic measurement technology is also constantly developing and improving. Ultrasonic measurement is based on the conversion of electrical signals into ultrasonic signals on the transducer for transmission and reception, so the transducer model is an important part of the ultrasonic measurement environment.
[0038] According to the bandwidth requirements, transducers are divided into two categories: broadband transducers and narrowband transducers: narrowband transducers are characterized by a long waveform recovery time, and the output waveform takes a long time to slowly increase to a stable full swing. Therefore, narrowband transducers have time requirements for wave transmission, that is, the emission of ultrasonic waves, and also require a long delay for wave reception, that is, the reception of ultrasonic waves, that is, it is necessary to wait for the amplitude to reach a certain amplitude before receiving; broadband transducers are characterized by a short waveform recovery time, for example, it generally only takes a few cycles to recover to the full swing. In the above scenario, one of the important links is the first wave detection of the transducer. For example, based on the detected first wave, the parameters of the transducer can be adjusted, for example, the reference level is converted to the zero-crossing voltage. Usually, the waveform amplitude of the first wave gradually increases from small to large to the full swing. When the amplitude, that is, the peak voltage exceeds the preset first wave amplitude position voltage, it indicates that the first wave is detected, so the first wave detection needs to realize the detection of the peak voltage.
[0039] There are two main methods for first wave detection at present: one is the digital detection method, which requires multiple cycle sampling, and the noise introduced by the digital module is large, which will affect the detection accuracy. The other is the analog detection method, that is, the voltage amplitude is measured through a customized module, and then the analog peak voltage is converted into a digital quantity through the ADC. This solution does not require additional setting of the number of long cycles for detection, but the customized module consumes a large amount of power and the detection accuracy is poor.
[0040] The voltage peak detection circuit and electronic device provided in this application are intended to solve the above technical problems in the prior art.
[0041] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0042] Embodiment 1
[0043] Figure 1 This is a schematic diagram of the structure of the voltage peak detection circuit provided in the first embodiment of the present application, such as Figure 1 As shown, the voltage peak detection circuit provided in this embodiment is used to realize accurate voltage peak detection. Accordingly, the voltage peak detection circuit includes: a power supply unit 11, a first controllable switch 12, an energy storage element 13, a comparator 14 and an output unit 15;
[0044] The output end of the power supply unit 11 is connected to the first end of the first controllable switch 12, the second end of the first controllable switch 12 is connected to the first end of the energy storage element 13, and the second end of the energy storage element 13 is grounded (VSS); the first input end of the comparator 14 receives the voltage to be measured, the second input end of the comparator 14 is connected to the first end of the energy storage element 13, and the output end of the comparator 14 is connected to the third end of the first controllable switch 12, that is, the control end; the output unit 15 is connected to the first end of the energy storage element 13, and is used to output the first voltage at the first end of the energy storage element 13;
[0045] When the first controllable switch 12 is closed, the power supply unit 11 charges the energy storage element 13, and the first voltage changes with the voltage to be measured; when the current voltage to be measured is greater than the first voltage, the comparator 14 outputs an enable signal of the first state, which is used to control the first controllable switch 12 to be closed; when the current voltage to be measured is not greater than the first voltage, the comparator 14 outputs an enable signal of the second state, which is used to control the first controllable switch 12 to be disconnected; when the first controllable switch 12 is disconnected, the energy storage element 13 stops charging, and the first voltage remains unchanged.
[0046] Among them, the power supply unit 11 is used to provide an electrical signal for charging the energy storage element, and there are many specific circuit implementation structures, which are not limited in this embodiment. The comparator 14 is used to output enable signals (EN) of different states according to different comparison results of the signals at the two input terminals, such as the signal at the first input terminal is greater than the signal at the second input terminal, or the signal at the second input terminal is greater than the signal at the first input terminal. The different states here are used to distinguish to achieve the closing or opening control of the first controllable switch 12. In one example, the enable signal output by the comparator 14 is a digital signal, including two different states of high level state and low level state, such as commonly referred to as "0" or "1". This embodiment also does not limit the specific circuit structure of the comparator. Because the comparator has the characteristics of high gain, even if the voltage difference between the voltage to be measured and the first voltage is very small, it can be quickly identified and compared, thereby achieving fast and accurate voltage peak detection.
[0047] The first controllable switch 12 supports controllable closing or opening, and its specific implementation structure may include but is not limited to: MOS tube, thyristor. The energy storage element 13 supports electric energy storage and retention, and its specific implementation structure may be a rechargeable element.
[0048] It should be noted that the circuit structure shown in the figure is only an example of this embodiment. Figure 2 The voltage waveform diagram shown in the figure is used as an example. In the figure, the solid line is the voltage to be measured, and the dotted line is the following voltage that follows the change of the voltage to be measured. The output unit 15 outputs the voltage value of the following voltage (i.e., the first voltage). The first controllable switch 12 is not considered here, that is, it is assumed that the first controllable switch 12 remains closed. Figure 2 For example, Δt is the time interval between the voltage to be measured and the following voltage. Time t1 is the current time, t0 is the time before time t1 and the time interval Δt is different from time t1, Vf0 is the following voltage at time t0, Vf1 is the following voltage at time t1, VIN0 is the voltage to be measured at time t0, and VIN1 is the voltage to be measured at time t1. Figure 2 As shown, before the voltage to be measured reaches its peak value, for example, at time t0, the voltage to be measured VIN0 is greater than the following voltage Vf0; when the voltage to be measured reaches its peak value, after a following time interval Δt, that is, at time t1, the following voltage reaches the voltage peak value of the voltage to be measured, and at this time, the voltage to be measured VIN1 is less than the following voltage Vf1. Therefore, under the premise that the first voltage follows the change of the voltage to be measured, when the voltage to be measured is less than the first voltage, the following voltage is close to reaching the peak value. The interval Δt between adjacent moments is determined based on the speed of voltage following. It can be understood that the smaller the time interval Δt, the more accurate the voltage peak detection result. In this solution, the high gain characteristics of the comparator are utilized, and the following voltage can quickly and timely follow the change of the voltage to be measured, thereby ensuring the accuracy of the voltage peak detection.
[0049] Combined with the circuit structure, an example is given: assuming that the peak voltage of the voltage to be measured needs to be detected, the voltage peak detection circuit is started, and the voltage to be measured VIN is transmitted to the first input terminal of the comparator 14; initially, since the energy storage element 13 has not been charged, the first voltage at its first terminal is zero, so the current voltage to be measured is greater than the first voltage, and the comparator 14 outputs an enable signal of the first state to control the first controllable switch 12 to close. Accordingly, the charging circuit of the energy storage element 13 is turned on, and the power supply unit 11 provides an electrical signal to charge the energy storage element 13, so that the first voltage rises, and since the comparator 14 has a high gain, the first voltage changes with the voltage to be measured (for example Figure 2 until the comparator 14 detects that the first voltage is greater than the voltage to be measured, indicating that the first voltage has reached a peak value, the comparator 14 outputs an enable signal of the second state to control the first controllable switch 12 to be disconnected. The charging circuit is disconnected, and the first voltage at the first end of the energy storage element 13 maintains the current voltage value, that is, the peak voltage representing the voltage to be measured, thereby realizing the detection of the peak voltage.
[0050] In practical applications, there may be multiple peak voltages in the voltage to be measured during the detection cycle. This solution selects the largest peak voltage from them to achieve accurate acquisition of the peak voltage. Still in combination with the above example, assuming that detection continues after the first peak voltage is detected, the voltage peak detection circuit continues to work. Similarly, if the next peak voltage of the voltage to be measured is not greater than the peak voltage represented by the current first voltage, the comparison result of the comparator is that the first voltage (at this time, the peak voltage detected last time) is continuously greater than the voltage to be measured, so the first controllable switch 12 is controlled to be continuously disconnected, the energy storage element 13 is not charged, and the first voltage does not change; if the next peak voltage of the voltage to be measured is greater than the peak voltage represented by the current first voltage, then when the voltage to be measured exceeds the first voltage that remains unchanged, the comparison result of the comparator is that the voltage to be measured is greater than the first voltage, so the first controllable switch 12 is controlled to be closed, the energy storage element 13 is charged again, and the first voltage changes again with the voltage to be measured until the next peak value of the voltage to be measured is reached again, and then similarly with reference to the above process, when a higher peak voltage is reached, it is no longer charged and remains unchanged. This similar cycle is repeated until the detection cycle ends, and the output unit 15 outputs a peak voltage, and the peak voltage is the maximum peak voltage in the entire detection cycle. The duration of the detection cycle can be preset, and this is not limited in this embodiment. In other words, the peak voltage can be accurately obtained in different detection cycles through the above method, which has strong applicability.
[0051] In the voltage peak detection circuit provided by the present embodiment, the comparator outputs an enable signal of different states according to the comparison result between the current measured signal and the first voltage. When the measured voltage is not less than the first voltage, the first controllable switch is controlled to be closed, at which time the energy storage element is charged, and the first voltage changes with the measured voltage; when the measured voltage is less than the first voltage, the first controllable switch is controlled to be disconnected, at which time the energy storage element stops charging, so the first voltage remains unchanged. The scheme of the present application utilizes that when the first voltage changes with the measured voltage, the first voltage at the current moment can characterize the law of the measured voltage at the previous moment. Therefore, if the measured voltage is less than the first voltage, it means that the first voltage has reached the peak value and will begin to decrease subsequently. Therefore, the current first voltage is the peak voltage. At this time, the peak voltage is recorded by controlling the first controllable switch to be disconnected, thereby realizing accurate detection of the peak voltage.
[0052] Embodiment 2
[0053] Figure 3a This is a schematic diagram of the structure of the voltage peak detection circuit provided in the second embodiment of the present application, such as Figure 3a As shown, the voltage peak detection circuit provided in this embodiment is used to achieve higher-precision voltage peak detection. Accordingly, based on the first embodiment of the present application, the voltage peak detection circuit also includes: a second controllable switch 31.
[0054] The first end of the second controllable switch 31 is connected to the second input end of the comparator 14, the second end of the second controllable switch 31 is connected to the first end of the energy storage element 13, and the third end of the second controllable switch 31, i.e., the control end, is used to close or open according to different states of the sampling clock signal; the sampling clock signal is used to control the second controllable switch 31 to close during the detection period and to open at the end of the detection period. The sampling clock signal can be provided by a preset sampling control circuit, which is not limited in this embodiment.
[0055] The second controllable switch 31 supports controllable closing or opening, and its specific implementation structure may include but is not limited to: MOS tube, thyristor.
[0056] In this solution, a detection period can be set, and the detection period is determined based on the sampling clock signal. For example, assuming that the first state of the sampling clock signal is used to control the second controllable switch 31 to be closed, and the second state of the sampling clock signal is used to control the second controllable switch 31 to be opened, the duration of the sampling clock signal maintaining the first state is the detection period. Figure 3b As shown, Figure 3b : is an example diagram of a working timing in an embodiment of the present application, wherein PU is a first start signal for determining the working cycle of the voltage peak detection circuit, PS is a sampling clock signal, ΔT is a detection cycle, VIN is a voltage to be measured, VOUT is an output voltage, T 0 is the start time of the detection cycle, T 1 , T 2 , T 3 For different moments in the detection cycle, T 4 is the end time of the detection cycle, T 5 is the end time of the working cycle of the voltage peak detection circuit. Here, the PS signal in the figure is first explained, and other signals are explained in the embodiments described later, which are not repeated here. Assuming that PS is the sampling clock signal and the second controllable switch 31 is a high-level conductive element, ΔT in the figure is the detection period. During the detection period, the sampling clock signal controls the second controllable switch 31 to close, otherwise, the second controllable switch 31 is controlled to open.
[0057] In combination with the circuit structure, an example is given: the voltage peak detection circuit is started, and the voltage to be measured VIN is transmitted to the first input terminal of the comparator 14; initially, the voltage to be measured is greater than the first voltage, and the comparator 14 outputs an enable signal to control the first controllable switch 12 to close; the sampling clock signal flips to a high level, the second controllable switch 31 is closed, and the detection cycle begins; at this time, the first controllable switch 12 and the second controllable switch 31 are both closed, the charging circuit is turned on, and the electrical signal provided by the power supply unit 11 charges the energy storage element 13, and the first voltage changes with the voltage to be measured; subsequently, refer to the example of embodiment 1 until the end of the detection cycle, the sampling clock signal flips to a low level, the second controllable switch 31 is disconnected, the charging circuit is disconnected, the first voltage remains unchanged, and the output unit 15 outputs the current first voltage, completing the voltage peak detection within the detection cycle.
[0058] In practical applications, there is a coupling capacitor between the two input terminals of the comparator 14. Therefore, in the first voltage holding stage, the capacitance change of the first input terminal of the comparator 14 will be coupled to the second input terminal of the comparator 14 through the coupling capacitor, affecting the stability of the first voltage, causing the voltage output by the output unit to fluctuate, resulting in a sampling error. In this regard, in this embodiment, the second output terminal of the comparator 14 is separated from the first terminal of the energy storage element 13 by a second controllable switch 31, that is, the second controllable switch 31 is closed during the detection cycle, so that the voltage peak detection circuit works normally. When the detection cycle ends, the second controllable switch 31 is controlled to be turned off, so that the change of the voltage to be measured at the first input terminal of the comparator 14 will not affect the first terminal of the energy storage element 13 due to the change of the capacitance of the first input terminal, thereby stabilizing the output voltage and achieving higher-precision voltage peak detection.
[0059] The voltage peak detection circuit provided in this embodiment is provided with a second controllable switch between the input end of the comparator and the energy storage element. The second controllable switch is closed during the detection cycle without affecting the normal operation of the circuit, and is disconnected outside the detection cycle, thereby avoiding the influence of the fluctuation of the voltage to be measured caused by the coupling capacitance of the comparator on the first voltage, thereby further improving the precision and accuracy of the voltage peak detection.
[0060] Embodiment 3
[0061] Figure 4a This is a schematic diagram of the structure of the voltage peak detection circuit provided in the third embodiment of the present application, such as Figure 4a As shown, the voltage peak detection circuit provided in this embodiment is used to achieve faster voltage peak detection. Accordingly, based on any implementation mode of the present application, the power supply unit 11 includes a current source circuit; and the energy storage element 13 is a capacitor.
[0062] The current source circuit is used to provide current, and its specific structure may be, for example, a mirror current source, etc., which is not limited here.
[0063] An example is given in combination with the circuit structure: the voltage peak detection circuit is started, and the voltage to be measured VIN is transmitted to the first input terminal of the comparator 14; initially, the voltage to be measured is greater than the first voltage, and the comparator 14 outputs an enable signal to control the first controllable switch 12 to close; at this time, the current provided by the current source circuit charges the capacitor, and the first voltage changes with the voltage to be measured; subsequently, refer to the example of Example 1 until the detection cycle ends, the sampling clock signal flips to a low level, the second controllable switch 31 is disconnected, the path between the current source circuit and the capacitor is disconnected, and the first voltage at the first end of the capacitor is maintained.
[0064] Among them, a current source circuit is used to charge the capacitor. Since the current charging response is fast, when the voltage to be measured changes dramatically, the first voltage can still follow the voltage to be measured well, achieving fast and accurate voltage following. In terms of detection speed, since the capacitor is charged by current, this solution supports adjusting the charging time by controlling the current of the current source and the capacitance value of the capacitor in a programmable manner according to the actual application scenario, thereby achieving different detection speeds.
[0065] In an optional implementation, the current source circuit includes: a first transistor, a second transistor and a resistor.
[0066] The first end of the first transistor is connected to the first end of the second transistor, the second end of the first transistor and the second end of the second transistor are commonly connected to VDD, the third end of the first transistor is connected to one end of the resistor and the first end of the first transistor, the other end of the resistor is grounded, and the third end of the second transistor is connected to the first end of the first controllable switch; wherein the first end of the first transistor and the first end of the second transistor are both control ends.
[0067] The first transistor includes a first MOS tube, and the second transistor includes a second MOS tube; the gate of the first MOS tube is connected to the gate of the second MOS tube, the source of the first MOS tube and the source of the second MOS tube are commonly connected to VDD, the drain of the first MOS tube is connected to one end of the resistor and the gate of the first MOS tube, the other end of the resistor is grounded, and the drain of the second MOS tube is connected to the first end of the first controllable switch.
[0068] In addition, the first transistor also includes a first triode, and the second transistor also includes a second triode; the base of the first triode is connected to the base of the second triode, the emitter of the first triode and the emitter of the second triode are commonly connected to VDD, the collector of the first triode is connected to one end of the resistor and the base of the first triode, the other end of the resistor is grounded, and the collector of the second triode is connected to the first end of the first controllable switch.
[0069] In one example, if Figure 4b As shown, Figure 4b 4 is a schematic diagram of a structure of a current source circuit. The current source circuit includes: a first PMOS transistor 411 , a second PMOS transistor 412 and a resistor 413 .
[0070] The gate of the first PMOS tube 411 is connected to the gate of the second PMOS tube 412, the source of the first PMOS tube 411 and the source of the second PMOS tube 412 are commonly connected to VDD, the drain of the first PMOS tube 411 is connected to one end of the resistor 413 and the gate of the first PMOS tube 411, the other end of the resistor 413 is grounded, and the drain of the second PMOS tube 412 is connected to one end of the first controllable switch 12.
[0071] It can be understood that the figure and the above example are only an example structure of the current source circuit. For example, in other examples, the above PMOS tube can also be replaced by controllable elements such as NMOS tube, PNP transistor and NPN transistor, and the connection relationship of each pole of the corresponding device can be adjusted according to the type of controllable element actually used. For specific circuit structure and principle, refer to the relevant technology. Among them, VDD is the operating voltage, which can be provided by the outside, and the specific operating voltage can be determined according to the parameters of the working device.
[0072] In the voltage peak detection circuit of this example, a mirror current source structure is used to implement the current source circuit, thereby achieving fast detection, and the circuit structure is simple and low power consumption.
[0073] In another example, Figure 4b As shown, the current source circuit also includes: a third controllable switch 414; a resistor 413 is connected in series with the third controllable switch 414 and is grounded through the third controllable switch 414; the third controllable switch 414 is used to close or open according to different states of the first start signal, and the first start signal is used to control the third controllable switch 414 to close when the voltage peak detection circuit is working and to open when the voltage peak detection circuit stops working.
[0074] The first start signal (PU in the figure) may include two states, which are used to control the third controllable switch 414 to be closed or turned off. Figure 3bAn example is given, where the PU signal is used to determine the working cycle of the voltage peak detection circuit. Assuming that the third controllable switch 414 is a high-level on-device, when the PU signal flips to a high-level state, the voltage peak detection circuit can work normally, and when the PU signal flips to a low-level state, the voltage peak detection circuit stops detecting. In practical applications, the first start signal can be generated by an external signal generator, and the specific method is not limited.
[0075] In combination with the drawings and circuit structure, an example is given: when voltage peak detection is required, the PU signal flips to a high level and enters a working cycle; when the PU signal is in a high level state, the third controllable switch 414 is closed, and the current source circuit starts to work and provide current; when the voltage to be measured is greater than the first voltage, the comparator 14 outputs an enable signal to control the first controllable switch 12 to close; at this time, the current source circuit provides current to charge the capacitor, and the first voltage changes with the voltage to be measured; subsequently refer to the example of Example 1 until the PU signal flips to a low level, the working cycle ends, the third controllable switch 414 is disconnected, and the current source circuit stops working.
[0076] In the voltage peak detection circuit of this example, a third controllable element is added to control the working state of the current source circuit, thereby effectively controlling the working state of the voltage peak detection circuit, reducing the static power consumption of the entire circuit when no detection is performed, thereby simplifying the circuit structure and reducing power consumption.
[0077] In an optional implementation, the current source circuit further includes: a third transistor; the third end of the third transistor is connected to the second end of the first transistor, and the second end of the third transistor is connected to the third end of the first transistor.
[0078] The first end of the third transistor receives the first start signal and is used to close or open according to different states of the first start signal, and the first start signal is used to control the third transistor to be turned off when the voltage peak detection circuit is working and to be turned on when the voltage peak detection circuit stops working; wherein, the first end of the third transistor is a control end.
[0079] The third transistor includes a third MOS tube; the drain of the third MOS tube is connected to the second end of the first transistor, and the source of the third MOS tube is connected to the third end of the first transistor.
[0080] The gate of the third MOS tube receives the first start signal and is used to close or open according to different states of the first start signal. The first start signal is used to control the third MOS tube to be turned off when the voltage peak detection circuit is working and to be turned on when the voltage peak detection circuit stops working.
[0081] In addition, the third transistor further includes a third triode; the collector of the third triode is connected to the second end of the first transistor, and the emitter of the third triode is connected to the third end of the first transistor.
[0082] The base of the third transistor receives the first start signal and is used to close or open according to different states of the first start signal. The first start signal is used to control the third transistor to be turned off when the voltage peak detection circuit is working and to be turned on when the voltage peak detection circuit stops working.
[0083] In another example, Figure 4b As shown, the current source circuit further includes: a third PMOS tube 415 .
[0084] The drain of the third PMOS transistor 415 is connected to the source of the first PMOS transistor 411 , and the source of the third PMOS transistor 415 is connected to the drain of the first PMOS transistor 411 .
[0085] The gate of the third PMOS tube 415 receives a first start signal, and is used to close or open according to different states of the first start signal. The first start signal is used to control the third PMOS tube 415 to be turned off when the voltage peak detection circuit is working and to be turned on when the voltage peak detection circuit stops working.
[0086] The working state of the voltage peak detection circuit is controlled by controlling the closing and opening of the third PMOS tube 415. It should be noted that, in addition to the above examples, a control signal can also be provided separately for the third PMOS tube. In addition, the third PMOS tube can also be replaced by a controllable element such as an NMOS tube, a PNP transistor, and an NPN transistor. After the replacement, the connection relationship of each pole of the device is adjusted accordingly. In order to simplify the circuit, devices with the same or opposite working states can share an original control signal.
[0087] For example, in a combined implementation, the circuit is provided with a third controllable switch 414 and the third PMOS tube 415. Based on the above solution, it can be known that the working states of the third controllable switch 414 and the third PMOS tube 415 are opposite, that is, when the third controllable switch 414 is turned on, the third PMOS tube 415 should be in the off state. It is further assumed that the control types of the third controllable switch 414 and the third PMOS tube 415 are opposite, for example, the third controllable switch 414 is an NMOS tube turned on at a high level, and the first start signal can be shared.
[0088] In the voltage peak detection circuit of this example, a third PMOS tube is added to control the working state of the voltage peak detection circuit. When no detection is performed, no current flows through the circuit, thereby further reducing the power consumption of the entire circuit.
[0089] The voltage peak detection circuit provided in this embodiment uses a current source to charge the capacitor. Since the current charging response is fast, rapid voltage peak detection can be achieved. At the same time, the current source current and the capacitance value can be controlled in a programmable manner to adjust the charging time according to the actual application scenario to achieve different detection speeds.
[0090] Embodiment 4
[0091] Figure 5 This is a schematic diagram of the structure of the voltage peak detection circuit provided in the fourth embodiment of the present application, such as Figure 5 As shown, the voltage peak detection circuit provided in this embodiment is used to achieve higher-precision voltage peak detection. Accordingly, based on any implementation manner, the voltage peak detection circuit further includes: a first controllable element 51.
[0092] One end of the first controllable element 51 is connected to the first end of the energy storage element 13, and the other end of the first controllable element 51 is grounded; the control end of the first controllable element 51 receives a second start signal, which is used to close or disconnect according to different states of the second start signal, and the second start signal is used to control the first controllable element 51 to be turned off when the voltage peak detection circuit is working and to be turned on when the voltage peak detection circuit stops working.
[0093] The first controllable element 51 may include but is not limited to: a MOS tube, which includes an NMOS tube or a PMOS tube. The second start signal includes two states, which are respectively used to control the first controllable element 51 to be closed or turned off.
[0094] In one example, if the first controllable element 51 is a MOS tube, the source of the MOS tube is connected to the first end of the energy storage element 13, the drain of the MOS tube is grounded, and the gate of the MOS tube is used as a control terminal to receive the second start signal. If the first controllable element 51 is an NMOS tube, it can be turned on when the second start signal is at a high level, and if the first controllable element 51 is a PMOS tube, it can be turned on when the second start signal is at a low level.
[0095] Also to simplify the structure, in a combined embodiment, a third controllable switch 414, a third PMOS tube 415 and a first controllable element 51 are provided in the circuit. Based on the aforementioned scheme, it can be seen that the working state of the first controllable element 51 is opposite to that of the third controllable switch 414, and is the same as the working state of the third PMOS tube 415. It is further assumed that the third controllable switch 414 and the first controllable element 51 have the same control type, for example, the third controllable switch 414 and the first controllable element 51 are both NMOS tubes that are turned on at a high level, then the third controllable switch 414, the third PMOS tube 415 that is turned on at a low level and the first controllable element 51 can share the first start signal, specifically, the original first start signal is used as the original signal, and the third controllable switch 414 and the third PMOS tube 415 can be directly controlled, and an inverter 16 is set in the circuit, the input end of the inverter 16 receives the first start signal, and the output end is connected to the control end of the first controllable element 51, and the inverted signal of the first start signal is output, that is, the second start signal (for example, PUN in the figure is the inverted signal of PU), so as to control the first controllable element 51. In this way, there is no need to set a separate signal generating circuit for the first controllable element 51, thereby simplifying the circuit structure.
[0096] An example is given in combination with the circuit structure: the voltage peak detection circuit is started, the first controllable element 51 is disconnected, and the voltage to be measured VIN is transmitted to the first input terminal of the comparator 14; initially, the voltage to be measured is greater than the first voltage, and the comparator 14 outputs an enable signal to control the first controllable switch 12 to close, and the charging circuit is turned on. The electrical signal provided by the power supply unit 11 charges the energy storage element 13, and the first voltage changes with the voltage to be measured; subsequently, refer to the example of embodiment 1 until the end of the working cycle, the first controllable element 51 is turned on, thereby releasing the electrical energy of the first end of the energy storage element 13, and resetting the output voltage.
[0097] The voltage peak detection circuit provided in this embodiment is provided with a first controllable element, which is turned on when the circuit is not working, thereby releasing the energy stored in the energy storage element to achieve reset and avoid affecting the subsequent voltage peak detection, thereby further improving the precision and accuracy of the voltage peak detection.
[0098] Embodiment 5
[0099] Figure 6 This is a schematic diagram of the structure of the voltage peak detection circuit provided in Example 5 of the present application, such as Figure 6 As shown, the voltage peak detection circuit provided in this embodiment is used to achieve voltage peak detection with lower power consumption. Accordingly, based on any implementation manner, the voltage peak detection circuit further includes: a second controllable element 61.
[0100] One end of the second controllable element 61 is connected to the output end of the comparator 14, and the other end of the second controllable element 61 is grounded; the control end of the second controllable element 61 receives a third start signal, which is used to close or open according to different states of the third start signal. The third start signal is used to control the second controllable element 61 to be turned off when the voltage peak detection circuit is working and to be turned on when the voltage peak detection circuit stops working.
[0101] The second controllable element 61 may include but is not limited to: a MOS tube, which includes an NMOS tube or a PMOS tube. The second start signal includes two states, which are respectively used to control the second controllable element 61 to be closed or turned off.
[0102] In one example, if the second controllable element 61 is a MOS tube, the source of the MOS tube is connected to the output end of the comparator 14, the drain of the MOS tube is grounded, and the gate of the MOS tube is used as a control end to receive the third start signal. If the second controllable element 61 is an NMOS tube, it can be turned on when the third start signal is at a high level, and if the second controllable element 61 is a PMOS tube, it can be turned on when the third start signal is at a low level.
[0103] Also in order to simplify the structure, in a combined implementation, a third controllable switch 414 and a second controllable element 61 are provided in the circuit. Based on the above solution, it can be known that the working states of the third controllable switch 414 and the second controllable element 61 are opposite. It is further assumed that the control types of the third controllable switch 414 and the second controllable element 61 are the same, for example, the third controllable switch 414 and the second controllable element 61 are both NMOS tubes that are turned on at a high level, and the first start signal can be shared. The specific method can refer to the relevant content in the above fourth embodiment.
[0104] An example is given in combination with the circuit structure: the voltage peak detection circuit is started, the second controllable element 61 is disconnected, and the voltage to be measured VIN is transmitted to the first input terminal of the comparator 14; initially, the voltage to be measured is greater than the first voltage, and the comparator 14 outputs an enable signal to control the first controllable switch 12 to close, and the charging circuit is turned on. The electrical signal provided by the power supply unit 11 charges the energy storage element 13, and the first voltage changes with the voltage to be measured; subsequently, refer to the example of embodiment 1 until the end of the working cycle, and the second controllable element 61 is turned on, thereby reducing the static power consumption in the non-working state and realizing the resetting of the enable signal.
[0105] The voltage peak detection circuit provided in this embodiment provides a second controllable element, which is turned on when the circuit is not working, thereby reducing static power consumption in a non-working state and resetting the enable signal.
[0106] Embodiment 6
[0107] Figure 7 This is a schematic diagram of the structure of the voltage peak detection circuit provided in Example 6 of the present application, as shown in Figure 7 As shown, the voltage peak detection circuit provided in this embodiment is used for more stable voltage peak detection. Accordingly, based on any implementation mode, the voltage peak detection circuit also includes: a shaping circuit 71.
[0108] The output end of the comparator 14 is connected to the control end of the first controllable switch 12 through a shaping circuit 71 ; the shaping circuit 71 is used to shape the enable signal output by the comparator 14 and transmit the shaped enable signal to the control end of the first controllable switch 12 .
[0109] In this embodiment, the enable signal output by the comparator 14 can be shaped by the shaping circuit 71 to better control the state of the first controllable switch 12 and ensure the accuracy of voltage peak detection. There are many specific structures of the shaping circuit.
[0110] In one example, the shaping circuit 71 includes: a series structure composed of an even number (two in the figure) of inverters 711 connected in series, the input end of the series structure is connected to the output end of the comparator 14, and the output end of the series structure is connected to the control end of the first controllable switch 12. This example provides a simple shaping circuit for shaping the enable signal output by the comparator, realizing accurate detection of the peak voltage while effectively simplifying the circuit structure.
[0111] The voltage peak detection circuit provided in this embodiment, by setting a shaping circuit, can shape the enable signal output by the comparator, so as to better control the conduction or disconnection of the first controllable element, ensure the accuracy of voltage peak detection, and simplify the circuit structure.
[0112] It should be noted that the above embodiments can be implemented separately or in combination, and the circuit structure in the accompanying drawings is only a specific example of the solution of the present application, and does not limit the solution of the present application. Figure 7 The circuit structure and Figure 3b The working timing diagram of the voltage peak detection circuit is introduced. It should be noted that the following is only an example:
[0113] Wherein, PU is the first start signal, when PU is high level (for example, 1), the voltage peak detection circuit enters the working state. When PU is low level (for example, 0), the circuit is powered off, no current flows through the circuit, and its static power consumption is minimal. At the same time, the first controllable element 51 is closed, the charge on the capacitor is cleared, and the output voltage VOUT is reset.
[0114] Among them, PS is the sampling clock signal. At time T0, PS changes from low to high. At this time, the first voltage on the capacitor is 0, and the voltage to be measured VIN is greater than the first voltage VA (i.e., the voltage at position A in the figure). The output of the comparator 14 is shaped to a high level by the two-stage inverter 711. The first controllable switch 12 is closed, and the current source circuit charges the capacitor. Since the comparator 14 has a high gain, the voltage VA at its second input terminal follows the voltage to be measured VIN at the first output terminal and reaches the first peak at time T1.
[0115] When VIN passes the first peak value, its voltage is less than VA. At this time, the comparator 14 outputs the enable signal EN as a low level, the first controllable switch 12 is disconnected, the current source circuit stops charging the capacitor, and VOUT is at the first peak voltage ( Figure 3b Subsequently, between T1 and T2, the voltage of VIN is less than the first peak voltage maintained by VOUT, so the comparator 14 keeps the output enable signal EN at a low level, the first controllable switch 12 remains disconnected, and VOUT remains unchanged.
[0116] At T2, VIN is equal to VOUT, and then VIN is greater than VOUT. At this time, the enable signal EN output by the comparator 14 becomes high, the first controllable switch 12 is closed again, the current source circuit continues to charge the capacitor, and VOUT rises with VIN. At T3, the second peak is detected (the second peak voltage is greater than the first peak voltage), the first controllable switch 12 is disconnected again, and VOUT maintains the second peak voltage. By analogy, at T4, PS changes from a high level to a low level, the detection period △T ends, and the voltage peak detection circuit maintains and outputs the maximum peak voltage detected in the waveform of the voltage to be measured within the △T period for subsequent processing. At T5, the working cycle ends, PU becomes a low level, the voltage peak detection circuit stops working, the first controllable element 51 is turned on, the capacitor is discharged, and VOUT is reset to 0.
[0117] The above scheme can achieve high-speed and high-precision measurement of the peak value of the first wave in ultrasonic measurement. At the same time, the structure of this scheme is composed of low-noise analog circuits, which avoids the noise introduced by the use of digital modules and further improves the detection accuracy. At the same time, it realizes the control of detection speed and real-time detection of waveform.
[0118] In the voltage peak detection circuit provided by the present application, the comparator outputs an enable signal of different states according to the comparison result between the current measured signal and the first voltage. When the measured voltage is not less than the first voltage, the first controllable switch is controlled to be closed, at which time the energy storage element is charged, and the first voltage changes with the measured voltage; when the measured voltage is less than the first voltage, the first controllable switch is controlled to be disconnected, at which time the energy storage element stops charging, so the first voltage remains unchanged. The scheme of the present application utilizes that when the first voltage changes with the measured voltage, the first voltage at the current moment can characterize the law of the measured voltage at the previous moment. Therefore, if the measured voltage is less than the first voltage, it means that the first voltage has reached the peak value and will begin to decrease subsequently. Therefore, the current first voltage is the peak voltage. At this time, the peak voltage is recorded by controlling the first controllable switch to be disconnected, thereby realizing accurate detection of the peak voltage.
[0119] Furthermore, the present application provides an electronic device, comprising a voltage peak detection circuit as described in any one of the above-mentioned embodiments 1 to 6 or in combination.
[0120] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0121] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A voltage peak detection circuit, characterized in that: include: A power supply unit, a first controllable switch, an energy storage element, a comparator and an output unit; The output end of the power supply unit is connected to the first end of the first controllable switch, the second end of the first controllable switch is connected to the first end of the energy storage element, and the second end of the energy storage element is grounded; the first input end of the comparator receives the voltage to be measured, the second input end of the comparator is connected to the first end of the energy storage element, and the output end of the comparator is connected to the third end of the first controllable switch; the output unit is connected to the first end of the energy storage element, and is used to output the first voltage at the first end of the energy storage element; wherein the third end of the first controllable switch is a control end; When the first controllable switch is closed, the power supply unit charges the energy storage element, and the first voltage changes with the voltage to be measured; when the current voltage to be measured is not less than the first voltage, the comparator outputs an enable signal of the first state, which is used to control the first controllable switch to be closed; when the current voltage to be measured is less than the first voltage, the comparator outputs an enable signal of the second state, which is used to control the first controllable switch to be disconnected; when the first controllable switch is disconnected, the energy storage element stops charging, and the first voltage remains unchanged.
2. The voltage peak detection circuit according to claim 1, characterized in that: The voltage peak detection circuit further includes: a second controllable switch; The first end of the second controllable switch is connected to the second input end of the comparator, the second end of the second controllable switch is connected to the first end of the energy storage element, and the third end of the second controllable switch is used to close or open according to different states of the sampling clock signal; the sampling clock signal is used to control the second controllable switch to close during the detection period and to open at the end of the detection period; wherein the third end of the second controllable switch is a control end.
3. The voltage peak detection circuit according to claim 1, characterized in that: The power supply unit includes a current source circuit; the energy storage element is a capacitor.
4. The voltage peak detection circuit according to claim 3, characterized in that: The current source circuit comprises: a first transistor, a second transistor and a resistor; The first end of the first transistor is connected to the first end of the second transistor, the second end of the first transistor and the second end of the second transistor are commonly connected to VDD, the third end of the first transistor is connected to one end of the resistor and the first end of the first transistor, the other end of the resistor is grounded, and the third end of the second transistor is connected to the first end of the first controllable switch; wherein the first end of the first transistor and the first end of the second transistor are both control ends.
5. The voltage peak detection circuit according to claim 4, characterized in that: The first transistor includes a first MOS transistor, and the second transistor includes a second MOS transistor; The gate of the first MOS tube is connected to the gate of the second MOS tube, the source of the first MOS tube and the source of the second MOS tube are commonly connected to VDD, the drain of the first MOS tube is connected to one end of the resistor and the gate of the first MOS tube, the other end of the resistor is grounded, and the drain of the second MOS tube is connected to the first end of the first controllable switch.
6. The voltage peak detection circuit according to claim 4, characterized in that: The first transistor further includes a first triode, and the second transistor further includes a second triode; The base of the first transistor is connected to the base of the second transistor, the emitter of the first transistor and the emitter of the second transistor are commonly connected to VDD, the collector of the first transistor is connected to one end of the resistor and the base of the first transistor, the other end of the resistor is grounded, and the collector of the second transistor is connected to the first end of the first controllable switch.
7. The voltage peak detection circuit according to claim 4, characterized in that: The current source circuit further includes: a third controllable switch; The resistor is connected in series with the third controllable switch and is grounded through the third controllable switch; the third controllable switch is used to close or open according to different states of the first start signal, and the first start signal is used to control the third controllable switch to close when the voltage peak detection circuit is working and to open when the voltage peak detection circuit stops working.
8. The voltage peak detection circuit according to claim 4, characterized in that: The current source circuit further includes: a third transistor; a third terminal of the third transistor is connected to the second terminal of the first transistor, and the second terminal of the third transistor is connected to the third terminal of the first transistor; The first end of the third transistor receives a first start signal, and is used to close or open according to different states of the first start signal, and the first start signal is used to control the third transistor to be turned off when the voltage peak detection circuit is working and to be turned on when the voltage peak detection circuit stops working; wherein, the first end of the third transistor is a control end.
9. The voltage peak detection circuit according to claim 8, characterized in that: The third transistor includes a third MOS tube; the drain of the third MOS tube is connected to the second end of the first transistor, and the source of the third MOS tube is connected to the third end of the first transistor; The gate of the third MOS tube receives the first start signal and is used to close or open according to different states of the first start signal. The first start signal is used to control the third MOS tube to be turned off when the voltage peak detection circuit is working and to be turned on when the voltage peak detection circuit stops working.
10. The voltage peak detection circuit according to claim 8, characterized in that: The third transistor further includes a third triode; the collector of the third triode is connected to the second end of the first transistor, and the emitter of the third triode is connected to the third end of the first transistor; The base of the third transistor receives the first start signal and is used to close or open according to different states of the first start signal. The first start signal is used to control the third transistor to be turned off when the voltage peak detection circuit is working and to be turned on when the voltage peak detection circuit stops working.
11. The voltage peak detection circuit according to any one of claims 1 to 10, characterized in that: The voltage peak detection circuit further includes: a first controllable element; One end of the first controllable element is connected to the first end of the energy storage element, and the other end of the first controllable element is grounded; the control end of the first controllable element receives a second start signal, which is used to close or open according to different states of the second start signal, and the second start signal is used to control the first controllable element to be turned off when the voltage peak detection circuit is working and to be turned on when the voltage peak detection circuit stops working.
12. The voltage peak detection circuit according to any one of claims 1 to 10, characterized in that: The voltage peak detection circuit further includes: a second controllable element; One end of the second controllable element is connected to the output end of the comparator, and the other end of the second controllable element is grounded; the control end of the second controllable element receives a third start signal, and is used to close or open according to different states of the third start signal, and the third start signal is used to control the second controllable element to be turned off when the voltage peak detection circuit is working and to be turned on when the voltage peak detection circuit stops working.
13. The voltage peak detection circuit according to any one of claims 1 to 12, characterized in that: The voltage peak detection circuit further includes: a shaping circuit; The output end of the comparator is connected to the control end of the first controllable switch through the shaping circuit; the shaping circuit is used to shape the enable signal output by the comparator and transmit the shaped enable signal to the control end of the first controllable switch.
14. The voltage peak detection circuit according to claim 13, characterized in that: The shaping circuit comprises: A series structure is formed by an even number of inverters connected in series, wherein the input end of the series structure is connected to the output end of the comparator, and the output end of the series structure is connected to the control end of the first controllable switch.
15. An electronic device, characterized in that: The method comprises a voltage peak detection circuit as described in any one of claims 1 to 14.
