Voltage detection method, voltage detection circuit, device and electrical equipment

The voltage detection circuit, composed of a full-wave rectifier circuit, a step-down circuit, and an output circuit, monitors the transition interval of the level signal, solving the problems of rapid and accurate detection of AC voltage zero crossing moments and voltage levels. This reduces the structure and cost of electrical equipment and improves control accuracy and safety.

CN122330482APending Publication Date: 2026-07-03GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU SHIYUAN ELECTRONICS CO LTD
Filing Date
2025-01-03
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

In AC power supply scenarios, existing technologies struggle to quickly and accurately detect the zero-crossing moment and voltage level of AC voltage, resulting in limitations on the control precision and safety of electrical equipment.

Method used

A voltage detection circuit consisting of a full-wave rectifier circuit, a step-down circuit, and an output circuit determines the zero-crossing time and voltage level of the AC voltage by monitoring the transition interval of the level signal.

Benefits of technology

It enables rapid and accurate detection of AC voltage zero-crossing moments and voltage levels, reducing the structure and cost of electrical equipment and improving control accuracy and safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122330482A_ABST
    Figure CN122330482A_ABST
Patent Text Reader

Abstract

This application provides a voltage detection method, voltage detection circuit, device, and electrical equipment. The method includes: monitoring whether the level signal output by the voltage detection circuit undergoes an Nth transition; if the Nth transition is detected, and if the (N-1)th transition of the level signal output by the voltage detection circuit is detected in advance, then obtaining a first interval duration between the Nth transition and the (N-1)th transition; and determining the zero-crossing time and / or voltage level of the AC voltage to be measured based on the first interval duration. The voltage detection method provided by this application can detect the zero-crossing time and / or voltage level of AC voltage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic technology, and more specifically, to a voltage detection method, voltage detection circuit, apparatus, and electrical equipment. Background Technology

[0002] In some AC power supply scenarios, it is necessary to detect parameters such as the zero-crossing time and voltage level of the AC voltage. This application provides a voltage detection method and voltage detection circuit that can detect the zero-crossing time and voltage level of the AC voltage. Summary of the Invention

[0003] This application provides a voltage detection method, voltage detection circuit, device, and electrical equipment. The method can monitor the zero-crossing time and / or voltage level of AC voltage.

[0004] Firstly, a voltage detection method is provided, the method comprising:

[0005] The voltage detection circuit monitors whether the output level signal undergoes the Nth transition; wherein the voltage detection circuit outputs a first level signal when the absolute value of the AC voltage to be measured is less than a voltage threshold, and outputs a second level signal when the absolute value of the AC voltage to be measured is greater than the voltage threshold, and the Nth transition is a transition from the first level signal to the second level signal;

[0006] If the Nth transition is detected, and the (N-1)th transition of the voltage detection circuit output signal is detected in advance, then the first interval duration between the Nth transition and the (N-1)th transition is obtained; wherein the (N-1)th transition is a transition from the second level signal to the first level signal;

[0007] The zero-crossing time and / or voltage level of the AC voltage to be measured are determined based on the first interval duration.

[0008] In this embodiment, the voltage detection circuit outputs a transformed first-level signal and a second-level signal based on the voltage value of the AC voltage to be measured. By detecting the first interval duration between the adjacent Nth transition and (N-1)th transition, the zero-crossing time and / or voltage level of the AC voltage to be measured are determined based on the first interval duration. This allows for simple and quick detection of the zero-crossing of AC voltage and the detection of voltage level.

[0009] Optionally, determining the zero-crossing time and / or voltage level of the AC voltage to be measured based on the first interval duration includes: when the Mth transition is detected, determining a target time located after the Mth transition as the zero-crossing time; wherein M is greater than N, the Mth transition is a transition from the second level signal to the first level signal, and the target time is spaced 0.5 times the first interval duration from the transition time of the Mth transition; and / or determining a target voltage level corresponding to the first interval duration from a plurality of reference voltage levels; and determining the target voltage level as the voltage level of the AC voltage to be measured.

[0010] Optionally, the Mth jump becomes the (N+1)th jump.

[0011] In this embodiment, after the Nth transition, when the (N+1)th transition is detected, the target time after the (N+1)th transition is determined as the zero-crossing time. The zero-crossing time of the current cycle can be determined in each cycle of the AC voltage based on the first interval duration corresponding to the adjacent previous cycle, allowing for real-time and accurate determination of the zero-crossing time. Furthermore, after the Nth transition, when any Mth transition from the second level signal to the first level signal is detected, the zero-crossing time is determined based on the first interval duration determined by the Nth transition. This avoids determining the first interval duration within each cycle of the AC voltage, thereby reducing the power consumption of the control element.

[0012] Optionally, determining the target voltage level corresponding to the first interval duration from multiple reference voltage levels includes: determining the actual reference voltage corresponding to the first interval duration based on the predicted scaling factor and the first interval duration; and determining the target voltage level corresponding to the actual reference voltage from the multiple reference voltage levels.

[0013] In this embodiment, the actual reference voltage is determined based on the predicted scaling factor and the first interval duration, and the target voltage level corresponding to the actual reference voltage is determined from multiple reference voltage levels, which can quickly and accurately determine the target voltage level.

[0014] Optionally, obtaining the first interval duration between the Nth transition and the (N-1)th transition includes: ending a pre-started timer to obtain a timing duration, and using the timing duration as the first interval duration; wherein the timer starts when the level signal output by the voltage detection circuit undergoes the (N-1)th transition; or, determining the time difference between the time when the Nth transition occurs and the time when the (N-1)th transition occurs; and determining the first interval duration based on the time difference.

[0015] In this embodiment of the application, when the Nth transition is detected, the first interval duration is determined based on the timing duration between the Nth transition and the (N-1)th transition, or the first interval duration is determined based on the time difference between the Nth transition and the (N-1)th transition, so that the first interval duration can be determined quickly and accurately.

[0016] Optionally, the method further includes: if the (N-2)th transition of the voltage detection circuit output level signal is detected in advance when the Nth transition is detected, then obtaining the second interval duration between the Nth transition and the (N-2)th transition;

[0017] The period duration and / or frequency of the AC voltage to be measured are determined based on the second interval duration.

[0018] In this embodiment, when the Nth transition and the (N-2)th transition are detected, the period duration and / or frequency of the AC voltage to be measured are determined based on the second interval duration between the Nth transition and the (N-2)th transition. This not only allows for the rapid determination of the period duration and frequency of the AC voltage, but also facilitates the determination of the period duration and frequency of the AC voltage by electronic devices.

[0019] Secondly, a voltage detection circuit is provided, comprising: a full-wave rectifier circuit, a step-down circuit, and an output circuit; the output terminal of the full-wave rectifier circuit is connected to the input terminal of the step-down circuit, the input terminal of the full-wave rectifier circuit is connected to the AC voltage to be measured, and is used to rectify the AC voltage to be measured and output the rectified pulsating DC voltage to the step-down circuit; the output terminal of the step-down circuit is connected to the input terminal of the output circuit, the step-down circuit is used to step down the pulsating DC voltage and output the stepped-down trigger voltage to the output circuit; the output circuit is used to output a first level signal when the trigger voltage is less than a trigger threshold, and to output a second level signal when the trigger voltage is greater than the trigger threshold.

