Alternating current and direct current input detection and identification circuit and switching power supply

By using a pure hardware-based AC/DC input detection and identification circuit, and through voltage signal comparison and filtering, the high cost problem caused by embedded microprocessors in existing technologies is solved, achieving low-cost and high-efficiency AC/DC detection.

CN224052308UActive Publication Date: 2026-03-27GUANGZHOU XUZHIYUAN TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing AC/DC input detection and identification circuits require embedded microprocessors, resulting in complex circuit structures and high costs, making it difficult to achieve efficient and low-cost AC/DC compatibility detection.

Method used

The AC/DC input detection and recognition circuit adopts a pure hardware solution, including a sampling circuit, an amplification circuit, a positive and negative signal processing circuit, an RC filter circuit, and an AND gate operation circuit. It realizes the identification of AC and DC power through voltage signal comparison and filtering, thus avoiding the use of embedded microprocessors.

Benefits of technology

It achieves efficient and low-cost AC/DC current detection, simplifies the circuit structure, reduces costs, and eliminates the need for tedious code writing and debugging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN224052308U_ABST
    Figure CN224052308U_ABST
Patent Text Reader

Abstract

The utility model discloses an AC / DC input detection and identification circuit and a switching power supply, and the AC / DC input detection and identification circuit comprises a sampling circuit which samples an AC voltage signal or a DC signal inputted by the sampling circuit in real time, and outputs a first voltage signal through the output end of the sampling circuit; the amplifying circuit is used for amplifying the first voltage signal into a second voltage signal; the positive and negative signal processing circuit compares a positive voltage signal in the second voltage signal with a positive reference voltage signal to generate a third voltage signal, and compares a negative voltage signal with a negative reference voltage signal to generate a fourth voltage signal; the RC filter circuit is used for converting the third voltage signal into a fifth voltage signal and converting the fourth voltage signal into a sixth voltage signal; and the AND gate operation circuit performs AND operation on the fifth voltage signal and the sixth voltage signal to generate a seventh voltage signal, and when the seventh voltage signal is a high level, the seventh voltage signal represents that the sampling circuit inputs an AC voltage signal, and otherwise, the seventh voltage signal is a DC voltage signal. According to the utility model, the cost can be greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The utility model relates to power supply technical field especially relates to a kind of AC-DC input detection identification circuit and switching power supply. BACKGROUND

[0002] Switching power supply because it can realize high efficiency, high power density, now widely used in various fields. In some medium and high power application occasions, in order to adapt to the requirements of existing market regulations, it is necessary to increase a power correction circuit (PFC) as a front-stage pre-regulation, and it is also necessary to realize AC-DC compatible input in some specific application occasions. But the compatibility of PFC of different circuit topologies to AC and DC is different, in order to realize the optimal control strategy (considering efficiency, reliability), then it is necessary to set the circuit that can detect and identify AC and DC at the input port of the power supply, to realize the switching of different control strategies.

[0003] Although, at present, the prior art realizes the accurate detection and identification of AC and DC signals by using embedded micro-processing to realize real-time detection of the amplitude, frequency and phase of the input signal. However, such technical scheme has the following obvious shortcomings:

[0004] (1) First of all, such technology needs to use embedded micro-processing, and write corresponding instruction code;

[0005] (2) Secondly, such technology has a complex circuit structure, and the embedded processor also needs to be matched with detection circuit and logic instruction execution circuit, so the cost is much higher than that of pure hardware circuit scheme. CONTENT OF THE UTILITY MODEL

[0006] Therefore, the technical problem to be solved by the utility model is to provide an AC-DC input detection and identification circuit and switching power supply, which at least solves one of the technical problems existing in the prior art.

[0007] As a first aspect of the utility model, the embodiment scheme of the AC-DC input detection and identification circuit provided is as follows:

[0008] An AC-DC input detection and identification circuit, comprising:

[0009] A sampling circuit comprising a first input terminal, a second input terminal and an output terminal, the sampling circuit is used to sample the AC voltage signal or DC signal input by the first input terminal and the second input terminal in real time, and outputs a first voltage signal from the output terminal;

