AC / DC voltage detection circuit

By designing the AC/DC voltage detection circuit and using clock cycle and voltage adjustment technology, the accuracy and complexity of detecting the AC/DC characteristics of the integrated circuit are solved, and efficient and low-cost electrical signal detection is achieved.

CN113495187BActive Publication Date: 2024-12-17HYPOWER MICROELECTRONICS (WUXI) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110690635.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-22
Publication Date
2024-12-17
Estimated Expiration
2041-06-22

AI Technical Summary

Technical Problem

The AC/DC characteristics of electrical signals need to be detected in existing integrated circuits, but the detection circuit needs to find a balance between accuracy and complexity, and the cost and volume need to be reduced.

Method used

An AC/DC voltage detection circuit is designed, including an upper edge trigger circuit and a detection output circuit. The input voltage is sampled through a preset clock cycle, the rising edge and change of the voltage are judged, the AC or DC judgment signal is generated, and the voltage bias is used. The set and step voltage generation circuit implements voltage adjustment to ensure detection accuracy and speed.

Benefits of technology

The balance between circuit complexity, detection accuracy and detection speed is achieved, the cost and volume of the integrated circuit are reduced, and the accuracy of detection of electrical signals is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113495187B_ABST
    Figure CN113495187B_ABST
Patent Text Reader

Abstract

The present application provides an AC / DC voltage detection circuit, comprising: an upper edge trigger circuit, comprising an input end and an output end, the upper edge trigger circuit samples the working voltage received by the input end with a preset clock cycle, the clock cycle is set so that the upper edge trigger circuit samples the upper edge of the AC voltage of the rated frequency M times (M is a natural number), and at the rising edge of the working voltage and within one of the clock cycles, when the increase amplitude of the working voltage is greater than the preset bias voltage value, the output signal of the output end realizes at least one target flip between a high level and a low level; and a detection and output circuit, connected to the output end of the upper edge trigger circuit, detecting the change of the working voltage and the target flip, when the detection result shows that within the preset M consecutive clock cycles, the output signal of the upper edge trigger circuit has the preset m times of the target flip (m is a natural number), the detection and output circuit generates an AC judgment signal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of integrated circuits, and in particular to an AC / DC voltage detection circuit. Background Art

[0002] In some cases, a specially designed circuit is required in an integrated circuit (IC) to detect the characteristics of an electrical signal. For example, in some applications, the voltage of an input signal needs to be detected to determine whether the input signal is an alternating current (AC) or a direct current (DC). On the one hand, the detection circuit needs to have a high accuracy to ensure the performance of the IC; on the other hand, the detection circuit cannot be too complex to reduce the cost and size of the IC. Summary of the invention

[0003] In order to solve the above technical problems, the present disclosure provides an AC / DC voltage detection circuit. The AC / DC voltage detection circuit provided by the present application can detect the voltage of the AC line, determine the AC / DC characteristics of the input signal, and can strike a balance between circuit complexity, detection accuracy and sufficiently fast detection speed, so as to achieve the best performance and IC cost balance.

[0004] The AC / DC voltage detection circuit comprises: an upper edge trigger circuit, comprising an input terminal and an output terminal, wherein the upper edge trigger circuit samples the working voltage received at the input terminal with a preset clock cycle, and the clock cycle is set to enable the upper edge trigger circuit to sample the upper edge of the AC voltage of the rated frequency M times, wherein M is a natural number, and at the rising edge of the working voltage and within one of the clock cycles, when the increase amplitude of the working voltage is greater than the preset bias voltage value, the output signal of the output terminal realizes at least one target flip between a high level and a low level; and a detection and output circuit, connected to the output terminal of the upper edge trigger circuit, detecting the change of the working voltage and the target flip, and when it is detected that the output signal of the upper edge trigger circuit has the preset m target flips within the preset M consecutive clock cycles, the detection and output circuit generates an AC judgment signal, wherein m is a natural number.

[0005] In some embodiments, during a rising edge of the working voltage, when the output signal of the output terminal undergoes less than m target flips, the detection and output circuit generates a DC determination signal.

[0006] In some embodiments, the AC / DC voltage detection circuit also includes a judgment circuit to determine whether the operating voltage is greater than a preset voltage, wherein: when the operating voltage is greater than the preset voltage, the judgment circuit activates the detection and output circuit to detect changes in the operating voltage and the target flip.

[0007] In some embodiments, the value range of M is between 15 and 25, and the value range of m is between 8 and 12.

[0008] In some embodiments, the magnitude of the bias voltage is positively correlated with the amplitude of the operating voltage.

[0009] In some embodiments, the rising edge trigger circuit includes: an adjustment circuit, including an adjustment circuit input terminal, receiving an operating voltage, wherein the operating voltage is an AC voltage, a first adjustment circuit output terminal, outputting a first voltage, and a second adjustment circuit output terminal, outputting a step second voltage; a comparator, including a first comparator input terminal, receiving the first voltage, a second comparator input terminal, receiving the second voltage, and a comparator output terminal, outputting a comparison result of the first voltage and the second voltage, wherein the second voltage differs from the first voltage by the bias voltage at the beginning of a preset clock cycle, and the second voltage does not drop by more than a first amplitude within the clock cycle.

[0010] In some embodiments, the first voltage is lower than the second voltage at the start of the clock cycle; and within one of the clock cycles, when the rise amplitude of the first voltage exceeds the bias voltage value, the output of the comparator undergoes at least one target flip.

[0011] In some embodiments, the voltage adjustment circuit includes: a voltage bias circuit that adds the bias voltage to the input voltage of the voltage bias circuit; and a step voltage generating circuit that converts the voltage input to the step voltage generating circuit into a step voltage.

[0012] In some embodiments, the step voltage generating circuit includes: a switching circuit; a clock circuit, connected to the switching circuit and controlling the switching circuit to open and close according to the clock cycle to generate the second voltage; and a voltage holding circuit, connected to the switching circuit and maintaining the second voltage after the switching circuit is disconnected so that the second voltage does not drop by more than the first amplitude within the clock cycle.

[0013] In some embodiments, wherein: the voltage bias circuit includes at least one of a voltage-controlled current source and a voltage-controlled voltage source; the switching circuit includes at least one field effect transistor; and the voltage holding circuit includes at least one capacitor.

[0014] In some embodiments, the output terminal of the first adjustment circuit is electrically connected to the input terminal of the adjustment circuit; and the voltage bias circuit is connected in series with the step voltage generating circuit, and the series circuit connects the input terminal of the adjustment circuit and the output terminal of the second adjustment circuit.

[0015] In some embodiments, the first comparator input terminal is the positive electrode of the comparator, the second comparator input terminal is the negative electrode of the comparator, and the bias voltage is a positive voltage; or the first comparator input terminal is the negative electrode of the comparator, the second comparator input terminal is the positive electrode of the comparator, and the bias voltage is a positive voltage.

[0016] In some embodiments, the voltage bias circuit is connected in series with the output terminal of the first adjustment circuit and the input terminal of the adjustment circuit; and the step voltage generating circuit is connected in series with the input terminal of the adjustment circuit and the output terminal of the second adjustment circuit.

[0017] In some embodiments, the first comparator input terminal is the positive electrode of the comparator, the second comparator input terminal is the negative electrode of the comparator, and the bias voltage is a negative voltage; or the first comparator input terminal is the positive electrode of the comparator, the second comparator input terminal is the negative electrode of the comparator, and the bias voltage is a negative voltage.

[0018] In some embodiments, the AC / DC voltage detection circuit further includes a voltage divider circuit, one end of the voltage divider circuit is connected to the input voltage, and the other end is connected to the ground line, and the voltage divider circuit divides the input voltage into the working voltage output. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The present disclosure will be further described according to exemplary embodiments. The foregoing and other aspects of the embodiments of the present disclosure will become more apparent in the following detailed description when read in conjunction with the accompanying drawings.

[0020] Figure 1 A circuit structure diagram of an AC / DC voltage detection circuit provided according to an embodiment of the present application is shown;

[0021] Figure 2A A timing diagram of various signals when an AC / DC voltage detection circuit provided according to an embodiment of the present application is working is shown;

[0022] Figure 2B A timing diagram of V1 and V2 provided according to an embodiment of the present application is shown;

[0023] Figure 2C Shows Figure 2B The enlarged diagram of the curves of V1 and V2 in the clock cycle T1;

[0024] Figure 2D Shows Figure 2B An enlarged view of the curves of V1 and V2 in the clock cycle T2;

[0025] Figure 2E According to this application Figure 2A Detailed view of area A in the middle;

[0026] Figure 2F A timing diagram of various signals when another AC / DC voltage detection circuit provided in an embodiment of the present application is working is shown;

[0027] Figure 2G A circuit structure diagram of a detection and output circuit provided according to an embodiment of the present application is shown;

[0028] Figure 3A A comparison diagram of input voltage and output voltage of a voltage bias circuit provided according to an embodiment of the present application is shown;

[0029] Figure 3B A comparison diagram of a voltage at an output terminal of a voltage bias circuit provided according to an embodiment of the present application and a second voltage loaded onto a voltage input terminal of a second comparator is shown;

[0030] Figure 4A A method for providing two different input groups according to an embodiment of the present application is shown. and Comparison of the outputs corresponding to the two sets of inputs when a constant ΔV is used;

[0031] Figure 4B FIG. 4 shows a method of ΔV and V according to an embodiment of the present application. in Schematic diagram of the relationship between peak values;

[0032] Figure 4C Another schematic diagram showing the relationship between ΔV and Vin peak value provided according to an embodiment of the present application is shown;

[0033] Figure 4D A timing diagram of V1 and V2 provided according to an embodiment of the present application is shown;

[0034] Figure 4E A timing diagram of V1 and V2 provided according to an embodiment of the present application is shown;

[0035] Figure 4F A timing diagram of V1 and V2 provided according to an embodiment of the present application is shown;

[0036] Figure 4G A circuit structure diagram of another AC / DC voltage detection circuit provided according to an embodiment of the present application is shown;

[0037] Figure 5 A circuit structure schematic diagram of another AC / DC voltage detection circuit provided according to an embodiment of the present application is shown;

[0038] Figure 6 Shows Figure 5 A comparison diagram of the operating voltage, the first voltage and the second voltage in the circuit structure;

[0039] Figure 7 A circuit structure diagram of another AC / DC voltage detection circuit provided according to an embodiment of the present application is shown; and

[0040] Figure 8 A circuit structure schematic diagram of another AC / DC voltage detection circuit provided according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0041] The terms used herein are only used for the purpose of describing specific example embodiments and are not restrictive. For example, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" used herein may also include plural forms. When used in this specification, the terms "include", "comprise" and / or "contain" mean the existence of the associated integers, steps, operations, element components and / or groups, but do not exclude the existence of one or more other features, integers, steps, operations, elements, components and / or groups or other features, integers, steps, operations, elements, components and / or groups may be added to the system / method. When used in this specification, the term "A on B" may mean that A is directly adjacent to B (above or below), or it may mean that A is indirectly adjacent to B (i.e., there is some material between A and B); the term "A in B" may mean that A is all inside B, or it may mean that A is partially inside B.