[0020] In this embodiment, the voltage detection circuit consists of a full-wave rectifier circuit, a step-down circuit, and an output circuit. The AC voltage is rectified and stepped down by the full-wave rectifier circuit and the step-down circuit to obtain a trigger voltage that can be input to the output circuit. This trigger voltage can then trigger the output circuit to output a first-level signal and a second-level signal. The voltage detection circuit has a simple structure and low cost, which can reduce the structure and cost of electrical equipment.

[0021] Optionally, the step-down circuit includes a first resistor and a second resistor; the first resistor and the second resistor are connected in series between the output terminal of the full-wave rectifier circuit and the ground terminal in the voltage detection circuit, and the first connection node between the first resistor and the second resistor constitutes the output terminal of the step-down circuit.

[0022] In this embodiment, the step-down circuit consists of a first resistor and a second resistor connected in series, which makes the structure of the step-down circuit simple and the cost low, thereby simplifying the circuit structure of the voltage detection circuit and reducing the cost of the voltage detection circuit.

[0023] Optionally, the output circuit includes a third resistor and a switching element; one connection terminal of the switching element is connected to the ground terminal, and the other connection terminal is connected to the power supply terminal in the voltage detection circuit through the third resistor; the control terminal of the switching element is connected to the first connection node, and is used to switch to a first state when the trigger voltage is less than the trigger threshold, so as to output the first level signal through the second connection node between the switching element and the third resistor, and to switch to a second state when the trigger voltage is greater than the trigger threshold, so as to output the second level signal through the second connection node; wherein, one of the first state and the second state is a conducting state and the other is a turning-off state.

[0024] In this embodiment, the output circuit consists of a third resistor connected in series and a switching element, which makes the structure of the output circuit simple and the cost low, thereby simplifying the circuit structure of the voltage detection circuit and reducing the cost of the voltage detection circuit.

[0025] Thirdly, a voltage detection device is provided, the device comprising:

[0026] A monitoring module is used to monitor whether the level signal output by the voltage detection circuit undergoes the Nth transition; wherein, the voltage detection circuit outputs a first level signal when the absolute value of the AC voltage to be measured is less than a voltage threshold, and outputs a second level signal when the absolute value of the AC voltage to be measured is greater than the voltage threshold, and the Nth transition is a transition from the first level signal to the second level signal;

[0027] The acquisition module is configured to, when the Nth transition is detected, if the (N-1)th transition of the level signal output by the voltage detection circuit is detected in advance, acquire the first interval duration between the Nth transition and the (N-1)th transition; wherein the (N-1)th transition is a transition from the second level signal to the first level signal;

[0028] The determination module is used to determine the zero-crossing time and / or voltage level of the AC voltage to be measured based on the first interval duration.

[0029] Fourthly, an electrical device is provided, including a memory and a processor. The memory is used to store executable program code; the processor is used to call and run the executable program code from the memory, causing the electrical device to execute the voltage detection method in any possible implementation of the first aspect.

[0030] Fifthly, a storage medium is provided that stores executable program code, which, when run on an electrical device, causes the electrical device to execute the voltage detection method in any possible implementation of the first aspect.

[0031] In a sixth aspect, an executable program code product is provided, comprising: executable program code that, when run on an electrical device, causes the electrical device to execute the voltage detection method in any possible implementation of the first aspect. Attached Figure Description

[0032] Figure 1 This is a schematic diagram of a voltage detection scenario provided in an embodiment of this application;

[0033] Figure 2 This is a schematic diagram of the circuit principle of a voltage detection circuit provided in an embodiment of this application;

[0034] Figure 3 for Figure 2 The waveform diagram of the voltage detection circuit shown is shown.

[0035] Figure 4 This is a schematic diagram of the circuit principle of another voltage detection circuit provided in the embodiment of this application;

[0036] Figure 5 for Figure 4 The waveform diagram of the voltage detection circuit shown is shown.

[0037] Figure 6 This is a flowchart illustrating the steps of a voltage detection method provided in an embodiment of this application;

[0038] Figure 7 This diagram illustrates a waveform comparison for different voltage levels.

[0039] Figure 8 This is a schematic flowchart of a voltage detection method provided in an embodiment of this application;

[0040] Figure 9 This is a schematic diagram of the structure of a voltage detection device provided in an embodiment of this application;

[0041] Figure 10 This is a schematic diagram of the structure of an electrical device provided in an embodiment of this application. Detailed Implementation

[0042] The technical solutions in this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.

[0043] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.

[0044] Currently, most electrical devices use AC power. In some AC power supply scenarios, it is necessary to perform zero-crossing detection on the supply voltage (AC voltage) of the electrical device to determine the zero-crossing point (also known as the zero-crossing moment). For example, when the electrical device is a motor, zero-crossing detection of the AC voltage is required. Based on the detected zero-crossing moment, the motor's speed, phase, and direction are determined to achieve precise motor control. As another example, when the electrical device is electronic equipment, the zero-crossing moment of the AC voltage needs to be detected and determined. At the zero-crossing moment, soft-start is performed on the switching power supply, uninterruptible power supply, and battery management system in the electronic equipment to avoid damage to the electronic equipment due to excessive starting current.

[0045] Furthermore, in some AC power supply scenarios, it is also necessary to detect and determine the AC voltage level. For example, some electronic devices (such as computers) may be sold in different regions, and the voltage levels of the power supply (AC voltage) in different regions are different. When the electronic device is powered on, it is necessary to detect the voltage level of the current input AC voltage so that the input AC voltage can be converted to a suitable voltage to power the electronic device. The voltage level can be represented by the maximum value of the AC voltage; for example, when the AC voltage is 220V, the voltage level is 220V; when the AC voltage is 110V, the voltage level is 110V.

[0046] It should be understood that the above are merely illustrative examples, and the scenarios for voltage level and zero-crossing detection may include, but are not limited to, the examples above.

[0047] This application provides a voltage detection method and a voltage detection circuit, which can detect the zero-crossing time and voltage level of AC voltage.

[0048] See Figure 1 , Figure 1 This is a schematic diagram of a voltage detection scenario provided in an embodiment of this application. Figure 1 As shown, this scenario includes a control element 10 and a voltage detection circuit 20, which are installed in the electrical equipment. The input terminal of the voltage detection circuit 20 can be connected to the power input terminal of the electrical equipment, which is used to supply AC voltage 30 (hereinafter referred to as the AC voltage to be measured) to power the electrical equipment. The output terminal of the voltage detection circuit 20 is connected to the control element 10. The voltage detection circuit 20 can detect the AC voltage 30, outputting a first-level signal to the control element 10 when the absolute value of the AC voltage 30 is less than a preset voltage threshold, and outputting a second-level signal to the control element 10 when the absolute value of the AC voltage 30 is greater than the preset voltage threshold.

[0049] Correspondingly, the control element 10 can execute the voltage detection method provided in the embodiments of this application to monitor whether the level signal output by the voltage detection circuit 20 has undergone the Nth transition from the first level signal to the second level signal. If the Nth transition is detected, and it is determined that the (N-1)th transition has been detected in advance, the zero-crossing time and / or voltage level of the AC voltage to be measured is determined according to the first interval duration between the Nth transition and the (N-1)th transition.

[0050] It should be noted that N is an integer greater than 0, and the Nth transition refers to any transition from the first level signal to the second level signal.