[0010] An amplification circuit comprising an input terminal and an output terminal, the input terminal inputs the first voltage signal, and the amplification circuit is used to amplify the first voltage signal to a second voltage signal and output the second voltage signal from the output terminal;

[0011] The positive and negative signal processing circuit comprises a first input end, a second input end, a third input end, a fourth input end, a first output end and a second output end, the first input end and the third input end input the second voltage signal, the second input end inputs a positive reference voltage signal, and the fourth input end inputs a negative reference voltage signal; the positive and negative signal processing circuit compares the positive voltage signal in the second voltage signal with the positive reference voltage signal to generate a third voltage signal which is output by the first output end; the positive and negative signal processing circuit compares the negative voltage signal in the second voltage signal with the negative reference voltage signal to generate a fourth voltage signal which is output by the second output end; the third voltage signal and the fourth voltage signal are both positive pulse square wave signals.

[0012] The RC filter circuit comprises a first input end, a second input end, a first output end and a second output end, the first input end inputs the third voltage signal, and the second input end inputs the fourth voltage signal; the RC filter circuit is used for converting the third voltage signal into a fifth voltage signal which is output by the first output end, and converting the fourth voltage signal into a sixth voltage signal which is output by the second output end; the fifth voltage signal and the sixth voltage signal are positive direct current voltage signals.

[0013] The AND gate operation circuit comprises a first input end, a second input end and an output end, the first input end inputs the fifth voltage signal, and the second input end inputs the sixth voltage signal; the AND gate operation circuit is used for performing AND operation on the fifth voltage signal and the sixth voltage signal to generate a seventh voltage signal which is output by the output end; when the seventh voltage signal is a high level, it represents that the first input end and the second input end of the sampling circuit input an alternating voltage signal; when the seventh voltage signal is a low level, it represents that the first input end and the second input end of the sampling circuit input a direct voltage signal.

[0014] Preferably, the sampling circuit comprises a resistor R1 and a resistor R2, one end of the resistor R1 is the first input end of the sampling circuit, the other end of the resistor R1 and the other end of the resistor R2 are connected together to be the output end of the sampling circuit, and the other end of the resistor R2 is the second input end of the sampling circuit.

[0015] Preferably, the amplification circuit comprises a resistor R3, a resistor R4 and an operational amplifier X1, a positive power supply end of the operational amplifier X1 inputs a positive supply voltage, a negative power supply end of the operational amplifier X1 inputs a negative supply voltage, a non-inverting input end of the operational amplifier X1 inputs the first voltage signal, one end of the resistor R4 is used for grounding, the other end of the resistor R4 is connected to the inverting input end of the operational amplifier X1 and one end of the resistor R3 at the same time, and the output end of the operational amplifier X1 and the other end of the resistor R3 are connected together to be the output end of the amplification circuit.

[0016] Preferably, the positive and negative signal processing circuit comprises a comparator U1 and a comparator U2, the non-inverting input terminal of the comparator U1 is the first input terminal of the positive and negative signal processing circuit, the inverting input terminal of the comparator U1 is the second input terminal of the positive and negative signal processing circuit, the output terminal of the comparator U1 is the first output terminal of the positive and negative signal processing circuit, the inverting input terminal of the comparator U2 is the third input terminal of the positive and negative signal processing circuit, the non-inverting input terminal of the comparator U2 is the fourth input terminal of the positive and negative signal processing circuit, and the output terminal of the comparator U2 is the second output terminal of the positive and negative signal processing circuit.

[0017] Preferably, the RC filter circuit comprises a resistor R5, a resistor R7, a capacitor C1 and a capacitor C2, one end of the resistor R5 is the first input terminal of the RC filter circuit, the other end of the resistor R5 and one end of the capacitor C1 are connected together to be the first output terminal of the RC filter circuit, one end of the resistor R7 is the second input terminal of the RC filter circuit, the other end of the resistor R7 and one end of the capacitor C2 are connected together to be the second output terminal of the RC filter circuit, and the other end of the capacitor C1 and the other end of the capacitor C2 are both used for grounding.

[0018] Further, the RC filter circuit further comprises a diode D1 and a diode D2, the anode of the diode D1 is the first input terminal of the filter circuit, the cathode of the diode D1 is connected to one end of the resistor R5, the anode of the diode D2 is the second input terminal of the filter circuit, and the cathode of the diode D2 is connected to one end of the resistor R7.