[0042] In view of the following description, these and other features of the present disclosure, as well as the operation and function of the related elements of the structure, and the economy of the combination and manufacture of the parts can be significantly improved. Reference is made to the accompanying drawings, all of which form a part of the present disclosure. However, it should be clearly understood that the drawings are for illustration and description purposes only and are not intended to limit the scope of the present disclosure.

[0043] As an example, Figure 1 FIG. 1 is a schematic diagram showing a circuit structure of an AC / DC voltage detection circuit 001 provided according to an embodiment of the present application. As an example, Figure 2AThe timing diagram of each signal when an AC / DC voltage detection circuit provided according to an embodiment of the present application works is shown. Specifically, the AC / DC voltage detection circuit 001 may include an upper edge trigger circuit 600 and a detection and output circuit 700. As an example, the upper edge trigger circuit 600 may include a voltage adjustment circuit 100 and a comparator 200. In some embodiments, the AC / DC voltage detection circuit 001 may also include a voltage divider circuit 400 and / or a latch circuit 800.

[0044] The voltage divider circuit 400 may include a circuit for dividing the signal V HV Any circuit that divides the voltage into the working voltage signal V0. For example Figure 1 As shown, the voltage divider circuit 400 may include a first resistor R1 and a second resistor R2 connected in series. The output terminal 420 of the voltage divider circuit 400 is connected between the first resistor R1 and the second resistor R2. One end of the voltage divider circuit 400 may be connected to the input voltage pin HV, and the other end may be connected to the ground line GND. In this way, by reasonably designing the resistance values ​​of the first resistor R1 and the second resistor R2, the voltage divider circuit 400 can convert the input voltage signal V HV The divided voltage is the working voltage signal V0 at the output terminal 420 .

[0045] The working voltage signal V0 can be an AC signal or a DC signal. For the convenience of description, in the following description of this application, the working principle of the AC / DC voltage detection circuit 001 is first described by taking the working voltage signal as an AC voltage signal as an example. Figure 2A , the working voltage signal V0 includes several cycles, wherein the working voltage signal in each cycle includes at least one rising edge and at least one falling edge. For ease of understanding, in the following description of this application, the input signal V HV Taking the AC power without frequency modulation as an example, the working principle of the circuit provided by the present application is introduced. HV The frequency f HV The frequency of the AC power is the same as that of the mains power, which is 50HZ. That is, the input signal V HV The period is T HV =20ms. Input signal V HV One cycle T HV There are 2 rising edges and 2 falling edges. The duration of a rising edge and a falling edge is 1 / 4T. HV .

[0046] The comparator 200 includes a first comparator input terminal 210, a second comparator input terminal 220, and a comparator output terminal 230. One of the first comparator input terminal 210 and the second comparator input terminal 220 can be the positive pole of the comparator 200 (the input terminal marked with "+"), and the other can be the negative pole of the comparator 200 (the input terminal marked with "-"). When the positive pole voltage is higher than the negative pole voltage, the output terminal 230 of the comparator 200 outputs a high level; when the negative pole voltage is higher than the positive pole, the output terminal 230 of the comparator 200 outputs a low level. Figure 1 For example, the first comparator input terminal 210 can be electrically connected to the first adjustment circuit output terminal 102 to receive the first voltage V1; the second comparator input terminal 220 can be electrically connected to the second adjustment circuit output terminal 103 to receive the second voltage V2. The comparator 200 can compare the first voltage signal V1 and the second voltage signal V2, and output a high level or a low level through the comparator output terminal 230 according to the comparison result, that is, output the comparison result of the first voltage V1 and the second voltage V2. When the first voltage signal V1 is greater than the second voltage signal V2, the comparator outputs a high level; when the first voltage signal V1 is less than the second voltage signal V2, the comparator outputs a low level.

[0047] The detection and output circuit 700 is connected to the comparator output terminal 230. The detection and output circuit 700 can detect the comparison result output by the comparator output terminal 230, and output a control signal according to the comparison result. As an example, the control signal can be used to control the start IC or stop IC. As an example, the detection and output circuit 700 can also output the characteristics of the input signal according to the comparison result, such as whether the type of the input signal is AC or DC. As an example, the detection and output circuit 700 may include at least one counting circuit. As an example, the counting circuit may include one or more counters, and determine whether the type of the input signal is AC or DC by counting the number of transitions between the high and low levels of the output of the comparator.

[0048] One end of the latch circuit 800 is connected to the output terminal 230 of the comparator 200, and the other end is connected to the voltage bias circuit 110. In some embodiments, the latch circuit 800 can also latch an AC / DC latch signal representing the AC / DC characteristics of the input signal according to the output signal of the output terminal 230 of the comparator.

[0049] The voltage adjustment circuit 100 includes an adjustment circuit input terminal 101, a first adjustment circuit output terminal 102, and a second adjustment circuit output terminal 103. The adjustment circuit input terminal 101 receives an operating voltage V0. The first adjustment circuit output terminal 102 outputs a first voltage V1. The second adjustment circuit output terminal 103 outputs a stepped second voltage V2. As an example, the second voltage V2 is equal to the first voltage V1 in a preset clock period T sample At the beginning, the phase difference is ΔV and in the clock cycle T sample The decrease in the bias voltage ΔV does not exceed the first amplitude. For example, the first amplitude can be 1%, 2%, 3%, 4%, 5%, 6%, 7%, 8%, 9% or 10% of ΔV or an interval between any two numbers. The magnitude of the bias voltage ΔV is related to the first voltage V1.

[0050] Specifically, the voltage adjustment circuit 100 may include a voltage bias circuit 110 and a step voltage generation circuit 500 .

[0051] The voltage bias circuit 110 can add the bias voltage ΔV to the input voltage V of the voltage bias circuit 110. in On, and the output voltage V out As an example, the voltage bias circuit 110 may include at least one of a voltage-controlled voltage source and a voltage-controlled current source. For example, the voltage bias circuit 110 may be a voltage-controlled current source.

[0052] As an example, the bias may be a positive bias (the bias voltage ΔV is a positive voltage), for example, the output voltage V out Ratio input voltage V in Large ΔV, that is, V out =V in +ΔV; the bias may also be a negative bias (the bias voltage ΔV is a negative voltage), for example, the output voltage V out Ratio input voltage V in Small ΔV, that is, V out =V in -ΔV. For the convenience of description, in the following description of this application, V out =V in +ΔV is used as an example to illustrate the working principle of the rising edge detection circuit. As an example, Figure 3A shows an input voltage V of a voltage bias circuit 110 provided according to an embodiment of the present application in and output voltage V out Reference Figure 3A , input voltage V in As the voltage rises, the voltage bias circuit 110 adds a bias voltage ΔV to V in Generate V out .

[0053] It should be noted that Figure 3A The operation process of the voltage bias circuit 110 is described by taking the rising edge as an example. For the falling edge, the principle is the same.

[0054] Continue to refer Figure 1 , the step voltage generating circuit 500 can convert the voltage input to the step voltage generating circuit into a step voltage. For example, the step voltage generating circuit 500 may include a switch circuit 120, a clock circuit 300 and a voltage holding circuit 130. As an example, the switch circuit 120 may include at least one field effect transistor. As an example, the field effect transistor may include, but is not limited to, a metal oxide semiconductor field effect transistor (MOSFET), a bipolar junction transistor (BJT), a silicon controlled rectifier (SCR), a gate turn-off thyristor (GTO), an insulated gate bipolar transistor (IGBT), a MOS controlled thyristor (MCT) or a static induction transistor (SIT). The clock circuit 300 is connected to the switch circuit 120 and operates according to the clock period T sample The switch circuit 120 is controlled to open and close to generate the second voltage V2. The voltage holding circuit 130 is connected to the switch circuit 120 and holds the second voltage V2 after the switch circuit 120 is turned off, so that the voltage V2 is sample The second voltage V2 loaded on the second comparator input terminal 220 decreases within the clock period T sample As an example, the voltage holding circuit 130 may include at least one capacitor circuit.

[0055] According to the above description, the first voltage V1 and the second voltage V2 are in a preset clock cycle T sample At the beginning, the phase difference is ΔV and in the clock cycle T sample The internal drop does not exceed the first amplitude.

[0056] The working principle of the AC / DC voltage detection circuit 001 is introduced below.

[0057] For ease of description, in the following description of the present application, the “first circuit S1” refers to a circuit connecting the adjustment circuit input terminal 101 and the first adjustment circuit output terminal 102, and the “second circuit S2” refers to a circuit connecting the adjustment circuit input terminal 101 and the second adjustment circuit output terminal 103. The working voltage signal V0 can be transmitted to the first comparator input terminal 210 and the second comparator input terminal 220 via the first circuit S1 and the second circuit S2, respectively. Figure 1The input end of the first circuit S1 is electrically connected to the working voltage V0, and the output end is the first adjustment circuit output end 102. The first circuit S1 can convert the working voltage V0 into the first voltage V1. The input end of the second circuit S2 is electrically connected to the working voltage V0, and the output end is the second adjustment circuit output end 103. The second circuit S2 can convert the working voltage V0 into the second voltage V2.

[0058] refer to Figure 1 , the voltage divider circuit 400 converts the input signal V HV The voltage is divided into the working voltage V0. The working voltage V0 is input into the adjustment circuit 100 from the adjustment circuit input terminal 101. The adjustment circuit 100 adjusts the working voltage V0 into the first voltage V1 and the second voltage V2 and outputs them from the first adjustment circuit output terminal 102 and the second adjustment circuit output terminal 103 respectively. The first comparator input terminal 210 is the positive electrode of the comparator; the second comparator input terminal 220 is the negative electrode of the comparator. The first comparator input terminal 210 is connected to the first adjustment circuit output terminal 102 and receives the first voltage V1, and the second comparator input terminal 220 is connected to the second adjustment circuit output terminal 103 and receives the second voltage V2.

[0059] The output terminal 102 of the first adjustment circuit is electrically connected to the input terminal 101 of the voltage adjustment circuit 100. Figure 1 As shown, both ends of the first circuit S1 can be directly connected to the output terminal 420 of the voltage divider circuit 400 and the first comparator input terminal 210. Therefore, the first voltage V1 transmitted to the first comparator input terminal 210 via the first circuit S1 is the same as the working voltage V0 outputted from the output terminal of the voltage divider circuit 400, that is, V1=V0.

[0060] The voltage bias circuit 110 is connected in series with the step voltage generating circuit 500, and the series circuit is connected to the voltage regulating circuit input terminal 101 and the second regulating circuit output terminal 103. Figure 1 As shown, the voltage bias circuit 110 and the step voltage generating circuit 500 can be connected in series and arranged on the second circuit S2. The input end of the voltage bias circuit 110 can be electrically connected to the output end 420 of the voltage divider circuit 400. The voltage bias circuit 110 can add a bias voltage to the working voltage V0. The voltage bias circuit 110 is configured to bias the working voltage V0 by ΔV. In other words, the voltage bias circuit 110 can add a bias voltage ΔV to the working voltage V0. Figure 1 The bias voltages shown in are positive voltages.