[0051] Optionally, the voltage detection circuit may include, for example, Figure 1 The diagram shows a full-wave rectifier circuit 21, a buck converter circuit 22, and an output circuit 23. The output terminal of the full-wave rectifier circuit 21 is connected to the input terminal of the buck converter circuit 22. The input terminal of the full-wave rectifier circuit 21 is connected to the AC voltage to be measured, used to rectify the AC voltage and output the rectified pulsating DC voltage to the buck converter circuit 22. The output terminal of the buck converter circuit 22 is connected to the input terminal of the output circuit 23. The buck converter circuit 22 is used to step down the pulsating DC voltage and output the stepped-down trigger voltage to the output circuit 23. The output circuit 23 is used to output a first-level signal when the trigger voltage is less than the trigger threshold and a second-level signal when the trigger voltage is greater than the trigger threshold.

[0052] See Figure 2 , Figure 2 This is a schematic diagram of the circuit principle of a voltage detection circuit provided in an embodiment of this application. Figure 2As shown, the full-wave rectifier circuit 21 can be a bridge rectifier circuit. The input terminal of this bridge rectifier circuit forms the input terminal of the voltage detection circuit, which is connected to the voltage input terminal of the electrical equipment. It can receive the AC voltage 30 input from the power input terminal. The full-wave rectifier circuit 21 can rectify the AC voltage 30 to obtain a pulsating DC voltage. The output terminal of the full-wave rectifier circuit 21 is connected to the input terminal of the buck circuit 22, and can output the rectified pulsating DC voltage to the buck circuit 22.

[0053] The step-down circuit 22 is used to step down the pulsating DC voltage to obtain a trigger voltage, which is lower than the pulsating DC voltage. The output terminal of the step-down circuit 22 is connected to the input terminal of the output circuit 23, allowing it to output the trigger voltage to the output circuit 23. It should be understood that the voltage level of the trigger voltage matches the voltage level of the output circuit 23, allowing it to be input to the output circuit 23.

[0054] The output circuit 23 is used to determine whether the trigger voltage is greater than the trigger threshold, which corresponds to the voltage threshold. When the trigger voltage is less than the trigger threshold, the absolute value of the AC voltage is less than the voltage threshold; when the trigger voltage is greater than the trigger threshold, the absolute value of the AC voltage is greater than the voltage threshold. The output circuit 23 outputs a first-level signal when the trigger voltage is less than the trigger threshold, indicating that the absolute value of the AC voltage 30 is less than the voltage threshold. The output circuit 23 outputs a second-level signal when the trigger voltage is greater than the trigger threshold, indicating that the absolute value of the AC voltage 30 is greater than the voltage threshold.

[0055] Optionally, the step-down circuit 22 includes a first resistor 221 and a second resistor 222; the first resistor 221 and the second resistor 222 are connected in series between the output terminal of the full-wave rectifier circuit 21 and the ground terminal GND in the voltage detection circuit 20, and the first connection node 223 between the first resistor 221 and the second resistor 222 constitutes the output terminal of the step-down circuit 22.

[0056] like Figure 2 As shown, the step-down circuit 22 can be composed of a first resistor 221 and a second resistor 222 connected in series. One end of the first resistor 221 is connected to the output terminal of the full-wave rectifier circuit 21, and can receive the pulsating DC voltage output by the full-wave rectifier circuit 21. The other end of the first resistor 221 is connected to the second resistor 222. The end of the second resistor 222 that is not connected to the first resistor 221 is connected to the ground terminal GND in the voltage detection circuit 20. The first connection node 223 between the first resistor 221 and the second resistor 222 constitutes the output terminal of the step-down circuit 22. The first resistor 221 and the second resistor 222 can step down the pulsating DC voltage output by the full-wave rectifier circuit 21 to obtain a trigger voltage whose waveform is consistent with the waveform of the pulsating DC voltage and is lower than the pulsating DC voltage.

[0057] Optionally, the output circuit includes a third resistor and a switching element; one connection terminal of the switching element is connected to the ground terminal, and the other connection terminal is connected to the power supply terminal in the voltage detection circuit through the third resistor; the control terminal of the switching element is connected to the first connection node, and is used to switch to a first state when the trigger voltage is less than the trigger threshold, so as to output a first level signal through the second connection node between the switching element and the third resistor, and to switch to a second state when the trigger voltage is greater than the trigger threshold, so as to output a second level signal through the second connection node; wherein, one of the first state and the second state is a conducting state and the other is a turning-off state.

[0058] like Figure 2 As shown, the output circuit 23 can be composed of a third resistor 231 connected in series and a switching element 232. The switching element 232 can be a PNP transistor, with the base of the PNP transistor as the control terminal and the collector and emitter as the two connection terminals. The emitter is connected to the third resistor 231, and the collector is connected to the ground terminal. The end of the third resistor 231 not connected to the transistor is connected to the power supply terminal (VCC) in the voltage detection circuit 20, for example, VCC is 3.3V. The second connection node 233 between the third resistor 231 and the switching element 232 constitutes the output terminal of the output circuit 23, and the second connection node 233 is connected to the input terminal of the control element 10.

[0059] When the switching element 232 is a PNP transistor, the switching element 232 is turned off (i.e., cut off) when the base voltage reaches the cutoff voltage of the PNP transistor, and the switching element 232 is turned on when the base voltage is less than the cutoff voltage of the PNP transistor.

[0060] like Figure 2 As shown, the resistance values ​​of the first resistor 221 and the second resistor 222 can be configured appropriately so that the trigger voltage output from the first connection node 223 reaches the cutoff voltage of the PNP transistor (the cutoff voltage is the trigger threshold) when the absolute value of the input voltage 30 is greater than the voltage threshold. This causes the PNP transistor to turn off when the absolute value of the input voltage 30 is greater than the voltage threshold, at which point the voltage of the second connection node 233 is pulled high by the third resistor 231. Conversely, by configuring the resistance values ​​of the first resistor 221 and the second resistor 222 appropriately, the trigger voltage is made less than the cutoff voltage of the PNP transistor when the absolute value of the input voltage 30 is less than the voltage threshold. This causes the PNP transistor to turn on when the absolute value of the input voltage 30 is less than the voltage threshold, at which point the voltage of the second connection node 233 is pulled low by the switching element 232.

[0061] Specifically, when the voltage of the second connection node 233 is pulled low, the output voltage (i.e., the level signal) is the first level signal; when the voltage of the second connection node 233 is pulled high, the output voltage is the second level signal. The control element 10 can monitor the level signal of the third connection node 233 as it transitions from the first level signal to the second level signal, and from the second level signal to the first level signal.

[0062] See Figure 3 , Figure 3 for Figure 2 The waveform diagram of the voltage detection circuit is shown. The "steamer wave" 31 represents the pulsating DC voltage output by the full-wave rectifier circuit 21, and the sawtooth wave 32 represents the level signal output by the output circuit 23. The voltage value of the second level signal is V2, and the voltage value of the first level signal is less than V2, for example... Figure 3 The value shown is 0V.

