Detection method and detection circuit for input AC voltage
The AC voltage is converted into a sine wave peak that can be processed by the microcontroller through the current mutual inductance module and the bias circuit, solving the problems of low detection accuracy and high cost in the prior art, and achieving more efficient and accurate AC voltage detection.
Patent Information
- Application Number
- CN202411401951.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2024-12-24
AI Technical Summary
In the prior art, the AC voltage detection method relies on components that are sensitive to temperature changes, resulting in low detection accuracy and high cost and complex circuits.
The current mutual inductance module and bias circuit are used to convert the AC current into a sine wave peak that can be processed by the microcontroller to avoid temperature influence, reduce component usage and circuit complexity, and use multi-period sampling peak voltage to determine the final value of the AC voltage.
It improves the accuracy and cost-effectiveness of AC voltage detection, reduces the complexity of detection methods, reduces the use of components, and enhances the reliability of detection.
Smart Images

Figure CN119178920A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of AC voltage detection, and in particular to a detection method and a detection circuit for an input AC voltage. Background Art
[0002] At present, some devices need to determine whether their grid voltage exceeds the limit value before use, and need to collect the grid voltage and then determine the size of the grid voltage. In the existing technology, the grid voltage is mostly passed through a transformer, and then the AC is converted into DC through a rectifier circuit, and then the current grid voltage value is collected through the AD function of the MCU.
[0003] However, the rectifier circuits used in the above-mentioned prior art mostly use components such as diodes and / or electrolytic capacitors that are sensitive to temperature changes. Therefore, the entire network voltage collection process will be greatly affected by the ambient temperature, which in turn affects and interferes with the voltage data collected by the MCU, making it impossible to accurately determine the input network voltage. At the same time, the use of components such as diodes and electrolytic capacitors also has the problems of high cost, complex collection methods and circuits. Summary of the invention
[0004] The present application provides a detection method and a detection circuit for an input AC voltage, so as to at least solve the technical problems of low detection accuracy and high cost existing in the related art.
[0005] According to one aspect of an embodiment of the present application, a method for detecting an input AC voltage is provided, which is applied to a detection circuit for an input AC voltage, wherein the detection circuit comprises: a current mutual induction module, wherein an input coil is connected to a circuit to be detected; a detection module, comprising a detection end and a reference end, which are respectively connected to the two ends of an output coil of the current mutual induction module; and a bias circuit, wherein an input end is respectively connected to the output end of the output coil and the reference end; the detection method comprises: obtaining a sampled peak voltage within a plurality of cycles between the detection end and the reference end; and determining a final value of the AC voltage according to the sampled peak voltage within the plurality of cycles.
[0006] In this application, the detection circuit of the input AC voltage does not use components such as diodes and electrolytic capacitors that are sensitive to temperature changes. Instead, after the AC passes through the current mutual inductance module, a bias circuit is added to make the voltage within the pin operating range of the single-chip microcomputer, so that the MCU directly collects the peak value of the sine wave to determine the current network voltage value. Try to avoid the detection of the network voltage value being greatly affected by the temperature, while reducing the use of components, reducing costs, and reducing the complexity of the circuit. The detection method determines the final value of the AC voltage based on the sampled peak voltage within multiple cycles, which greatly reduces the complexity of the detection method and improves the accuracy of the detection.
[0007] As an optional implementation, the detection method also includes: acquiring multiple sampling voltages at a preset sampling frequency within a cycle; determining a sampling peak voltage among the multiple sampling voltages, a first sampling voltage before the sampling peak voltage is sampled and closest to the sampling time of the sampling peak voltage, and a second sampling voltage after the sampling peak voltage is sampled and closest to the sampling time of the sampling peak voltage; determining that the sampling peak voltage is a first valid sampling peak voltage or an invalid sampling peak voltage based on the sampling peak voltage, the first sampling voltage and the second sampling voltage within a cycle; and determining the final value of the AC voltage based on the multiple first valid sampling peak voltages.
[0008] In this implementation, the validity of the sampled peak voltage in a cycle is determined by the first sampled voltage and the second sampled voltage that are closest to the sampled peak voltage in a cycle, that is, the closer the first sampled voltage is to the second sampled voltage, the more accurate the sampled peak voltage obtained in the cycle is. This acquisition method can accurately determine the validity of the sampled peak voltage obtained in a cycle, and the judgment method is simple and direct, and can also improve the accuracy of peak voltage acquisition.
[0009] As an optional implementation, determining whether the sampling peak voltage is a first valid sampling peak voltage or an invalid sampling peak voltage based on the sampling peak voltage, the first sampling voltage and the second sampling voltage within a cycle includes: determining the difference between the sampling peak voltage and the first sampling voltage and the difference between the second sampling voltage and the sampling peak voltage; judging whether the difference between the sampling peak voltage and the first sampling voltage and the difference between the second sampling voltage and the sampling peak voltage meet preset conditions; if the difference between the sampling peak voltage and the first sampling voltage and the difference between the second sampling voltage and the sampling peak voltage meet the preset conditions, the sampling peak voltage is the first valid sampling peak voltage.
[0010] In this embodiment, a condition for determining whether a sampled peak voltage within a cycle is a valid sampled peak voltage is set, that is, determining whether the difference between the sampled peak voltage and the first sampled voltage and the difference between the second sampled voltage and the sampled peak voltage meet a preset condition. This can further accurately determine the validity of the sampled peak voltage obtained within a cycle, and further improve the accuracy of peak voltage acquisition.
[0011] As an optional implementation, the difference between the sampled peak voltage and the first sampled voltage is set to ΔX1; the difference between the second sampled voltage and the sampled peak voltage is set to ΔX2; the preset conditions include: ΔX1≥(ΔX2*k1) and ΔX1≤ΔX2; or, ΔX2≥(ΔX1*k1) and ΔX2≤ΔX1; wherein k1 is a preset proportional coefficient and k1<1.
[0012] In this embodiment, the preset conditions are further limited, wherein the setting of the preset proportional coefficient k1 can modify the preset conditions according to actual conditions. When higher accuracy is required, k1 is closer to 1. This setting method can further improve the accuracy of judging the validity of the sampled peak voltage within the cycle.
[0013] As an optional implementation manner, determining the final value of the AC voltage according to the multiple first valid sampled peak voltages includes: performing low-pass filtering on the multiple first valid sampled peak voltages to obtain the final value of the AC voltage.
[0014] In this implementation, low-pass filtering is used to filter the plurality of first effective sampling peak voltages, which can reduce the impact of fluctuations in the grid voltage on the output data and further improve the accuracy of the grid voltage value.
[0015] As an optional implementation, the low-pass filtering of multiple first effective sampling peak voltages includes: setting the first first effective sampling peak voltage as an initial voltage value according to the order of the cycles of the multiple first effective sampling peak voltages; determining a first filtering value according to the initial voltage value and the second first effective sampling peak voltage, and setting the first filtering value as a current filtering value; and updating the current filtering value according to the current filtering value and the next first effective sampling peak voltage.
[0016] As an optional implementation, updating the current filter value based on the current filter value and the next first valid sampling peak voltage includes: V0=V1*k2+X0*(1-k2); wherein V0 is the current filter value after update, V1 is the current filter value before update, X0 is the first valid sampling peak voltage, k2 is the filter coefficient, and k2<1.
[0017] As an optional implementation manner, determining the final value of the AC voltage according to the multiple first effective sampled peak voltages includes: performing mean filtering on the multiple sampled peak voltages to obtain the final value of the AC voltage.
[0018] As an optional implementation, determining the final value of the AC voltage based on the sampled peak voltages within the multiple cycles includes: obtaining a bias voltage; determining whether the multiple sampled peak voltages are greater than the bias voltage; the sampled peak voltage greater than the bias voltage is the second effective sampled peak voltage; and determining the final value of the AC voltage based on the multiple second effective sampled peak voltages.
[0019] In this implementation, the sampled peak voltage can be filtered according to the bias voltage, and only the sampled peak voltage corresponding to the bias voltage is taken, which can reduce the amount of calculation and reduce the calculation burden of the MCU.
[0020] According to another aspect of the present application, a detection circuit for inputting AC voltage is also disclosed, comprising: a current mutual induction module, wherein the input coil is connected to the circuit to be detected; a detection module, comprising a detection end and a reference end, respectively connected to the output end and the input end of the output coil of the current mutual induction module; a bias circuit, wherein the input end is respectively connected to the output end of the output coil and the reference end; a first resistor is further provided between the reference end and the input end of the bias circuit; the bias circuit comprises a second resistor arranged between the output end and the input end, and the output end of the bias circuit is grounded; and a filter capacitor is further provided between the detection end and the reference end.
[0021] Specifically, the detection circuit of the input AC voltage does not use components such as diodes and electrolytic capacitors that are sensitive to temperature changes. Instead, the AC passes through the current mutual inductance module and then adds a bias circuit to make the voltage within the working range of the microcontroller pin, so that the MCU directly collects the peak value of the sine wave to determine the current network voltage value. This avoids the detection of the network voltage value being greatly affected by temperature as much as possible, while reducing the use of components, reducing costs, and reducing the complexity of the circuit. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0024] Figure 1 It is a flow chart of an optional input AC voltage detection method provided according to an embodiment of the present application.
[0025] Figure 2It is a schematic diagram of the structure of an optional input AC voltage detection circuit provided according to an embodiment of the present application.
[0026] Reference numerals
[0027] 1 current mutual inductance module; 2 circuit to be detected; 3 detection module, 31 detection end, 32 reference end; 4 bias circuit. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] like Figure 1-2 As shown, in order to solve the above technical problems, the embodiment of the present application provides a detection method for input AC voltage, which is applied to a detection circuit for input AC voltage, wherein the detection circuit comprises: a current mutual induction module 1, wherein the input coil is connected to the circuit to be detected 2; a detection module 3, comprising a detection terminal 31 and a reference terminal 32, which are respectively connected to the two ends of the output coil of the current mutual induction module 1; a bias circuit 4, wherein the input terminal is respectively connected to the output end of the output coil and the reference terminal 32; the detection method comprises:
[0031] S1 obtains the sampled peak voltage between the detection terminal 31 and the reference terminal 32 in multiple cycles;
[0032] S2 determines a final value of the AC voltage according to the sampled peak voltages in the multiple cycles.
[0033] Specifically, the detection circuit of the input AC voltage does not use components such as diodes and electrolytic capacitors that are sensitive to temperature changes. Instead, after the AC passes through the current mutual inductance module 1, a bias circuit 4 is added to make the voltage within the pin operating range of the single-chip microcomputer, so that the MCU directly collects the peak value of the sine wave to determine the current network voltage value. Try to avoid the detection of the network voltage value being greatly affected by temperature, while reducing the use of components, reducing costs, and reducing the complexity of the circuit. The detection method determines the final value of the AC voltage based on the sampled peak voltage within multiple cycles, which greatly reduces the complexity of the detection method and improves the accuracy of the detection.
[0034] As an optional implementation, the detection method also includes: acquiring multiple sampling voltages at a preset sampling frequency within a cycle; determining a sampling peak voltage among the multiple sampling voltages, a first sampling voltage before the sampling peak voltage is sampled and closest to the sampling time of the sampling peak voltage, and a second sampling voltage after the sampling peak voltage is sampled and closest to the sampling time of the sampling peak voltage; determining that the sampling peak voltage is a first valid sampling peak voltage or an invalid sampling peak voltage based on the sampling peak voltage, the first sampling voltage and the second sampling voltage within a cycle; and determining the final value of the AC voltage based on the multiple first valid sampling peak voltages.
[0035] In this embodiment, the validity of the sampled peak voltage in a cycle is determined by the first sampled voltage and the second sampled voltage that are closest to the sampled peak voltage before and after the sampled peak voltage obtained in a cycle, that is, the closer the first sampled voltage is to the second sampled voltage, the more symmetrical the positions of the first sampled voltage and the second sampled voltage in the sine wave are relative to the sampled peak voltage, and the more accurate the sampled peak voltage obtained in the cycle is. This acquisition method can accurately determine the validity of the sampled peak voltage obtained in a cycle, and the judgment method is simple and direct, and can also improve the accuracy of peak voltage acquisition.
[0036] In addition, it should be noted that the setting of the preset sampling frequency can be selected according to actual conditions. For example, in order to reduce the workload of the MCU, a lower acquisition period such as 1ms or 0.5ms can be used to periodically collect data. Similarly, a higher sampling frequency can be selected when higher accuracy is required. Among them, the higher the sampling frequency, the more accurate the sampled peak voltage will be to a certain extent.
[0037] As an optional implementation, determining whether the sampling peak voltage is a first valid sampling peak voltage or an invalid sampling peak voltage based on the sampling peak voltage, the first sampling voltage and the second sampling voltage within a cycle includes: determining the difference between the sampling peak voltage and the first sampling voltage and the difference between the second sampling voltage and the sampling peak voltage; judging whether the difference between the sampling peak voltage and the first sampling voltage and the difference between the second sampling voltage and the sampling peak voltage meet preset conditions; if the difference between the sampling peak voltage and the first sampling voltage and the difference between the second sampling voltage and the sampling peak voltage meet the preset conditions, the sampling peak voltage is the first valid sampling peak voltage.
[0038] In this embodiment, a condition for determining whether a sampled peak voltage within a cycle is a valid sampled peak voltage is set, that is, determining whether the difference between the sampled peak voltage and the first sampled voltage and the difference between the second sampled voltage and the sampled peak voltage meet a preset condition. This can further accurately determine the validity of the sampled peak voltage obtained within a cycle, and further improve the accuracy of peak voltage acquisition.
[0039] In addition, as another implementation, the condition for determining whether the sampling peak voltage within a cycle is a valid sampling peak voltage can be set to directly determine the magnitude of the first sampling voltage and the second sampling voltage, that is, when the difference between the first sampling voltage and the second sampling voltage meets a preset difference condition, it indicates that the error of the sampling peak voltage within this cycle is small, and the sampling peak voltage is the first valid sampling peak voltage.
[0040] It should be noted that the present application does not further limit the conditions for determining whether the sampled peak voltage within a cycle is a valid sampled peak voltage, and technicians can set them according to actual conditions.
[0041] As an optional implementation, the difference between the sampled peak voltage and the first sampled voltage is set to ΔX1; the difference between the second sampled voltage and the sampled peak voltage is set to ΔX2; the preset conditions include: ΔX1≥(ΔX2*k1) and ΔX1≤ΔX2; or, ΔX2≥(ΔX1*k1) and ΔX2≤ΔX1; wherein k1 is a preset proportional coefficient and k1<1.
[0042] Exemplarily, the difference between the sampled peak voltage and the first sampled voltage is set to ΔX1; the difference between the second sampled voltage and the sampled peak voltage is set to ΔX2; the preset conditions include: ΔX1≥(ΔX2*k1) and ΔX1≤ΔX2; or, ΔX2≥(ΔX1*k1) and ΔX2≤ΔX1, which further defines the preset conditions, wherein the setting of the preset proportional coefficient k1 can modify the preset conditions according to actual conditions. When higher accuracy is required, k1 is closer to 1. At the same time, the setting of the preset sampling frequency will also affect the accuracy of obtaining the sampled peak voltage. For example, if a high-accuracy network voltage value needs to be obtained, a higher sampling frequency can be set, and k1 can be set closer to 1. At the same time, this setting will also increase the calculation burden of the MCU.
[0043] As an optional implementation manner, determining the final value of the AC voltage according to the multiple first valid sampled peak voltages includes: performing low-pass filtering on the multiple first valid sampled peak voltages to obtain the final value of the AC voltage.
[0044] In this implementation, low-pass filtering is used to filter the plurality of first effective sampling peak voltages, which can reduce the impact of fluctuations in the grid voltage on the output data and further improve the accuracy of the grid voltage value.
[0045] As an optional implementation, the low-pass filtering of multiple first effective sampling peak voltages includes: setting the first first effective sampling peak voltage as an initial voltage value according to the order of the cycles of the multiple first effective sampling peak voltages; determining a first filtering value according to the initial voltage value and the second first effective sampling peak voltage, and setting the first filtering value as a current filtering value; and updating the current filtering value according to the current filtering value and the next first effective sampling peak voltage.
[0046] As an optional implementation, updating the current filter value based on the current filter value and the next first valid sampling peak voltage includes: V0=V1*k2+X0*(1-k2); wherein V0 is the current filter value after update, V1 is the current filter value before update, X0 is the first valid sampling peak voltage, k2 is the filter coefficient, and k2<1.
[0047] As an optional implementation manner, determining the final value of the AC voltage according to the multiple first effective sampled peak voltages includes: performing mean filtering on the multiple sampled peak voltages to obtain the final value of the AC voltage.
[0048] As an optional implementation, determining the final value of the AC voltage based on the sampled peak voltages within the multiple cycles includes: obtaining a bias voltage; determining whether the multiple sampled peak voltages are greater than the bias voltage; the sampled peak voltage greater than the bias voltage is the second effective sampled peak voltage; and determining the final value of the AC voltage based on the multiple second effective sampled peak voltages.
[0049] In this implementation, the sampled peak voltage can be filtered according to the bias voltage, and only the sampled peak voltage corresponding to the bias voltage is taken, which can reduce the amount of calculation and reduce the calculation burden of the MCU.
[0050] Among them, filtering the sampling peak voltage according to the bias voltage can also be used as a pre-filter before judging whether the first sampling voltage and the second sampling voltage meet the preset conditions. That is, before determining that the sampling peak voltage is the first valid sampling peak voltage or the invalid sampling peak voltage according to the sampling peak voltage, the first sampling voltage and the second sampling voltage in a cycle, first determine whether the multiple sampling peak voltages are greater than the bias voltage, and the sampling peak voltage greater than the bias voltage is the second valid sampling peak voltage, and then in the cycle where the second valid sampling peak voltage is located, determine that the sampling peak voltage is the first valid sampling peak voltage or the invalid sampling peak voltage according to the sampling peak voltage, the first sampling voltage and the second sampling voltage in the cycle. It can reduce the amount of calculation, reduce the calculation burden of the MCU, and at the same time improve the accuracy of the network voltage value detection.
[0051] like Figure 2 As shown, according to another aspect of the present application, a detection circuit for inputting AC voltage is also disclosed, comprising: a current mutual inductance module 1, wherein the input coil is connected to the circuit to be detected 2; a detection module 3, comprising a detection terminal 31 and a reference terminal 32, which are respectively connected to the output terminal and the input terminal of the output coil of the current mutual inductance module 1; a bias circuit 4, wherein the input terminal is respectively connected to the output terminal of the output coil and the reference terminal 32; a first resistor R1 is further included between the reference terminal 32 and the input terminal of the bias circuit 4; the bias circuit 4 comprises a second resistor R2 arranged between the output terminal and the input terminal, and the output terminal of the bias circuit 4 is grounded; and a filter capacitor C1 is further included, which is arranged between the detection terminal 31 and the reference terminal 32.
[0052] Specifically, the detection circuit of the input AC voltage does not use components such as diodes and electrolytic capacitors that are sensitive to temperature changes. Instead, after the AC passes through the current mutual inductance module 1, a bias circuit 4 is added to make the voltage within the working range of the pin of the single-chip microcomputer, so that the MCU directly collects the peak value of the sine wave to determine the current network voltage value. The detection of the network voltage value is avoided as much as possible from being greatly affected by the temperature, while reducing the use of components, reducing costs, and reducing the complexity of the circuit.
[0053] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0054] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more electronic devices (such as personal computers, servers, or network devices) to perform all or part of the steps of the methods described in the various embodiments of the present application.
[0055] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0056] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0057] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution provided in this embodiment.
[0058] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0059] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0060] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for detecting an input AC voltage, characterized in that: A detection circuit for inputting an alternating current voltage is applied, the detection circuit comprising: a current mutual induction module, an input coil connected to a circuit to be detected; a detection module, comprising a detection end and a reference end, respectively connected to two ends of an output coil of the current mutual induction module; a bias circuit, an input end of which is respectively connected to the output end of the output coil and the reference end; The detection method comprises: Acquire a sampled peak voltage between the detection terminal and the reference terminal within a plurality of cycles; The final value of the AC voltage is determined according to the sampled peak voltages in the multiple cycles.
2. The method for detecting input AC voltage according to claim 1, characterized in that: The detection method further comprises: Acquire multiple sampling voltages at a preset sampling frequency within one cycle; Determine a sampling peak voltage among the plurality of sampling voltages, a first sampling voltage before the sampling peak voltage is sampled and closest to the sampling time of the sampling peak voltage, and a second sampling voltage after the sampling peak voltage is sampled and closest to the sampling time of the sampling peak voltage; Determine whether the sampling peak voltage is a first valid sampling peak voltage or an invalid sampling peak voltage according to the sampling peak voltage, the first sampling voltage, and the second sampling voltage within a cycle; The final value of the AC voltage is determined according to the plurality of the first effective sampled peak voltages.
3. The method for detecting input AC voltage according to claim 2, characterized in that: The step of determining whether the sampling peak voltage is a first valid sampling peak voltage or an invalid sampling peak voltage according to the sampling peak voltage, the first sampling voltage, and the second sampling voltage within a cycle includes: Determine a difference between the sampled peak voltage and the first sampled voltage and a difference between the second sampled voltage and the sampled peak voltage; Determining whether a difference between the sampled peak voltage and the first sampled voltage and a difference between the second sampled voltage and the sampled peak voltage meet a preset condition; If the difference between the sampling peak voltage and the first sampling voltage and the difference between the second sampling voltage and the sampling peak voltage meet a preset condition, the sampling peak voltage is the first effective sampling peak voltage.
4. The method for detecting input AC voltage according to claim 3, characterized in that: Setting the difference between the sampled peak voltage and the first sampled voltage as ΔX1; The difference between the second sampling voltage and the sampling peak voltage is set to ΔX2; the preset conditions include: ΔX1≥(ΔX2*k1) and ΔX1≤ΔX2; Or, ΔX2≥(ΔX1*k1) and ΔX2≤ΔX1; Wherein, k1 is a preset proportional coefficient, and k1<1.
5. The method for detecting input AC voltage according to claim 2, characterized in that: Determining the final value of the AC voltage according to the plurality of first effective sampled peak voltages comprises: Low-pass filtering is performed on the plurality of first effective sampled peak voltages to obtain a final value of the AC voltage.
6. The method for detecting input AC voltage according to claim 5, characterized in that: The low-pass filtering of the plurality of first effective sampled peak voltages comprises: According to the order of the cycles of the plurality of first effective sampling peak voltages, setting the first first effective sampling peak voltage as an initial voltage value; Determine a first filter value according to the initial voltage value and the second first valid sampling peak voltage, and set the first filter value as a current filter value; The current filtering value is updated according to the current filtering value and the next first valid sampling peak voltage.
7. The method for detecting input AC voltage according to claim 6, characterized in that The updating of the current filtering value according to the current filtering value and the next first valid sampling peak voltage comprises: V0=V1*k2+X0*(1-k2); Among them, V0 is the current filtering value after updating, V1 is the current filtering value before updating, X0 is the first effective sampling peak voltage, k2 is the filtering coefficient, and k2<1.
8. The method for detecting input AC voltage according to claim 2, wherein: Determining the final value of the AC voltage according to the plurality of first effective sampled peak voltages comprises: The plurality of sampled peak voltages are subjected to mean filtering to obtain a final value of the AC voltage.
9. The method for detecting input AC voltage according to claim 1, wherein: Determining the final value of the AC voltage according to the sampled peak voltages in the multiple cycles includes: Get bias voltage; Determining whether a plurality of the sampled peak voltages are greater than the bias voltage; A sampling peak voltage greater than the bias voltage is a second effective sampling peak voltage; The final value of the AC voltage is determined according to a plurality of the second effective sampled peak voltages.
10. A detection circuit for input AC voltage, characterized in that: include: A current mutual inductance module, wherein the input coil is connected to the circuit to be detected; A detection module, comprising a detection end and a reference end, which are respectively connected to the output end and the input end of the output coil of the current mutual inductance module; A bias circuit, the input end of which is respectively connected to the output end of the output coil and the reference end; A first resistor is also provided between the reference terminal and the bias circuit input terminal; The bias circuit includes a second resistor arranged between the output terminal and the input terminal, and the output terminal of the bias circuit is grounded; It also includes a filter capacitor, which is arranged between the detection end and the reference end.