[0019] Further, the RC filter circuit further comprises a resistor R8 and a resistor R9, the resistor R8 is connected between the first input terminal and the first output terminal of the RC filter circuit, and the resistor R9 is connected between the second input terminal and the second output terminal of the RC filter circuit.

[0020] Preferably, the AND gate operation circuit comprises an AND gate U3, the first input terminal of the AND gate U3 is the first input terminal of the AND gate operation circuit, the second input terminal of the AND gate U3 is the second input terminal of the AND gate operation circuit, and the output terminal of the AND gate U3 is the output terminal of the AND gate operation circuit.

[0021] Preferably, the absolute values of the positive reference voltage signal and the negative reference voltage signal are equal.

[0022] As a second aspect of the utility model, the embodiment scheme of the switching power supply is as follows:

[0023] A switching power supply, wherein: comprising the AC / DC input detection and identification circuit of any one of the first aspect.

[0024] The utility model discloses the remarkable advantages of:

[0025] (1) pure hardware scheme, no embedded microprocessor, no need to write code, debugging complicatedly;

[0026] (2) circuit logic is simple, one way amplifier circuit, two voltage comparators, two RC circuits, one and gate circuit is constituted, and the scheme is easy to implement;

[0027] (3) compared with embedded microprocessor detection, identification scheme, cost is greatly reduced. BRIEF DESCRIPTION OF DRAWINGS

[0028] Figure 1 It is the principle block diagram of AC and DC input detection and identification circuit of the first embodiment of the utility model;

[0029] Figure 2 It is a specific circuit principle diagram of AC and DC input detection and identification circuit of the first embodiment of the utility model;

[0030] Figure 3 It is Figure 2 The simulation waveform diagram of circuit when AC input;

[0031] Figure 4 It is Figure 2 The simulation waveform diagram of circuit when DC input. DETAILED DESCRIPTION

[0032] In order to make the above purpose, features and advantages of the utility model more obvious and easy to understand, the specific embodiment of the utility model is described in detail below with the drawings, obviously, the described embodiment is a part of the embodiment of the utility model, rather than all the embodiment. Based on the embodiment in the application, all other embodiments obtained by the person skilled in the art without making creative labor should belong to the scope of the application.

[0033] It should be noted that the terms "include" and "have" and their any variants described in the specification and claims of the present application are intended to cover the non-exclusive inclusion, for example, include a series of components, unit circuits or control timing, which need not be limited to the clearly listed components, unit circuits or control timing, but can include the components, unit circuits or control timing that are not clearly listed or inherent to these circuits.

[0034] In addition, the embodiments in the application and the features in the embodiments can be combined with each other without conflict.

[0035] It should be understood that in the description and claims, when it is described that an element is "connected" to another element, the element can be "directly connected" to the other element, or "connected" to the other element through a third element; when it is described that a step is followed by another step, the step can be directly followed by the other step, or followed by the other step through a third step.

[0036] First embodiment

[0037] The embodiment provided is an AC / DC input detection and identification circuit, Figure 1 For the principle block diagram of the AC / DC input detection and identification circuit of the first embodiment of the utility model, please refer to Figure 1 It includes:

[0038] The sampling circuit includes a first input end, a second input end and an output end, and is used for real-time sampling AC voltage signals or DC signals input from the first input end and the second input end, and outputs a first voltage signal V1 from the output end;

[0039] The amplification circuit includes an input end and an output end, and inputs the first voltage signal V1 from the input end, and is used for amplifying the first voltage signal V1 to a second voltage signal V2 and outputting the second voltage signal V2 from the output end;

[0040] The positive and negative signal processing circuit includes a first input end, a second input end, a third input end, a fourth input end, a first output end and a second output end, and inputs the second voltage signal V2 from the first input end and the third input end, inputs a positive reference voltage signal Vref+ from the second input end, and inputs a negative reference voltage signal Vref- from the fourth input end, compares the positive voltage signal in the second voltage signal V2 with the positive reference voltage signal Vref+ to generate a third voltage signal V3 and output the third voltage signal V3 from the first output end, compares the negative voltage signal in the second voltage signal V2 with the negative reference voltage signal Vref- to generate a fourth voltage signal V4 and output the fourth voltage signal V4 from the second output end, and the third voltage signal V3 and the fourth voltage signal V4 are both positive pulse square wave signals;