[0063] Combination Figure 2 As shown, the waveform of the trigger voltage output by the step-down module 22 is consistent with the waveform of the "bun wave" 31. The voltage threshold V1 corresponds to the trigger threshold, which is the cutoff voltage of the PNP transistor. When the absolute value of the AC voltage is less than the voltage threshold V1, the trigger voltage is less than the cutoff voltage of the PNP transistor. At this time, the switching element 232 switches to the on state (switches to the first state), the voltage of the second connection node 233 is pulled low, and the voltage detection circuit 20 outputs a low-level first-level signal. When the absolute value of the AC voltage is greater than the voltage threshold V1, the trigger voltage is greater than the cutoff voltage of the PNP transistor. At this time, the switching element 232 switches to the off state (i.e., switches to the second state), the voltage of the second connection node 233 is pulled high, and the voltage detection circuit outputs a high-level second-level signal.

[0064] See Figure 4 , Figure 4 This is a schematic diagram of the circuit principle of another voltage detection circuit provided in an embodiment of this application. For example... Figure 4 As shown, the output circuit 23 consists of a third resistor 231 connected in series and a switching element 232. The switching element 232 can be an NPN transistor, with the base of the NPN transistor as the control terminal and the collector and emitter as the two connection terminals. The collector is connected to the third resistor 231, and the emitter is connected to the ground terminal. The end of the third resistor 231 not connected to the NPN transistor is connected to the power supply terminal in the voltage detection circuit 20. The second connection node 233 between the third resistor 231 and the switching element 232 constitutes the output terminal of the output circuit 23, and the second connection node 233 is connected to the input terminal of the control element 10.

[0065] When the switching element 232 is an NPN transistor, the switching element 232 is turned on and in the on state when the base voltage is greater than the turn-on voltage of the NPN transistor, and the switching element 232 is turned off and in the off state when the base voltage is less than the turn-on voltage of the NPN transistor.

[0066] like Figure 4 As shown, the resistance values ​​of the first resistor 221 and the second resistor 222 can be configured appropriately so that the trigger voltage output from the first connection node 223 reaches the turn-on voltage (trigger threshold) of the NPN transistor when the absolute value of the input voltage 30 is greater than the voltage threshold. This causes the NPN transistor to conduct when the absolute value of the input voltage 30 is greater than the voltage threshold, at which point the voltage of the second connection node 233 is pulled low by the switching element 232. Conversely, by configuring the resistance values ​​of the first resistor 221 and the second resistor 222 appropriately, the trigger voltage is made less than the turn-on voltage of the NPN transistor when the absolute value of the input voltage 30 is less than the voltage threshold. This causes the NPN transistor to turn off when the absolute value of the input voltage 30 is less than the voltage threshold, at which point the voltage of the second connection node 233 is pulled high by the third resistor 231.

[0067] Specifically, when the voltage of the second connection node 233 is pulled high, the output voltage (i.e., the level signal) is the first level signal; when the voltage of the second connection node 233 is pulled low, the output voltage is the second level signal. The control element 10 can monitor the level signal of the third connection node 233 as it transitions from the first level signal to the second level signal, and from the second level signal to the first level signal.

[0068] See Figure 5 , Figure 5 for Figure 4 The waveform diagram of the voltage detection circuit is shown. The pulsating DC voltage output by the full-wave rectifier circuit 21 is the "steamer wave" 31, and the sawtooth wave 32 is the level signal output by the voltage detection circuit 20. The voltage value of the first level signal is V2, and the voltage value of the second level signal is a level signal less than V2, such as 0V.

[0069] Combination Figure 4As shown, the waveform of the trigger voltage output by the step-down module 22 is consistent with the waveform of the "bun wave" 31. The voltage threshold V1 corresponds to the trigger threshold, which is the turn-on voltage of the NPN transistor. When the absolute value of the AC voltage is less than the voltage threshold V1, the trigger voltage is less than the trigger threshold (i.e., the turn-on voltage of the NPN transistor). At this time, the switching element 232 switches to the off state (i.e., switches to the first state), the voltage of the second connection node 233 is pulled high, and the voltage detection circuit 20 outputs the first level signal of V2. When the absolute value of the AC voltage is greater than the voltage threshold V1, the trigger voltage is greater than the trigger threshold (i.e., the turn-on voltage of the NPN transistor). At this time, the switching element 232 switches to the on state (i.e., switches to the second state), the voltage of the second connection node 233 is pulled low, and the voltage detection circuit outputs the second level signal of 0V.

[0070] It should be understood that the above are merely illustrative examples, and the specific circuit structure of the voltage detection circuit may include, but is not limited to, the examples above.

[0071] In this embodiment, the voltage detection circuit comprises a full-wave rectifier circuit, a step-down circuit, and an output circuit. The full-wave rectifier circuit and the step-down circuit rectify and reduce the AC voltage to obtain a trigger voltage that can be input to the output circuit. This trigger voltage can then trigger the output circuit to output a first-level signal and a second-level signal, allowing the control element to detect the zero-crossing time and / or voltage level of the AC voltage based on the output level signal from the voltage detection circuit. The voltage detection circuit has a simple structure and low cost, which can reduce the structure and cost of electrical equipment.

[0072] Furthermore, the step-down circuit consists of a first resistor and a second resistor connected in series, which makes the structure of the step-down circuit simple and the cost low, thereby simplifying the circuit structure of the voltage detection circuit and reducing the cost of the voltage detection circuit.

[0073] Furthermore, the output circuit consists of a third resistor connected in series and a switching element, which makes the structure of the output circuit simple and the cost low, thereby simplifying the circuit structure of the voltage detection circuit and reducing the cost of the voltage detection circuit.

[0074] See Figure 6 , Figure 6 This is a flowchart illustrating the steps of a voltage detection method provided in an embodiment of this application. The executing entity of this method can be a control element in an electrical device, such as... Figure 6 As shown, the method may include the following steps:

[0075] Step 601: Monitor whether the level signal output by the voltage detection circuit undergoes the Nth transition.

[0076] The voltage detection circuit outputs a first-level signal when the absolute value of the AC voltage being measured is less than a voltage threshold, and outputs a second-level signal when the absolute value of the AC voltage being measured is greater than the voltage threshold. The Nth transition is a transition from the first-level signal to the second-level signal. As illustrated above, the first-level signal and the second-level signal are different voltage levels.

[0077] like Figure 2 and Figure 4 As shown, after the electrical equipment is connected to AC voltage 30, AC voltage 30 is input to full-wave rectifier circuit 21. Full-wave rectifier circuit 21 rectifies AC voltage 30 to obtain pulsating DC voltage. Step-down circuit 23 steps down the pulsating DC voltage to obtain trigger voltage. Output circuit 23 outputs a first level signal when the trigger voltage is less than the trigger threshold (i.e., the absolute value of AC voltage is less than the voltage threshold), and outputs a second level signal when the trigger voltage is greater than the trigger threshold (i.e., the absolute value of AC voltage is greater than the voltage threshold). Correspondingly, control element 10 can monitor the level signal output by second connection node 233 to determine whether the level signal output by voltage detection circuit 10 is the first level signal or the second level signal.

[0078] by Figure 3 For example, the first level signal is 0V, and the second level signal is V2. The electrical equipment can be connected to AC voltage at any time after time 0. Therefore, the control element 10 can detect the voltage detection circuit output signal transitioning from a low first level signal to a high second level signal at times a, d, and g, i.e., detecting a rising edge at the output of the voltage detection circuit. Similarly, at times b and e, it can detect the voltage detection circuit output signal transitioning from a high second level signal to a low first level signal, i.e., detecting a falling edge at the output of the voltage detection circuit.

