Alternating current detection circuit
By using the current conversion module and the voltage conversion module in the AC detection circuit to generate the voltage signal, and combining the comparison module with the preset threshold, the problem of low detection accuracy in the existing technology is solved, and accurate judgment of AC power and convenient wiring are achieved.
Patent Information
- Application Number
- CN202410482376.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-22
- Publication Date
- 2024-08-23
AI Technical Summary
The existing AC detection circuit has low detection accuracy, cannot accurately determine the presence of AC, and needs to distinguish the connection relationship between the live wire and the neutral wire.
An alternating current detection circuit is designed. The current conversion module generates a current signal representing the voltage difference between the terminals. The voltage conversion module generates a voltage signal according to the magnitude and direction of the current signal, and uses the comparison module to compare with the preset threshold to determine the terminal. Whether to connect AC power, there is no need to distinguish the connection relationship between live wire and neutral wire.
It improves the accuracy of AC power detection and the convenience of wiring, and can accurately determine whether the terminal is connected to AC power.
Smart Images

Figure CN118534377A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of integrated circuits, and in particular to an alternating current detection circuit. Background Art
[0002] At present, the mains electricity usually needs to be rectified before supplying power to electrical equipment. In order to drive the electrical equipment normally, it is generally necessary to detect the power supply status of the mains electricity first. In the prior art, it is usually determined by detecting the voltage of one of the neutral line and the live line, or by detecting the voltage difference between the neutral line and the live line. For example, currents are generated by the neutral line and the live line respectively, and whether there is AC power supply is determined based on the currents generated respectively. Although these AC detection circuits can realize AC detection, there is a problem of low detection accuracy. Summary of the invention
[0003] The purpose of the embodiment of the present invention is to provide an alternating current detection circuit to solve the above problem. The embodiment of the present invention achieves the above purpose through the following technical solutions.
[0004] An embodiment of the present invention provides an alternating current detection circuit, comprising:
[0005] A current conversion module is connected to the first terminal and the second terminal respectively, and generates a current signal representing the voltage difference between the first terminal and the second terminal at the current terminal; a voltage conversion module is connected to the current terminal, and generates a corresponding voltage signal according to the magnitude and direction of the current signal; a comparison module is connected to the voltage conversion module, and obtains a comparison result between the voltage signal and a preset threshold; a judgment module is connected to the comparison module, and determines whether the first terminal and the second terminal are connected to alternating current according to the comparison result.
[0006] In some embodiments, the voltage conversion module includes a first voltage dividing unit and a second voltage dividing unit connected in series between a first voltage terminal and a second voltage terminal. The first voltage dividing unit and the second voltage dividing unit are connected together to form a common terminal, and the common terminal is respectively connected to the current terminal and the comparison module; the potential at the common terminal changes with the current signal.
[0007] In some embodiments, the comparison module includes:
[0008] The first comparison unit has a first input terminal connected to the common terminal, a second input terminal receiving a first preset threshold, and an output terminal connected to the judgment module; the second comparison unit has a first input terminal connected to the common terminal, a second input terminal receiving a second preset threshold, and an output terminal connected to the judgment module.
[0009] In some embodiments, the AC power detection circuit also includes a first resistor, a second resistor, and a third resistor connected in series between the first voltage terminal and the second voltage terminal, the common point formed by the first resistor and the second resistor is connected to the second input terminal of the first comparison unit, and the common point formed by the second resistor and the third resistor is connected to the second input terminal of the second comparison unit.
[0010] In some embodiments, the first resistor and the third resistor have the same resistance value, and / or the first voltage dividing unit and the second voltage dividing unit have the same resistance value.
[0011] In some embodiments, the current conversion module includes a first current branch and a second current branch. When the absolute value of the voltage difference is greater than a preset voltage, the first current branch generates a current signal at the current end, and the direction of the current signal is a first direction, or the second current branch generates a current signal at the current end, and the direction of the current signal is a second direction.
[0012] In some embodiments, the current conversion module includes a first current branch and a second current branch. When the voltage difference is greater than a first preset voltage, the first current branch converts the voltage difference into current, and generates a current signal at the current end through a first mirror circuit, and the direction of the current signal is a first direction; when the voltage difference is less than a second preset voltage, the second current branch converts the voltage difference into current, and generates a current signal at the current end through a second mirror circuit, and the direction of the current signal is a second direction; the first direction is opposite to the second direction.
[0013] In some embodiments, the first current branch includes: a fourth resistor having a first end connected to the first terminal;
[0014] A first switch tube, whose first end is connected to the second end of the fourth resistor; a first mirror unit, whose input end is connected to the second end of the first switch tube, and whose output end is connected to the current end, and when a current signal with a first direction is generated, the first switch tube is turned on.
[0015] In some embodiments, the current conversion module includes a second switch tube, a first end of the second switch tube is connected to the third voltage end, and a second end of the second switch tube is connected to the first end of the fourth resistor, the first end of the first switch tube, and the third end of the second switch tube.
[0016] In some embodiments, the judgment module is configured to judge whether the first terminal and the second terminal are connected to alternating current when the comparison result meets a preset change condition.
[0017] Compared with the prior art, through the implementation of the AC power detection circuit provided in this embodiment, it is possible to obtain a current signal of corresponding magnitude and direction based on the voltage difference between the first terminal and the second terminal, and generate a corresponding voltage signal for comparison with a preset threshold value to determine whether the first terminal and the second terminal are connected to AC power. In this process, there is no need to distinguish the connection relationship between the live wire, the neutral wire and the first terminal and the second terminal. At the same time, the relationship between the magnitude and direction of the voltage difference and the current signal is cleverly utilized to further generate a voltage signal for comparison with the preset threshold value, thereby improving the convenience of wiring the AC power detection circuit and at the same time being able to improve the accuracy of AC power detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0019] Figure 1 is a schematic diagram of a module of the AC power detection circuit provided in this embodiment;
[0020] Figure 2 is another module schematic diagram of the AC power detection circuit provided in this embodiment;
[0021] Figure 3 is a circuit structure diagram of an AC power detection circuit provided in this embodiment;
[0022] Figure 4 is a structural schematic diagram of a current conversion module in the alternating current detection circuit provided in this embodiment;
[0023] Figure 5 FIG. 4 is a schematic diagram of an alternating current waveform of the alternating current detection circuit provided in this embodiment. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] The specific AC detection circuit will be introduced below, and various embodiments of the present invention will be described in detail with reference to the accompanying drawings.
[0026] See also Figure 1An AC detection circuit provided by an embodiment of the present invention includes: a current conversion module 11, which is connected to a first terminal A and a second terminal B respectively, and generates a current signal representing a voltage difference between the first terminal A and the second terminal B at a current terminal b4; a voltage conversion module 12, which is connected to the current terminal b4, and generates a corresponding voltage signal according to the magnitude and direction of the current signal; a comparison module 13, which is connected to the voltage conversion module 12, and obtains a comparison result between the voltage signal and a preset threshold; a judgment module 14, which is connected to the comparison module 13, and determines whether the first terminal A and the second terminal B are connected to AC according to the comparison result.
[0027] In this embodiment, the first terminal A is used to connect to one of the neutral line and the live line, and the second terminal B is used to connect to the other of the neutral line and the live line. Regardless of whether the first terminal A, the second terminal B, the neutral line, and the live line are connected reversely, the current conversion module 11 can generate a current signal based on the voltage difference between the first terminal A and the second terminal B. Specifically, the voltage difference between the first terminal A and the second terminal B can generate current signals of different sizes and directions in different intervals. The direction of the current signal may include a first direction and a second direction, and the first direction is opposite to the second direction.
[0028] In this embodiment, the voltage conversion module 12 can generate a corresponding voltage signal based on the magnitude and direction of the current signal. For example, when the direction of the current signal is the first direction, the greater the current, the smaller the potential generated by the voltage conversion module 12, and when the direction of the current signal is the second direction, the greater the current, the greater the potential generated by the voltage conversion module 12.
[0029] In this embodiment, the comparison module 13 can compare the voltage signal with a preset threshold. Specifically, by comparing the voltage signal with the preset threshold, the magnitude and direction of the current signal can be reflected, and the voltage difference between the first terminal A and the second terminal B can be confirmed.
[0030] Through the implementation of this embodiment, it is possible to obtain a current signal of corresponding magnitude and direction based on the voltage difference between the first terminal A and the second terminal B, and generate a corresponding voltage signal for comparison with a preset threshold value to determine whether the first terminal A and the second terminal B are connected to alternating current. In this process, there is no need to distinguish the connection relationship between the live wire, the neutral wire and the first terminal A and the second terminal B. At the same time, the relationship between the magnitude and direction of the voltage difference and the current signal is cleverly utilized to further generate a voltage signal for comparison with the preset threshold value, thereby improving the convenience of wiring the AC detection circuit and at the same time being able to improve the accuracy of AC detection.
[0031] Furthermore, in some embodiments, Figure 2As shown, the voltage conversion module 12 may include a first voltage dividing unit 121 and a second voltage dividing unit 122 connected in series between a first voltage terminal and a second voltage terminal. The first voltage dividing unit 121 and the second voltage dividing unit 122 are connected together to form a common terminal e5, and the common terminal e5 is respectively connected to the current terminal b4 and the comparison module 13; the potential at the common terminal e5 changes with the current signal.
[0032] It should be noted that Figure 2 The current terminal b4 and the common terminal e5 shown in the figure are arranged separately only for the convenience of understanding the current direction of the current signal in the AC detection circuit provided in this embodiment. In the actual circuit, the common terminal e5 and the current terminal b4 can be regarded as common connection positions. In addition, the "common terminal" in this embodiment is also used to facilitate the description of the circuit structure, and should not be limited to a specific intersection formed by connecting two wire bodies, but can also be a wire body extending on the basis of a specific intersection formed by connecting two wire bodies. Here, only the "common terminal" is used to describe the circuit structure of the AC detection circuit.
[0033] In this embodiment, the first voltage terminal provides a first voltage V1, and the second voltage terminal provides a second voltage V2. The first voltage V1 may be greater than the second voltage V2, or the first voltage V1 may be less than the second voltage V2. When there is a voltage difference between the first terminal A and the second terminal B, or when the absolute value of the voltage difference between the first terminal A and the second terminal B exceeds a preset voltage, the generated current signal causes the potential at the common terminal e5 to change. Specifically, when the direction of the current signal is one direction, the greater the current, the greater the potential at the common terminal e5. When the direction of the current signal is another direction, the greater the current, the smaller the potential at the common terminal e5. This is provided to the comparison module 13 to compare the potential at the common terminal e5 with the preset threshold.
[0034] In addition, in this embodiment, the first voltage dividing unit 121 may include one or more resistors, and the second voltage dividing unit 122 is similar. Figure 3 Taking the circuit structure shown as an example, the first voltage dividing unit 121 can be the eighth resistor R8, and the second voltage dividing unit 122 can be the ninth resistor R9. It should be noted that the first voltage dividing unit 121 and the second voltage dividing unit 122 can also be devices or circuit structures with voltage dividing capabilities, and the specific forms of the first voltage dividing unit 121 and the second voltage dividing unit 122 are not specifically limited here.
[0035] Furthermore, in some embodiments, Figure 2As shown, the comparison module 13 may include: a first comparison unit 131, whose first input terminal is connected to the common terminal e5, whose second input terminal receives the first preset threshold value Vth1, and whose output terminal is connected to the judgment module 14; a second comparison unit 132, whose first input terminal is connected to the common terminal e5, whose second input terminal receives the second preset threshold value Vth2, and whose output terminal is connected to the judgment module 14.
[0036] In this embodiment, the current conversion module 11 generates a current signal at the current terminal b4 to affect the potential of the common terminal e5, compares the potential with the first preset threshold Vth1 and the second preset threshold Vth2, and sends the comparison results to the judgment module 14 through the output terminal.
[0037] Specifically, Figure 2 As shown, when the current conversion module 11 does not generate a current signal at the current terminal b4, the potential of the common terminal e5 is less than the first preset threshold value Vth1, and the potential of the common terminal e5 is greater than the second preset threshold value Vth2. This indicates that there is no voltage difference between the first terminal A and the second terminal B or the absolute value of the voltage difference between the first terminal A and the second terminal B is less than the preset voltage.
[0038] When the current conversion module 11 generates a current signal from the common terminal e5 to the current terminal b4 at the current terminal b4, the voltage at both ends of the first voltage divider unit 121 rises, the voltage at both ends of the second voltage divider unit 122 drops, the potential of the common terminal e5 drops, the potential of the common terminal e5 is less than the first preset threshold value Vth1, the potential of the common terminal e5 is less than the second preset threshold value Vth2, and the larger the current of the current signal, the greater the drop in the potential of the common terminal e5. Therefore, compared with the case where the current conversion module 11 does not generate a current signal at the current terminal b4, the output result of the second comparison unit 132 changes, which can also indicate that there is a voltage difference between the first terminal A and the second terminal B or the absolute value of the voltage difference between the first terminal A and the second terminal B is greater than the preset voltage.
[0039] When the current conversion module 11 generates a current signal from the current terminal b4 to the common terminal e5 at the current terminal b4, the voltage at both ends of the first voltage divider unit 121 decreases, the voltage at both ends of the second voltage divider unit 122 increases, the potential of the common terminal e5 increases, the potential of the common terminal e5 is greater than the first preset threshold value Vth1, the potential of the common terminal e5 is greater than the second preset threshold value Vth2, and the greater the current of the current signal, the greater the increase in the potential of the common terminal e5. Therefore, compared with the case where the current conversion module 11 does not generate a current signal at the current terminal b4, the output result of the first comparison unit 131 changes, which can also indicate that there is a voltage difference between the first terminal A and the second terminal B or the absolute value of the voltage difference between the first terminal A and the second terminal B is greater than the preset voltage.
[0040] In this embodiment, the determination module 14 can determine whether the first terminal A and the second terminal B are connected to AC power according to the magnitude relationship between the voltage (potential) and the first preset threshold value Vth1 and the second preset threshold value Vth2.
[0041] Furthermore, in some embodiments, Figure 3 As shown, the AC power detection circuit may also include a first resistor R1, a second resistor R2, and a third resistor R3 connected in series between the first voltage terminal and the second voltage terminal, a common point e2 formed by the first resistor R1 and the second resistor R2 is connected to the second input terminal of the first comparison unit 131, and a common point e3 formed by the second resistor R2 and the third resistor R3 is connected to the second input terminal of the second comparison unit 132.
[0042] In this embodiment, the potential at the common point e2 formed by the first resistor R1 and the second resistor R2 can be used as the first preset threshold value Vth1 and is connected to the second input terminal of the first comparison unit 131; the potential at the common point e3 formed by the second resistor R2 and the third resistor R3 can be the second preset threshold value Vth2 and is connected to the second input terminal of the second comparison unit 132.
[0043] In this embodiment, the first voltage terminal and the second voltage terminal provide reference voltages for the first resistor R1, the second resistor R2, and the third resistor R3, and provide voltages for the first voltage divider unit 121 and the second voltage divider unit 122. When the current at the current terminal b4 changes, the potential of the common terminal e5 is driven to change to achieve floating ground detection. The connection relationship among the first comparison unit 131, the second comparison unit 132, the first resistor R1, the second resistor R2, the third resistor R3, and the current terminal b4 is cleverly utilized to achieve conversion of voltage signals based on current signals and complete AC detection, thereby reducing the complexity of the circuit structure, reducing the chip area, and reducing power consumption.
[0044] In order to more clearly understand the working mode of the AC detection circuit provided in this embodiment, Figure 3 Taking the circuit structure shown as an example, the first voltage V1 is greater than the second voltage V2, the first comparison unit 131 is the comparator OP1, the second comparison unit 132 is OP2, the positive input terminal of the comparator OP1 serves as the first input terminal of the first comparison unit 131, the inverting input terminal of the comparator OP1 serves as the second input terminal of the first comparison unit 131, the positive input terminal of the comparator OP2 serves as the first input terminal of the second comparison unit 132, and the inverting input terminal of the comparator OP2 serves as the second input terminal of the second comparison unit 132.
[0045] At this time, the first preset threshold value Vth1 is (V1-V2)·(R2+R3) / (R1+R2+R3), and the second preset threshold value Vth2 is (V1-V2)·(R3) / (R1+R2+R3).
[0046] When the current conversion module 11 does not generate a current signal at the current terminal b4, the potential of the common terminal e5 is (V1-V2)·(R9) / (R8+R9), the potential of the common terminal e5 is less than the first preset threshold value Vth1, the potential of the common terminal e5 is greater than the second preset threshold value Vth2, the comparator OP1 outputs a low level, and the comparator OP2 outputs a high level. At this time, it means that there is no voltage difference between the first terminal A and the second terminal B or the absolute value of the voltage difference between the first terminal A and the second terminal B is less than the preset voltage.
[0047] When the current conversion module 11 generates a current signal at the current terminal b4 with a direction from the common terminal e5 to the current terminal b4, assuming that the magnitude of the current signal is I, the current flowing through the eighth resistor R8 increases, the voltage across the eighth resistor R8 increases, the current flowing through the ninth resistor R9 decreases, the voltage across the ninth resistor R9 decreases, the potential of the common terminal e5 decreases, the potential of the common terminal e5 is less than the first preset threshold value Vth1, and the potential of the common terminal e5 is less than the second preset threshold value Vth2. The larger the current of the current signal, the greater the decrease in the potential of the common terminal e5, the comparator OP1 outputs a low level, and the comparator OP2 outputs a low level.
[0048] When the current conversion module 11 generates a current signal at the current terminal b4 with a direction from the current terminal b4 to the common terminal e5, assuming that the magnitude of the current signal is I, the current flowing through the eighth resistor R8 decreases, the voltage across the eighth resistor R8 decreases, the current flowing through the ninth resistor R9 increases, the voltage across the ninth resistor R9 increases, the potential of the common terminal e5 increases, the potential of the common terminal e5 is greater than the first preset threshold value Vth1, and the potential of the common terminal e5 is greater than the second preset threshold value Vth2. The larger the current of the current signal, the greater the increase in the potential of the common terminal e5, the comparator OP1 outputs a high level, and the comparator OP2 outputs a high level.
[0049] When the comparator OP1 outputs a low level and the comparator OP2 outputs a high level, it indicates that the current conversion module 11 does not generate a current signal at the current terminal b4, there is no voltage difference between the first terminal A and the second terminal B, or the absolute value of the voltage difference between the first terminal A and the second terminal B is less than the preset voltage.
[0050] When the comparator OP1 outputs a low level and the comparator OP2 outputs a low level, or when the comparator OP1 outputs a low level and the comparator OP2 outputs a high level, there is a voltage difference between the first terminal A and the second terminal B or the absolute value of the voltage difference between the first terminal A and the second terminal B is greater than the preset voltage.
[0051] Therefore, whether there is alternating current between the first wiring terminal A and the second wiring terminal B can be determined by outputting level signals from the comparator OP1 and the comparator OP2.
[0052] In this embodiment, the sensitivity of the comparison module 13 in comparing the preset threshold value with the potential of the common terminal e5 can be adjusted by adjusting the resistance values of the first resistor R1, the second resistor R2, the third resistor R3, the first voltage divider unit 121, and the second voltage divider unit 122. At the same time, the first resistor R1, the second resistor R2, the third resistor R3, the first voltage divider unit 121, and the second voltage divider unit 122 are all under the same voltage standard to adapt to the potential changes generated by the current signal at the current terminal b4 at the common terminal e5 under various conditions.
[0053] Further, in some embodiments, the first resistor R1 and the third resistor R3 have the same resistance value, and / or the first voltage dividing unit 121 and the second voltage dividing unit 122 have the same resistance value. In this case, it is only necessary to adjust the ratio of the resistance value of the second resistor R2 to the sum of the resistance values of the first resistor R1, the second resistor R2, and the third resistor R3 to set the first preset threshold value Vth1 and the second preset threshold value Vth2.
[0054] Furthermore, in some embodiments, Figure 4 As shown, the current conversion module 11 may include a first current branch 111 and a second current branch 112. When the absolute value of the voltage difference is greater than a preset voltage, the first current branch 111 generates a current signal at the current terminal b4, and the direction of the current signal is a first direction, or the second current branch 112 generates a current signal at the current terminal b4, and the direction of the current signal is a second direction.
[0055] In this embodiment, when the absolute value of the voltage difference is greater than the preset voltage, the current conversion module 11 generates a current signal at the current terminal b4, and the direction of the current signal is the first direction or the second direction. At the same time, only one of the first current branch 111 and the second current branch 112 provides a current signal.
[0056] Furthermore, in some embodiments, Figure 4 As shown, the current conversion module 11 may include a first current branch 111 and a second current branch 112. When the voltage difference is greater than the first preset voltage Vc1, the first current branch 111 converts the voltage difference into current, and generates a current signal at the current terminal b4 through the first mirror circuit, and the direction of the current signal is the first direction; when the voltage difference is less than the second preset voltage Vc2, the second current branch 112 converts the voltage difference into current, and generates a current signal at the current terminal b4 through the second mirror circuit, and the direction of the current signal is the second direction; the first direction is opposite to the second direction.
[0057] When the first terminal A and the second terminal B are connected to alternating current, the voltage difference between the first terminal A and the second terminal B usually changes according to a sinusoidal wave. In order to prevent a slight voltage difference between the first terminal A and the second terminal B, that is, false triggering and determining that the first terminal A and the second terminal B are connected to alternating current, it can be set that when the voltage difference between the first terminal A and the second terminal B is greater than the first preset voltage Vc1, the first current branch 111 generates a current signal with a first direction at the current terminal b4; or, when the voltage difference between the first terminal A and the second terminal B is less than the second preset voltage Vc2, the second current branch 112 generates a current signal with a second direction at the current terminal b4.
[0058] like Figure 4 As shown, VL represents the live line voltage, VN represents the neutral line voltage, VL-VN represents the voltage difference between the live line and the neutral line, and VN-VL represents the voltage difference between the neutral line and the live line. Therefore, VL-VN and VN-VL can represent the voltage difference between the first terminal A and the second terminal B. Vcl can represent the first preset voltage Vc1, and Vc2 can represent the second preset voltage Vc2.
[0059] Furthermore, in some embodiments, Figure 4 As shown, the first current branch 111 may include: a fourth resistor R4, a first end of which is connected to the first terminal A; a first switch tube M1, a first end of which is connected to the second end of the fourth resistor R4; a first mirror unit 1111, an input end of which is connected to the second end of the first switch tube M1, and an output end of which is connected to the current terminal b4. When a current signal with a first direction is generated, the first switch tube M1 is turned on.
[0060] In this embodiment, when the voltage difference between the first terminal A and the second terminal B is greater than the first preset voltage Vc1, the first switch tube M1 is turned on, and the current flows through the first switch tube M1 from the fourth resistor R4 and is input to the input end of the first mirror unit 1111. The output end of the first mirror unit 1111 generates a current signal with a first direction at the current terminal b4.
[0061] Furthermore, in some embodiments, Figure 4 As shown, the second current branch 112 may include: a fifth resistor R5, a first end of which is connected to the second terminal B; a third switch tube M3, a first end of which is connected to the second end of the fifth resistor R5; a second mirror unit 1121, an input end of which is connected to the second end of the third switch tube M3; a third mirror unit 1122, an input end of which is connected to the output end of the second mirror unit 1121, and an output end of which is connected to the current terminal b4. When a current signal with a direction in the second direction is generated, the third switch tube M3 is turned on.
[0062] In this embodiment, when the voltage difference between the first terminal A and the second terminal B is less than the second preset voltage Vc2, the third switch tube M3 is turned on, and the current flows through the fifth resistor R5 through the third switch tube M3, and then sequentially through the input end of the second mirror unit 1121, the output end of the second mirror unit 1121, the input end of the third mirror unit 1122, the output end of the third mirror unit 1122, and the output end of the third mirror unit 1122. The output end of the third mirror unit 1122 is connected to the current end b4, and the output end of the third mirror unit 1122 generates a current signal with a second direction at the current end b4.
[0063] Further, in some embodiments, the current conversion module 11 may include a second switch tube M2, a first end of the second switch tube M2 is connected to the third voltage end, and a second end of the second switch tube M2 is connected to the first end of the fourth resistor R4, the first end of the first switch tube M1, and the third end of the second switch tube M2.
[0064] In this embodiment, the third terminal of the first switch tube M1 may be connected to the fifth voltage terminal.
[0065] In this embodiment, when a current signal with a first direction is generated, the second switch tube M2 is turned off, and the voltage at the second terminal of the second switch tube M2 is greater than the difference between the third voltage V3 at the third voltage terminal and the gate-source voltage of the second switch tube M2; the first switch tube M1 is turned on, and the fifth voltage V5 at the fifth voltage terminal is greater than the sum of the third voltage V3 minus the gate-source voltage of the first switch tube M1 and the gate-source voltage of the second switch tube M2. The first switch tube M1 and the second switch tube M2 can be used for voltage clamping, and the voltage clamping range can be adjusted by adjusting the magnitude of the fifth voltage V5.
[0066] Further, in some embodiments, the current conversion module 11 may include a fourth switch tube M4, a first end of the fourth switch tube M4 is connected to the third voltage end, and a second end of the fourth switch tube M4 is connected to the first end of the fifth resistor R5, the first end of the third switch tube M3, and the third end of the fourth switch tube M4.
[0067] In this embodiment, the third terminal of the third switch tube M3 may be connected to the fifth voltage terminal.
[0068] In this embodiment, when the current signal with the second direction is generated, the fourth switch tube M4 is turned off, and the voltage at the second terminal of the fourth switch tube M4 is greater than the difference between the third voltage V3 at the third voltage terminal and the gate-source voltage of the fourth switch tube M4; the third switch tube M3 is turned on, and the fifth voltage V5 at the fifth voltage terminal is greater than the sum of the third voltage V3 minus the gate-source voltage of the third switch tube M3 and the gate-source voltage of the fourth switch tube M4. The third switch tube M3 and the fourth switch tube M4 can be used for voltage clamping, and the voltage clamping range can be adjusted by adjusting the magnitude of the fifth voltage V5.
[0069] Further, in some embodiments, a sixth resistor R6 is connected between the first terminal A and the first end of the fourth resistor R4, and a seventh resistor R7 is connected between the second terminal B and the first end of the fifth resistor R5. By providing the sixth resistor R6 and the seventh resistor R7, excessive voltage can be prevented.
[0070] Further, in some embodiments, the first mirror unit 1111 may include a fifth switch tube M5 and a sixth switch tube M6, wherein the first end of the fifth switch tube M5 and the first end of the sixth switch tube M6 are connected to the fourth voltage end, the second end of the fifth switch tube M5 is connected to the third end of the fifth switch tube M5, the third end of the sixth switch tube M6, and the second end of the first switch tube M1, and the second end of the sixth switch tube M6 is connected to the current end b4.
[0071] Further, in some embodiments, the second mirror unit 1121 may include a seventh switch tube M7 and an eighth switch tube M8. The first end of the seventh switch tube M7 and the first end of the eighth switch tube M8 are connected to the fourth voltage end, the second end of the eighth switch tube M8 is connected to the second end of the third switch tube M3, the third end of the eighth switch tube M8, and the third end of the seventh switch tube M7, and the third end of the seventh switch tube M7 is connected to the input end of the third mirror unit 1122 as the output end of the second mirror unit 1121.
[0072] Further, in some embodiments, the third mirror unit 1122 may include a ninth switch tube M9 and a tenth switch tube M10. The second end of the tenth switch tube M10 is connected to the output end of the second mirror unit 1121, the third end of the tenth switch tube M10, and the third end of the ninth switch tube M9 as the input end of the third mirror unit 1122, the first end of the tenth switch tube M10 and the first end of the ninth switch tube M9 are connected to the third voltage end, and the second end of the ninth switch tube M9 is connected to the current end b4 as the output end of the third mirror unit 1122.
[0073] In this embodiment, by cooperating with the circuit structure between the second mirror unit 1121, the third mirror unit 1122, the third switch tube M3 and the fifth resistor R5, the current flowing through the fifth resistor R5 can be mirrored to generate a current signal with a second direction, so that the current signal at the current terminal b4 can indicate the voltage difference between the first connection terminal and the second connection terminal.
[0074] In this embodiment, through the cooperation of the first mirror unit 1111, the second mirror unit 1121, and the third mirror unit 1122, the voltage difference between the first terminal A and the second terminal B can be expressed at the current end through a current signal, generating current signals in the first direction and the second direction in opposite directions for subsequent voltage conversion module 12 and comparison module 13 to process and realize AC detection.
[0075] In some embodiments, the second switch tube M2 may have the same aspect ratio as the fourth switch tube M4; the ninth switch tube M9 may have the same aspect ratio as the tenth switch tube M10; the first switch tube M1 may have the same aspect ratio as the third switch tube M3; the fifth switch tube M5 may have the same aspect ratio as the sixth switch tube M6; the seventh switch tube M7 may have the same aspect ratio as the eighth switch tube M8. Thus, the first current branch 111 and the second current branch 112 may be substantially one-to-one symmetrical, and when the absolute value of the voltage difference between the first terminal A and the second terminal B is the same, the current signals generated by the first current branch 111 and the second current branch 112 are the same in magnitude and opposite in direction.
[0076] In addition, the third voltage V3 of the third voltage terminal and the fourth voltage V4 of the fourth voltage terminal may have no obvious potential. The current conversion module 11 provided in this embodiment generates a current signal based on the voltage difference between the first terminal A and the second terminal B.
[0077] Furthermore, in this embodiment, the third voltage V3 may be the same as the first voltage V1 , and the fourth voltage V4 may be the same as the second voltage V2 .
[0078] The AC power detection circuit provided in this embodiment can realize AC power detection based on the voltage difference between the first wiring terminal A and the second wiring terminal B, thereby completing floating ground detection.
[0079] like Figure 4 As shown, the first switch tube M1, the second switch tube M2, the fourth switch tube M4, the fifth switch tube M5, the ninth switch tube M9, and the tenth switch tube M10 can be P-type transistors. The fifth switch tube M5, the sixth switch tube M6, the seventh switch tube M7, and the eighth switch tube M8 can be N-type transistors.
[0080] In order to more clearly understand the working principle of the current conversion module 11 in this embodiment, the following is an example Figure 4 The circuit structure shown is explained:
[0081] When the voltage difference between the first terminal A and the second terminal B is greater than the first preset voltage Vc1, the second switch tube M2, the ninth switch tube M9, the tenth switch tube M10, the seventh switch tube M7, the eighth switch tube M8, and the third switch tube M3 are turned off, and the first switch tube M1, the fourth switch tube M4, the fifth switch tube M5, and the sixth switch tube M6 are turned on. The fifth switch tube M5 and the sixth switch tube M6 form a mirror circuit to generate a current in the direction of the first terminal A→a2→a3, and then the mirror circuit generates a current I1 in the direction of the current terminal b4→b2→b3, and the current I1 in the direction of the current terminal b4→b2→b3 is regarded as a current signal in the first direction (i.e. Figure 3At this time, the current I2 from b1→b2→current terminal b4 is equivalent to 0.
[0082] When the voltage difference between the first terminal A and the second terminal B is less than the second preset voltage Vc2, the second switch tube M2, the ninth switch tube M9, the tenth switch tube M10, the seventh switch tube M7, the eighth switch tube M8, and the third switch tube M3 are turned on, the first switch tube M1, the fourth switch tube M4, the fifth switch tube M5, and the sixth switch tube M6 are turned off, the seventh switch tube M7 and the eighth switch tube M8 form a mirror circuit to generate a current in a direction from the second terminal B→d2→d3, and then a current in a direction from c1→c2 is generated by mirroring, the ninth switch tube M9 and the tenth switch tube M10 form a mirror circuit to generate a current I2 in a direction from b1→b2→current terminal b4, and the current I2 in the direction from b1→b2→current terminal b4 is regarded as a current signal in the second direction (i.e. Figure 3 At this time, the current I1 from the current terminal b4→b2→b3 is equivalent to 0.
[0083] Further, in some embodiments, when the judgment module 14 detects that the level signal output by the first comparison unit 131 and the second comparison unit 132 at a certain moment indicates that there is a voltage difference between the first wiring terminal A and the second wiring terminal B, or the absolute value of the voltage difference between the first wiring terminal A and the second wiring terminal B reaches a preset voltage, the judgment module 14 can determine that the first wiring terminal A and the second wiring terminal B are connected to AC power. Figure 3 Taking the circuit structure shown as an example, when the comparator OP1 and the comparator OP2 both output low level signals, or the comparator OP1 and the comparator OP2 both output high level signals, the judgment module 14 can confirm that the first terminal A and the second terminal B are connected to AC power.
[0084] In this embodiment, it can be quickly detected whether the first wiring terminal A and the second wiring terminal B are connected to AC power.
[0085] Further, in some embodiments, the judgment module 14 is configured to judge that the first wiring terminal A and the second wiring terminal B are connected to alternating current when the comparison result meets the preset change condition.
[0086] like Figure 5As shown, it can be found that when the voltage difference between the first terminal A and the second terminal B is greater than the first preset voltage Vc1, the comparator OP1 outputs a low level and the comparator OP2 outputs a low level. When the voltage difference between the first terminal A and the second terminal B is less than the second preset voltage Vc2, the comparator OP1 outputs a high level and the comparator OP2 outputs a high level. When the voltage difference between the first terminal A and the second terminal B is between the first preset voltage Vc1 and the second preset voltage Vc2, the comparator OP1 outputs a low level and the comparator OP2 outputs a high level.
[0087] Specifically, when the judgment module 14 detects that the change of the level signal output by the first comparison unit 131 and the second comparison unit 132 within a certain period of time meets the preset change condition, the judgment module 14 can determine that the first terminal A and the second terminal B are connected to AC power. Figure 3 Taking the circuit structure shown in FIG. 1 as an example, when it is detected that the level of the output of the comparator OP1 changes from a low level to a high level and the comparator OP2 keeps outputting a high level, it can be confirmed that the first terminal A and the second terminal B are connected to AC power. When it is detected that the comparator OP1 keeps outputting a low level and the level of the output of the comparator OP2 changes from a high level to a low level, it can be confirmed that the first terminal A and the second terminal B are connected to AC power.
[0088] In this embodiment, whether the first wiring terminal A and the second wiring terminal B are connected to AC power can be determined by comparing the change in the result, thereby preventing false triggering.
[0089] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. An alternating current detection circuit, characterized in that: include: A current conversion module, connected to the first wiring terminal and the second wiring terminal respectively, generating a current signal representing a voltage difference between the first wiring terminal and the second wiring terminal at the current terminal; A voltage conversion module, connected to the current terminal, generates a corresponding voltage signal according to the magnitude and direction of the current signal; A comparison module, connected to the voltage conversion module, to obtain a comparison result between the voltage signal and a preset threshold; The judgment module is connected to the comparison module and determines whether the first wiring terminal and the second wiring terminal are connected to AC power according to the comparison result.
2. The alternating current detection circuit according to claim 1, characterized in that: The voltage conversion module includes a first voltage dividing unit and a second voltage dividing unit connected in series between a first voltage terminal and a second voltage terminal. The first voltage dividing unit and the second voltage dividing unit are connected together to form a common terminal, and the common terminal is connected to the current terminal and the comparison module respectively; the potential at the common terminal changes with the current signal.
3. The AC detection circuit according to claim 2, characterized in that: The comparison module comprises: A first comparison unit, wherein a first input terminal is connected to the common terminal, a second input terminal receives a first preset threshold value, and an output terminal is connected to the judgment module; The second comparison unit has a first input terminal connected to the common terminal, a second input terminal receiving a second preset threshold, and an output terminal connected to the judgment module.
4. The alternating current detection circuit according to claim 3, characterized in that: The AC power detection circuit also includes a first resistor, a second resistor, and a third resistor connected in series between the first voltage terminal and the second voltage terminal, the common point formed by the first resistor and the second resistor is connected to the second input terminal of the first comparison unit, and the common point formed by the second resistor and the third resistor is connected to the second input terminal of the second comparison unit.
5. The alternating current detection circuit according to claim 4, characterized in that: The first resistor has the same resistance value as the third resistor, and / or the first voltage dividing unit has the same resistance value as the second voltage dividing unit.
6. The alternating current detection circuit according to claim 1, characterized in that: The current conversion module includes a first current branch and a second current branch. When the absolute value of the voltage difference is greater than a preset voltage, the first current branch generates the current signal at the current end, and the direction of the current signal is a first direction, or the second current branch generates the current signal at the current end, and the direction of the current signal is a second direction.
7. The alternating current detection circuit according to claim 1, characterized in that: The current conversion module includes a first current branch and a second current branch. When the voltage difference is greater than a first preset voltage, the first current branch converts the voltage difference into a current, and generates the current signal at the current end through a first mirror circuit, and the direction of the current signal is a first direction; When the voltage difference is less than a second preset voltage, the second current branch converts the voltage difference into a current, and generates the current signal at the current end through a second mirror circuit, and the direction of the current signal is a second direction; the first direction is opposite to the second direction.
8. The alternating current detection circuit according to claim 6 or 7, characterized in that: The first current branch comprises: a fourth resistor, a first end of which is connected to the first terminal; A first switch tube, a first end of which is connected to the second end of the fourth resistor; The first mirror unit has an input end connected to the second end of the first switch tube and an output end connected to the current end. When a current signal with the first direction is generated, the first switch tube is turned on.
9. The alternating current detection circuit according to claim 8, characterized in that: The current conversion module includes a second switch tube, a first end of the second switch tube is connected to the third voltage end, and a second end of the second switch tube is connected to the first end of the fourth resistor, the first end of the first switch tube, and the third end of the second switch tube.
10. The alternating current detection circuit according to claim 1, characterized in that: The judgment module is configured to judge whether the first wiring terminal and the second wiring terminal are connected to alternating current when the comparison result meets a preset change condition.