[0041] The RC filter circuit includes a first input end, a second input end, a first output end and a second output end, inputs the third voltage signal V3 from the first input end, and inputs the fourth voltage signal V4 from the second input end, and is used for converting the third voltage signal V3 into a fifth voltage signal V5 and outputting the fifth voltage signal V5 from the first output end, and converting the fourth voltage signal V4 into a sixth voltage signal V6 and outputting the sixth voltage signal V6 from the second output end, and the fifth voltage signal V5 and the sixth voltage signal V6 are positive DC voltage signals;

[0042] And gate operation circuit, including first input end, second input end and output end, its first input end input fifth voltage signal V5, second input end input sixth voltage signal V6, and gate operation circuit is used to carry out and operation to fifth voltage signal V5 and sixth voltage signal V6 after generating seventh voltage signal V7 by its output end output, when seventh voltage signal V7 is high level, when the first input end and the second input end of sampling circuit input is AC voltage signal, when seventh voltage signal V7 is low level, when the first input end and the second input end of sampling circuit input is DC voltage signal.

[0043] The AC / DC input detection and identification circuit of the embodiment adopts a pure hardware scheme, and AC / DC input detection and identification is realized through extremely simple circuit logic, specifically, the second voltage signal output by the amplification circuit is compared with the positive reference voltage signal and the negative reference voltage signal respectively, when the input is AC, the third voltage signal and the fourth voltage signal exist at the same time, when the input is DC, the fourth voltage signal is missing, therefore, the third voltage signal and the fourth voltage signal are subjected to RC filtering to obtain a corresponding DC voltage signal, and then subjected to and operation, the seventh voltage signal output by the and gate operation circuit can represent the signal type input by the first input end and the second input end of the sampling circuit, this scheme is easy to implement, does not need to embed a microprocessor, and does not need complicated code writing and debugging, compared with the embedded microprocessor detection and identification scheme, the cost is greatly reduced.

[0044] Figure 2 For a specific circuit schematic diagram of the AC / DC input detection and identification circuit of the first embodiment of the utility model, please refer to Figure 2 , wherein:

[0045] The sampling circuit includes resistors R1 and R2, one end of the resistor R1 is the first input end of the sampling circuit, the other end of the resistor R1 and the other end of the resistor R2 are connected together as the output end of the sampling circuit, and the other end of the resistor R2 is the second input end of the sampling circuit.

[0046] The amplification circuit includes resistors R3, R4 and an operational amplifier X1, the positive power supply end of the operational amplifier X1 inputs a positive supply voltage, the negative power supply end of the operational amplifier X1 inputs a negative supply voltage, the non-inverting input end of the operational amplifier X1 inputs a first voltage signal, one end of the resistor R4 is used for grounding, the other end of the resistor R4 is connected to the inverting input end of the operational amplifier X1 and one end of the resistor R3 at the same time, and the output end of the operational amplifier X1 and the other end of the resistor R3 are connected together as the output end of the amplification circuit.

[0047] The positive and negative signal processing circuit comprises a comparator U1 and a comparator U2, the non-inverting input terminal of the comparator U1 is the first input terminal of the positive and negative signal processing circuit, the inverting input terminal of the comparator U1 is the second input terminal of the positive and negative signal processing circuit, the output terminal of the comparator U1 is the first output terminal of the positive and negative signal processing circuit, the inverting input terminal of the comparator U2 is the third input terminal of the positive and negative signal processing circuit, the non-inverting input terminal of the comparator U2 is the fourth input terminal of the positive and negative signal processing circuit, and the output terminal of the comparator U2 is the second output terminal of the positive and negative signal processing circuit;