[0079] by Figure 5 For example, the first level signal is V2, and the second level signal is 0V. The electrical equipment can be connected to AC voltage at any time after time 0. Therefore, the control element 10 can detect the voltage detection circuit output signal changing from a high-level first level signal to a low-level second level signal at times a, d, and g, i.e., detecting a rising edge at the output of the voltage detection circuit. Similarly, at times b and e, it can detect the voltage detection circuit output signal changing from a low-level second level signal to a high-level first level signal, i.e., detecting a rising edge at the output of the voltage detection circuit.

[0080] It is understandable that since the AC voltage changes periodically, the pulsating DC voltage also changes periodically. The voltage detection circuit outputs a level signal that periodically jumps from a first level signal to a second level signal, and then back to the first level signal.

[0081] Where N is a positive integer, and the Nth transition refers to any transition from the first level signal to the second level signal. Figure 2 and Figure 3 For example, when the AC voltage is applied to the voltage detection circuit before time d, the control element can detect when the voltage detection circuit output signal changes from a first level signal to a second level signal at time d, thus determining that the change at time d is the Nth change. Similarly, the control element can also detect when the voltage detection circuit output signal changes from a first level signal to a second level signal at time g. And at time e, the control element can detect when the voltage detection circuit output signal changes from a second level signal to a first level signal.

[0082] Step 602: If the (N-1)th transition of the voltage detection circuit output signal is detected in advance when the Nth transition is detected, then the first interval duration between the Nth transition and the (N-1)th transition is obtained.

[0083] Because the voltage detection circuit outputs a periodic level signal, when the Nth transition is a transition from the first level signal to the second level signal, the (N-1)th transition is a transition from the second level signal to the first level signal that precedes the Nth transition. Figure 3 As shown, when the AC voltage is connected to the voltage detection circuit before time b, the control element can detect the Nth transition at time d and the (N-1)th transition at time b. At this time, the first interval duration between time d and time b can be obtained.

[0084] Optionally, when obtaining the first interval duration between the Nth transition and the (N-1)th transition, the pre-started timer can be terminated to obtain the timing duration, and the timing duration can be used as the first interval duration; wherein, the timer is started when the level signal output by the voltage detection circuit undergoes the (N-1)th transition.

[0085] For example, the control element can start a timer each time it detects a transition in the voltage detection circuit's output level signal from a second level signal to a first level signal. When the Nth transition in the voltage detection circuit's output level signal is detected, if it is determined that the timer has been pre-started, the timer can be stopped, and the timed duration can be used as the first interval duration. Figure 3As shown, at time b, the control element detects a transition in the voltage detection circuit's output signal from a second level signal to a first level signal, and can start a timer. At time d, the control element can detect the Nth transition. If it is determined that the timer was started in advance, then it is determined that the (N-1)th transition was detected in advance, and the timing can be stopped to obtain the timing duration, which is the first interval duration.

[0086] Conversely, if the Nth transition is detected at time d, and it is determined that the timer was not started beforehand, then it can be determined that the (N-1)th transition was not detected beforehand. At this time, the control element can continue to monitor the level signal output by the voltage detection circuit to detect the next Nth transition.

[0087] It should be noted that the timer can be a software timer in the control element or a hardware timer; this embodiment does not impose any restrictions on this.

[0088] Optionally, when obtaining the first interval duration between the Nth transition and the (N-1)th transition, the time difference between the time when the Nth transition occurs and the time when the (N-1)th transition occurs is determined; the first interval duration is determined based on the time difference.

[0089] For example, each time the control element detects a transition in the voltage detection circuit's output signal from a second level signal to a first level signal, it can record the transition time, which can be the control element's system time. When the Nth transition in the voltage detection circuit's output signal is detected, it can determine whether the (N-1)th transition has been detected beforehand based on the pre-recorded transition time. For instance, when the control element detects a transition in the voltage detection circuit's output signal from a second level signal to a first level signal at time b, it can record the system time at time b. At time d, the control element can detect the Nth transition in the voltage detection circuit's output signal from a first level signal to a second level signal. If the system time at time b is pre-recorded, it can be determined that the (N-1)th transition has been detected beforehand, and the time difference between the system time at time b and the system time at time d can be calculated and used as the first interval duration.

[0090] Conversely, if the system time at time b is not recorded beforehand when the Nth transition is detected, it can be determined that the (N-1)th transition was not detected beforehand. At this time, the control element can continue to monitor the level signal output by the voltage detection circuit to detect the next Nth transition.

[0091] In this embodiment of the application, when the Nth transition is detected, the first interval duration is determined based on the timing duration between the Nth transition and the (N-1)th transition, or the first interval duration is determined based on the time difference between the Nth transition and the (N-1)th transition, so that the first interval duration can be determined quickly and accurately.

[0092] Step 603: Determine the zero-crossing time and / or voltage level of the AC voltage to be measured based on the first interval duration.

[0093] like Figure 3 and Figure 5 As shown, when an AC voltage is rectified by full-wave rectification to obtain a pulsating DC voltage, the moment when the pulsating DC voltage reaches zero is the zero-crossing moment of the AC voltage. Before each zero-crossing moment, the voltage detection circuit outputs a signal level that transitions from a second level signal to a first level signal; after each zero-crossing moment, the voltage detection circuit outputs a signal level that transitions from the first level signal to the second level signal. Figure 3 For example, times c and f are the zero-crossing times of the AC voltage. Since the AC voltage changes periodically, the two adjacent peaks in the 31-wave pattern are symmetrical. Therefore, time c is located at the midpoint between time b and time d. Before time c, the voltage detection circuit outputs a signal level that jumps from the second level signal to the first level signal. After time c, the voltage detection circuit outputs a signal level that jumps from the first level signal to the second level signal. The interval between time b and time c is equal to the interval between time c and time d.

[0094] Optionally, if the Mth transition is detected, the target time after the Mth transition is determined as the zero-crossing time; wherein, M is greater than N, the Mth transition is a transition from the second level signal to the first level signal, and the interval between the target time and the transition time of the Mth transition is 0.5 times the first interval duration.

[0095] For example, the Mth transition can be the (N+1)th transition. Figure 3 As shown, when the (N-1)th transition at time b and the Nth transition at time d are detected, the first interval duration between time b and time d can be obtained. Afterwards, the control element can continue to monitor the level signal output by the voltage detection circuit, and the (N+1)th transition can be detected at time e. After detecting the (N+1)th transition at time e, time f, which is located after the (N+1)th transition and is 0.5 times the first interval duration from the transition time of the (N+1)th transition (i.e., time e), is determined. Time f is the target time, and it can be determined that time f is a zero-crossing time. Time f is located at the center between time e and time g, and the interval between time f and time e is 0.5 times the first interval duration.

[0096] For example, the Mth transition can also be any transition from the second level signal to the first level signal after the (N+1)th transition. Figure 3 As shown, after the Nth transition at time d is detected, a transition from the second level signal to the first level signal can be detected at time h. This transition is the (N+3)th transition. When the (N+3)th transition is detected at time h, time i, which is located after the (N+3)th transition and is 0.5 times the first interval time of the transition time of the (N+3)th transition (i.e., time h), can be determined. Time i is the target time, and at this time, time i can be determined as the zero-crossing time.

[0097] Similarly, after time i, the control element continues to monitor the level signal output by the voltage detection circuit. When the next time the transition from the second level signal to the first level signal is detected, the target time located after the transition time and 0.5 times the first interval time can be determined as the zero-crossing time.