[0061] The clock circuit 300 is connected to the switch circuit 120. The clock circuit 300 is connected to the switch circuit 120 at a preset clock period T sample The clock pulse is sent to control the on and off of the switch circuit 120 .

[0062] One end of the switch circuit 120 is connected to the output end of the voltage bias circuit 110, and the other end is connected to the second comparator input end 220 as the output end of the voltage adjustment circuit 100. When the switch circuit 120 is turned on, the second voltage V2 outputted from the output end of the voltage bias circuit 110 can be connected to the second comparator input end 220. When the switch circuit 120 is turned off, the second voltage V2 cannot be connected to the second comparator input end 220. As an example, the switch circuit 120 may include at least one field effect transistor or other circuit that can be controlled to turn on and off the power supply.

[0063] One end of the voltage holding circuit 130 is grounded (GND), and the other end is connected to the second circuit S2 between the switch circuit 120 and the second comparator input terminal 220. The voltage holding circuit 130 is used to stabilize the second voltage V2 loaded on the second comparator input terminal 220 when the switch circuit 120 is closed within a preset range within the preset clock cycle after the switch circuit 120 is disconnected. As an example, the voltage holding circuit 130 includes at least one capacitor circuit. For example, Figure 1 In the embodiment, the voltage holding circuit 130 includes a capacitor C hold When the switch circuit 120 is in the closed state, the second circuit S2 is connected to load the second voltage V2 to the second comparator input terminal 220, and the capacitor C hold When the switch is in the off state, the capacitor C hold The voltage V2 is loaded on the second comparator input terminal 220 as the input signal of the second comparator input terminal 220, so that the input signal of the second comparator input terminal 220 is stabilized at the second voltage V2.

[0064] As an example, Figure 3B The voltage V at the output end of a voltage bias circuit provided in an embodiment of the present application is shown. out A comparison diagram of the second voltage V2 loaded onto the second comparator voltage input terminal 220 (ΔV>0). Figure 3B The voltage V at the input of the voltage bias circuit is also shown as a dotted line. in Timing diagram of .

[0065] The pulse signal m1 occurs at time t1. At this time, the voltage of the first comparator input terminal 210 is V1(t1). At the same time, when the pulse signal m1 arrives, the switch circuit 120 is connected, and the voltage of the second comparator input terminal 220 is V2(t1)=V1(t1)+ΔV. At the same time, when the switch circuit 120 is connected, the capacitor C hold Charge the capacitor C hold The voltage across the positive and negative electrodes becomes V2(t1). After the pulse signal m1 ends, the switch circuit 120 is disconnected, and the capacitor Chold The voltage stabilization effect makes the second voltage of the second comparator input terminal 220 basically stable at V2(t1), and the stabilization time is one clock cycle T of the pulse signal. sample ,for example Figure 3B As shown by the horizontal line L1 in FIG. As mentioned above, the basically stable capacitance C hold The voltage stabilization effect can allow the second voltage of the second comparator input terminal 220 to slightly decrease based on V2(t1). The decrease does not exceed the first amplitude. For example, the first amplitude can be 1%, 2%, 3%, 4%, 5%, 6%, 7%, 8%, 9% or 10% of ΔV(t1) or an interval between any two of these numbers.

[0066] The pulse signal m2 occurs at time t2. When the pulse signal m2 arrives, the voltage at the first comparator input terminal 210 is V1(t2), the switch circuit 120 is connected again, and the voltage at the second comparator input terminal 220 increases instantaneously from V2(t1) to the same voltage as the output terminal of the voltage bias circuit, that is, increases to V2(t2)=V1(t2)+ΔV(t2). At the same time, when the switch circuit 120 is connected, the capacitor C hold Charge the capacitor C hold The voltage across the positive and negative electrodes becomes V2 (t2). After the pulse signal m2 ends, the switch circuit 120 is disconnected, and the capacitor C hold The voltage stabilization effect makes the second voltage of the second comparator input terminal 220 basically stable at V2(t2), and the stabilization time is one clock cycle T of the pulse signal. sample ,for example Figure 3B As shown by the horizontal line L2 in FIG. As mentioned above, the substantially stable capacitance C hold The voltage stabilization effect can allow the second voltage of the second comparator input terminal 220 to slightly decrease based on V2(t2). The decrease does not exceed the first amplitude. For example, the first amplitude can be 1%, 2%, 3%, 4%, 5%, 6%, 7%, 8%, 9% or 10% of ΔV(t2) or an interval between any two of them.

[0067] It can be seen from this that the timing diagram of the voltage V2 acting on the second comparator input terminal 220 is as follows: Figure 3B As shown. Since the magnitude of the first voltage V1 is the same as V in The same. Therefore, we can also get the relationship between the first voltage V1 and the second voltage V2. As an example, Figure 3B 4 also shows a timing diagram of a first voltage V1 loaded on the first comparator input terminal 210 and a second voltage V2 loaded on the second comparator input terminal 220 provided according to an embodiment of the present application.

[0068] refer to Figure 3BAt time t2, the switch circuit 120 receives the pulse signal m2 from the clock circuit 300. The pulse signal m2 causes the second voltage to increase from V2(t1) to V2(t2). Figure 3B As shown by the vertical line L3 in . V2 and V1 intersect, and the intersection point is X1. The time corresponding to X1 is t2. Before the time t2, the first voltage is above the second voltage, that is, the first voltage is greater than the second voltage. After the time t2, the first voltage is below the second voltage, that is, the first voltage is less than the second voltage. Since the first voltage V1 is loaded on the first comparator input terminal and the second voltage V2 is loaded on the second comparator input terminal, before the clock signal m2 arrives, the first voltage is greater than the second voltage, and the output of the comparator 200 is a high level; after the clock signal m2 ends, the first voltage is less than the second voltage, so the output of the comparator 200 is a low level. That is, when the clock signal m2 arrives, the comparator changes from a high level to a low level. Therefore, the clock signal m2 can cause the comparator to flip once.