[0048] The RC filter circuit comprises a resistor R5, a resistor R7, a capacitor C1 and a capacitor C2, one end of the resistor R5 is the first input terminal of the RC filter circuit, the other end of the resistor R5 and one end of the capacitor C1 are connected together to be the first output terminal of the RC filter circuit, one end of the resistor R7 is the second input terminal of the RC filter circuit, the other end of the resistor R7 and one end of the capacitor C2 are connected together to be the second output terminal of the RC filter circuit, and the other end of the capacitor C1 and the other end of the capacitor C2 are both used for grounding;

[0049] Further, the RC filter circuit further comprises a diode D1 and a diode D2, the anode of the diode D1 is the first input terminal of the filter circuit, the cathode of the diode D1 is connected to one end of the resistor R5, the anode of the diode D2 is the second input terminal of the filter circuit, and the cathode of the diode D2 is connected to one end of the resistor R7;

[0050] Further, the RC filter circuit further comprises a resistor R8 and a resistor R9, the resistor R8 is connected between the first input terminal and the first output terminal of the RC filter circuit, and the resistor R9 is connected between the second input terminal and the second output terminal of the RC filter circuit;

[0051] The AND gate operation circuit comprises an AND gate U3, the first input terminal of the AND gate U3 is the first input terminal of the AND gate operation circuit, the second input terminal of the AND gate U3 is the second input terminal of the AND gate operation circuit, and the output terminal of the AND gate U3 is the output terminal of the AND gate operation circuit.

[0052] Figure 3 For Figure 2 The simulation waveform diagram of the circuit when AC input; Figure 4 For Figure 2 The simulation waveform of the circuit when DC input, the working principle of the embodiment is described below in combination with Figure 2 , Figure 3 and Figure 4

[0053] Please refer to Figure 2 ​Wherein, the detection circuit is composed of sampling resistors R1, R2, which can obtain the positive and negative cycle amplitude, frequency and phase information of the alternating current input in real time. Specifically, the resistors R1, R2 are connected in series, and the two ends are connected to the input ports “L” and “N” respectively. The resistors R1, R2 are valued in a certain proportion to match the logic level of the detection circuit. Usually, the value of R1 is much larger than that of R2. When alternating current is applied to the L and N ends, a small voltage signal (peak-to-peak value of 1V) is generated at the two ends of the resistor R2. The direct current input is the same as the alternating current input. Figure 3 As shown in the waveform.

[0054] Figure 2 The amplification circuit is composed of an operational amplifier X1, resistors R3 and R4, and is a non-inverting amplification circuit. The amplified signal is used to match the logic level of the subsequent circuit, and to improve the accuracy of detection and identification. It should be noted that the amplification circuit can be composed of a non-inverting amplifier or a negative feedback amplifier. However, the operational amplifier X1 in this embodiment needs to be supplied with positive and negative power supply, so that it can amplify the positive half cycle signal and the negative half cycle signal sampled. The amplification factor M of the non-inverting amplifier is determined by the ratio of the resistance value of resistor R3 (denoted as R3) to the resistance value of resistor R4 (denoted as R4), i.e.:

[0055] (1.1)

[0056] In this embodiment, the amplification factor M1 is selected to be 2 times, and the ratio of the resistance value of resistor R3 to the resistance value of resistor R4 is 1. The voltage value at the output end V2 of the operational amplifier X1 is 2V peak-to-peak, as shown in the waveform. Figure 3

[0057] Figure 2 The positive voltage signal in the second voltage signal is processed by the comparator U1, and the negative voltage signal in the second voltage signal is processed by the comparator U2. If the input is an alternating voltage: when the sampling circuit samples and the amplification circuit amplifies the positive half cycle signal, the positive half cycle signal is greater than the positive reference voltage signal Vref+, and the V3 end of the comparator U1 is inverted to high level, as shown in the waveform. Figure 3 When the sampling circuit samples and the amplification circuit amplifies the negative half cycle signal, the negative half cycle signal is less than the negative reference voltage signal Vref-, and the V4 end of the comparator U2 is inverted to high level, as shown in the waveform. Figure 3 At the output ends V3 and V4 of the comparators U2 and U1, two groups of square wave pulse waveforms with a frequency of 50Hz, a duty cycle of approximately 50% and an amplitude of 5V are obtained.