[0098] In practical applications, after the Nth transition, if the (N+1)th transition is detected, the target time after the (N+1)th transition is determined as the zero-crossing time. This can be achieved by determining the zero-crossing time of the current cycle within each AC voltage cycle based on the first interval duration corresponding to the adjacent previous cycle, allowing for real-time and accurate determination of the zero-crossing time. Furthermore, after the Nth transition, if any Mth transition from the second level signal to the first level signal is detected, the zero-crossing time can be determined based on the first interval duration determined by the Nth transition. This avoids determining the first interval duration within each AC voltage cycle, thereby reducing the power consumption of the control element.

[0099] Optionally, in determining the voltage level of the AC voltage to be measured, a target voltage level corresponding to the first interval duration can be determined from multiple reference voltage levels; the target voltage level is then determined as the voltage level of the AC voltage to be measured.

[0100] Where the voltage threshold (trigger threshold) is constant, the higher the AC voltage level, the shorter the interval between the Nth transition and the (N-1)th transition. Based on this, the AC voltage level can be determined according to the first interval duration.

[0101] See Figure 7 , Figure 7 A schematic diagram comparing waveforms at different voltage levels is shown. Figure 7As shown, wave 71 represents the pulsating DC voltage corresponding to the first AC voltage, wave 72 represents the pulsating DC voltage corresponding to the second AC voltage, wave 73 represents the level signal corresponding to the first AC voltage, and wave 74 represents the level signal corresponding to the second AC voltage. Since the voltage level of the first AC voltage is higher than that of the second AC voltage, it can be seen that the interval t1 between the Nth transition and the (N-1)th transition corresponding to the first AC voltage is less than the interval t2 between the Nth transition and the (N-1)th transition corresponding to the second AC voltage. That is, the first interval is negatively correlated with the voltage level; the higher the voltage level, the shorter the first interval.

[0102] Based on this, multiple voltage levels (hereinafter referred to as reference voltage levels) can be preset for input electrical equipment, and the interval duration (i.e., the first interval duration) corresponding to each reference voltage level can be determined experimentally. After determining the first interval duration, if the difference between the first interval duration and the interval duration corresponding to a certain reference voltage level is less than a preset value, then the first interval duration is determined to be the interval duration corresponding to that reference voltage level. This reference voltage level is the target voltage level, and it can be determined that this reference voltage level is the AC voltage level of the currently input electrical equipment.

[0103] like Figure 7 As shown, when the voltage levels input to the electrical equipment include a first AC voltage and a second AC voltage, the voltage levels (i.e., reference voltage levels) of the first and second AC voltages can be pre-stored in the control element, along with the interval duration t1 corresponding to the first AC voltage and the interval duration t2 corresponding to the second AC voltage. After determining the first interval duration, if the difference between the first interval duration and the interval duration t1 is less than a preset value, it indicates that the first interval duration is close to or equal to the interval duration t1, and the voltage level of the AC voltage currently input to the electrical equipment can be determined to be the voltage level of the first AC voltage. Similarly, after determining the first interval duration, if the difference between the first interval duration and the interval duration t2 is less than a preset value, it indicates that the first interval duration is close to or equal to the interval duration t2, and the voltage level of the AC voltage currently input to the electrical equipment can be determined to be the voltage level of the second AC voltage.

[0104] Optionally, determining the target voltage level corresponding to the first interval duration from multiple reference voltage levels includes: determining the actual reference voltage corresponding to the first interval duration based on the predicted scaling factor and the first interval duration; and determining the target voltage level corresponding to the actual reference voltage from multiple reference voltage levels.

[0105] In one implementation, based on the principle that the higher the voltage level, the shorter the first interval duration, a proportionality coefficient between the reference voltage level and the first interval duration can be experimentally determined beforehand for multiple reference voltage levels. After determining the first interval duration, the product of the first interval duration and the proportionality coefficient can be calculated to obtain the actual reference voltage corresponding to the first interval duration. Then, a target voltage level that is close to or equal to the actual reference voltage can be determined from the multiple reference voltages.

[0106] For example, after determining the first interval duration, the actual reference voltage can be determined using the formula (1) shown below.

[0107] V in =K×T1 (1);

[0108] Where K is the proportionality coefficient, T1 is the duration of the first interval, and V in This is the actual reference voltage.

[0109] In this embodiment, the actual reference voltage is determined based on the predicted scaling factor and the first interval duration, and the target voltage level corresponding to the actual reference voltage is determined from multiple reference voltage levels, which can quickly and accurately determine the target voltage level.

[0110] Optionally, the method may further include: if the (N-2)th transition of the level signal output by the voltage detection circuit is detected in advance when the Nth transition is detected, then obtaining a second interval duration between the Nth transition and the (N-2)th transition.

[0111] The period duration and / or frequency of the AC voltage to be measured are determined based on the second interval duration.

[0112] Because the voltage detection circuit outputs a periodic level signal, when the Nth transition is a transition from the first level signal to the second level signal, the (N-2)th transition is also a transition from the first level signal to the second level signal. Figure 3 As shown, when the transition at time d becomes the Nth transition, the transition at time a becomes the (N-2)th transition.

[0113] For example, the control element can start a timer each time a level change in the voltage detection circuit's output signal is detected, and stop the timer when the next level change in the voltage detection circuit's output signal is detected, thereby obtaining the interval between two adjacent changes. In obtaining the second interval, the interval between the Nth change and the (N-1)th change, and the interval between the (N-1)th change and the (N-2)th change can be obtained. The two intervals are then summed to obtain the second interval.

[0114] like Figure 3 As shown, when the electrical equipment is connected before time a, the control element can detect the (N-2)th transition at time a, the (N-1)th transition at time b, and the Nth transition at time d. At the same time, the time interval between time a and time b can be obtained by timing, as well as the time interval between time b and time d.

[0115] To determine the period of an AC voltage, the interval between times a and b, and between times b and d, can be summed to obtain a second interval, which is equal to half the period of the AC voltage. Then, twice this second interval is calculated to obtain the period of the AC voltage. To determine the frequency of the AC voltage, the derivative of the period can be calculated to obtain the frequency.

[0116] For example, after determining the second interval duration, the period duration and frequency of the AC voltage can be determined by formulas (2) and (3) as shown below.

[0117] T x =2×(t1×t2) (2);

[0118]

[0119] Where t1 is the interval between time a and time b, t2 is the interval between time b and time d, (t1×t2) is the second interval, and T x denoted as , where is the period duration of the AC voltage, and f is the frequency of the AC voltage.

[0120] In this embodiment, when the Nth transition and the (N-2)th transition are detected, the period duration and / or frequency of the AC voltage to be measured are determined based on the second interval duration between the Nth transition and the (N-2)th transition. This not only allows for the rapid determination of the period duration and frequency of the AC voltage, but also facilitates the determination of the period duration and frequency of the AC voltage by electronic devices.

[0121] See Figure 8 , Figure 8 This is a schematic flowchart of a voltage detection method provided in an embodiment of this application.

[0122] like Figure 8 As shown, the method may include the following steps:

[0123] Step 801: Determine if a transition has occurred.