[0069] Continuing to refer to 3B, according to the previous description, the time between the end of the pulse signal m2 and the arrival of the pulse signal m3 (i.e. Figure 3B During this period, the first voltage V1 continues to rise from the intersection point X1. At point X2, the first voltage and the second voltage intersect again. The time corresponding to the intersection point X2 is t x2 That is, at t x2 At the moment t3, the comparator flips again. Combined with the previous description, at the moment corresponding to the intersection X1, the output of the comparator flips from a high level to a low level (i.e., a falling edge appears), at the moment corresponding to the intersection X2, the output of the comparator flips from a low level to a high level (i.e., a rising edge appears), and at the moment t3 when the next pulse signal m3 arrives, the output of the comparator flips from a high level to a low level again (i.e., a falling edge appears again).

[0070] In the clock cycle T sample At the beginning of the second voltage V2 is lower than the first voltage V1; in one of the clock cycles T sample When the rising amplitude of the working voltage V0 exceeds the bias voltage value, the output of the comparator 200 undergoes at least one high-low level flip.

[0071] Note that the above flip is based on the premise that in a clock cycle T sample At the beginning, ΔV makes the step voltage V2 greater than the voltage V1 that floats naturally with V0, and in a clock cycle T sampleWithin , the variation range of the floating voltage V1 is greater than ΔV, so that V1 and V2 intersect. Under this condition, every time a pulse signal arrives, the output of the comparator flips from high level to low level (i.e., a falling edge appears); between two pulse signals, the output of the comparator flips from low level to high level (i.e., a rising edge appears); when the next pulse signal arrives, the output of the comparator flips from high level to low level again (i.e., a falling edge appears again).

[0072] Combined with the previous description, when Figure 2A The input signal V HV is an AC signal. HV When at the falling edge, the first voltage V1 decreases with time and is less than the second voltage V2 at the beginning of the V1 clock cycle. Therefore, the second voltage V2 is always greater than the first voltage V1, and the output of the comparator 200 always outputs a low level without flipping.

[0073] In summary, when V HV When V is at the rising edge, the output of the comparator can be reversed, that is, the comparator can output a pulse; HV When at the falling edge, the output of the comparator does not flip, that is, the comparator does not output a pulse.

[0074] Therefore, the detection and output circuit 700 detects whether the comparator can output a pulse to obtain V HV Whether the current is at the rising edge or the falling edge.

[0075] In summary, the AC / DC voltage detection circuit provided in the present application uses the voltage bias circuit 110 in the voltage adjustment circuit 100 to add an offset to the working voltage V0. When the switch is closed, the offset will be stored in the capacitor C hold Using the switch, clock signal and capacitor C downstream of the voltage bias circuit 110 hold The offset signal is sampled and held. This makes the slopes of the first voltage signal (direct sample) loaded on the first comparator input terminal and the second voltage loaded on the second comparator input terminal different, so that a crossover occurs within the clock cycle. Each time a crossover occurs, the output of the comparator will flip. The characteristics of the input electrical signal can be determined based on whether the comparator can output a pulse signal, such as whether the input signal fluctuates, whether it is a rising edge, or a falling edge.

[0076] In some embodiments, the IC is only allowed to operate at the rising edge of AC. At the falling edge of AC, the IC is not operated. To determine the timing of stopping the IC, the detection circuit needs to detect when the input signal changes from the rising edge to the falling edge. For the input signal V HVFor example, it is the transition from the rising edge to the falling edge at the position of the peak 901. Therefore, if the position of the peak 901 can be accurately detected, the transition timing from the rising edge to the falling edge can be known.

[0077] The detection circuit 001 provided in the present application can determine the transition from the rising edge to the falling edge according to the last intersection point of V1 and V2.

[0078] refer to Figure 2A , when V1 approaches the peak value 901, the slope of V1 gradually decreases. As the clock continues, the slope of V1 gradually decreases to zero and continues to decrease to a negative slope. At the end of the rising edge, as the slope of V1 gradually decreases, the first voltage and the second voltage no longer cross, and the output of the comparator no longer flips. That is, the comparator no longer continuously outputs pulses.

[0079] As an example, Figure 2B shows a timing diagram of V1 and V2 provided according to an embodiment of the present application, Figure 2C Shows Figure 2B The enlarged graph of the curves of V1 and V2 in the clock cycle T1, Figure 2D Shows Figure 2B The enlarged diagram of the curves of V1 and V2 in the clock cycle T2. In the clock cycle T1, V1 and V2 intersect, and their intersection point X1 is the last intersection point of V1 and V2 in the rising edge. In the clock cycle T2 immediately following the clock cycle T1 and the rising edge thereafter, V1 and V2 no longer intersect.

[0080] refer to Figure 2C and Figure 2D It can be seen that: within the clock cycle T1, the change ΔV1 of V1 is greater than the bias voltage ΔV, so V1 and V2 intersect; while within the clock cycle T2, the change ΔV1 of V1 is less than the bias voltage ΔV, so V1 and V2 do not intersect.

[0081] That is, in one clock cycle T sample When the change of the operating voltage is greater than the bias voltage, V1 and V2 will cross, and the output signal of the output terminal will achieve at least one target flip between a high level and a low level.

[0082] As the input signal climbs along the rising edge, the slope of the input signal gradually decreases, so within a clock cycle, the change of the input signal becomes smaller and smaller until it becomes zero. At the position of the peak 901, the slope of the input signal is zero.

[0083] According to the above description, when the change of the working voltage is greater than the bias voltage, V1 and V2 will cross, and when the change of the working voltage is less than the bias voltage, V1 and V2 will not cross. In the process of the input signal climbing along the rising edge, the change of the input signal becomes smaller and smaller until it reaches zero. Since the magnitude of the bias voltage is not zero, before reaching the peak 901, V1 and V2 gradually change from "crossing" to "not crossing". Therefore, there must be a last intersection.

[0084] The position of the peak 901 can be determined according to the position of the last intersection point, that is, the position of the peak 901 can be determined according to the last target flip event that occurs in the comparator.

[0085] Within the duration of a rising edge, the last pulse output by the comparator corresponds to the last crossing of V1 and V2. In other words, the timing when the comparator stops outputting pulses corresponds to the last crossing.

[0086] In summary, the circuit provided by the present application can judge the transition from rising edge to falling edge according to the timing when the comparator stops outputting pulses. The closer the timing of stopping outputting pulses (i.e. the timing when the last intersection occurs) is to the peak, the higher the accuracy of the judgment.

[0087] As an example, Figure 2E According to this application Figure 2A Detailed view of area A in the middle. Reference Figure 2E When the comparator no longer outputs pulses, the second target circuit can be triggered to monitor the output of the comparator. When the comparator starts to output continuous pulses again, the second target circuit can be reset to indicate that it has entered the rising edge again. In this way, the input signal V can be obtained through the output of the second target circuit. HV The current state of the second target circuit (at a rising edge or a falling edge). As an example, the second target circuit may be a monitoring circuit. As an example, the monitoring circuit may include a power-on prohibition unit or a switch signal prohibition unit. In some embodiments, the power-on prohibition unit may include a hardware power-on prohibition circuit, and the switch signal prohibition unit may include a hardware switch signal prohibition circuit. In some embodiments, the monitoring circuit may also be implemented by controlling a general circuit through software, such as controlling a general control circuit through a power-on prohibition program or a switch signal prohibition program to complete the function of the above-mentioned power-on prohibition circuit or switch signal prohibition circuit.

[0088] Based on the analysis above, the position of the last intersection of V1 and V2 in the rising edge is related to the detection accuracy of the detection circuit. The closer the last intersection is to the real peak, the higher the detection accuracy. By selecting the appropriate bias voltage and clock cycle, the last intersection can be made close to the real peak. In practice, the last intersection will more or less deviate from the real peak, so the circuit sampling will more or less miss the actual peak.

[0089] In some embodiments, it can be set that “once it is detected that the comparator has no output pulse, the power-on prohibition unit or the switch signal prohibition unit is started”.

[0090] refer to Figure 2E , the rising edge and the falling edge are switched at the peak 901. Before the switch, it is a rising edge, and after the switch, it is a falling edge. Assume that the clock time corresponding to the peak 901 is t f At time t f In the previous one or more clock cycles, the first voltage and the second voltage no longer cross each other, and the comparator does not output a pulse.

[0091] In order to improve the detection accuracy and ensure that the second target circuit is started at the falling edge, the detection and output circuit 700 can be configured as follows: when the detection result of the detection circuit shows that the comparator is in n consecutive clock cycles T sample When the target flip does not occur in n consecutive clock cycles, the detection circuit outputs a second signal to trigger the second target circuit, wherein n is a natural number not less than 2. That is, when the comparator does not have the target flip in n consecutive clock cycles, the detection and output circuit generates a second signal to indicate that the operating voltage has been converted from a rising edge to a falling edge, wherein n is a natural number not less than 2. For example, the value of n can be 2, 3, 4, 5, 6, 7, 8, 9, 10, and so on.

[0092] Based on the foregoing description, it can be known that the position of the last intersection of V1 and V2 is related to many factors. As an example, factors affecting the position of the last intersection of V1 and V2 include, but are not limited to, the magnitude of the bias voltage, the sampling frequency of the clock pulse, the frequency and peak value of the input signal, and so on. Therefore, the value of n is also related to the above factors. In practical applications, the value of n can be determined based on the magnitude of the bias voltage, the sampling frequency of the clock pulse, the frequency and peak value of the input signal, and the detection accuracy. In practice, the value of n in the range of 1 to 3 can enable the circuit to maintain a high detection accuracy. In other words, in practice, in order to improve the detection accuracy, the timing of the second target circuit being triggered can be delayed by 1-3 sampling periods T compared to the timing of the last pulse output by the comparator. sample .

[0093] refer to Figure 2A The timing of triggering the second target circuit is delayed by 3 clock cycles T compared to the timing of the comparator stopping outputting pulses. sample , it can be ensured that the second target circuit is triggered on the falling edge, increasing the accuracy of the second target circuit being triggered on the falling edge. If the second target circuit is triggered corresponding to the timing of stopping the IC, then it can be ensured that the timing of stopping the IC is on the falling edge and not far from the actual peak position, thereby improving the detection accuracy of the circuit.

[0094] In addition to the timing of stopping the IC, the detection and output circuit 700 can also determine the timing of starting the IC based on the output of the comparator. Taking the switching power supply controller as an example, the switching power supply controller needs to detect the AC line voltage to determine when the AC line voltage is high enough to start the operation of the IC. When the AC line voltage is too low, the switching power supply controller must stop the switching operation to protect the system from excessive stress during operation.

[0095] Start threshold V HV (start) refers to the pre-set conditions that must be met to start the IC operation. When the input voltage V HV Greater than the start threshold V HV (start) will start the IC operation.

[0096] In some embodiments, V HV A spike may appear on the rising edge. Some of the spikes may cause the input voltage V HV Exceeds the start threshold V for a short time HV (start), and when the spike passes, the input voltage V HV may recover to the start threshold V HV (start) is below (i.e., below the start threshold). In this case, if the setting “once the input voltage V is detected” is HV Exceeding the start threshold V HV (start), the IC is immediately started, which will cause an erroneous start. Therefore, in some embodiments of the present application, the detection and output circuit 700 can be configured as follows: when the detection result of the detection and output circuit 700 is displayed in N consecutive clock cycles T sample The target flip occurs in the comparison results, and the operating voltage V HV are not less than the start threshold V HV(start), the detection and output circuit 700 outputs a first signal to start the IC, wherein N is a natural number not less than 2. For example, the value of N can be 2, 3, 4, 5, 6, 7, 8, 9, 10, etc. As an example, the first signal can be configured to control the start of a first target circuit. As an example, the first target circuit can include an IC. As an example, the IC can include a flyback converter.

[0097] That is, according to the circuit provided by the present application, the IC can be started only when the following two conditions are met at the same time.

[0098] Condition 1: In N consecutive clock cycles T sample In the embodiment, the comparison results output by the comparator 200 all show the target flip.

[0099] Condition 2: When each target flip occurs in all target flips that occur in the N consecutive clock cycles, the operating voltage V HV are not less than the start threshold V HV (start).

[0100] For ease of understanding, in the following description of this application, the circuit is introduced by taking N=2 as an example.

[0101] As an example, Figure 2F FIG. 2 shows a timing diagram of various signals when another AC / DC voltage detection circuit provided in an embodiment of the present application is working. Figure 2F , V HV The peak J in V HV In t J When the time exceeds V HV (start), after the peak J passes, V HV Back to V HV (start). If the input voltage V HV Exceeding the start threshold V HV (start), the IC is started immediately, that is, at t J If the IC is started at the same time, it will cause false start.

[0102] According to the above discussion, according to the circuit provided by the present application, the IC can be started only when both condition 1 and condition 2 are satisfied. Taking N=2 as an example, it can be understood that, to avoid false start, the IC must sample 2 consecutive AC line voltages > the start threshold before enabling the operation.

[0103] Specifically, in Figure 2F In the figure, the peak J makes V HV In t J When the startup threshold VHV (start). HV Exceeding the start threshold V HV In the two consecutive clock cycles from (start) (i.e., in clock cycles T1 and T2), the output results of the comparator both have target flips. Based on the previous description, it can be seen that the target flip in clock cycle T1 corresponds to the timing of the intersection X1, and the target flip in clock cycle T2 corresponds to the timing of the intersection X2. Figure 2F , at the time t when the intersection X1 appears X1 , V HV Less than V HV (start), at the time t when the intersection X2 appears X2 , V HV Greater than V HV (start).

[0104] That is, although V HV Exceeding the start threshold V HV Within the two clock cycles from (start) (i.e., clock cycles T1 and T2), the comparator output results all show a target flip (i.e., satisfying condition 1); however, the corresponding V HV Less than V HV (start) (i.e. condition 2 is not satisfied), therefore, the IC cannot be started. In this way, false start is avoided.

[0105] For two consecutive clock cycles T2 and T3, the comparator output results both have target flips in these two consecutive clock cycles. According to the previous discussion, in the two consecutive clock cycles T2 and T3, the first target flip corresponds to the time when the intersection X2 appears, and the second target flip corresponds to the time when the intersection X3 appears. At the time when the intersection X2 appears, t X2 and the time t at which the intersection X2 appears X3 , V HV Both are greater than V HV That is, for two consecutive clock cycles T2 and T3, the input signal V HV Conditions 1 and 2 are satisfied at the same time, so the IC can be started. This improves the accuracy of the circuit.

[0106] As an example, Figure 2G FIG. 1 shows a circuit structure diagram of a detection and output circuit 700 provided according to an embodiment of the present application. Figure 2G The detection and output circuit 700 may include a comparator 710 , an AND gate circuit 720 , and a counting circuit 730 .

[0107] Comparator 710 is used to compare V HV and V HV(start) When V HV Greater than V HV(start) When the comparator 710 outputs a high level, HV Less than V HV(start) When , the comparator 710 outputs a low level.

[0108] The output terminal of the rising edge trigger circuit 600 is connected to the first input terminal of the AND gate circuit 720. Figure 1 The output of the comparator 200 is the output of the rising edge trigger circuit 600. Based on the above description, when the input signal V HV When the current is AC and the voltage is at a rising edge, the comparator 200 can output a pulse including a target flip (eg Figure 2F shown).

[0109] Continue to refer Figure 2G , the output terminal of the comparator 710 is connected to the second input terminal of the AND gate circuit 720.

[0110] Combination Figure 2G The circuit structure and Figure 2F From the timing diagram of and the principle of AND gate circuit 720, it can be understood that: the pulse output by comparator 200 is used as a sampling pulse to perform a target sampling on the comparison result of comparator 710. The time when each sampling pulse in the target sampling occurs corresponds to the time when the target flip occurs, that is, Figure 2F The moment when the intersection points X1, X2, and X3 occur. When the sampling result corresponding to a sampling pulse is high level, it means that the input signal V HV Greater than V HV(start) , that is, when the intersection occurs, V HV Greater than V HV(start) The output signal of the AND gate circuit 720 represents the result of the sampling. That is, when the output of the AND gate circuit 720 is high, it means that the corresponding intersection occurs when V HV Greater than V HV(start) On the contrary, when the output of AND gate circuit 720 is low, it means that the corresponding cross point appears. HV Less than V HV(start) .

[0111] The input terminal of the counting circuit 730 is connected to the output terminal of the AND gate circuit 720, and the output terminal of the counting circuit 730 is connected to the first target circuit 790. As an example, the first target circuit 790 is a flyback converter. The counting circuit 730 is configured to count the number of pulses output by the AND gate circuit 720. If the counting result of the counting circuit 730 shows that there are two consecutive clock cycles T sampleIf the AND gate circuit 720 outputs a pulse in both clock cycles, it means that the output of the comparator 200 has a target flip in both clock cycles, and the corresponding V HV Both are greater than V HV(start) Therefore, the IC can be started. In summary, sampling 2 consecutive AC line voltages > the start threshold before starting the IC can cleverly avoid false starts.

[0112] It should be noted that the above only lists two conditions that must be met to start the IC. In actual applications, there may be other conditions to start the IC without affecting the core spirit of this application. Figure 2G In the circuit structure shown, the input end of the AND gate circuit 720 can also be connected to signals corresponding to other conditions.

[0113] In some embodiments, the magnitude of ΔV is constant, with the input voltage V in The characteristics are irrelevant.

[0114] As an example, Figure 4A A method for providing two different input groups according to an embodiment of the present application is shown. and Comparison of the outputs corresponding to the two sets of inputs when a constant ΔV is used.

[0115] exist Figure 4A In FIG. 3 , three graphs are shown from left to right. The sampling clock periods in the three graphs are all T sample . Figure 4A The corresponding input signal of the figure on the left is The corresponding bias voltage is ΔV. Figure 4A The middle graph corresponds to the input signal The corresponding bias voltage is ΔV. Figure 4A The corresponding input signal of the figure on the right is The corresponding bias voltage is ΔV'. Figure 4A in,signal The peak value is greater than the signal The peak value, ΔV' is equal to ΔV.

[0116] refer to Figure 4A In the figure on the left, when the input signal is When: in clock cycle T(1), V1 and V2 cross (crossing point X1), and the comparator outputs a pulse; in clock cycle T(2), V1 and V2 cross (crossing point X2), and the comparator outputs a pulse; in clock cycle T(3), V1 and V2 do not cross, and the comparator stops outputting pulses. According to the above description, the detection and output circuit 700 determines the input signal V according to whether the comparator can output a pulse. HV Is the current rising edge or falling edge? If the comparator stops outputting pulses, the next clock pulse (corresponding to Figure 4A When the pulse m4 at time t4 in the left figure arrives, the detection and output circuit 700 outputs a signal indicating that it is at a falling edge. Figure 4A For example, the detection and output circuit 700 will output a signal indicating V at time t4. HV As an example, if the monitoring circuit is used to detect the output of the comparator, when the pulse m4 arrives at time t4, the output of the monitoring circuit will be reversed.

[0117] refer to Figure 4A In the middle figure, when the input signal is When: In clock cycle T(1), V1 and V2 intersect (intersection point Y1), and the comparator outputs a pulse; starting from clock cycle T(2), V1 and V2 no longer intersect, and the comparator stops outputting pulses. According to the above description, the detection and output circuit 700 determines the input signal V according to whether the comparator can output a pulse. HV The current edge is rising or falling. Similarly, if the next clock pulse (corresponding to Figure 4A When the pulse m3 at time t3 in the middle figure arrives, the detection and output circuit 700 outputs a signal indicating that it is at a falling edge. Figure 4A For example, the detection and output circuit 700 will output a signal indicating V at time t3. HV As an example, if the monitoring circuit is used to detect the output of the comparator, when the pulse m3 arrives at time t3, the output of the monitoring circuit will be reversed.

[0118] contrast Figure 4A The left picture and Figure 4A The middle figure shows that when the input signal has a smaller peak value When the same bias voltage ΔV is used, compared with Figure 4A The left figure is composed of Figure 4A The middle figure shows that the monitoring circuit flips at a time distance The peak 901 of has a longer band, that is, when the monitoring circuit flips, In fact, there is a longer band before the rising edge is converted to the falling edge. When the peak value is small, the initial slope is also small. At this time, if the rising edge has ended and the falling edge has begun according to the output result of the comparator, the detection accuracy of the circuit is not very high.

[0119] In some embodiments, the magnitude of ΔV can be the same as V in Related.

[0120] As an example, ΔV can be the same as V in That is, if The peak value is less than The peak value of ΔV2 is also smaller than the value of ΔV1. As an example, Figure 4B FIG. 4 shows a method of ΔV and V according to an embodiment of the present application. in Schematic diagram of the relationship between the peak values. Figure 4B In the embodiment shown, ΔV=K·(V in The peak value of V is shown in Figure 2, where K is a constant value, that is, ΔV is the same as V HV The peak value is linearly positively correlated. It should be noted that Figure 4B The comparison of ΔV and V is only given as an example. HV The positive correlation between the peak values ​​is described in an example line. HV The peak value can also be a nonlinear positive correlation without affecting the core spirit of this application. For example, Figure 4C Another embodiment of the present invention provides another method of ΔV and V in Schematic diagram of the relationship between the peak values. Figure 4C In the example, ΔV is the same as V HV The peak value is positively correlated, but not linearly. Of course, in some embodiments, the size of ΔV can also vary with V in For example, ΔV(t) = K·V in (t).

[0121] Continue to refer Figure 4A ,for Figure 4A The right side of the figure shows that when the input signal has a smaller peak When a smaller bias voltage ΔV' is used: in clock cycle T(1), V1 and V2 cross (crossing point Z1), and the comparator outputs a pulse; in clock cycle T(2), V1 and V2 cross (crossing point Z2), and the comparator outputs a pulse; starting from clock cycle T(3), V1 and V2 no longer cross, and the comparator stops outputting pulses. According to the above description, the detection and output circuit 700 determines the input signal V according to whether the comparator can output a pulse.HV The current edge is rising or falling. Similarly, if the next clock pulse (corresponding to Figure 4A When the pulse m4 at time t4 in the right figure arrives, the detection and output circuit 700 outputs a signal indicating that it is at a falling edge. Figure 4A For example, the detection and output circuit 700 outputs a signal indicating V at time t4. HV As an example, if the monitoring circuit is used to detect the output of the comparator, when the pulse m4 arrives at time t4, the output of the monitoring circuit will be reversed.

[0122] contrast Figure 4A The middle picture and Figure 4A The figure on the right shows that when the input signal has a smaller peak value When a smaller bias voltage ΔV' is used, compared with Figure 4A The middle picture, Figure 4A In the figure on the right, the moment when the output signal of the monitoring circuit flips is delayed by one clock cycle T sample , the input signal V corresponding to the moment when the output signal of the monitoring circuit flips HV Compared to Figure 4A The middle graph is closer to the peak 901, which improves the detection accuracy of the circuit.

[0123] As described above, in some applications, the IC needs to detect the voltage of the input signal to determine whether the input signal is AC or DC.

[0124] For example, for AC-DC controllers, the input signal of current AC-DC controllers can usually only be AC, not DC, so a detection circuit is needed to ensure that the input signal is AC and not DC. On the other hand, in some cases, users hope to expand the input signal of AC-DC controllers from AC to AC and DC so that users can optimize system design and reduce costs according to application requirements. The premise is also to know whether the input signal is AC or DC.

[0125] Based on the analysis of the AC / DC voltage detection circuit provided in the present application, it can be seen that: the AC / DC voltage detection circuit provided in the present application, if V HV For AC, when V HV When the comparator is at the rising edge, the output of the comparator can flip between high and low levels; HV When at the falling edge, the comparator output does not flip between high and low levels.

[0126] When V HV When it is DC, refer to Figure 1 :If the input signal VHV is a direct current. Without considering noise and disturbance, the first voltage V1 is sample The input voltage of the voltage bias circuit is V in =V0=V1, the voltage V at the output of the voltage bias circuit 110 out =V0+ΔV=V1+ΔV. In the clock cycle T sample Inside, V out When the switch circuit 120 is closed, V2 = V out =V0+ΔV=V1+ΔV. When the switch is turned off, V2=V C =V out =V0+ΔV=V1+ΔV. That is, in the entire clock cycle, V2 is always greater than V1 by ΔV, that is, V2=V1+ΔV. V2 and V1 do not cross, so the output of the comparator always outputs a low level. In other words, for the AC / DC voltage detection circuit provided in this application, if V HV For DC, without considering noise and disturbance, or although the input signal V HV There are fluctuations, but the fluctuation amplitude is not enough to be within a clock cycle T sample If V1 surpasses V2 within 1 second, the output of the comparator 200 will not flip.

[0127] In summary, without considering disturbance and noise, for the AC / DC voltage detection circuit provided in this application: when V HV When it is AC, the comparator can output a level-flipping signal at the rising edge of AC; HV When it is DC, the comparator cannot output a level-flipping signal.

[0128] Therefore, the detection circuit provided in the present application can determine the input signal V by detecting the level flip signal output by the comparator through the detection and output circuit 700. HV AC / DC characteristics - that is, whether the input signal is AC or DC. For AC voltages with frequency and voltage amplitude that meet the standards, at V HV The circuit 700 can continuously output multiple level flip signals on the rising edge of the voltage fluctuation, but for AC voltages whose frequency and amplitude do not meet the standards and DC voltages with noise fluctuations, the circuit 700 cannot continuously output a sufficient number of level flip signals on the rising edge of the voltage fluctuation because the rising edge cannot last long enough and / or the amplitude is not high enough. For DC voltages with very little noise, since no detectable rising edge occurs, the circuit 700 cannot output a level flip signal either.

[0129] Combination Figure 1 and Figure 2A, can be seen as: using the clock pulse output by the clock circuit as the sampling pulse, the input signal V HV Sampling is performed, where the sampling period is the period T of the clock pulse sample ——That is, the rising edge trigger circuit is triggered with a preset clock period T sample The working voltage received by the input terminal is sampled. In a sampling period T sample If the rising amplitude of the input signal is greater than the preset bias voltage ΔV, the output signal at the output end (the signal output by the comparator) achieves at least one target flip between the high level and the low level, and the comparator outputs a pulse; if the rising amplitude of the input signal is not greater than the preset bias voltage ΔV, the output signal at the output end (the signal output by the comparator) does not undergo a target flip, and the comparator does not output a pulse.

[0130] In order to make the IC have better performance, the detection circuit provided in the present application: the clock cycle is set so that the rising edge trigger circuit samples the rising edge of the AC voltage of the rated frequency M times (wherein M is a natural number).

[0131] That is, the detection circuit provided by the present application can be realized by carefully selecting the sampling period T sample and / or the number of output pulses to enable the IC to have higher performance.

[0132] The clock cycle T sample The relationship between the detection accuracy is briefly analyzed.

[0133] As an example, Figure 4D A timing diagram 001 of V1 and V2 provided according to an embodiment of the present application is shown. Figure 4E A timing diagram 002 of V1 and V2 provided according to an embodiment of the present application is shown. Figure 4F A timing diagram 003 of V1 and V2 provided according to an embodiment of the present application is shown. The circuit structures corresponding to the timing diagrams 001, 002 and 003, the input signal V HV and the bias voltage ΔV are the same, but the clock period T of the corresponding sampling clock pulse is sample Different. Among them, timing diagram 001 is used as the control group, and its clock period is T sample , Timing Diagram 002 and Timing Diagram 003 are experimental groups, and the clock period of Timing Diagram 002 is 1 / 2T sample , the clock period of timing diagram 003 is 2T sample .

[0134] Due to the circuit structure, the input signal V HV And the bias voltage ΔV are the same, therefore, the first voltage corresponding curve V1 in the timing diagram 001, the timing diagram 002 and the timing diagram 003 is the same.

[0135] Comparing the timing diagram 001 and the timing diagram 002, we can see that for the same bias voltage ΔV and input signal V HV , when the clock period is 1 / 2T sample When the last intersection of V2 and V1 decreases, it advances forward, that is, compared with the clock period of T sample , when the clock period is 1 / 2T sample When V1 and V2 cross the last point, the distance from the input signal V HV The peak is farther away and the detection accuracy is lower.

[0136] Comparing the timing diagram 001 and the timing diagram 003, we can see that for the same bias voltage ΔV and input signal V HV , when the clock period is 2T sample When the clock period is 1.2T, the position of the last intersection point of V2 and V1 does not change. sample By analyzing the situation, we can know that compared with the clock cycle T sample , when the clock cycle is 1.2T sample When , the last intersection point of V1 and V2 is closer to the peak value 901 of the input signal, and the detection accuracy is higher.

[0137] It should be noted that Figure 4D , Figure 4E and Figure 4F The analysis is just a simple analysis of the relationship between the clock cycle and the last crossing point position in the form of a graphical comparison. From the above analysis, it can be seen that due to the periodicity of the sampling clock, the relationship between the clock cycle and the last crossing point position is not a simple positive or negative correlation.

[0138] Through the above analysis, it can be determined that: the last intersection of V1 and V2 is at the same clock cycle T sample are relevant.

[0139] In practice: If the sampling period T sample If the sampling frequency is too high (i.e. the sampling period is too small), the frequency of the comparator operation will increase, which will reduce the circuit detection speed. At the same time, if the sampling frequency is too high, the circuit energy consumption will increase. In a low-load working environment, energy consumption is a key performance indicator of the circuit. If the sampling period T sample If the sampling frequency is too low, the number of pulses output by the comparator in a rising edge will decrease. If the number of pulses output by the comparator in a rising edge is too small, the detection accuracy of the circuit will be reduced.

[0140] Therefore, for a given input signal V HV, you can choose an appropriate clock period T sample To achieve a balance between detection speed and detection accuracy in the circuit, so that the IC can obtain better performance.

[0141] For the convenience of description, in the following description of this application, “T up ” indicates the input signal V HV The duration of a continuous rising edge in . For the duration T of a rising edge up , M clock pulse sampling points can be set to obtain the best balance between detection speed and detection accuracy, where M is a natural number. As an example, the value of M can be between [10, 100]. Correspondingly, the clock period T sample The value range of the input signal V HV , 1 / 100 to 1 / 10 of the duration of a rising edge in . Specifically, the value of M can be any value among 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, or an integer between any two numbers. Specifically, the value of M can be set between [18, 30]. For example, M can be set to any one of 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30. Specifically, the value of M can be set between [15, 25]. For example, M can be set to any value among 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25. For example, the value of M can be 20, that is, at V HV Or a rising edge in the working voltage triggers the circuit to V HV Or the working voltage is sampled 20 times.

[0142] When the input signal V HV When it is a periodic signal, the value of M can also be converted into the period T of the clock pulse. sample or frequency f sample Without affecting the core spirit of this application.

[0143] As an example, when the input signal V HV When the frequency is 50HZ, for example, the input signal is an AC signal without frequency modulation, the number of sampling of the clock pulse set in one rising edge is M, so that the detection circuit can obtain a better balance between detection speed and detection accuracy. HV The frequency is 50HZ and the period is 20ms. Then, the duration of a rising edge in the input signal is T up =1 / 4T HV =5ms. Taking M=25 as an example, 25 samples can be taken on a rising edge, then the clock period of the clock pulse is Tsample =200us, the corresponding clock pulse frequency f sample =5kHZ.

[0144] In summary, carefully choose the clock period T sample The value of makes the number of samples in one rising edge M, which can make the detection circuit achieve sufficient performance without over-design.

[0145] In some embodiments, in order to further improve the accuracy of the detected AC / DC characteristics, when the detection result of the detection and output circuit shows that within a preset M consecutive clock cycles, the output signal of the rising edge trigger circuit has a preset m number of target flips (where m is a natural number), the detection and output circuit generates an AC judgment signal; when the detection result of the detection and output circuit shows that in a rising edge of the working voltage, the output signal of the output end has less than m target flips, the detection and output circuit generates a DC judgment signal.

[0146] The value of m may be related to M. When M takes a larger value, the value of m may also take a larger value as appropriate. When M takes a smaller value, the value of m may also take a smaller value as appropriate. As an example, the value of m may be between 1 / 4 and 3 / 4 of M. Specifically, the value of m may be between 1 / 3 and 2 / 3 of M. Specifically, the value of m may be around 1 / 2 of M.

[0147] As an example, the value of m can be set between [5,30]. As an example, the value of m can be set between [8,12]. For example, m can be set to any one of 8, 9, 10, 11, and 12. Taking the input signal as an unmodulated AC signal of the mains, the number of samples M of the clock pulse set in a rising edge can be between [15, 25], and the value of m can be set between [8,12]. Taking M=25 and m=10 as an example, that is, the clock period of the clock pulse can be set to T sample =200us, the frequency of the clock pulse is f sample =5kHZ, within 25 clock pulses of a rising edge, as long as the comparator can output no less than 10 pulses, the detection and output circuit will generate an AC judgment signal; if within 25 clock pulses of a rising edge, the number of pulses output by the comparator is less than 10, the detection and output circuit will generate a DC judgment signal.

[0148] In this way, by selecting a suitable m, the problem of reduced detection accuracy caused by the influence of noise and interference in the input signal on the comparator output is solved, and the accuracy of AC / DC detection is further improved.

[0149] In summary, the circuit provided in the present application can achieve better performance by selecting appropriate sampling time and time interval without over-designing the circuit, thereby reducing costs.

[0150] In some embodiments, the AC / DC voltage detection circuit provided by the present application may further include a judgment circuit. The judgment circuit receives an operating voltage. The judgment circuit is configured to judge the magnitude of the operating voltage. Specifically, the judgment circuit is configured to judge whether the operating voltage is greater than a preset voltage. When the judgment circuit judges that the operating voltage is not less than the preset voltage, the judgment circuit activates the detection and output circuit to detect the change of the operating voltage and the target flip, thereby generating an AC judgment signal or a DC judgment signal.

[0151] Specifically for AC judgment, when the judgment circuit judges that the operating voltage is not less than the preset voltage, and the detection and output circuit detects that within the preset M consecutive clock cycles, the output signal of the rising edge trigger circuit has the preset m target flips, the detection and output circuit generates an AC judgment signal.

[0152] Specifically for DC judgment, when the judgment circuit judges that the operating voltage is not less than the preset voltage, and the detection output circuit detects that in a rising edge of the operating voltage, the output signal of the output end has less than m target flips, the detection and output circuit generates a DC judgment signal.

[0153] Based on the above description, the operating voltage can be determined by the input voltage V HV Therefore, the judgment circuit can also be used to determine the input voltage V HV For ease of understanding, in the following description of this application, the circuit is judged to determine the input voltage V HV The judgment circuit is introduced by taking judgment as an example.

[0154] As an example, Figure 4G FIG. 1 shows a circuit structure diagram of another AC / DC voltage detection circuit 001 provided according to an embodiment of the present application. Figure 4G , the AC / DC voltage detection circuit 001 includes a judgment circuit 960. The judgment circuit 960 receives an input voltage V HV The judgment circuit 960 is configured to HV Specifically, the judgment circuit 960 judges the input voltage V HV Is it greater than the preset value V K The preset value V k It can be the minimum voltage value for the circuit to start. In other words, only when the input voltage VHV Exceeds the preset value V K The AC / DC voltage detection circuit starts the AC / DC detection when the input voltage V HV Less than the preset value V K When the AC / DC voltage detection circuit does not start the AC / DC detection. HV Take the unmodulated mains as an example, V K The value of can be between [20V,40V]. For example, V K The value can be 30V. In this way, when there is no input voltage V HV Or the input voltage V HV When the value is too small, the AC / DC voltage detection circuit can be considered as not working, which can reduce power consumption on the one hand and avoid erroneously outputting a signal representing DC power when there is no input signal on the other hand.

[0155] There are many ways to implement the judgment circuit 960. For example, Figure 4G In the embodiment shown, the judgment circuit 960 may include a comparator 961 and an AND gate 962. The positive electrode of the comparator 961 receives an input voltage V HV , the negative electrode receives the preset value V K , so that the input voltage V HV Is it greater than the preset value V K Make a judgment. When the input voltage V HV Greater than the preset value V K When the comparator 961 outputs a high level, the input voltage V HV Less than the preset value V K When , the comparator 961 outputs a low level. One input terminal of the AND gate 962 is connected to the output terminal of the comparator 961, and the other input terminal receives the input voltage V HV Only when the comparator 961 outputs a high level, the AND gate 962 will have an output, and the rising edge trigger circuit 600 and the detection and output circuit 700 located downstream may have an output.

[0156] Of course, in addition to Figure 4G The circuit structure shown in the figure, the judgment circuit 960 can also adopt other circuit structures without affecting the core spirit of the present application. For example, the AND gate 962 can be arranged between the rising edge trigger circuit 600 and the detection and output circuit 700. For another example, the AND gate 962 can be arranged downstream of the detection and output circuit 700.

[0157] In some embodiments, the judgment circuit 960 may further include a timing / counting circuit 963. The timing / counting circuit 963 may HV Exceeds the preset value V KThe duration / number of times are counted to ensure that the input voltage V HV Basically stabilize at the preset value V within a certain period of time K For example, the timing / counting circuit 963 can sample and count the output of the comparator 961 to determine whether the input voltage V HV Exceeds the preset value V K How long is the duration, or determine the input voltage V within this 50ms HV Exceeds the preset value V K When determining the input voltage V HV Within this 50ms, it can basically stabilize at the preset value V K When the voltage is above 0, the judgment circuit 960 outputs a high level, and then the AC / DC voltage detection circuit starts the AC / DC detection.

[0158] The structure and connection mode of the timing / counting circuit 963 may also be in various ways. For example, the timing / counting circuit 963 may include a counting circuit connected between the AND gate 962 and the rising edge trigger circuit 600. For another example, the timing / counting circuit 963 may include a clock circuit connected to the other input end of the AND gate 962.

[0159] Based on the analysis above, the output of the rising edge trigger circuit does not flip during the falling edge of AC, that is, the rising edge trigger circuit cannot output a pulse during the falling edge of AC. If the AC / DC detection is enabled during the falling edge, the falling edge of AC will be mistaken for DC.

[0160] Therefore, for the AC / DC voltage detection circuit provided by the present application, the AC / DC detection is prohibited at the falling edge of AC, that is, the AC / DC detection is enabled only at the rising edge of AC.

[0161] Based on the analysis above, when the input signal V HV When the rising edge changes to the falling edge, the second target circuit is triggered (for example Figure 2A ). Therefore, it can be set that: AC / DC detection is started only when the output of the second target circuit is at a low level. In this way, when the output of the second target circuit is at a high level, AC / DC detection can be prohibited. Specifically, an inverter can be connected to the output end of the second target circuit, and a logic AND circuit can be set downstream of the inverter, one input end of the logic AND circuit is connected to the input end of the inverter, and the other end of the logic AND circuit can be connected to one or more output ends in the detection output circuit, so that the detection result of the detection and output circuit can be limited to be valid on the rising edge. Of course, other circuit structures can also be used to prohibit AC / DC from working on the falling edge without affecting the core spirit of this application.

[0162] In summary, the present application provides an AC / DC voltage detection circuit, which uses the voltage bias circuit 110 in the voltage adjustment circuit 100 to add an offset to the working voltage V0. When the switch is closed, the offset will be stored in the capacitor C hold Using the switch, clock signal and capacitor C downstream of the voltage bias circuit 110 hold The offset signal is sampled and held. This makes the slopes of the first voltage signal (direct sample) loaded on the input of the first comparator and the second voltage loaded on the input of the second comparator different, so that a crossover occurs within the clock cycle. Each time a crossover occurs, the output of the comparator will flip. The characteristics of the input electrical signal can be determined based on whether the comparator can output a pulse signal, such as whether the input signal fluctuates, whether it is AC or DC, and whether it is a rising edge or a falling edge.

[0163] The AC / DC voltage detection circuit provided in the present application, the detection and output circuit 700 can accurately give the AC / DC characteristics of the input signal according to the pulse output by the comparator, so that the input signal of the AC-DC controller can be expanded from AC to AC and DC. On the one hand, the circuit structure is simple, the number of components is small, and the IC cost and volume can be reduced. On the other hand, the circuit has high accuracy and can strike a balance between circuit complexity, detection accuracy, sufficiently fast detection speed, and low cost, so as to achieve the best performance and IC cost balance. For example, as long as a reasonable ΔV value and sampling clock T are set sample The frequency can control the frequency of the pulse output by the comparator. Further, for analog ICs (including, but not limited to, switching power supply controllers, audio and video amplifiers, signal converters, etc.), if digital circuits are used to sample and detect the characteristics of electrical signals, adding digital design to the analog IC will increase the cost of the IC. The detection circuit provided by the present application has an input signal V HV It can be an analog signal. When applied to an analog IC, it can greatly reduce the complexity of the analog IC, thereby achieving a balance between circuit complexity, detection accuracy, sufficiently fast detection speed, and low cost, and achieving the best performance and IC cost balance.

[0164] It should be noted that, for the sake of convenience, in the above description, the detection circuit is introduced by taking the bias voltage as a positive bias as an example. In practice, as an example, the bias voltage can be a negative bias without affecting the core spirit of the present application. For example, the bias voltage can be set to -ΔV. Figure 5 A circuit structure schematic diagram of another AC / DC voltage detection circuit 002 provided according to an embodiment of the present application is shown.

[0165] refer to Figure 5The voltage bias circuit 110 is arranged on the first circuit S1. At this time, the voltage bias circuit 110 is connected in series with the first adjustment circuit output terminal 102 and the adjustment circuit input terminal 101. That is, the two ends of the voltage bias circuit 110 are connected to the adjustment circuit input terminal 101 and the first adjustment circuit output terminal 102 respectively.

[0166] The step voltage generating circuit 500 is arranged on the second circuit S2. At this time, the step voltage generating circuit 500 is connected in series with the adjusting circuit input terminal 101 and the second adjusting circuit output terminal 103. That is, the two ends of the step voltage generating circuit 500 are connected to the adjusting circuit input terminal 101 and the second adjusting circuit output terminal 103 respectively. Figure 5 , the first comparator input terminal 210 is the positive electrode of the comparator, the second comparator input terminal 220 is the negative electrode of the comparator, and the bias voltage is a negative voltage -ΔV.

[0167] As an example, Figure 6 Shows Figure 5 A comparison diagram of the operating voltage V0, the first voltage V1 and the second voltage V2 in the circuit structure in FIG.

[0168] The voltage bias circuit 110 adds the bias voltage to the working voltage V0 to generate the first voltage V1. The bias voltage is a negative value, and its absolute value is equal to ΔV, that is, the bias voltage is -ΔV. Then, V1 = V0-ΔV. The timing diagram of the first voltage V1 is as follows: Figure 6 As shown in V1.

[0169] The step voltage generating circuit 500 acts on the working voltage signal V0 to generate a stepped second voltage V2 by causing the working voltage signal V0 to generate a stepped second voltage V2.

[0170] refer to Figure 5 and Figure 6 When the clock pulse m1 arrives, the switch Q1 is connected, the second voltage V2 is the same as the working voltage V0 and is V2(t1). When the switch Q1 is connected, the capacitor C hold is charged to V2(t1); after the clock pulse m1 ends, switch Q1 is disconnected, and capacitor C hold The voltage of the negative electrode of the comparator is basically maintained at V2(t1) (i.e. Figure 6 The holding time is one clock cycle T of the clock pulse. sample The basic stability represents the capacitance C hold The voltage stabilization effect can allow the second voltage of the second comparator input terminal 220 to drop slightly on the basis of V2(t1). The drop does not exceed the first amplitude. For example, the first amplitude can be 1%, 2%, 3%, 4%, 5%, 6%, 7%, 8%, 9% or 10% of ΔV(t1) or the interval between any two numbers. Figure 6 It can be seen that the clock cycle T corresponding to the horizontal line L1 sample At the beginning, the first voltage V1 is lower than the second voltage V2. sample During the period, the working voltage V0 rises along the rising edge, and the first voltage V1 also rises along the rising edge. During this period, the second voltage V2 is on the capacitor C hold The effect of the first voltage V1 remains substantially constant. In this clock cycle, the rise of the first voltage exceeds the bias voltage, the first voltage V1 intersects with the second voltage V2 (the intersection point is X1), and the comparator flips.

[0171] When the clock pulse m2 arrives, the switch Q1 is connected, and the second voltage V2 increases instantaneously to the same as the working voltage V0, that is, increases to V2(t2). Before the clock pulse m2 arrives, the second voltage V2 is V2(t1). The arrival of the clock pulse m2 causes the second voltage V2 to increase instantaneously from V2(t1) to V2(t2). Before the increase, the value of the second voltage V2(t1) is less than the first voltage V1, that is, the positive voltage of the comparator is greater than the negative voltage, and the comparator outputs a high level; after the increase, the value of the second voltage V2(t2) is greater than V1, that is, the positive voltage of the comparator is less than the negative voltage, and the comparator outputs a low level. In other words, the arrival of the clock pulse m2 causes the first voltage V1 and the second voltage V2 to cross once (the intersection point is X2), and the comparator flips once.

[0172] At the same time, the clock pulse m2 reaches the capacitor C when the switch Q1 is turned on. hold is charged, so that the capacitor C hold The voltage across the positive and negative electrodes becomes V2(t2); after the clock pulse m2 ends, switch Q2 is disconnected, and capacitor C hold The second voltage V2 loaded on the negative electrode of the comparator is maintained at V2(t2) (i.e. Figure 6 The holding time is one clock cycle T of the clock pulse. sample .

[0173] In summary, by using a negative bias voltage, the first voltage and the second voltage can also cross within the clock cycle, causing the comparator to flip, so that the input signal can be judged as a DC signal or an AC signal based on the output of the comparator (such as whether the comparator can output pulses and the number of output pulses).

[0174] It should be noted that, for the sake of convenience of description, the above text uses "the first comparator input terminal is the positive electrode of the comparator; the second comparator input terminal is the negative electrode of the comparator" as an example to illustrate the principle of the AC / DC voltage detection circuit. The first comparator input terminal can be the negative electrode of the comparator, and the second comparator input terminal can be the positive electrode of the comparator without affecting the core spirit of this application.

[0175] For the sake of ease of description, in the foregoing description of this application, the structure of the detection circuit is introduced by taking the target flip from a low level to a high level as an example. In practice, the target flip can be from a high level to a low level without affecting the core spirit of this application.

[0176] As an example, Figure 7 A circuit structure schematic diagram of another AC / DC voltage detection circuit 003 provided according to an embodiment of the present application is shown. Figure 7 The circuit structure shown is the same as Figure 1 The circuit structures shown are similar, except that: Figure 7 The output terminal of the first voltage regulating circuit is connected to the input terminal of the first comparator, wherein the input terminal of the first comparator is the negative electrode of the comparator; Figure 7 The output terminal of the second voltage adjustment circuit in the circuit is connected to the input terminal of the second comparator, wherein the input terminal of the second comparator is the positive electrode of the comparator. That is, the voltage bias circuit 110 is connected in series with the step voltage generating circuit 500 and is arranged on the first circuit S1. Therefore, the first voltage is loaded to the negative electrode of the comparator, and the second voltage is loaded to the positive electrode of the comparator.

[0177] Figure 3B The comparison diagram of the first voltage and the second voltage shown is applicable to Figure 7 Circuit structure. Figure 3B It can be seen that the use of Figure 7 In the circuit structure, every time a clock cycle arrives, the comparator flips once when the clock cycle arrives, and the comparator flips again within the clock cycle. Figure 7 In the circuit shown, taking the clock signal m2 as an example, before the clock signal m2 arrives, the second voltage V2(t1) is less than the first voltage V1, that is, the positive voltage of the comparator is less than the negative voltage, and the comparator outputs a low level; the arrival of the clock pulse m2 causes the second voltage to increase from V2(t1) to V2(t2) instantly, and the increased second voltage V2(t2) is greater than the first voltage V1, that is, the positive voltage of the comparator is greater than the negative voltage of the comparator, and the comparator outputs a high level. In other words, the arrival of the pulse signal m2 causes the comparator to flip from a low level to a high level. After the pulse signal m2 ends, the second voltage is at the capacitor C holdUnder the action of , the second voltage remains at V2(t2). As the first voltage climbs along the rising edge, when the rise of the first voltage exceeds the bias voltage, the second voltage and the first voltage intersect again (intersection point X2). Before the intersection point X2, the second voltage is greater than the first voltage, that is, the positive voltage of the comparator is greater than the negative voltage of the comparator, and the comparator outputs a high level; after the intersection point X2, the second voltage is less than the first voltage, that is, the positive voltage of the comparator is less than the negative voltage of the comparator, and the comparator outputs a low level. That is, in the clock cycle T sample The comparator flips from high level to low level.

[0178] That is, when the clock pulse arrives, the comparator flips from low level to high level, and before the next clock pulse arrives, the comparator flips from high level to low level. Therefore, it is also possible to determine whether the input signal is a DC signal or an AC signal based on the output of the comparator (such as whether the comparator can output pulses and the number of pulses output).

[0179] In some embodiments, the components inside the rising edge trigger circuit 600 may also be connected in other ways without affecting the core spirit of the present application.

[0180] Figure 8 A circuit structure schematic diagram of another AC / DC voltage detection circuit 004 provided according to an embodiment of the present application is shown. Figure 8 The circuit structure shown is the same as Figure 5 The circuit structures shown are similar, except that: Figure 8 The output terminal of the first voltage regulating circuit is connected to the input terminal of the first comparator, wherein the input terminal of the first comparator is the negative electrode of the comparator; Figure 8 The output terminal of the second voltage adjustment circuit is connected to the input terminal of the second comparator, wherein the second comparator input terminal is the positive electrode of the comparator. In other words, the first voltage is loaded to the negative electrode of the comparator, and the second voltage is loaded to the positive electrode of the comparator. Figure 8 The timing analysis can refer to Figure 5 For the sake of brevity, the analysis will not be repeated.

[0181] In summary, the AC / DC voltage detection circuit provided in the present application uses the voltage bias circuit 110 in the voltage adjustment circuit 100 to add an offset to the working voltage V0. When the switch is closed, the offset will be stored in the capacitor C hold Using the switch, clock signal and capacitor C downstream of the voltage bias circuit 110 holdThe offset signal is sampled and held. This makes the slopes of the first voltage signal (direct sample) loaded on the first comparator input terminal and the second voltage loaded on the second comparator input terminal different, so that a crossover occurs within the clock cycle. Each time a crossover occurs, the output of the comparator will flip. The fluctuation of the electrical signal can be determined based on whether the comparator can output a pulse signal, such as whether the electrical signal fluctuates, whether it is a rising edge, or a falling edge.

[0182] The present application provides an AC / DC voltage detection circuit that can detect the voltage of an AC line. The circuit has a simple structure and a small number of components, which can reduce IC cost and volume. The circuit has high accuracy and can strike a balance between circuit complexity, detection accuracy, sufficiently fast detection speed, and low cost to achieve optimal performance and IC cost balance. For example, as long as a reasonable ΔV value and sampling clock T are set sample The frequency of the pulse output by the comparator can be controlled.

[0183] For analog ICs (including, but not limited to, switching power supply controllers, audio and video amplifiers, signal converters, etc.), if digital circuits are used to sample and detect the characteristics of electrical signals, adding digital design to the analog IC will increase the cost of the IC. The detection circuit provided by the present application has an input signal V HV It can be an analog signal. When applied to an analog IC, it can greatly reduce the complexity of the analog IC, thereby achieving a balance between circuit complexity, detection accuracy, sufficiently fast detection speed, and low cost, and achieving the best performance and IC cost balance.

[0184] The voltage fluctuation rising edge detection circuit provided in the present application can be used in an AC-DC controller. The voltage fluctuation rising edge detection circuit can detect whether the working current of the AC-DC controller is AC or DC, thereby expanding the working current of the AC-DC controller from DC to DC and AC.

[0185] The basic concepts have been described so far, and it may be more apparent to those skilled in the art after reading this detailed disclosure that the above detailed disclosure is intended to be presented only by way of example and not by way of limitation. Although not explicitly stated herein, various changes, improvements and modifications are desired and may be made by those skilled in the art. For example, the steps in the method of the present disclosure may not necessarily be operated in the order described. These steps may also be partially operated and / or operated in other combinations reasonably expected by those of ordinary skill in the art. These changes, improvements and modifications are intended to be proposed by the present disclosure and fall within the spirit and scope of the exemplary embodiments of the present disclosure.

[0186] In addition, certain terms have been used to describe embodiments of the present disclosure. For example, the terms "an embodiment," "an embodiment," and / or "some embodiments" indicate that a particular feature, structure, or characteristic described in conjunction with the embodiment is included in at least one embodiment of the present disclosure. Therefore, it should be emphasized and understood that two or more references to "an embodiment," "an embodiment," or "an alternative embodiment" in various parts of this specification do not necessarily refer to the same embodiment. In addition, particular features, structures, or characteristics may be appropriately combined in one or more embodiments of the present disclosure.

[0187] In addition, those skilled in the art will recognize that aspects of the disclosure may be illustrated and described herein in any of a number of patentable categories or contexts, including any new and useful process, machine, manufacturing or composition problem, or any new and useful improvement thereof. Accordingly, aspects of the disclosure may be implemented entirely in hardware, entirely in software (including firmware, resident software, microcode, etc.), or software and hardware implementations may be combined, all of which are generally referred to herein as "blocks," "modules," "engines," "units," "components," or "systems." In addition, aspects of the disclosure may take the form of a computer program product embodied in one or more computer-readable media having computer-readable program code embodied thereon.

[0188] Furthermore, the order of the processing elements or sequences recited, or the numbers, letters, or other designations used therefor, are not intended to limit the claimed processes and methods to any order except as may be specified in the claims. Although the above disclosure discusses various useful embodiments of what are currently considered to be the present disclosure through various examples, it should be understood that such detail is for that purpose only and that the appended claims are not limited to the disclosed embodiments, but, on the contrary, are intended to cover modifications and equivalent arrangements within the spirit and scope of the disclosed embodiments. For example, although the implementation of the various components described above may be embodied in a hardware device, it may also be implemented as a software-only solution, for example, installation on an existing server or mobile device.

[0189] Similarly, it should be understood that in the foregoing description of the embodiments of the present disclosure, various features are sometimes combined in a single embodiment, figure, or description thereof to simplify the present disclosure to aid in understanding one or more of the various inventive embodiments. However, the disclosed approach should not be interpreted as reflecting an intention that the claimed subject matter requires more features than those explicitly recited in each claim. Rather, an inventive embodiment has less than all of the features of a single foregoing disclosed embodiment.

Claims

1. An AC / DC voltage detection circuit, characterized in that: include: The rising edge trigger circuit includes an input terminal and an output terminal, wherein: The rising edge trigger circuit samples the working voltage received by the input terminal at a preset clock cycle. The clock cycle is set to enable the rising edge trigger circuit to sample the rising edge of the AC voltage of the rated frequency M times, where M is a natural number, and At the rising edge of the working voltage and within one of the clock cycles, when the increase of the working voltage is greater than the preset bias voltage value, the output signal of the output terminal achieves at least one target flip between a high level and a low level; a detection and output circuit connected to the output end of the rising edge trigger circuit, detecting the change of the working voltage and the target flipping, and when detecting that the output signal of the rising edge trigger circuit has the target flipped m times within the preset M consecutive clock cycles, the detection and output circuit generates an AC judgment signal, wherein m is a natural number; and A judgment circuit is used to judge whether the working voltage is greater than a preset voltage, wherein: when the working voltage is greater than the preset voltage, the judgment circuit activates the detection and output circuit to detect changes in the working voltage and the target flipping.

2. The AC / DC voltage detection circuit according to claim 1, characterized in that: During a rising edge of the working voltage, when the output signal of the output terminal undergoes less than m target flips, the detection and output circuit generates a DC determination signal.

3. The AC / DC voltage detection circuit according to claim 1, characterized in that: in: The value range of M is between 15 and 25, and the value range of m is between 8 and 12.

4. The AC / DC voltage detection circuit according to claim 1, characterized in that: The magnitude of the bias voltage is positively correlated with the amplitude of the operating voltage.

5. The AC / DC voltage detection circuit according to claim 1, characterized in that: The rising edge trigger circuit comprises: Adjustment circuit, including The input end of the adjustment circuit receives a working voltage, wherein the working voltage is an AC voltage. The first adjustment circuit output terminal outputs a first voltage, and The output terminal of the second adjustment circuit outputs a second step voltage; Comparators, including A first comparator input terminal receives the first voltage, a second comparator input terminal receiving the second voltage, and The comparator output terminal outputs a comparison result of the first voltage and the second voltage, wherein the second voltage differs from the first voltage by the bias voltage at the beginning of a preset clock cycle and the second voltage does not drop by more than a first amplitude within the clock cycle.

6. The AC / DC voltage detection circuit according to claim 5, characterized in that: wherein the first voltage is lower than the second voltage at the start of the clock cycle; as well as In one of the clock cycles, when the rising amplitude of the first voltage exceeds the bias voltage value, the output of the comparator undergoes the target flip at least once.

7. The AC / DC voltage detection circuit according to claim 5, characterized in that: The adjustment circuit comprises: a voltage bias circuit that adds the bias voltage to an input voltage of the voltage bias circuit; and The step voltage generating circuit converts a voltage input to the step voltage generating circuit into a step voltage.

8. The AC / DC voltage detection circuit according to claim 7, characterized in that: The step voltage generating circuit comprises: a switch circuit; a clock circuit connected to the switch circuit and controlling the switch circuit to open and close according to the clock cycle to generate the second voltage; and A voltage holding circuit is connected to the switch circuit and holds the second voltage after the switch circuit is disconnected, so that the second voltage does not drop by more than the first amplitude within the clock cycle.

9. The AC / DC voltage detection circuit according to claim 8, characterized in that: in: The voltage bias circuit includes at least one of a voltage-controlled current source and a voltage-controlled voltage source; The switch circuit includes at least one field effect transistor; and The voltage holding circuit includes at least one capacitor.

10. The AC / DC voltage detection circuit according to claim 7, characterized in that: The output terminal of the first adjustment circuit is electrically connected to the input terminal of the adjustment circuit; and The voltage bias circuit is connected in series with the step voltage generating circuit, and the series circuit is connected to the input end of the regulating circuit and the output end of the second regulating circuit.

11. The AC / DC voltage detection circuit according to claim 10, characterized in that: The first comparator input terminal is the positive electrode of the comparator, the second comparator input terminal is the negative electrode of the comparator, and the bias voltage is a positive voltage; or The first comparator input terminal is a negative electrode of the comparator, the second comparator input terminal is a positive electrode of the comparator, and the bias voltage is a positive voltage.

12. The AC / DC voltage detection circuit according to claim 7, characterized in that: The voltage bias circuit is connected in series with the output terminal of the first adjustment circuit and the input terminal of the adjustment circuit; and The step voltage generating circuit is connected in series with the input end of the regulating circuit and the output end of the second regulating circuit.

13. The AC / DC voltage detection circuit according to claim 12, wherein: The first comparator input terminal is the positive electrode of the comparator, the second comparator input terminal is the negative electrode of the comparator, and the bias voltage is a negative voltage; or The first comparator input terminal is the positive electrode of the comparator, the second comparator input terminal is the negative electrode of the comparator, and the bias voltage is a negative voltage.

14. The AC / DC voltage detection circuit according to claim 1, characterized in that: It also includes a voltage divider circuit, one end of which is connected to the input voltage, and the other end is connected to the ground line. The voltage divider circuit divides the input voltage into the working voltage output.

Citation Information

Patent Citations

  • Apparatus and method for discharging capacitor of input filter of power supply, and power supply including the apparatus

    CN102457180A