Switch and load metering function control method
By introducing detection circuits and main control circuits into the switch, the start of the metering circuit is controlled according to the working mode and power withdrawal method, the problem that the single/zero fire universal switch cannot realize the load metering function, and the normal operation of the load metering function is achieved. Avoiding the "ghost fire" phenomenon.
Patent Information
- Application Number
- CN202310821210.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-05
- Publication Date
- 2025-01-14
AI Technical Summary
The existing single/zero fire universal switch cannot realize the load metering function, resulting in "ghost fire" easily when the load is in the off state, and it is impossible to effectively record and understand the energy consumption of household appliances.
A switch is designed, including a first detection circuit, a second detection circuit and a main control circuit. The start of the metering circuit is controlled by detecting the working mode and power withdrawal method of the switch to ensure that the normal operation of the load metering function is realized in different modes. , and turn off the metering function when necessary to avoid "ghost fire".
The load metering function of single/zero fire universal switch is realized, avoiding the occurrence of "ghost fire" phenomenon, and can effectively collect the electrical parameters of the load such as power consumption, and provide overload protection without affecting the switching power consumption.
Smart Images

Figure CN119310884A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of switch design, and in particular to a switch and a load metering function control method. Background Art
[0002] Smart homes have entered thousands of households, making people's lives smarter and more convenient. As the most frequently used and most critical part of smart homes, smart switches have long been an indispensable basic product in smart homes. In order to expand applications and functions, smart switches also add metering circuits to help users understand and record the energy consumption of household appliances. The control circuits, communication modules, metering circuits, etc. inside smart switches require continuous power supply. However, most households have single-fire wire wiring and can only install single-fire switches. Single-fire switches draw power from a single fire wire and form a loop by passing a tiny current (uA level or mA level) through the load (light bulb, etc.) to power the switch. In this way, when the load (light bulb, etc.) is in the off state, there will still be a certain current on the load (light bulb, etc.), causing some energy-saving lamps or LED lamps to flicker or dim, which is the "ghost fire" phenomenon.
[0003] In order to avoid the "ghost fire" phenomenon, the intelligent single-fire switch must limit the switch operating current to a certain range, resulting in the single-fire switch having to abandon the metering circuit. Since the single / zero-fire universal switch is essentially still a single-fire switch, it is impossible to deploy a load metering module.
[0004] As can be seen from the above, there is a problem in the prior art that the single / zero fire universal switch cannot realize the load metering function. Summary of the invention
[0005] The present application provides a switch and a load metering function control method, which can solve the problem that the single / zero fire universal switch in the related art cannot realize the load metering function. The technical solution is as follows:
[0006] According to one aspect of the present application, a switch includes: a first detection circuit, a second detection circuit, a metering circuit, and a main control circuit; the first detection circuit is used to detect the working mode of the switch; the working mode includes a first mode and a second mode; the second detection circuit is used to detect the power supply mode of the switch; the power supply mode includes a first power supply mode and a second power supply mode; the main control circuit is connected to the metering circuit, and is used to control the metering circuit to start a load metering function according to the working mode and / or power supply mode of the switch.
[0007] In an exemplary embodiment, the first detection circuit includes a detection signal output unit; wherein the detection signal output unit is used to output a first detection signal when the switch is not connected to the neutral line, and transmit the first detection signal to the main control circuit, so that the main control circuit determines that the working mode of the switch is the first mode; or, output a second detection signal when the switch is connected to the neutral line, and transmit the second detection signal to the main control circuit, so that the main control circuit determines that the working mode of the switch is the second mode.
[0008] In an exemplary embodiment, the second detection circuit includes a first power supply circuit, a second power supply circuit and a sampling circuit; wherein the first power supply circuit is used to output a first power supply signal to the sampling circuit when the switch is electrically connected to the load, so that the sampling circuit samples the first power supply signal; the second power supply circuit is used to output a second power supply signal to the sampling circuit when the switch is disconnected from the load, so that the sampling circuit samples the second power supply signal; the sampling circuit is used to output a sampling signal by sampling the first power supply signal or the second power supply signal, and transmit the sampling signal to the main control circuit, so that the main control circuit determines the power supply mode of the switch based on the sampling signal.
[0009] In an exemplary embodiment, the first power extraction circuit includes a first conversion element and a first switch element, wherein the AC voltage is converted into a first voltage by the first conversion element and then transmitted to the sampling circuit via the first switch element.
[0010] In an exemplary embodiment, the second power extraction circuit includes a second conversion element and a second switch element, wherein the AC voltage is converted into a second voltage by the second conversion element and then transmitted to the sampling circuit via the second switch element.
[0011] In an exemplary embodiment, the sampling circuit includes a comparator, which is connected to the first power supply circuit and the second power supply circuit, and is used to compare the first power supply signal or the second power supply signal with a threshold signal, generate the sampling signal and transmit it to the main control circuit.
[0012] In an exemplary embodiment, the sampling circuit includes a first current limiting element and a second current limiting element, one end of the first current limiting element is connected in series with one end of the second current limiting element, the other end of the first current limiting element is connected to the first power taking circuit and the second power taking circuit, the other end of the second current limiting element is grounded, and the sampling signal is output at the series connection point of the first current limiting element and the second current limiting element.
[0013] In an exemplary embodiment, the metering circuit includes a power supply module, a voltage output module and a load metering module; wherein the power supply module is connected to the voltage output module and is used to output a power supply voltage to the voltage output module; the voltage output module is connected to the main control circuit and is used to supply power to the load metering module according to the power supply voltage output by the power supply module under the control of the main control circuit; the load metering module is used to measure the electrical parameters of the load and transmit the measured electrical parameters to the main control circuit.
[0014] In an exemplary embodiment, the voltage output module includes a linear regulator; the input end of the linear regulator is connected to the power module, the output end of the linear regulator supplies power to the load metering module, and the enable end of the linear regulator is connected to the main control circuit; the main control circuit controls the linear regulator to supply power to the load metering module by controlling the enable end of the linear regulator.
[0015] In an exemplary embodiment, the voltage output module includes a third switch element; one end of the third switch element is connected to the power module, the other end of the third switch element is connected to the load metering module, and the control end of the third switch element is connected to the main control circuit; the main control circuit controls the third switch element to be turned on, so that the power supply voltage output by the power module is transmitted to the load metering module.
[0016] According to one aspect of the present application, a load metering function control method is applied to the switch as described above, and the method includes: detecting the working mode and power supply mode of the switch; the working mode includes a first mode and a second mode, and the power supply mode includes a first power supply mode and a second power supply mode; according to the working mode and / or power supply mode of the switch, controlling the metering circuit in the switch to start the load metering function.
[0017] In an exemplary embodiment, controlling the metering circuit in the switch to start the load metering function according to the working mode and / or power supply mode of the switch includes: if the working mode of the switch is the second mode, controlling the metering circuit to start the load metering function; if the working mode of the switch is the first mode, controlling the metering circuit to start the load metering function according to the power supply mode of the switch.
[0018] In an exemplary embodiment, if the working mode of the switch is the first mode, the metering circuit is controlled to start the load metering function according to the power supply mode of the switch, including: when the working mode of the switch is the first mode, if the power supply mode of the switch is the second power supply mode, the metering circuit is controlled to turn off the load metering function; if the power supply mode of the switch is the first power supply mode, the metering circuit is controlled to start the load metering function.
[0019] The beneficial effects of the technical solution provided by this application are:
[0020] In the above technical solution, a switch is provided, including: a first detection circuit, a second detection circuit, a metering circuit, and a main control circuit; wherein the first detection circuit is used to detect the working mode of the switch, the second detection circuit is used to detect the power supply mode of the switch, and the main control circuit is used to control the metering circuit to start the load metering function according to the working mode and / or the power supply mode of the switch. The switch determines the working mode and the power supply mode through the first detection circuit and the second detection circuit, and then controls whether the metering circuit works based on the working mode and / or the power supply mode. The metering circuit can be controlled to work normally in the second mode (the switch is connected to the neutral line), the load metering function is turned on, and the electrical parameters of the load (such as power consumption) are collected; and the metering circuit can be further controlled to work according to the power supply mode in the first mode (the switch is not connected to the neutral line), and the metering circuit can be controlled to work normally in the first power supply mode (the load is turned on), the load metering function is turned on, and the electrical parameters of the load (such as power consumption) are collected for overload protection, and the load metering function is turned off in the second power supply mode (the load is turned off) to reduce the power consumption of the switch and avoid the "ghost fire" phenomenon. Compared with the prior art where only the zero-fire switch has the load metering function, the switch provided by the present application enables the single / zero-fire universal switch to realize the load metering function while avoiding the ghost fire problem, thereby effectively solving the problem in the related art that the single / zero-fire universal switch cannot realize the load metering function. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can obtain other drawings based on these drawings without creative work.
[0022] Figure 1 is a structural schematic diagram of a switch provided in an embodiment of the present application;
[0023] Figure 2A and 2B is a schematic structural diagram of a first detection circuit in an exemplary embodiment;
[0024] Figure 3 is a schematic structural diagram of a second detection circuit in an exemplary embodiment;
[0025] Figure 4 is a schematic diagram of a specific implementation of a first power extraction circuit and a second power extraction circuit in an exemplary embodiment;
[0026] Figure 5 is a schematic diagram of a specific implementation of the sampling circuit 1044 in an exemplary embodiment;
[0027] Figure 6 is a schematic diagram of the structure of the metering circuit 106 in an exemplary embodiment;
[0028] Figure 7 is a flow chart of a load metering function control method according to an exemplary embodiment;
[0029] Figure 8 yes Figure 7 A flowchart of an embodiment corresponding to step 920 in an embodiment;
[0030] Fig. 9 yes Figure 8 A flowchart of an embodiment corresponding to step 1020 in an embodiment;
[0031] Fig.10 It is a schematic diagram of a specific implementation of a load metering function control method in an exemplary embodiment. DETAILED DESCRIPTION
[0032] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.
[0033] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present disclosure refers to the presence of the features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0034] The following is an introduction and explanation of several terms involved in this application:
[0035] Ghost fire: refers to the phenomenon in which the working power consumption of each functional module inside the switch flows through the lamp after the smart switch controls the low-power energy-saving lamp or LED lamp to turn off the light, causing the lamp to flicker or dimly light.
[0036] Single fire switch: refers to a switch that can work by connecting only the live wire and the load wire.
[0037] Neutral fire switch: refers to a switch that requires the live wire, load wire and neutral wire to be connected at the same time to work.
[0038] Single / neutral fire universal switch: refers to a switch that can work when connected only to the live wire or when connected to both the live wire and the neutral wire.
[0039] As mentioned above, the current single / zero fire universal switch cannot realize the load metering function.
[0040] The control module, communication module and other functional modules inside the smart switch require continuous power supply. There is a separate circuit in the zero-fire switch to provide the switch with working current, but the single-fire switch needs to use the load to form a circuit to provide the switch with working current, which makes it easy for ghost fire to occur.
[0041] To solve this problem, one solution is to use a battery to provide working current for the single-fire switch. The power supply of the switch will not affect the load, but the battery needs to be replaced regularly, which is very inconvenient and has very poor feasibility.
[0042] Another solution is to reduce the power consumption of the switch as much as possible to avoid the ghost fire problem, so that the single-fire switch can only abandon some functional modules. For example, the working power consumption of the load metering module is about 1mW. If it works in a single-fire switch, it will cause ghost fire phenomenon. The single-fire switch can only give up the load metering function. Since the single / zero fire universal switch is still a single fire switch in essence, the current single / zero fire universal switch still cannot realize the load metering function.
[0043] As can be seen from the above, the related technology still has the defect that the single / zero fire universal switch cannot realize the load metering function.
[0044] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0045] See also Figure 1 An embodiment of the present application provides a switch 100 , including: a first detection circuit 102 , a second detection circuit 104 , a metering circuit 106 , and a main control circuit 108 .
[0046] The first detection circuit 102 is used to detect the working mode of the switch 100 .
[0047] The working modes of the switch 100 include a first mode and a second mode. The switch 100 provided in the present application is a single-fire, zero-fire universal switch, which can work in a single-fire mode or a zero-fire mode. The first mode refers to the single-fire mode, and the second mode refers to the zero-fire mode.
[0048] In a possible implementation, the first detection circuit 102 determines the working mode of the switch 100 by detecting whether the switch 100 is connected to the neutral line.
[0049] The second detection circuit 104 is used to detect the power supply mode of the switch 100 .
[0050] The power supply mode of the switch 100 includes a first power supply mode and a second power supply mode. Optionally, the first power supply mode refers to an on-state power supply mode, and the second power supply mode refers to an off-state power supply mode.
[0051] In a possible implementation, the second detection circuit 104 determines the power supply mode of the switch 100 by detecting the power supply signal output by the power supply circuit.
[0052] The main control circuit 108 is connected to the metering circuit 106 and is used to control the metering circuit 106 to start the load metering function according to the working mode and / or power supply mode of the switch 100.
[0053] The metering circuit 106 has a load metering function and can measure electrical parameters of the load, such as voltage, current, power, electric quantity, etc., which are not specifically limited here.
[0054] In a possible implementation, the metering circuit 106 may include an electric energy metering chip, such as a power metering chip HLW8012, which is not intended to be a specific limitation.
[0055] In a possible implementation, the main control circuit 108 receives output signals of the first detection circuit 102 and the second detection circuit 104 , determines the working mode and / or power supply mode of the switch 100 , makes a decision and controls the metering circuit 106 to perform corresponding operations.
[0056] Specifically, if the working mode of the switch 100 is the second mode (zero-fire mode), the main control circuit 108 controls the metering circuit 106 to turn on the load metering function and collect the electrical parameters of the load (such as power consumption); if the working mode of the switch 100 is the first mode (single-fire mode) and the power supply method is the first power supply method (on-state power supply), the main control circuit 108 controls the metering circuit 106 to turn on the load metering function, collect the electrical parameters of the load (such as power consumption), and can also serve as overload protection; if the working mode of the switch 100 is the first mode (single-fire mode) and the power supply method is the second power supply method (off-state power supply), the main control circuit 108 controls the metering circuit 106 to turn off the load metering function to avoid the "ghost fire" phenomenon.
[0057] In a possible implementation, the main control circuit 108 is a component capable of processing and executing a control algorithm, such as an MCU (microcontroller).
[0058] Through the above embodiments, a switch is provided, comprising: a first detection circuit, a second detection circuit, a metering circuit, and a main control circuit; wherein the first detection circuit is used to detect the working mode of the switch, the second detection circuit is used to detect the power supply mode of the switch, and the main control circuit is used to control the metering circuit to start the load metering function according to the working mode and / or the power supply mode of the switch. The switch determines the working mode and the power supply mode through the first detection circuit and the second detection circuit, and then controls whether the metering circuit works based on the working mode and / or the power supply mode. The metering circuit can be controlled to work normally in the second mode (the switch is connected to the neutral line), the load metering function is turned on, and the electrical parameters of the load (such as power consumption) are collected; and the metering circuit can be further controlled to work according to the power supply mode in the first mode (the switch is not connected to the neutral line), the metering circuit can be controlled to work normally in the first power supply mode (the load is turned on), the load metering function is turned on, and the electrical parameters of the load (such as power consumption) are collected for overload protection, and the load metering function is turned off in the second power supply mode (the load is turned off) to reduce the power consumption of the switch and avoid the "ghost fire" phenomenon. Compared with the prior art where only the zero-fire switch has the load metering function, the switch provided by the present application enables the single / zero-fire universal switch to realize the load metering function while avoiding the ghost fire problem, thereby effectively solving the problem in the related art that the single / zero-fire universal switch cannot realize the load metering function.
[0059] See also Figure 2A and 2B In an exemplary embodiment, the first detection circuit 102 includes a detection signal output unit 1020 .
[0060] Among them, L represents the live wire and N represents the neutral wire.
[0061] Figure 2AIn the embodiment, the detection signal output unit 1020 outputs a first detection signal when the switch 100 is not connected to the neutral line, and transmits the first detection signal to the main control circuit 108, so that the main control circuit 108 determines that the working mode of the switch 100 is the first mode (single fire mode).
[0062] Figure 2B In the embodiment, the detection signal output unit 1020 outputs a second detection signal when the switch 100 is connected to the neutral line, and transmits the second detection signal to the main control circuit 108, so that the main control circuit 108 determines that the working mode of the switch 100 is the second mode (zero-fire mode).
[0063] The forms of the first detection signal and the second detection signal may vary according to actual conditions. For example, the first detection signal and the second detection signal may be level signals, voltage signals, or serial port signals, which are not specifically limited here.
[0064] In one possible implementation, when the switch 100 is not connected to the neutral line, the detection signal output unit 1020 does not form a closed loop with the power grid, the detection signal output unit 1020 does not work, and outputs a low-level signal (first detection signal). At this time, the main control circuit 108 recognizes it as a single-fire mode; when the switch 100 is connected to the neutral line, the detection signal output unit 1020 forms a closed loop with the power grid, the detection signal output unit 1020 works, and outputs a high-level signal (second detection signal). At this time, the main control circuit 108 recognizes it as a zero-fire mode.
[0065] In one possible implementation, the detection signal output unit 1020 can be implemented by a resistor voltage divider circuit, and the voltage after rectification of the AC voltage in the power grid is transmitted to the ADC detection pin of the main control circuit 108 through a resistor voltage divider. At this time, the first detection signal and the second detection signal are voltage signals, so that the main control circuit 108 determines whether there is a neutral line connected by detecting the voltage value and determines the working mode of the switch.
[0066] See also Figure 3 In an exemplary embodiment, the second detection circuit 104 includes a first power extraction circuit 1040 , a second power extraction circuit 1042 and a sampling circuit 1044 .
[0067] Wherein, when the switch 100 is electrically connected to the load, the first power circuit 1040 outputs the first power supply signal to the sampling circuit 1044 , so that the sampling circuit 1044 samples the first power supply signal.
[0068] The second power extraction circuit 1042 outputs the second power supply signal to the sampling circuit 1044 when the switch 100 is disconnected from the load, so that the sampling circuit 1044 samples the second power supply signal.
[0069] The switch 100 is electrically connected to the load, which means that the switch 100 controls the load to be connected to the grid, that is, the load is in an on state; the switch 100 is disconnected from the load, which means that the switch 100 controls the load to be disconnected from the grid, that is, the load is in an off state.
[0070] The first power supply signal and the second power supply signal may be voltage signals, which are not specifically limited here.
[0071] The sampling circuit 1044 outputs a sampling signal by sampling the first power supply signal or the second power supply signal, and transmits the sampling signal to the main control circuit 108 , so that the main control circuit 108 determines the power supply mode of the switch 100 based on the sampling signal.
[0072] It should be understood that when the switch 100 is electrically connected to the load (i.e., the load is turned on), the first power circuit 1040 works to convert the grid voltage into a low voltage (power supply signal) to power the switch; when the switch 100 is disconnected from the load (i.e., the load is turned off), the second power circuit 1042 works to convert the grid voltage into a low voltage (power supply signal) to power the switch. The power supply signal can be sampled by the sampling circuit 1044, and the sampling result is transmitted to the main control circuit 108, so that the main control circuit 108 can determine the power supply mode of the switch 100.
[0073] In one possible implementation, Figure 4 The first power-taking circuit 1040 includes a first conversion element 10400 and a first switch element 10402, wherein the AC voltage is converted into a first voltage by the first conversion element 10400 and then transmitted to the sampling circuit 1044 via the first switch element 10402; the second power-taking circuit 1042 includes a second conversion element 10420 and a second switch element 10422, wherein the AC voltage is converted into a second voltage by the second conversion element 10420 and then transmitted to the sampling circuit 1044 via the second switch element 10422.
[0074] L represents the live wire and N represents the neutral wire.
[0075] Optionally, the first conversion element 10400 and the second conversion element 10420 may be AC / DC converters, and the first switch element 10402 and the second switch element 10422 may be diodes, which are not specifically limited herein.
[0076] In one possible implementation, Figure 5 As shown, it is a schematic diagram showing a specific implementation of the sampling circuit 1044.
[0077] Figure 5 Three solutions are given.
[0078] Solution 1: The sampling circuit 1044 includes a first current limiting element and a second current limiting element, one end of the first current limiting element and one end of the second current limiting element are connected in series, the other end of the first current limiting element is connected to the first power taking circuit and the second power taking circuit (receiving the power supply signal), the other end of the second current limiting element is grounded, and the sampling signal is output at the series connection point of the first current limiting element and the second current limiting element.
[0079] The power supply signal is sampled by resistor voltage division, and correspondingly, the main control circuit 108 detects the sampled signal after voltage division by ADC.
[0080] Solution 2: The sampling circuit 1044 includes a comparator, which is connected to the first power supply circuit and the second power supply circuit (receives a power supply signal), compares the first power supply signal or the second power supply signal with a threshold signal, generates a sampling signal and transmits it to the main control circuit 108.
[0081] Among them, the first power supply signal and the second power supply signal have different sizes. By comparing the power supply signal with the threshold voltage, it can be determined whether the power supply signal is the first power supply signal or the second power supply signal, that is, it can be determined whether the power supply mode is the first power supply mode or the second power supply mode.
[0082] In the solution using a comparator, the sampling signal is a high or low level, and the main control circuit 108 can complete the judgment using a common IO pin.
[0083] Solution 3: Use a sampling chip to collect the power supply signal and then transmit it to the main control circuit 108.
[0084] In the above embodiment, a specific implementation of the second detection circuit is provided, which can enable the switch to detect its power supply mode.
[0085] See also Figure 6 In an exemplary embodiment, the metering circuit 106 includes a power supply module 1060 , a voltage output module 1062 , and a load metering module 1064 .
[0086] The power supply module 1060 is connected to the voltage output module 1062 and is used to output the power supply voltage to the voltage output module 1062 .
[0087] The voltage output module 1062 is connected to the main control circuit 108 , and is used to supply power to the load metering module 1064 according to the power supply voltage output by the power supply module 1060 under the control of the main control circuit 108 .
[0088] The load metering module 1064 measures electrical parameters of the load and transmits the measured electrical parameters to the main control circuit 108 .
[0089] The power module 1060 may be an AC / DC converter that converts the grid voltage into a power supply voltage.
[0090] The load metering module 1064 can implement a load metering function for measuring electrical parameters such as voltage, current, and power consumption. In a possible implementation, the load metering module 1064 includes a power metering chip HLW8012, which can measure electrical parameters such as active power, power, voltage RMS, and current RMS.
[0091] Under the control of the main control circuit 108 , the voltage output module 1062 supplies power to the load metering module 1064 , or stops supplying power to the load metering module 1064 , thereby controlling whether the load metering module 1064 is working or sleeping.
[0092] In a possible implementation, the metering circuit 106 includes a power supply module 1060 , a voltage output module 1062 , and a load metering module 1064 .
[0093] The power module 1060 includes a live line L, a neutral line N and VOUT, and converts the grid voltage (220V AC) into a power voltage (low-voltage DC) to supply power to the load metering module 1064. Optionally, the power module 1060 is an AC / DC converter.
[0094] In this embodiment, the voltage output module 1062 includes a third switch element. Optionally, the third switch element is a metal-oxide semiconductor field effect transistor MOSFET.
[0095] One end of the third switch element 1062 is connected to the power module 1060, the other end of the third switch element 1062 is connected to the load metering module 1064, and the control end of the third switch element 1062 is connected to the main control circuit 108. The main control circuit 108 controls the third switch element 1062 to be turned on, so that the power supply voltage output by the power module 1060 is transmitted to the load metering module 1064.
[0096] That is, the main control circuit 108 can control the operation of the load metering module 1064 by controlling the third switch element 1062 to be turned on or off, that is, control the load metering function to be turned on or off, thereby controlling the power consumption of the switch.
[0097] The load metering module 1064 includes a power metering chip and peripheral circuits. Specifically, a sampling resistor is connected in series in the input main loop, L, L1 and the sampling resistor form a loop, the current flows through the sampling resistor to form a voltage difference, the power metering chip collects the voltage signal at both ends of the sampling resistor, and obtains the current value through differential calculation. The power metering chip can detect the input voltage by reducing the grid voltage through the resistor, provided that the voltage does not exceed the chip withstand voltage. The current and power calculated internally by the power metering chip are reported to the main control circuit 108 through the pin.
[0098] Optionally, after the main control circuit 108 obtains various electrical parameters from the load metering module 1064, it uploads them to the cloud (or server) and then pushes them to the client, so that the switch can realize the reporting of load metering.
[0099] In one possible implementation, the voltage output module 1062 includes a linear regulator (LDO).
[0100] The input end of the linear regulator 1062 is connected to the power module 1060 , the output end of the linear regulator 1062 supplies power to the load metering module 1064 , and the enable end (EN pin) of the linear regulator 1064 is connected to the main control circuit 108 .
[0101] The main control circuit 108 controls the linear regulator 1062 to supply power to the load metering module 1064 by controlling the enable terminal of the linear regulator 1062 .
[0102] In this embodiment, the power module 1060 is powered by the live wire L and the neutral wire N, the power module outputs the power supply voltage to supply the linear regulator 1062, the VDD power supply of the power metering chip is provided by the linear regulator 1062, and the enable (EN pin) of the linear regulator 1062 is controlled by the main control circuit 108: when the main control circuit 108 controls the enable EN of the linear regulator 1062 to be pulled high, the VOUT pin of the linear regulator 1062 outputs 5V for the VDD pin of the power metering chip; when the main control circuit 108 controls the enable EN to be pulled low, the linear regulator 1062 stops outputting, the VDD voltage of the power metering chip is 0, and the power metering chip cannot work.
[0103] Through the cooperation of the above embodiments, the voltage output module 1062 can have different implementation methods, and can adopt a third switch element (MOSFET), or can adopt a linear regulator and other implementation methods. Furthermore, the main control circuit 108 can control the operation of the load metering module 1064 by controlling whether the voltage output module 1062 outputs the power supply voltage, that is, controlling the load metering function to be turned on or off, thereby controlling the power consumption of the switch, thereby controlling the load metering function to be turned off in the single-fire mode and the off-state power-taking mode to avoid the ghost fire problem, and controlling the load metering function to be turned on in other working modes and power-taking modes to realize the reporting of the energy consumption of each load, etc., so that the single / zero-fire universal switch can realize the load metering function and avoid the ghost fire problem at the same time, thereby effectively solving the problem that the single / zero-fire universal switch in the related art cannot realize the load metering function.
[0104] See also Figure 7 , which shows a load metering function control method, applied to the switch as described above, the method comprising the following steps:
[0105] Step 900, detecting the working mode and power supply method of the switch.
[0106] The working mode includes a first mode and a second mode, and the power supply mode includes a first power supply mode and a second power supply mode.
[0107] The first mode refers to the single-fire mode, and the second mode refers to the zero-fire mode; the first power-drawing method refers to the on-state power-drawing method, and the second power-drawing method refers to the off-state power-drawing method.
[0108] Step 920: According to the working mode and / or power supply mode of the switch, the metering circuit in the switch is controlled to start the load metering function.
[0109] In one possible implementation, Figure 8 As shown, step 920 includes the following steps:
[0110] Step 1000: If the working mode of the switch is the second mode, the metering circuit is controlled to start the load metering function.
[0111] Step 1020: If the working mode of the switch is the first mode, the metering circuit is controlled to start the load metering function according to the power supply mode of the switch.
[0112] In one possible implementation, Fig. 9 As shown, step 1020 includes the following steps:
[0113] Step 1100: When the working mode of the switch is the first mode, if the power supply mode of the switch is the second power supply mode, the metering circuit is controlled to turn off the load metering function.
[0114] Step 1120: If the power supply mode of the switch is the first power supply mode, the metering circuit is controlled to start the load metering function.
[0115] Under the effect of the above embodiments, according to the working mode of the switch and / or the power supply method, the metering circuit is controlled to start the load metering function to avoid the occurrence of ghost fire phenomenon, and the load metering function can be realized at the same time.
[0116] In an application scenario, such as Fig.10 As shown, it shows the implementation process of the load metering function control method in an example:
[0117] 1. First check whether it is single fire mode or zero fire mode.
[0118] 2. When in zero-fire mode, turn on the power metering function.
[0119] 3. When it is single-fire mode, further determine whether to turn off the light to draw power or turn on the light to draw power.
[0120] 3.1. When turning off the lights to draw power, turn off the power metering function.
[0121] 3.2. When turning on the light to draw power, turn on the power metering function.
[0122] In this application scenario, the MCU can control whether the power metering chip works or not by controlling whether the LDO outputs the power supply voltage, that is, controlling whether the load metering function is turned on or off, thereby controlling the power consumption of the switch, and thus controlling the load metering function to be turned off in the single-fire mode and the off-state power-taking mode to avoid the ghost fire problem. In other working modes and power-taking modes, the load metering function is turned on to report the energy consumption of each load, etc., so that the single / zero-fire universal switch can realize the load metering function and avoid the ghost fire problem, thereby effectively solving the problem that the single / zero-fire universal switch in the related technology cannot realize the load metering function.
[0123] Compared with the related art, this application can produce the following beneficial effects:
[0124] 1. A switch is provided, comprising: a first detection circuit, a second detection circuit, a metering circuit, and a main control circuit; wherein the first detection circuit is used to detect the working mode of the switch, the second detection circuit is used to detect the power supply mode of the switch, and the main control circuit is used to control the metering circuit to start the load metering function according to the working mode and / or the power supply mode of the switch. The switch determines the working mode and the power supply mode through the first detection circuit and the second detection circuit, and then controls whether the metering circuit works based on the working mode and / or the power supply mode. The metering circuit can be controlled to work normally in the second mode (the switch is connected to the neutral line), the load metering function is turned on, and the electrical parameters of the load (such as power consumption) are collected; and the metering circuit can be further controlled to work according to the power supply mode in the first mode (the switch is not connected to the neutral line). In the first power supply mode (the load is turned on), the metering circuit is controlled to work normally, the load metering function is turned on, and the electrical parameters of the load (such as power consumption) are collected for overload protection, and the load metering function is turned off in the second power supply mode (the load is turned off) to reduce the power consumption of the switch and avoid the "ghost fire" phenomenon. Compared with the prior art where only the zero-fire switch has the load metering function, the switch provided by the present application enables the single / zero-fire universal switch to realize the load metering function while avoiding the ghost fire problem, thereby effectively solving the problem in the related art that the single / zero-fire universal switch cannot realize the load metering function.
[0125] 2. The MCU can control whether the power metering chip works or not by controlling whether the LDO outputs the power supply voltage, that is, controlling whether the load metering function is turned on or off, thereby controlling the power consumption of the switch, and thus controlling the load metering function to be turned off in the single-fire mode and the off-state power-taking mode to avoid the ghost fire problem. In other working modes and power-taking modes, the load metering function is turned on to report the energy consumption of each load, etc., so that the single / zero-fire universal switch can realize the load metering function and avoid the ghost fire problem, thereby effectively solving the problem that the single / zero-fire universal switch in the related technology cannot realize the load metering function.
[0126] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0127] The above description is only a partial implementation method 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 switch, characterized in that: include: A first detection circuit, a second detection circuit, a metering circuit, and a main control circuit; The first detection circuit is used to detect the working mode of the switch; The working mode includes a first mode and a second mode; The second detection circuit is used to detect the power supply mode of the switch; the power supply mode includes a first power supply mode and a second power supply mode; The main control circuit is connected to the metering circuit, and is used to control the metering circuit to start the load metering function according to the working mode and / or power supply mode of the switch.
2. The switch according to claim 1, characterized in that The first detection circuit includes a detection signal output unit; wherein, The detection signal output unit is used to output a first detection signal when the switch is not connected to the neutral line, and transmit the first detection signal to the main control circuit, so that the main control circuit determines that the working mode of the switch is the first mode; or output a second detection signal when the switch is connected to the neutral line, and transmit the second detection signal to the main control circuit, so that the main control circuit determines that the working mode of the switch is the second mode.
3. The switch according to claim 1, characterized in that The second detection circuit includes a first power supply circuit, a second power supply circuit and a sampling circuit; wherein, The first power supply circuit is used to output a first power supply signal to the sampling circuit when the switch is electrically connected to the load, so that the sampling circuit samples the first power supply signal; The second power extraction circuit is used to output a second power supply signal to the sampling circuit when the switch is disconnected from the load, so that the sampling circuit samples the second power supply signal; The sampling circuit is used to output a sampling signal by sampling the first power supply signal or the second power supply signal, and transmit the sampling signal to the main control circuit, so that the main control circuit determines the power supply mode of the switch based on the sampling signal.
4. The switch according to claim 3, characterized in that The first power extraction circuit includes a first conversion element and a first switch element, wherein the AC voltage is converted into a first voltage by the first conversion element and then transmitted to the sampling circuit via the first switch element.
5. The switch according to claim 3, characterized in that The second power extraction circuit includes a second conversion element and a second switch element, wherein the AC voltage is converted into a second voltage by the second conversion element and then transmitted to the sampling circuit via the second switch element.
6. The switch according to claim 3, characterized in that The sampling circuit includes a comparator, which is connected to the first power supply circuit and the second power supply circuit and is used to compare the first power supply signal or the second power supply signal with a threshold signal, generate the sampling signal and transmit it to the main control circuit.
7. The switch according to claim 3, characterized in that The sampling circuit includes a first current limiting element and a second current limiting element, one end of the first current limiting element is connected in series, the other end of the first current limiting element is connected to the first power taking circuit and the second power taking circuit, the other end of the second current limiting element is grounded, and the sampling signal is output at the series connection point of the first current limiting element and the second current limiting element.
8. The switch according to any one of claims 1 to 7, characterized in that: The metering circuit includes a power supply module, a voltage output module and a load metering module; wherein, The power supply module is connected to the voltage output module and is used to output a power supply voltage to the voltage output module; The voltage output module is connected to the main control circuit and is used to supply power to the load metering module according to the power supply voltage output by the power supply module under the control of the main control circuit; The load metering module is used to measure the electrical parameters of the load and transmit the measured electrical parameters to the main control circuit.
9. The switch according to claim 8, characterized in that The voltage output module includes a linear voltage regulator; The input end of the linear regulator is connected to the power module, the output end of the linear regulator supplies power to the load metering module, and the enable end of the linear regulator is connected to the main control circuit; The main control circuit controls the linear regulator to supply power to the load metering module by controlling the enable terminal of the linear regulator.
10. The switch according to claim 8, characterized in that The voltage output module includes a third switch element; One end of the third switch element is connected to the power module, the other end of the third switch element is connected to the load metering module, and the control end of the third switch element is connected to the main control circuit; The main control circuit controls the third switch element to be turned on, so that the power supply voltage output by the power supply module is transmitted to the load metering module.
11. A load metering function control method, characterized in that: Applied to the switch according to claims 1 to 10, the method comprises: Detecting the working mode and the power supply mode of the switch; the working mode includes a first mode and a second mode, and the power supply mode includes a first power supply mode and a second power supply mode; According to the working mode and / or power supply mode of the switch, the metering circuit in the switch is controlled to start the load metering function.
12. The method according to claim 11, characterized in that According to the working mode and / or power supply mode of the switch, controlling the metering circuit in the switch to start the load metering function includes: If the working mode of the switch is the second mode, controlling the metering circuit to start the load metering function; If the working mode of the switch is the first mode, the metering circuit is controlled to start the load metering function according to the power supply mode of the switch.
13. The method according to claim 12, characterized in that If the working mode of the switch is the first mode, controlling the metering circuit to start the load metering function according to the power supply mode of the switch includes: When the working mode of the switch is the first mode, if the power supply mode of the switch is the second power supply mode, the metering circuit is controlled to turn off the load metering function; If the power supply mode of the switch is the first power supply mode, the metering circuit is controlled to start the load metering function.