Detection circuit and detection method of electricity meter and electricity meter
By introducing an AC input circuit and an optocoupler into the meter circuit, and combining it with an RC network design of optional modules, dual-mode switching of relay status and zero-crossing detection is achieved. This solves the problems of meter circuit complexity and inaccurate relay operation, and improves the performance and lifespan of the meter.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-03
- Publication Date
- 2026-03-13
AI Technical Summary
The existing relay detection and zero-crossing detection circuits in electricity meters are complex in structure, costly, and highly dependent on chips. The timing of relay operation is inaccurate, which can easily cause contact arcing, affecting the performance and lifespan of the electricity meter.
The design employs a low-voltage processing circuit with mains input circuit, optocoupler, and optional modules. Through RC network design and hardware surface mount selection, it achieves dual-mode switching of relay status and zero-crossing detection, accurately capturing the moment of voltage zero crossing and avoiding contact arcing.
Simplify circuit structure, reduce material costs, improve chip selection flexibility, extend relay life, and achieve miniaturization and multi-functional compatibility of electricity meters.
Smart Images

Figure CN121656952A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electricity meter testing technology, and in particular to an electricity meter testing circuit, testing method, and electricity meter. Background Technology
[0002] Currently, in the design and application of electricity meters, relays are key actuators, and the accurate detection and reliable control of their working status have a significant impact on the overall performance and service life of the electricity meter.
[0003] In existing technologies, separate relay detection circuits and zero-crossing detection circuits are typically used to determine the relay status and capture the zero-crossing point of the AC voltage, respectively. For example, the meter needs to use a metering chip with zero-crossing detection function, and the zero-crossing signal is detected by the metering chip and transmitted to the controller.
[0004] However, the aforementioned existing technical solutions have the following obvious drawbacks: 1. Complex circuit structure and high cost: The use of discrete relay detection and zero-crossing detection circuits leads to an increase in the number of components and a complex circuit layout, which not only increases material costs but also increases the difficulty of circuit design and debugging.
[0005] 2. Reliance on dedicated metering chips: The zero-crossing detection function requires the use of a metering chip with zero-crossing detection capability, which limits the flexibility of chip selection, increases the system's dependence on specific chips, and is not conducive to cost control and solution optimization.
[0006] 3. Inaccurate relay operation timing: The relay may operate at any phase of the AC voltage, which can easily cause contact arcing, shorten the relay's service life, and affect the normal operation of the meter. Summary of the Invention
[0007] This invention provides a detection circuit, detection method, and electricity meter, which solves the problems of complex circuit structure, high cost, strong chip dependence, and inaccurate relay action timing in existing electricity meter circuits when detecting relay status and voltage zero crossing.
[0008] To solve the above-mentioned technical problems, the present invention provides a detection circuit for an electricity meter, comprising: a mains input circuit, the input terminal of which is connected to the mains power via a relay; an optocoupler, the input terminal of which is connected to the output terminal of the mains input circuit; and a low-voltage processing circuit connected to the output terminal of the optocoupler, the low-voltage processing circuit including a first optional module or a second optional module; when the relay is closed and the mains power is in the positive half-cycle, the optocoupler conducts, and the low-voltage processing circuit outputs a low level; when the relay is open, the optocoupler is turned off, and the low-voltage processing circuit outputs a high level; wherein, when the low-voltage processing circuit includes the first optional module: when the relay is closed and the mains power is in the negative half-cycle, the optocoupler is turned off, the low-voltage processing circuit outputs a low level, and the output signal of the low-voltage processing circuit is used to determine the open / closed state of the relay; when the low-voltage processing circuit includes the second optional module: when the relay is closed and the mains power is in the negative half-cycle, the optocoupler is turned off, the low-voltage processing circuit outputs a high level, and the output signal of the low-voltage processing circuit is used to determine the open / closed state of the relay and the zero-crossing point of the mains power.
[0009] In some embodiments, the first optional module includes a capacitor and a first resistor, and the low-voltage processing circuit further includes a switching unit; the control terminal and the first conducting terminal of the switching unit are respectively connected to the two output terminals of the optocoupler, the first conducting terminal is connected to the power supply and used to output a high level or a low level, the capacitor and the first resistor are connected in parallel between the control terminal and the second conducting terminal of the switching unit, and the second conducting terminal is grounded.
[0010] In some embodiments, the second optional module includes a second resistor, and the low-voltage processing circuit further includes a switching unit; the control terminal and the first conducting terminal of the switching unit are respectively connected to the two output terminals of the optocoupler, the first conducting terminal is connected to the power supply and used to output a high level or a low level, the second resistor is connected in parallel between the control terminal and the second conducting terminal of the switching unit, and the second conducting terminal is grounded.
[0011] In some embodiments, the switching unit is a transistor, with the base of the transistor being the control terminal, the collector of the transistor being the first conducting terminal, and the emitter of the transistor being the second conducting terminal.
[0012] In some embodiments, the low-voltage processing circuit further includes a pull-up resistor and a base resistor; the pull-up resistor is connected in series between the power supply and the first conducting terminal of the switching unit, and the base resistor is connected in series between the output terminal of the optocoupler and the control terminal of the switching unit; wherein, when the low-voltage processing circuit includes a first optional module: the base resistor is connected in parallel with the capacitor and the first resistor respectively; when the low-voltage processing circuit includes a second optional module: the base resistor is connected in series with the second resistor.
[0013] In some embodiments, the mains input circuit includes a first diode; the negative terminal of the first diode is connected to the positive terminal of the light-emitting diode of the optocoupler, the positive terminal of the first diode is connected to the negative terminal of the light-emitting diode of the optocoupler, and the first diode is also used to connect to the mains power via a relay.
[0014] In some embodiments, the mains input circuit further includes at least one current-limiting resistor; the current-limiting resistor is connected in series with the first diode and the light-emitting diode of the optocoupler, respectively.
[0015] The present invention also provides a method for detecting an electricity meter, applied to the aforementioned detection circuit. The detection method includes: acquiring the output signal of the low-voltage processing circuit; determining the open / closed state of a relay based on whether the output signal is high or low, or determining the open / closed state of the relay and the zero-crossing point of the mains power.
[0016] In some embodiments, determining the open / closed state of the relay, or determining the open / closed state of the relay and the zero-crossing point of the mains power, based on whether the output signal is high or low, includes: if the output signal is continuously low, determining that the relay is in a closed state; if the output signal is continuously high, determining that the relay is in an open state; if the output signal is alternating between high and low levels, determining that the relay is in a closed state, and the transition time between high and low levels is the zero-crossing point of the mains power.
[0017] The present invention also provides an electricity meter, including the aforementioned detection circuit.
[0018] The beneficial effects of this invention are as follows: This invention discloses a detection circuit, detection method, and electricity meter. The detection circuit includes: a mains input circuit, the input terminal of which is used to connect to the mains power through a relay; an optocoupler, the input terminal of which is connected to the output terminal of the mains input circuit; and a low-voltage processing circuit, connected to the output terminal of the optocoupler. The low-voltage processing circuit includes a first optional module or a second optional module. When the low-voltage processing circuit includes the first optional module, its output signal is used to determine the open / closed state of the relay. When the low-voltage processing circuit includes the second optional module, its output signal is used to determine the open / closed state of the relay and the zero-crossing point of the mains power. This application improves the relay detection circuit by setting a first optional module or a second optional module in the low-voltage processing circuit. It adopts a configurable RC network design and, through flexible adjustment of the resistor-capacitor patches, achieves a switchable function between relay status detection and dual modes of relay status detection and mains zero-crossing point detection through flexible combination of hardware patch selection and software configuration. In the relay status detection and mains voltage zero-crossing detection mode, both the relay status signal and the zero-crossing signal can be transmitted to the microcontroller simultaneously for monitoring. This allows for precise capture of the mains voltage zero-crossing moment, ensuring the relay only operates at the zero-crossing point, effectively preventing contact arcing under peak voltage and significantly extending relay lifespan. This application not only achieves multi-functional compatibility but also reduces material costs by simplifying the circuit structure, facilitates the integration of internal circuitry in the meter, and enables product miniaturization; it also increases the flexibility of chip selection in the meter. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a schematic diagram of the detection circuit of an electricity meter according to the present invention; Figure 2 This is a circuit diagram of two optional modules of the detection circuit of an electricity meter according to the present invention; Figure 3 This is a circuit diagram of the first optional module in the detection circuit of an electricity meter according to the present invention; Figure 4 This is a circuit diagram of the second optional module in the detection circuit of an electricity meter according to the present invention; Figure 5 This is the current flow direction of the first optional module of the detection circuit of an electricity meter according to the present invention. Figure 1 ; Figure 6 This is the current flow direction of the first optional module of the detection circuit of an electricity meter according to the present invention. Figure 2 ; Figure 7 This is the current flow direction of the second optional module of the detection circuit of an electricity meter according to the present invention. Figure 1 ; Figure 8 This is the current flow direction of the second optional module of the detection circuit of an electricity meter according to the present invention. Figure 2 ; Figure 9 This is a timing waveform diagram of the output signal of the first optional module of the detection circuit of an electricity meter according to the present invention; Figure 10 This is a timing waveform diagram of the output signal of the second optional module of the detection circuit of an electricity meter according to the present invention; Figure 11 This is a block diagram of the components of an electricity meter according to the present invention; Figure 12 This is a flowchart illustrating a method for testing an electricity meter according to the present invention. Figure 13 This is a schematic diagram of the specific process of step S2 in the method for testing an electricity meter according to the present invention.
[0021] Figure reference numerals: Detection circuit 1; Mains input circuit 2; Optocoupler 3; Low voltage processing circuit 4; First optional module 41; Second optional module 42; Switching unit 43; Relay 5; Mains power 6; Microcontroller 7; Meter 8. Detailed Implementation
[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] It should be understood that the invention can be embodied in various forms and should not be construed as being limited to the embodiments set forth herein. Rather, providing these embodiments will make the disclosure thorough and complete, and will fully convey the scope of the invention to those skilled in the art. In the drawings, for clarity, the dimensions and relative dimensions of layers and regions may be exaggerated, and the same reference numerals denote the same elements throughout.
[0024] It should be understood that when an element or layer is referred to as "on," "adjacent to," "connected to," or "coupled to" other elements or layers, it may be directly on, adjacent to, connected to, or coupled to other elements or layers, or there may be intervening elements or layers. Conversely, when an element is referred to as "directly on," "directly adjacent to," "directly connected to," or "directly coupled to" other elements or layers, there are no intervening elements or layers. It should be understood that although the terms first, second, third, etc., may be used to describe various elements, components, areas, layers, and / or portions, these elements, components, areas, layers, and / or portions should not be limited by these terms. These terms are only used to distinguish one element, component, area, layer, or portion from another element, component, area, layer, or portion. Therefore, without departing from the teachings of this invention, the first element, component, area, layer, or portion discussed below may be referred to as the second element, component, area, layer, or portion.
[0025] Spatial relation terms such as “below,” “under,” “below,” “under,” “above,” “above,” etc., are used herein for convenience of description to describe the relationship between one element or feature shown in the figure and other elements or features. It should be understood that, in addition to the orientation shown in the figure, spatial relation terms are intended to also include different orientations of the device in use and operation. For example, if the device in the figure is flipped, then the element or feature described as “below,” “under,” or “below” other elements or features will be oriented “above” other elements or features. Therefore, the exemplary terms “below” and “under” can include both above and below orientations. The device may be otherwise oriented (rotated 90 degrees or otherwise) and the spatial descriptive terms used herein will be interpreted accordingly.
[0026] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. When used herein, the singular forms “a,” “an,” and “the” are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the terms “comprising” and / or “including,” when used in this specification, identify the presence of the stated features, integers, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups. When used herein, the term “and / or” includes any and all combinations of the associated listed items.
[0027] It should be noted that in the embodiments of this application, "connection" can be understood as electrical connection. The connection between two electrical components can be a direct or indirect connection between the two electrical components. For example, the connection between A and B can be a direct connection between A and B, or an indirect connection between A and B through one or more other electrical components.
[0028] It should be noted that, in the embodiments of this application, "electrical connection" can be a direct connection between two electrical components or an indirect connection. For example, the electrical connection between A and B can be achieved by A and B being directly connected, or by A and B being indirectly connected through one or more other electrical components.
[0029] To fully understand this invention, detailed structures and steps will be presented in the following description to illustrate the technical solution proposed by this invention. Preferred embodiments of the invention are described in detail below; however, in addition to these detailed descriptions, the invention may have other embodiments.
[0030] like Figure 1 As shown, the detection circuit 1 of the electricity meter of the present invention includes an AC power input circuit 2, an optocoupler 3, and a low-voltage processing circuit 4.
[0031] The input terminal of the mains input circuit 2 is used to connect to the mains power 6 via relay 5. The input terminal of the optocoupler 3 is connected to the output terminal of the mains input circuit 2. The input terminal of the low-voltage processing circuit 4 is connected to the output terminal of the optocoupler 3; combined with... Figure 2 As shown, the low-voltage processing circuit 4 includes a first optional module 41 or a second optional module 42, and the two modules can be selected according to different needs.
[0032] Specifically, when relay 5 is closed and mains power 6 is in the positive half-cycle, optocoupler 3 is turned on, and low-voltage processing circuit 4 outputs a low level; when relay 5 is open, optocoupler 3 is turned off, and low-voltage processing circuit 4 outputs a high level.
[0033] Furthermore, when the low-voltage processing circuit 4 includes the first optional module 41: when the relay 5 is closed and the mains power 6 is in the positive half-cycle, the optocoupler 3 is turned on, and the low-voltage processing circuit 4 outputs a low level; when the relay 5 is closed and the mains power 6 is in the negative half-cycle, the optocoupler 3 is turned off, and the low-voltage processing circuit 4 outputs a low level; when the relay 5 is open, the optocoupler 3 is turned off, and the low-voltage processing circuit 4 outputs a high level.
[0034] The output signal of the low-voltage processing circuit 4 is used to determine the open / closed state of the relay 5. If the output signal is continuously low, it is determined that the relay 5 is in the closed state; if the output signal is continuously high, it is determined that the relay 5 is in the open state.
[0035] Furthermore, when the low-voltage processing circuit 4 includes the second optional module 42: when the relay 5 is closed and the mains power 6 is in the positive half-cycle, the optocoupler 3 is turned on, and the low-voltage processing circuit 4 outputs a low level; when the relay 5 is closed and the mains power 6 is in the negative half-cycle, the optocoupler 3 is turned off, and the low-voltage processing circuit 4 outputs a high level; when the relay 5 is open, the optocoupler 3 is turned off, and the low-voltage processing circuit 4 outputs a high level.
[0036] The output signal of the low-voltage processing circuit 4 is used to determine the open / closed state of relay 5 and the zero-crossing point of the mains power 6. If the output signal is an alternating high level and low level, it is determined that relay 5 is in the closed state, and the transition time between the high level and the low level is the zero-crossing point of the mains power 6; if the output signal is a continuous high level, it is determined that relay 5 is in the open state.
[0037] The detection circuit 1 of this application improves the relay detection circuit by setting a first optional module 41 or a second optional module 42 in the low-voltage processing circuit 4. It adopts a configurable RC network design and achieves a switchable function between two modes: relay 5 status detection and relay 5 status detection combined with mains power 6 zero-crossing point detection by flexibly adjusting the resistor and capacitor chips and flexibly combining hardware chip selection and software configuration.
[0038] In the mode of relay 5 status detection and mains power 6 zero-crossing detection, the relay 5 status signal and zero-crossing signal can be transmitted to the microcontroller simultaneously for monitoring. This allows for precise capture of the zero-crossing moment of the mains power 6 voltage, ensuring that relay 5 only operates at the zero-crossing point. This effectively avoids contact arcing under peak voltage and significantly extends the lifespan of relay 5. This application not only achieves multi-functional compatibility but also reduces material costs by simplifying the circuit structure and facilitates the integration of the meter's internal circuitry, resulting in a more miniaturized product. Furthermore, it increases the flexibility of chip selection in the meter.
[0039] The following is combined Figures 1 to 13 The present application will be further described in detail with reference to specific embodiments.
[0040] Combination Figures 1 to 4 As shown, the mains input circuit 2 of this application includes a first diode D19 and at least one current-limiting resistor. The current-limiting resistor is connected in series with the first diode D19 and the light-emitting diode of the optocoupler U12, respectively.
[0041] In this embodiment, the mains input circuit 2 has eight current-limiting resistors, namely the first current-limiting resistor R130 and the second current-limiting resistor R79 on the side adjacent to the live wire, and the third current-limiting resistor R67, the fourth current-limiting resistor R68, the fifth current-limiting resistor R69, the sixth current-limiting resistor R70, the seventh current-limiting resistor R71 and the eighth current-limiting resistor R72 on the side adjacent to the neutral wire.
[0042] Specifically, one end L-OUT of the first current-limiting resistor R130 is used to connect to the live wire through the contacts of relay 5; one end L-OUT of the first current-limiting resistor R130 is the secondary contact of relay 5. When relay 5 is closed, the contacts are closed, and one end L-OUT of the first current-limiting resistor R130 is connected to the live wire through the contacts of relay 5. When relay 5 is open, the contacts are open, and one end L-OUT of the first current-limiting resistor R130 is disconnected from the live wire. At this time, one end L-OUT of the first current-limiting resistor R130 is in a floating state; in this embodiment, relay 5 is a magnetic latching relay. The other end of the first current-limiting resistor R130 is connected to one end of the second current-limiting resistor R79, and the other end of the second current-limiting resistor R79 is connected to the negative terminal of the first diode D19 and the positive terminal 1 of the light-emitting diode of optocoupler U12, respectively. One end N of the third current-limiting resistor R67 is used for electrical connection to the neutral wire. The third current-limiting resistor R67, the fourth current-limiting resistor R68, the fifth current-limiting resistor R69, the sixth current-limiting resistor R70, the seventh current-limiting resistor R71, and the eighth current-limiting resistor R72 are connected sequentially from left to right. The other end of the eighth current-limiting resistor R72 is connected to the positive terminal of the first diode D19 and the negative terminal 2 of the light-emitting diode of the optocoupler U12, respectively. The first diode D19 and the light-emitting diode of the optocoupler U12 are connected in parallel.
[0043] Furthermore, such as Figure 1 , Figure 2 As shown, the phototransistor of optocoupler U12 is connected to the input terminal of the low-voltage processing circuit 4; in this embodiment, the model of optocoupler U12 is QX816D-CuH-ST.
[0044] Furthermore, in combination Figures 1 to 4 As shown, the low-voltage processing circuit 4 of this application includes a first optional module 41 or a second optional module 42, as well as a switching unit 43, a pull-up resistor R138, a base resistor R136, and a power supply VEE. In this embodiment, the switching unit 43 is a transistor T10, with the base of the transistor T10 being the control terminal B, the collector of the transistor T10 being the first conducting terminal C, and the emitter of the transistor T10 being the second conducting terminal E.
[0045] Specifically, the control terminal B and the first conducting terminal C of the switching unit 43 are connected to the two output terminals of the optocoupler U12, respectively. That is, the control terminal B of the switching unit 43 is connected to the emitter 3 of the phototransistor of the optocoupler U12, and the first conducting terminal C of the switching unit 43 is connected to the collector 4 of the phototransistor of the optocoupler U12. The first conducting terminal C of the switching unit 43 is also connected to the power supply VEE and is used to output a high or low level. The second conducting terminal E of the switching unit 43 is grounded. The pull-up resistor R138 is connected in series between the collector 4 of the phototransistor of the optocoupler U12 and the first conducting terminal C of the switching unit 43. The end of the pull-up resistor R138 away from the power supply VEE is also used to connect to the detection pin RelayTest of the microcontroller 7. The base resistor R136 is connected in series between the emitter 3 of the phototransistor of the optocoupler U12 and the control terminal B of the switching unit 43.
[0046] Among them, combined Figure 1 , Figure 2 , Figure 3 As shown, when the low-voltage processing circuit 4 includes a first optional module 41: the first optional module 41 includes a capacitor C83 and a first resistor R131; the capacitor C83 and the first resistor R131 are connected in parallel between the control terminal B and the second conduction terminal E of the switching unit 43; one end of the capacitor C83 and one end of the first resistor R131 are also connected to the emitter 3 of the phototransistor of the optocoupler U12, and the base resistor R136 is connected in parallel with the capacitor C83 and the first resistor R131.
[0047] When the low-voltage processing circuit 4 includes the first optional module 41, the output signal of the low-voltage processing circuit 4 is used to determine the open / closed state of the relay 5. At this time, the current flow direction in the detection circuit 1 is as follows: Figure 5 , Figure 6 As shown, the timing waveform of the output signal is as follows: Figure 9 As shown.
[0048] When relay 5 is closed and mains power 6 is in the positive half-cycle, the voltage at L_OUT is greater than the voltage at N, and optocoupler U12 is turned on. Power supply VEE, optocoupler U12's phototransistor, base resistor R136, switching unit 43 and GND form a circuit. At the same time, power supply VEE charges capacitor C83 through the phototransistor. The control terminal B of switching unit 43 is turned on with the second conducting terminal E. At the same time, the first conducting terminal C and the second conducting terminal E of switching unit 43 are also turned on. The detection pin RelayTest of microcontroller 7 is connected to ground through the first conducting terminal C and the second conducting terminal E of switching unit 43. The low-voltage processing circuit 4 outputs a low level.
[0049] When relay 5 is closed and mains power 6 is in the negative half-cycle, the voltage at L_OUT is less than the voltage at N, the first diode D19 is turned on, and optocoupler U12 is turned off. Since capacitor C83 is charged when optocoupler U12 is turned on, there is a voltage on capacitor C83, which will form a loop of capacitor C83, base resistor R136, switching unit 43 and GND. The first conducting terminal C and the second conducting terminal E of switching unit 43 are turned on. The detection pin RelayTest of microcontroller 7 is connected to ground through the first conducting terminal C and the second conducting terminal E of switching unit 43. The low-voltage processing circuit 4 outputs a low level.
[0050] When relay 5 is disconnected, the first diode D19 and optocoupler U12 are not conducting. The detection pin RelayTest of microcontroller 7 is connected to power supply VEE through pull-up resistor R138, and the output of weak current processing circuit 4 is high level.
[0051] The microcontroller 7 monitors the level changes in real time through the weak current signal input on the secondary side of the optocoupler U12, and, combined with the built-in program algorithm, accurately determines the working state of the relay 5. If the output signal is continuously low, it is determined that the relay 5 is in the closed state; if the output signal is continuously high, it is determined that the relay 5 is in the open state.
[0052] Combination Figure 1 , Figure 2 , Figure 4 As shown, when the low-voltage processing circuit 4 includes a second optional module 42: the second optional module 42 includes a second resistor R139, which is connected in parallel between the control terminal B and the second conduction terminal E of the switching unit 43; the base resistor R136 is connected in series with the second resistor R139 and then grounded.
[0053] When the low-voltage processing circuit 4 includes the second optional module 42, the output signal of the low-voltage processing circuit 4 is used to determine the open / closed state of the relay 5 and the zero-crossing point of the mains power 6. At this time, the current flow direction in the detection circuit 1 is as follows: Figure 7 , Figure 8 As shown, the timing waveform of the output signal is as follows: Figure 10 As shown.
[0054] When relay 5 is closed and mains power 6 is in the positive half-cycle, the voltage at L_OUT is greater than the voltage at N, and optocoupler U12 is turned on. Power supply VEE, optocoupler U12's phototransistor, base resistor R136, switching unit 43 and GND form a circuit. The control terminal B of switching unit 43 is connected to the second conducting terminal E. At the same time, the first conducting terminal C and the second conducting terminal E of switching unit 43 are also connected. The detection pin RelayTest of microcontroller 7 is connected to ground through the first conducting terminal C and the second conducting terminal E of switching unit 43. The low-voltage processing circuit 4 outputs a low level.
[0055] When relay 5 is closed and mains power 6 is in the negative half cycle, the voltage at L_OUT is less than the voltage at N, the first diode D19 is turned on, the optocoupler U12 is turned off, the switching unit 43 is not turned on, the detection pin RelayTest of microcontroller 7 is connected to power supply VEE through pull-up resistor R138, and the output of weak current processing circuit 4 is high level.
[0056] When relay 5 is disconnected, the first diode D19 and optocoupler U12 are not conducting. The detection pin RelayTest of microcontroller 7 is connected to power supply VEE through pull-up resistor R138, and the output of weak current processing circuit 4 is high level.
[0057] The microcontroller 7 receives a weak electrical signal input from the secondary side of the optocoupler U12, monitors the level changes in real time, and, combined with its built-in program algorithm, accurately determines the operating state of the relay 5 and accurately detects the zero-crossing point of the mains power 6. If the output signal alternates between high and low levels, it is determined that the relay 5 is in the closed state, and the transition between high and low levels is the zero-crossing point of the mains power 6; if the output signal is a continuous high level, it is determined that the relay 5 is in the open state.
[0058] In summary, the beneficial effects of this application are: This application improves the relay detection circuit by setting a first optional module or a second optional module in the low-voltage processing circuit. It adopts a configurable RC network design and achieves a switchable function between relay status detection and mains zero-crossing detection by flexibly adjusting the resistor and capacitor chips and flexibly combining hardware chip selection and software configuration.
[0059] In the relay status detection and mains voltage zero-crossing detection mode, both the relay status signal and the zero-crossing signal can be transmitted to the microcontroller simultaneously for monitoring. This allows for precise capture of the mains voltage zero-crossing moment, ensuring the relay only operates at the zero-crossing point, effectively preventing contact arcing under peak voltage and significantly extending relay lifespan. This application not only achieves multi-functional compatibility but also reduces material costs by simplifying the circuit structure, facilitates the integration of internal circuitry in the meter, and enables product miniaturization; it also increases the flexibility of chip selection in the meter.
[0060] Based on the same inventive concept, such as Figure 11 As shown, the present invention also provides an electricity meter 8, which includes the detection circuit 1 described above.
[0061] In this application, the other technical features of the above-mentioned meter 8 are the same as those disclosed in the aforementioned embodiment of the detection circuit 1, and will not be repeated here.
[0062] Based on the same inventive concept, the present invention also provides a method for detecting an electricity meter, applied to the detection circuit 1 described above, such as... Figure 12 As shown, the detection method includes the following steps: S1: Obtain the output signal of the low-voltage processing circuit.
[0063] S2: Determine the open / closed state of the relay based on whether the output signal is high or low, or determine the open / closed state of the relay and the zero-crossing point of the mains power.
[0064] Furthermore, such as Figure 13 As shown, step S2 specifically includes: S21: If the output signal is continuously low, it is determined that the relay is in a closed state.
[0065] S22: If the output signal is continuously high, it is determined that the relay is in the open state.
[0066] S23: If the output signal is an alternating high level and low level, it is determined that the relay is in a closed state, and the transition time between the high level and the low level is the zero crossing point of the mains power.
[0067] In this application, the other technical features of the above-described detection method are the same as those disclosed in the embodiment of the aforementioned detection circuit 1, and will not be repeated here.
[0068] Therefore, this invention discloses a detection circuit, detection method, and electricity meter. The detection circuit includes: a mains input circuit, the input terminal of which is connected to the mains power supply via a relay; an optocoupler, the input terminal of which is connected to the output terminal of the mains input circuit; and a low-voltage processing circuit, connected to the output terminal of the optocoupler. The low-voltage processing circuit includes a first optional module or a second optional module. When the low-voltage processing circuit includes the first optional module, its output signal is used to determine the open / closed state of the relay. When the low-voltage processing circuit includes the second optional module, its output signal is used to determine the open / closed state of the relay and the zero-crossing point of the mains power. This application improves the relay detection circuit by setting a first optional module or a second optional module in the low-voltage processing circuit. It adopts a configurable RC network design and, through flexible adjustment of the resistor-capacitor patches, achieves a switchable function between relay status detection and dual modes of relay status detection and mains zero-crossing point detection through flexible combinations of hardware patch selection and software configuration. In the relay status detection and mains voltage zero-crossing detection mode, both the relay status signal and the zero-crossing signal can be transmitted to the microcontroller simultaneously for monitoring. This allows for precise capture of the mains voltage zero-crossing moment, ensuring the relay only operates at the zero-crossing point, effectively preventing contact arcing under peak voltage and significantly extending relay lifespan. This application not only achieves multi-functional compatibility but also reduces material costs by simplifying the circuit structure, facilitates the integration of internal circuitry in the meter, and enables product miniaturization; it also increases the flexibility of chip selection in the meter.
[0069] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A detection circuit for an electricity meter, characterized in that, include: A mains power input circuit, wherein the input terminal of the mains power input circuit is used to connect to the mains power via a relay; An optocoupler, wherein the input terminal of the optocoupler is connected to the output terminal of the mains input circuit; A low-voltage processing circuit is connected to the output terminal of the optocoupler, and the low-voltage processing circuit includes a first optional module or a second optional module; When the relay is closed and the mains power is in the positive half-cycle, the optocoupler is turned on, and the low-voltage processing circuit outputs a low level; when the relay is open, the optocoupler is turned off, and the low-voltage processing circuit outputs a high level. Wherein, when the low-voltage processing circuit includes the first optional module: when the relay is closed and the mains power is in the negative half cycle, the optocoupler is turned off, the low-voltage processing circuit outputs a low level, and the output signal of the low-voltage processing circuit is used to determine the open and closed state of the relay. When the low-voltage processing circuit includes the second optional module: when the relay is closed and the mains power is in the negative half-cycle, the optocoupler is turned off, the low-voltage processing circuit outputs a high level, and the output signal of the low-voltage processing circuit is used to determine the open / closed state of the relay and the zero-crossing point of the mains power.
2. The detection circuit according to claim 1, characterized in that, The first optional module includes a capacitor and a first resistor, and the low-voltage processing circuit further includes a switching unit; The control terminal and the first conducting terminal of the switching unit are respectively connected to the two output terminals of the optocoupler. The first conducting terminal is connected to the power supply and is used to output the high level or the low level. The capacitor and the first resistor are connected in parallel between the control terminal and the second conducting terminal of the switching unit. The second conducting terminal is grounded.
3. The detection circuit according to claim 1, characterized in that, The second optional module includes a second resistor, and the low-voltage processing circuit further includes a switching unit; The control terminal and the first conducting terminal of the switching unit are respectively connected to the two output terminals of the optocoupler. The first conducting terminal is connected to the power supply and is used to output the high level or the low level. The second resistor is connected in parallel between the control terminal and the second conducting terminal of the switching unit, and the second conducting terminal is grounded.
4. The detection circuit according to claim 2 or 3, characterized in that, The switching unit is a transistor, the base of the transistor is the control terminal, the collector of the transistor is the first conducting terminal, and the emitter of the transistor is the second conducting terminal.
5. The detection circuit according to claim 2 or 3, characterized in that, The low-voltage processing circuit also includes a pull-up resistor and a base resistor; The pull-up resistor is connected in series between the power supply and the first conducting terminal of the switching unit, and the base resistor is connected in series between the output terminal of the optocoupler and the control terminal of the switching unit. Wherein, when the low-voltage processing circuit includes the first optional module: the base resistor is connected in parallel with the capacitor and the first resistor respectively; When the low-voltage processing circuit includes the second optional module: the base resistor is connected in series with the second resistor.
6. The detection circuit according to claim 1, characterized in that, The mains input circuit includes a first diode; The negative terminal of the first diode is connected to the positive terminal of the light-emitting diode of the optocoupler, and the positive terminal of the first diode is connected to the negative terminal of the light-emitting diode of the optocoupler. The first diode is also used to connect to the mains power through the relay.
7. The detection circuit according to claim 6, characterized in that, The mains input circuit also includes at least one current-limiting resistor; The current-limiting resistor is connected in series with the first diode and the light-emitting diode of the optocoupler.
8. A method for testing an electricity meter, characterized in that, The detection method, applied to the detection circuit according to any one of claims 1 to 7, comprises: Obtain the output signal of the low-voltage processing circuit; The open / closed state of the relay is determined based on whether the output signal is high or low, or the open / closed state of the relay and the zero-crossing point of the mains power are determined.
9. The detection method according to claim 8, characterized in that, The step of determining the open / closed state of the relay based on whether the output signal is high or low, or determining the open / closed state of the relay and the zero-crossing point of the mains power, includes: If the output signal is a continuous low level, it is determined that the relay is in a closed state; If the output signal is continuously high, it is determined that the relay is in the off state; If the output signal is an alternating high level and low level, it is determined that the relay is in a closed state, and the transition time between the high level and the low level is the zero crossing point of the mains power.
10. An electricity meter, characterized in that, Includes the detection circuit described in any one of claims 1 to 7.
Citation Information
Patent Citations
Zero-crossing detection method and circuit
CN102662104A
Optocoupler-based zero passage detecting circuit
CN102890184A
CPLD-based protection relay in AC and open-phase protection system
CN104678860A
Control circuit and control method of relay and switch equipment
CN115527803A
Detecting circuit for power transmission and failure states of electric energy meter
CN201697990U