[0124] In this embodiment, after the electrical equipment is powered on, the control element continuously monitors the level signal output by the voltage detection circuit to determine whether the level signal output by the voltage detection circuit has changed. If a change in the level signal output by the voltage detection circuit is detected, step 802 is executed; if no change in the level signal output by the voltage detection circuit is detected, the monitoring of the level signal output by the voltage detection circuit continues.

[0125] Step 802: Determine if a timer is in progress.

[0126] In this embodiment, when a change in the voltage detection circuit's output level signal is detected, the control element determines whether a timer is already running. If a timer is already running, step 803 is executed to stop the timing and obtain the duration. If it is determined that no timer has been started, step 8015 or step 8025 is executed to start the timer. That is, a timer is started each time a change in the voltage detection circuit's output level signal is detected.

[0127] Step 803: Stop the timer.

[0128] In this embodiment, after the control element detects a change in the level signal output by the voltage detection circuit and a timer is pre-started, it stops the timer. If the detected change is determined to be the first change (i.e., the Nth change), step 8024 is executed, and the timing duration is used as the first interval duration. If the detected change is determined to be the second change (i.e., the (N-1)th change), step 8014 is executed, and the timing duration is used as the third interval duration. The first change is a change from a first level signal to a second level signal, and the second change is a change from a second level signal to a first level signal. Figure 3 As shown, the first interval duration is the interval duration between the Nth transition and the (N-1)th transition (e.g., time b and time d), and the third interval duration is the interval duration between the (N-1)th transition and the (N-2)th transition (e.g., time b and time a).

[0129] Step 8014: Use the timing duration as the third interval duration.

[0130] Step 8015: Start timing.

[0131] Step 8016: Determine whether the first interval duration has been obtained in advance.

[0132] In this embodiment, after obtaining the third interval duration, it is determined whether the first interval duration has been obtained in advance. If the first interval duration has been obtained in advance, step 807 can be executed to sum the first interval duration and the third interval duration to obtain the second interval duration. Based on the second interval duration, the period duration and frequency of the AC voltage are determined using the above formulas (2) and (3). At the same time, the zero-crossing time and voltage level can be determined based on the first interval duration.

[0133] Step 8024: Use the timing duration as the first interval duration.

[0134] Step 8025: Start timing.

[0135] Step 8026: Determine whether the third interval duration has been obtained in advance.

[0136] In this embodiment, after obtaining the first interval duration, it is determined whether the third interval duration has been obtained in advance. If the third interval duration has been obtained in advance, step 807 can be executed to sum the first interval duration and the third interval duration to obtain the second interval duration. Based on the second interval duration, the period duration and / or frequency of the AC voltage are determined using the above formulas (2) and (3). At the same time, the zero-crossing time and voltage level can be determined based on the first interval duration.

[0137] The timer can be restarted after each acquisition of the first or third interval duration. Specifically, the timer starts counting each time a change in the voltage detection circuit's output signal is detected, and ends when the next change in the voltage detection circuit's output signal is detected, thus obtaining the time duration. If a second change in the voltage signal occurs, the time duration is the first interval duration; if a second change in the voltage signal occurs, the time duration is the third interval duration.

[0138] In this embodiment, the voltage detection circuit outputs a transformed first-level signal and a second-level signal based on the voltage value of the AC voltage to be measured. By detecting the first interval duration between the adjacent Nth transition and (N-1)th transition, the zero-crossing time and / or voltage level of the AC voltage to be measured are determined based on the first interval duration. This allows for simple and quick detection of the zero-crossing of AC voltage and the detection of voltage level.

[0139] In some scenarios, it is necessary to simultaneously detect the zero-crossing moment and voltage level of AC voltage. In related technologies, to simultaneously detect these two points, two independent detection circuits are typically installed in the electrical equipment: one for detecting the zero-crossing moment and the other for detecting the voltage level. This inevitably increases the complexity of the equipment. However, in this embodiment, a single voltage detection circuit can simultaneously detect the AC voltage level, zero-crossing moment, and frequency, avoiding the need for two detection circuits in the equipment. This simplifies the equipment's structure and reduces its cost.

[0140] The above text combined Figures 1 to 8 The voltage detection method provided in the embodiments of this application has been described in detail; the following will be combined with Figure 9 and Figure 10 The apparatus embodiments of this application are described in detail below. It should be understood that the apparatus in the embodiments of this application can perform the various methods described in the foregoing embodiments of this application, that is, the specific working processes of the various products described below can be referred to the corresponding processes in the foregoing method embodiments.

[0141] Figure 9 This is a schematic diagram of the structure of a voltage detection device provided in an embodiment of this application. For example, as shown... Figure 9 As shown, the voltage detection device 900 includes:

[0142] The monitoring module 901 is used to monitor whether the level signal output by the voltage detection circuit undergoes the Nth transition; wherein, the voltage detection circuit outputs a first level signal when the absolute value of the AC voltage to be measured is less than a voltage threshold, and outputs a second level signal when the absolute value of the AC voltage to be measured is greater than the voltage threshold, and the Nth transition is a transition from the first level signal to the second level signal;

[0143] The acquisition module 902 is used to acquire, when the Nth transition is detected, if the (N-1)th transition of the level signal output by the voltage detection circuit is detected in advance, the first interval duration between the Nth transition and the (N-1)th transition; the (N-1)th transition is a transition from the second level signal to the first level signal;

[0144] The determination module 903 is used to determine the zero-crossing time and / or voltage level of the AC voltage to be measured based on the first interval duration.

[0145] Optionally, the determining module 903 is specifically configured to, upon detecting the Mth transition, determine a target time following the Mth transition as the zero-crossing time; wherein M is greater than N, the Mth transition is a transition from the second level signal to the first level signal, and the target time is spaced 0.5 times the first interval duration between the transition time of the Mth transition; and / or, determine a target voltage level corresponding to the first interval duration from a plurality of reference voltage levels; and determine the target voltage level as the voltage level of the AC voltage to be measured.

[0146] Optionally, the Mth jump becomes the (N+1)th jump.

[0147] Optionally, the determining module 903 is specifically configured to determine the actual reference voltage corresponding to the first interval duration based on the predicted scaling factor and the first interval duration; and to determine the target voltage level corresponding to the actual reference voltage from the plurality of reference voltage levels.

[0148] Optionally, the acquisition module 902 is specifically used to terminate a pre-started timer to obtain the timing duration, and use the timing duration as the first interval duration; wherein the timer is started when the level signal output by the voltage detection circuit undergoes the (N-1)th transition; or, the time difference between the time of the Nth transition and the time of the (N-1)th transition is determined; and the first interval duration is determined based on the time difference.

[0149] Optionally, the acquisition module 902 is further configured to, if the (N-2)th transition of the level signal output by the voltage detection circuit is detected in advance when the Nth transition is detected, acquire the second interval duration between the Nth transition and the (N-2)th transition; the determination module 903 is further configured to determine the period duration and / or frequency of the AC voltage to be measured based on the second interval duration.

[0150] It should be noted that the voltage detection device 900 described above is embodied in the form of a functional unit. The term "module" here can be implemented in software and / or hardware, without specific limitations.

[0151] For example, a "module" can be a software program, hardware circuit, or a combination of both that implements the above functions. Hardware circuits may include application-specific integrated circuits (ASICs), electronic circuits, processors (e.g., shared processors, proprietary processors, or group processors) and memory for executing one or more software or firmware programs, combined logic circuits, and / or other suitable components that support the described functions.