[0058] Figure 2 ​The third voltage signal V3 is filtered by diode D1, resistor R5, resistor R8 and capacitor C1, diode D1 is used to realize the unidirectional flow of current output by the comparator U1, resistor R8 is used to discharge the energy of capacitor C1; the fourth voltage signal V4 is filtered by diode D2, resistor R7, resistor R9 and capacitor C2, diode D2 is used to realize the unidirectional flow of current output by the comparator U2, resistor R9 is used to discharge the energy of capacitor C2, the two groups of square wave pulse signals V3 and V4 are filtered through the two branches, and the smooth DC signals V5 and V6 are obtained as shown in the waveforms. Figure 3

[0059] Figure 2 The AND gate operation circuit is composed of a single AND gate integrated circuit U3. Only when V5 and V6 are both high, the AND gate circuit U3 will be inverted to high, as shown in the waveforms. It should be noted that the AND gate operation circuit performs AND operation, i.e. multiplication operation, which can be composed of a special AND gate integrated circuit or diodes or transistors. Any circuit that can realize the AND operation of two signals meets the requirements. Figure 3

[0060] As can be known from the above analysis, only when the levels of V3 and V4 at the output ends of the comparators U1 and U2 are periodically inverted, V5 and V6 will be simultaneously high, and the V-S end of the AND gate circuit will be inverted to high, i.e. the input is AC. On the contrary, if the input at the L and N ends is DC, the amplitude of the DC will not change with time, i.e. there is only positive half-cycle signal without negative half-cycle signal. Under the condition of DC input, V3 is high at the comparator U1, and the V4 end of the comparator U2 is low, and the V-S end of the AND gate circuit U3 is inverted to low, as shown in the waveforms. Figure 4

[0061] Therefore, the input of AC or DC can be determined by the high or low level of the V-S end of the AND gate circuit U3.

[0062] As a specific embodiment, the absolute values of the positive reference voltage signal Vref+ and the negative reference voltage signal Vref- are equal, and the two are used as the reference voltage of the positive and negative cycle peak voltage of AC respectively to realize the detection of the positive and negative half-cycle of AC, and the DC does not have the characteristic of negative half-cycle signal, thereby realizing the determination of the input of AC or DC.

[0063] Second embodiment

[0064] The embodiment provided is a switching power supply, which comprises any one of the AC / DC input detection and identification circuits in the first embodiment.

[0065] ​​​The switching power supply of the embodiment includes any AC / DC input detection and identification circuit in the first embodiment, does not embed a microprocessor, does not need complicated code programming and debugging, and has a greatly reduced cost compared with the embedded microprocessor detection and identification scheme.

[0066] The above is only the embodiment of the present application, and it should be particularly pointed out that the above embodiment should not be regarded as limiting the present application, and for ordinary skilled in the art, without departing from the spirit and scope of the present application, a number of improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.

Claims

1. An AC / DC input detection and identification circuit, characterized in that, The application relates to a signal processing circuit. The signal processing circuit comprises a sampling circuit, an amplification circuit, a positive-negative signal processing circuit, an RC filter circuit and an AND gate operation circuit. The sampling circuit comprises a first input end, a second input end and an output end, and is used for sampling alternating voltage signals or direct current signals input from the first input end and the second input end in real time and outputting a first voltage signal from the output end. The amplification circuit comprises an input end and an output end, and is used for amplifying the first voltage signal input from the input end and outputting a second voltage signal from the output end. The positive-negative signal processing circuit comprises a first input end, a second input end, a third input end, a fourth input end, a first output end and a second output end, and is used for comparing positive voltage signals in the second voltage signal with a positive reference voltage signal input from the first input end and the third input end, comparing negative voltage signals in the second voltage signal with a negative reference voltage signal input from the second input end and the fourth input end, outputting a third voltage signal from the first output end and outputting a fourth voltage signal from the second output end, wherein the third voltage signal and the fourth voltage signal are positive pulse square wave signals. The RC filter circuit comprises a first input end, a second input end, a first output end and a second output end, and is used for converting the third voltage signal input from the first input end into a fifth voltage signal and outputting the fifth voltage signal from the first output end, and converting the fourth voltage signal input from the second input end into a sixth voltage signal and outputting the sixth voltage signal from the second output end, wherein the fifth voltage signal and the sixth voltage signal are positive direct current voltage signals.