[0152] Therefore, the units of the various examples described in the embodiments of this application can be implemented in electronic hardware, or a combination of electrical device software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0153] This embodiment can divide the device into functional modules based on the above method example. For example, each module can correspond to a separate function, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.

[0154] It should be understood that the device provided in this embodiment is used to perform the voltage detection method described above, and therefore can achieve the same effect as the implementation method described above.

[0155] When using integrated units, the device may include a processing module and a storage module. The processing module may be a processor or a controller that implements or executes the various exemplary logic blocks, modules, and circuits shown in connection with the disclosure of this application. The processor may also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc., and the storage module may be a memory.

[0156] In addition, the device provided in the embodiments of this application may specifically be a chip, component or module. The chip may include a connected processor and a memory. The memory is used to store instructions. When the processor calls and executes the instructions, the chip can execute a voltage detection method provided in the above embodiments.

[0157] This application also provides a storage medium storing executable program code. When the executable program code is run on an electrical device, the electrical device performs the above-described related method steps to implement a voltage detection method provided in the above embodiments. The electrical device readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, Digital Video Discs (DVDs), Compact Disc Read-Only Memory (CD-ROM), microdrives, and magneto-optical disks, read-only memory (ROM), random access memory (RAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), dynamic random access memory (DRAM), video random access memory (VRAM), flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of media or device suitable for storing instructions and / or data.

[0158] This application also provides an executable program code product that, when run on an electrical device, causes the electrical device to perform the aforementioned related steps to implement a voltage detection method provided in the above embodiments.

[0159] The storage medium, executable program code product or chip provided in this application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.

[0160] Figure 10 This is a schematic diagram of the structure of an electrical device provided in an embodiment of this application. The electrical device is, for example, the push server mentioned above.

[0161] For example, such as Figure 10 As shown, the electrical device 1000 includes a memory 1010 and a processor 1020. The memory 1010 stores executable program code 1030, and the processor 1020 is used to call and execute the executable program code 1030 to perform a voltage detection method.

[0162] For example, the memory 1010 can be used to store the relevant program of the voltage detection method provided in the embodiments of this application; the processor 1020 can call the relevant program of the voltage detection method stored in the memory 1010 to execute the voltage detection method of the embodiments of this application.

[0163] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0164] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0165] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A voltage detection method, characterized by, The method includes: The voltage detection circuit monitors whether the output level signal undergoes the Nth transition; wherein the voltage detection circuit outputs a first level signal when the absolute value of the AC voltage to be measured is less than a voltage threshold, and outputs a second level signal when the absolute value of the AC voltage to be measured is greater than the voltage threshold, and the Nth transition is a transition from the first level signal to the second level signal; If the Nth transition is detected, and the (N-1)th transition of the voltage detection circuit output signal is detected in advance, then the first interval duration between the Nth transition and the (N-1)th transition is obtained; wherein the (N-1)th transition is a transition from the second level signal to the first level signal; The zero-crossing time and / or voltage level of the AC voltage to be measured are determined based on the first interval duration.

2. The method of claim 1, wherein, Determining the zero-crossing time and / or voltage level of the AC voltage to be measured based on the first interval duration includes: If the Mth transition is detected, the target time after the Mth transition is determined as the zero-crossing time; wherein, M is greater than N, the Mth transition is a transition from the second level signal to the first level signal, and the target time and the transition time of the Mth transition are spaced 0.5 times the first interval duration. And / or, determine a target voltage level corresponding to the first interval duration from a plurality of reference voltage levels; and determine the target voltage level as the voltage level of the AC voltage to be measured.

3. The method of claim 2, wherein, The Mth transition becomes the (N+1)th transition.

4. The method of claim 2, wherein, Determining the target voltage level corresponding to the first interval duration from multiple reference voltage levels includes: Based on the predicted scaling factor and the first interval duration, determine the actual reference voltage corresponding to the first interval duration; The target voltage level corresponding to the actual reference voltage is determined from the plurality of reference voltage levels.

5. The method of claim 1, wherein, Obtaining the first interval duration between the Nth transition and the (N-1)th transition includes: The timing duration is obtained by ending the pre-started timer, and the timing duration is used as the first interval duration; wherein, the timer is started when the level signal output by the voltage detection circuit undergoes the (N-1)th transition; Alternatively, determine the time difference between the time when the Nth transition occurs and the time when the (N-1)th transition occurs; determine the duration of the first interval based on the time difference.

6. The method of any one of claims 1-5, wherein, The method further includes: If the Nth transition is detected, and the (N-2)th transition of the voltage detection circuit output signal is detected in advance, then the second interval duration between the Nth transition and the (N-2)th transition is obtained. The period duration and / or frequency of the AC voltage to be measured are determined based on the second interval duration.

7. A voltage detection circuit, characterized by comprising: include: Full-wave rectifier circuit, step-down circuit and output circuit; The output terminal of the full-wave rectifier circuit is connected to the input terminal of the step-down circuit. The input terminal of the full-wave rectifier circuit is connected to the AC voltage to be measured, which is used to rectify the AC voltage to be measured and output the rectified pulsating DC voltage to the step-down circuit. The output terminal of the step-down circuit is connected to the input terminal of the output circuit. The step-down circuit is used to step down the pulsating DC voltage and output the stepped-down trigger voltage to the output circuit. The output circuit is used to output a first level signal when the trigger voltage is less than the trigger threshold, and to output a second level signal when the trigger voltage is greater than the trigger threshold.

8. The voltage detection circuit of claim 7, wherein, The step-down circuit includes a first resistor and a second resistor; The first resistor and the second resistor are connected in series between the output terminal of the full-wave rectifier circuit and the ground terminal in the voltage detection circuit, and the first connection node between the first resistor and the second resistor constitutes the output terminal of the step-down circuit.

9. The voltage detection circuit of claim 8, wherein, The output circuit includes a third resistor and a switching element; One connection terminal of the switching element is connected to the ground terminal, and the other connection terminal is connected to the power supply terminal in the voltage detection circuit through the third resistor. The control terminal of the switching element is connected to the first connection node and is used to switch to a first state when the trigger voltage is less than the trigger threshold, so as to output the first level signal through the second connection node between the switching element and the third resistor, and to switch to a second state when the trigger voltage is greater than the trigger threshold, so as to output the second level signal through the second connection node; wherein, one of the first state and the second state is a conducting state and the other is a turning-off state.

10. A voltage detection device, characterized by, The device includes: A monitoring module is used to monitor whether the level signal output by the voltage detection circuit undergoes the Nth transition; wherein, the voltage detection circuit outputs a first level signal when the absolute value of the AC voltage to be measured is less than a voltage threshold, and outputs a second level signal when the absolute value of the AC voltage to be measured is greater than the voltage threshold, and the Nth transition is a transition from the first level signal to the second level signal; The acquisition module is configured to, when the Nth transition is detected, if the (N-1)th transition of the level signal output by the voltage detection circuit is detected in advance, acquire the first interval duration between the Nth transition and the (N-1)th transition; wherein the (N-1)th transition is a transition from the second level signal to the first level signal; The determination module is used to determine the zero-crossing time and / or voltage level of the AC voltage to be measured based on the first interval duration.

11. An electrical appliance, characterized in that, include: Memory, used to store executable program code; A processor is configured to call and run the executable program code from the memory, causing the electrical device to perform the voltage detection method as described in any one of claims 1 to 6.