2. The AC / DC input detection and identification circuit according to claim 1, characterized in that: The AND gate operation circuit comprises a first input end, a second input end and an output end, and is used for performing AND operation on the fifth voltage signal input from the first input end and the sixth voltage signal input from the second input end, outputting a seventh voltage signal from the output end, and representing alternating voltage signals input from the first input end and the second input end of the sampling circuit when the seventh voltage signal is high, and representing direct current voltage signals input from the first input end and the second input end of the sampling circuit when the seventh voltage signal is low. The sampling circuit comprises resistors R1 and R2, one end of the resistor R1 is the first input end of the sampling circuit, the other end of the resistor R1 and the other end of the resistor R2 are connected together and serve as the output end of the sampling circuit, and the other end of the resistor R2 is the second input end of the sampling circuit.

3. The AC / DC input detection and identification circuit of claim 1, wherein: The amplification circuit comprises a resistor R3, a resistor R4 and an operational amplifier X1, a positive power supply end of the operational amplifier X1 inputs a positive supply voltage, a negative power supply end of the operational amplifier X1 inputs a negative supply voltage, a non-inverting input end of the operational amplifier X1 inputs the first voltage signal, one end of the resistor R4 is grounded, the other end of the resistor R4 is connected to the inverting input end of the operational amplifier X1 and one end of the resistor R3, and the output end of the operational amplifier X1 and the other end of the resistor R3 are connected together to serve as the output end of the amplification circuit.

4. The AC / DC input detection and identification circuit of claim 1, wherein: The positive and negative signal processing circuit comprises a comparator U1 and a comparator U2, a non-inverting input end of the comparator U1 serves as a first input end of the positive and negative signal processing circuit, an inverting input end of the comparator U1 serves as a second input end of the positive and negative signal processing circuit, an output end of the comparator U1 serves as a first output end of the positive and negative signal processing circuit, an inverting input end of the comparator U2 serves as a third input end of the positive and negative signal processing circuit, a non-inverting input end of the comparator U2 serves as a fourth input end of the positive and negative signal processing circuit, and an output end of the comparator U2 serves as a second output end of the positive and negative signal processing circuit.

5. The AC / DC input detection and identification circuit of claim 1, wherein: The RC filter circuit comprises a resistor R5, a resistor R7, a capacitor C1 and a capacitor C2, one end of the resistor R5 serves as a first input end of the RC filter circuit, the other end of the resistor R5 and one end of the capacitor C1 are connected together to serve as a first output end of the RC filter circuit, one end of the resistor R7 serves as a second input end of the RC filter circuit, the other end of the resistor R7 and one end of the capacitor C2 are connected together to serve as a second output end of the RC filter circuit, and the other end of the capacitor C1 and the other end of the capacitor C2 are both grounded.

6. The AC / DC input detection and identification circuit of claim 5, wherein: The RC filter circuit further comprises a diode D1 and a diode D2, an anode of the diode D1 serves as a first input end of the filter circuit, a cathode of the diode D1 is connected to one end of the resistor R5, an anode of the diode D2 serves as a second input end of the filter circuit, and a cathode of the diode D2 is connected to one end of the resistor R7.

7. The AC / DC input detection and identification circuit of claim 6, wherein: The RC filter circuit further comprises a resistor R8 and a resistor R9, the resistor R8 is connected between the first input end and the first output end of the RC filter circuit, and the resistor R9 is connected between the second input end and the second output end of the RC filter circuit.

8. The AC / DC input detection and identification circuit of claim 1, wherein: The AND gate operation circuit comprises an AND gate U3, a first input end of the AND gate U3 serves as a first input end of the AND gate operation circuit, a second input end of the AND gate U3 serves as a second input end of the AND gate operation circuit, and an output end of the AND gate U3 serves as an output end of the AND gate operation circuit.

9. The AC / DC input detection and identification circuit of claim 1, wherein: The absolute values of the positive reference voltage signal and the negative reference voltage signal are equal.

10. A switching power supply characterized by comprising: The AC / DC input detection and identification circuit of any one of claims 1 to 9. The AC / DC input detection and identification circuit of any one of claims 1 to 9.