A relay state detection circuit and method for three-phase smart meter
By designing a relay state detection circuit for three-phase smart meter and using duty cycle signals to determine the relay state, the complexity and cost of relay state detection in three-phase circuits are solved, and efficient and accurate relay state detection is achieved.
Patent Information
- Application Number
- CN202411911898.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-04
AI Technical Summary
In a three-phase circuit, how to accurately identify the various combination states of relay contacts to ensure detection accuracy, while simplifying the circuit structure and reducing component costs.
A relay state detection circuit for a three-phase smart meter is designed, including a three-phase power supply unit, a unit under test, a detection unit and a main control unit. The detection unit converts the on-off state of the relay contact switch into signals with different duty cycles through anti-reverse protection circuit, current limit protection circuit, isolation protection circuit and shaping drive circuit. The main control unit determines the state of the relay by judging the duty cycle of the signal.
It realizes accurate detection of various states of three-phase relay appliances, simplifies the circuit structure, reduces component costs, and improves the detection effect and the intelligence level of the meter.
Smart Images

Figure CN119758057A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of load state detection in electric energy control and detection equipment; more specifically, to a state detection circuit of a built-in relay of a three-phase electric energy meter. Background Art
[0002] As the application of smart meters in power management and control systems becomes more and more popular, the proportion of relays in meter design is also increasing; the diversification of smart meter installation environments has led to a gradual increase in the requirements for meter anti-theft; among them, the detection of the status of the meter's built-in relay is essential.
[0003] At present, the traditional three-phase smart meter relay status detection circuit on the market is relatively complicated. Generally, three separate detection circuits are used to detect the three-phase electricity separately. This circuit has many components, the circuit board design is difficult, and it needs to occupy three single-chip microcomputer IO detection ports, which is relatively more expensive.
[0004] Therefore, in a three-phase circuit, how to accurately identify the various combination states of relay contacts, simplify the circuit structure and reduce the cost of components while ensuring detection accuracy is an urgent problem to be solved. Summary of the invention
[0005] The purpose of the present invention is to provide a three-phase relay state detection circuit and method for the detection problem of the relay state in a three-phase electric energy meter circuit.
[0006] The technical solution of the present invention is:
[0007] The present invention provides a relay state detection circuit for a three-phase smart meter, comprising a three-phase power supply unit, a unit to be tested, a detection unit and a main control unit connected in sequence; wherein,
[0008] The three-phase power supply unit is a three-phase four-wire power supply system of mains A phase, B phase, C phase and N line;
[0009] The unit under test is a three-phase relay RYL1 inside the smart meter;
[0010] The detection unit comprises an anti-reverse protection circuit, a current limiting protection circuit, an isolation protection circuit and a shaping drive circuit which are connected in series in sequence;
[0011] The main control unit is an embedded single-chip microcomputer MCU. The main control unit detects the duty cycle of the output signal of the detection unit, and determines the relay state of the unit under test according to the duty cycle.
[0012] Furthermore, the three-phase relay RYL1 includes contact switches KA, KB and KC; the first pins of the contact switches KA, KB and KC are respectively connected to the mains phases A, B and C, and the second pins are respectively connected to the negative poles of the anti-reverse protection diodes D1, D2 and D3.
[0013] Furthermore, the anti-reverse protection circuit includes anti-reverse diodes D1-D3 corresponding to the A, B, and C phase power supplies; the cathodes of the anti-reverse diodes D1-D3 are respectively connected to the second pins of the internal contact switches KA, KB, and KC of the three-phase relay RYL1 under test, and the anodes of the anti-reverse diodes D1-D3 are respectively connected to the current limiting resistors of the corresponding phases in the current limiting protection circuit.
[0014] Further, the current limiting protection circuit includes A-phase current limiting resistors R3 and R4, B-phase current limiting resistors R5 and R6, C-phase current limiting resistors R7 and R8, and N-line current limiting resistors R1 and R2;
[0015] The A-phase current limiting resistors R3 and R4 are connected in series, and one end of the resistor R3 is connected to the anode of the anti-reverse diode D1, and one end of the resistor R4 is connected to the isolation protection circuit;
[0016] The B-phase current limiting resistors R5 and R6 are connected in series, and one end of the resistor R5 is connected to the anode of the anti-reverse diode D2, and one end of the resistor R6 is connected to the isolation protection circuit;
[0017] The C-phase current limiting resistors R7 and R8 are connected in series, and one end of the resistor R7 is connected to the anode of the anti-reverse diode D3, and one end of the resistor R8 is connected to the isolation protection circuit;
[0018] The N-line current limiting resistors R1 and R2 are connected in series, and one end of the resistor R1 is connected to the mains N, and one end of the resistor R2 is connected to the isolation protection circuit.
[0019] Further, the isolation protection circuit includes an optocoupler protection diode D4 and a photocoupler U2;
[0020] The 1st and 2nd pins of the optocoupler protection diode D4 are connected to the three corresponding current limiting resistors R4, R6, and R8 of A, B, and C in the current limiting protection circuit; the 3rd pin of the optocoupler protection diode D4 is connected to the N line current limiting resistor R2 in the current limiting protection circuit; and the 1st, 2nd, and 3rd pins of the optocoupler protection diode D4 are connected to the input end of the photocoupler U2, and the output end of the photocoupler U2 is connected to the shaping drive circuit.
[0021] Furthermore, the shaping drive circuit includes driving resistors R9-R11 and a shaping inverter transistor Q1; an output end of the photoelectric coupler U2 is connected to one end of the driving resistors R9 and R10, the other end of the driving resistor R9 is connected to the emitter E of the shaping inverter transistor Q1 and is grounded, and the other end of the driving resistor R10 is connected to the base B of the shaping inverter transistor Q1; the other output end of the photoelectric coupler U2 is connected to one end of the driving resistor R11 and is connected to the power supply VCC, and the other end of the driving resistor R11 is connected to the collector C of the shaping inverter transistor Q1 and is connected to the corresponding signal input end of the main control unit as the output of the shaping drive circuit.
[0022] Further, the detecting a duty cycle of an output signal of the detection unit by the main control unit and determining a relay state of the unit under test according to the duty cycle includes:
[0023] The main control unit samples the output signal of the detection unit at a preset time interval, and counts the number of high levels, the number of low levels and the number of rising edges within the preset time interval;
[0024] Calculating the duty cycle according to the number of high levels and the number of low levels;
[0025] If the duty cycle is a first threshold, determining that the three contact switches of the unit under test are all disconnected;
[0026] If the duty cycle is within the second threshold interval, determining that one of the three contact switches of the unit under test is closed;
[0027] If the duty cycle is within a third threshold interval, determining that two of the three contact switches of the unit under test are closed;
[0028] If the duty cycle is a fourth threshold, it is determined that the three contact switches of the unit under test are all closed.
[0029] Furthermore, after calculating the duty cycle, it also includes: for each duty cycle calculated, if the change in the duty cycle calculated three times in a row is within a preset range, then the duty cycle is taken as an effective duty cycle; based on the effective duty cycle, the closed state of the three contact switches of the unit under test is determined.
[0030] Further, the first threshold is 0%; the second threshold is 11-33%; the third threshold is 45-66%; and the fourth threshold is 100%.
[0031] A detection method for a relay state detection circuit of a three-phase smart meter, the method comprising the following steps:
[0032] Obtain three-phase alternating current provided by a three-phase power supply unit, and connect it to a detection unit through three contact switches of the unit under test;
[0033] The detection unit is used to rectify and isolate the three-phase alternating current, and output it to the main control unit;
[0034] The duty cycle of the output signal of the detection unit is detected by the main control unit, and the relay state of the unit under test is determined according to the duty cycle.
[0035] Beneficial effects of the present invention:
[0036] Compared with the traditional three-way relay state detection circuit, the simple relay state detection circuit for the three-phase smart meter of the present invention uses fewer components and has a simpler circuit board design. It does not need to occupy three detection ports of three embedded single-chip microcomputers, and only needs one detection port to realize various state detections of the three-phase relay by judging different duty ratios of the signal; the cost is more favorable and the detection effect is more ideal.
[0037] The present invention discloses a simple relay state detection method for a three-phase smart meter. The detection unit is connected in series with the relay to be tested, and components such as anti-reverse diodes, current limiting resistors, and isolation optocouplers are used to convert the on-off state of the relay contact switch into signals with different duty ratios and output them to the main control unit. The main control unit can accurately identify the four states of all relay contacts being disconnected, any one being turned on, any two being turned on, or all being turned on by judging the duty ratio of the signal, and the duty ratios correspond to 0%, 11-33%, 45-66%, and 100%, respectively; this solution has a simple structure, low cost, and high reliability, and can realize real-time monitoring of the relay state in the three-phase smart meter, effectively improving the intelligent level and operational safety of the meter.
[0038] Other features and advantages of the present invention will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The above and other objects, features and advantages of the present invention will become more apparent through a more detailed description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, wherein like reference numerals generally represent like components throughout the exemplary embodiments of the present invention.
[0040] Figure 1 A relay state detection circuit diagram for a three-phase smart meter according to an embodiment of the present invention is shown.
[0041] Figure 2 A schematic diagram showing the duty cycle of an output signal of a detection unit according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0042] The preferred embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0043] Figure 1 A relay state detection circuit diagram for a three-phase smart meter according to an embodiment of the present invention is shown.
[0044] like Figure 1 As shown, the present invention provides a relay state detection circuit for a three-phase smart meter, which includes a three-phase power supply unit, a unit under test, a detection unit and a main control unit; the unit under test is connected to the detection unit; the detection unit is connected to the main control unit; the main control unit determines the corresponding different states of the relay through the different duty cycle signal waveforms output by the detection unit; wherein:
[0045] The three-phase power supply unit is a three-phase four-wire power supply system of mains A phase, B phase, C phase and N line;
[0046] The unit under test is a three-phase relay;
[0047] The detection unit includes an anti-reverse protection diode, a current limiting protection resistor, an isolation protection photoelectric coupler, and a shaping drive circuit;
[0048] The main control unit is an embedded micro single chip computer;
[0049] The unit under test includes a three-phase relay RYL1, and the internal structure of the three-phase relay includes a contact switch KA, a contact switch KB, and a contact switch KC; the first pin of KA is connected to the three-phase power supply A, and the second pin of KA is connected to the anti-reverse protection diode D1; the first pin of KB is connected to the three-phase power supply B, and the second pin of KB is connected to the anti-reverse protection diode D2; the first pin of KC is connected to the three-phase power supply C, and the second pin of KC is connected to the anti-reverse protection diode D3;
[0050] The detection unit includes an anti-reverse protection diode, a current limiting protection resistor, an isolation protection photoelectric coupler, and a shaping drive circuit; the anti-reverse protection diode includes an A-phase power supply anti-reverse diode D1, a B-phase power supply anti-reverse diode D2, a C-phase power supply anti-reverse diode D3, and an optocoupler protection diode D4; the current limiting protection resistor includes an A-phase current limiting first resistor R3, an A-phase current limiting second resistor R4; a B-phase current limiting first resistor R5, a B-phase current limiting second resistor R5; a C-phase current limiting first resistor R7, a C-phase current limiting second resistor R8; an N-line current limiting first resistor R1, an N-line current limiting second resistor R2; the isolation protection photoelectric coupler is a photoelectric coupler U2; the shaping drive circuit includes a driving first resistor R9, a driving second resistor R10, a driving third resistor R11, and a shaping inverter transistor Q3;
[0051] The cathode of the A-phase power supply anti-reverse diode D1 is connected to the second pin of the contact switch KA inside the relay of the unit under test, and the anode of D1 is connected to the first pin of the A-phase current limiting first resistor R3; the second pin of R3 is connected to the first pin of the A-phase current limiting second resistor R4; the second pin of R4 is connected to the first and second pins of the optocoupler protection diode D4 and the second pin of the optocoupler U2;
[0052] The cathode of the B-phase power supply anti-reverse diode D2 is connected to the second pin of the contact switch KB inside the relay of the unit under test, and the anode of D2 is connected to the first pin of the B-phase current limiting first resistor R5; the second pin of R5 is connected to the first pin of the B-phase current limiting second resistor R6; the second pin of R6 is connected to the first and second pins of the optocoupler protection diode D4 and the second pin of the optocoupler U2;
[0053] The cathode of the C-phase power supply anti-reverse diode D3 is connected to the second pin of the contact switch KC inside the relay of the unit under test, and the anode of D3 is connected to the first pin of the C-phase current limiting first resistor R7; the second pin of R7 is connected to the first pin of the C-phase current limiting second resistor R8; the second pin of R8 is connected to the first and second pins of the optocoupler protection diode D4 and the second pin of the optocoupler U2;
[0054] The first pin of the photoelectric coupler U2 is connected to the second pin of the second current limiting resistor R2 of the N line, and the first pin of R2 is connected to the second pin of the first current limiting resistor R1 of the N line; the third pin of the photoelectric coupler U2 is connected to the first pin of the first driving resistor R9 of the shaping drive circuit and the first pin of the second driving resistor R10; the second pin of R9 is grounded; the second pin of R10 is connected to the B pole pin of the shaping inverter transistor Q1; the E pole pin of Q1 is connected to the ground; the C pole pin of Q1 is connected to the second pin of the driving third resistor R11 and the embedded micro single chip computer U1; the first pin of R11 is connected to the fourth pin of the photoelectric coupler U2;
[0055] The main control unit detects the duty cycle of the output signal of the detection unit, and determines the relay state of the unit under test according to the duty cycle;
[0056] Specifically: configure a 250us timer, sample the high and low levels of the relay state detection signal SCS_FB at a fixed interval of 250us, and count the number of high levels Level_highNum, the number of low levels Level_lowNum, and the number of rising edges Level_waveNum within 8000 consecutive times.
[0057] like Figure 2 FIG. 4 is a schematic diagram showing the duty cycle of the output signal of the detection unit according to an embodiment of the present invention, and the duty cycle calculation is:
[0058] Duty cycle = Level_lowNum × 100 / (Level_highNum + Level_lowNum) (%);
[0059] In order to eliminate the influence of waveform jitter or other factors on the calculation results, the calculation results are filtered, and a queue is set to insert the calculation results of the duty cycle each time. If the changes in the calculation results for three consecutive times are within a reliable range, the corresponding calculation data is used to determine the contact state.
[0060] The calculation results correspond to different contact states, and are widened based on the ideal frequency or duty cycle given by the hardware. The specific judgment is as follows:
[0061] 1. When the contact switches KA, KB and KC of relay RLY1 are disconnected, the first and second pins of the optocoupler U2 do not form a loop, and the third and fourth pins of U2 are not conducting; the SCS_FB signal is connected to the VCC3V3 power supply by driving the third resistor R11, and the SCS_FB signal is always in a high level state, and the low level duty cycle is 0%
[0062] 2. When any one of the contact switches KA, KB, and KC of relay RLY1 is closed, the corresponding single-phase voltage is turned on. For example, KA is closed, the first and second pins of the optocoupler U2 are periodically turned on, and the conduction frequency is consistent with the A-phase voltage frequency; the third and fourth pins of U2 are periodically turned on, and the inverted shaping transistor Q1 is periodically turned on; the SCS_FB signal presents a high-low flip pulse signal, and the low-level duty cycle is 33%;
[0063] 3. When any two of the contact switches KA, KB and KC of the relay RLY1 are closed, the corresponding two-phase voltage is turned on. For example, KA and KB are closed, the first and second pins of the photocoupler U2 are periodically turned on; the third and fourth pins of U2 are periodically turned on, and the inverted shaping transistor Q1 is periodically turned on; the SCS_FB signal presents a high-low flip pulse signal, and the low-level duty cycle is 66%;
[0064] 4. When the contact switches KA, KB and KC of relay RLY1 are all closed, the corresponding three-phase voltages are all turned on, the 1st and 2nd pins of the optocoupler U2 are continuously turned on; the 3rd and 4th pins of U2 are continuously turned on, and the inverting shaping transistor Q1 is continuously turned on; the SCS_FB signal is always in a low level state, and the low level duty cycle is 100%;
[0065] The embedded micro single-chip microcomputer MCU in the main control unit can detect different relay states by judging the different duty cycles of the SCS_FB signal, so that the intelligent three-phase meter can make corresponding processing.
[0066] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments.
Claims
1. A relay state detection circuit for a three-phase smart meter, characterized in that: It includes a three-phase power supply unit, a unit under test, a detection unit and a main control unit connected in sequence; wherein the three-phase power supply unit is a three-phase four-wire power supply system of mains A phase, B phase, C phase and N line; The unit under test is a three-phase relay RYL1 inside the smart meter; The detection unit comprises an anti-reverse protection circuit, a current limiting protection circuit, an isolation protection circuit and a shaping drive circuit which are connected in series in sequence; The main control unit is an embedded single-chip microcomputer MCU. The main control unit detects the duty cycle of the output signal of the detection unit, and determines the relay state of the unit under test according to the duty cycle.
2. The relay state detection circuit for a three-phase smart meter according to claim 1, characterized in that: The three-phase relay RYL1 includes contact switches KA, KB and KC; the first pins of the contact switches KA, KB and KC are respectively connected to the mains phases A, B and C, and the second pins are respectively connected to the negative electrodes of the anti-reverse protection diodes D1, D2 and D3.
3. The relay state detection circuit for a three-phase smart meter according to claim 2, characterized in that: The anti-reverse protection circuit includes anti-reverse diodes D1-D3 corresponding to the A, B, and C phase power supplies; the cathodes of the anti-reverse diodes D1-D3 are respectively connected to the second pins of the internal contact switches KA, KB, and KC of the three-phase relay RYL1 under test, and the anodes of the anti-reverse diodes D1-D3 are respectively connected to the current limiting resistors of the corresponding phases in the current limiting protection circuit.
4. The relay state detection circuit for a three-phase smart meter according to claim 3, characterized in that: The current limiting protection circuit includes A-phase current limiting resistors R3 and R4, B-phase current limiting resistors R5 and R6, C-phase current limiting resistors R7 and R8, and N-line current limiting resistors R1 and R2; The A-phase current limiting resistors R3 and R4 are connected in series, and one end of the resistor R3 is connected to the anode of the anti-reverse diode D1, and one end of the resistor R4 is connected to the isolation protection circuit; The B-phase current limiting resistors R5 and R6 are connected in series, and one end of the resistor R5 is connected to the anode of the anti-reverse diode D2, and one end of the resistor R6 is connected to the isolation protection circuit; The C-phase current limiting resistors R7 and R8 are connected in series, and one end of the resistor R7 is connected to the anode of the anti-reverse diode D3, and one end of the resistor R8 is connected to the isolation protection circuit; The N-line current limiting resistors R1 and R2 are connected in series, and one end of the resistor R1 is connected to the mains N, and one end of the resistor R2 is connected to the isolation protection circuit.
5. The relay state detection circuit for a three-phase smart meter according to claim 4, characterized in that: The isolation protection circuit includes an optocoupler protection diode D4 and a photocoupler U2; The 1st and 2nd pins of the optocoupler protection diode D4 are connected to the three corresponding current limiting resistors R4, R6, and R8 of A, B, and C in the current limiting protection circuit; the 3rd pin of the optocoupler protection diode D4 is connected to the N line current limiting resistor R2 in the current limiting protection circuit; and the 1st, 2nd, and 3rd pins of the optocoupler protection diode D4 are connected to the input end of the photocoupler U2, and the output end of the photocoupler U2 is connected to the shaping drive circuit.
6. The relay state detection circuit for a three-phase smart meter according to claim 5, characterized in that: The shaping drive circuit includes driving resistors R9-R11 and a shaping inverting transistor Q1; an output end of the photoelectric coupler U2 is connected to one end of the driving resistors R9 and R10, the other end of the driving resistor R9 is connected to the emitter E of the shaping inverting transistor Q1 and is grounded, and the other end of the driving resistor R10 is connected to the base B of the shaping inverting transistor Q1; the other output end of the photoelectric coupler U2 is connected to one end of the driving resistor R11 and is connected to the power supply VCC, and the other end of the driving resistor R11 is connected to the collector C of the shaping inverting transistor Q1 and is connected to the corresponding signal input end of the main control unit as the output of the shaping drive circuit.
7. The relay state detection circuit for a three-phase smart meter according to claim 1, characterized in that: The step of detecting the duty cycle of the output signal of the detection unit by the main control unit and determining the relay state of the unit under test according to the duty cycle comprises: The main control unit samples the output signal of the detection unit at a preset time interval, and counts the number of high levels, the number of low levels and the number of rising edges within the preset time interval; Calculating the duty cycle according to the number of high levels and the number of low levels; If the duty cycle is a first threshold, determining that the three contact switches of the unit under test are all disconnected; If the duty cycle is within the second threshold interval, determining that one of the three contact switches of the unit under test is closed; If the duty cycle is within a third threshold interval, determining that two of the three contact switches of the unit under test are closed; If the duty cycle is a fourth threshold, it is determined that the three contact switches of the unit under test are all closed.
8. The relay state detection circuit for a three-phase smart meter according to claim 7, characterized in that After calculating the duty cycle, it also includes: for each duty cycle calculated, if the change of the duty cycle calculated three times in a row is within a preset range, then the duty cycle is taken as the effective duty cycle; according to the effective duty cycle, the closed state of the three contact switches of the unit under test is determined.
9. The relay state detection circuit for a three-phase smart meter according to claim 7, characterized in that: The first threshold is 0%; the second threshold is 11-33%; the third threshold is 45-66%; and the fourth threshold is 100%.
10. A detection method for a relay state detection circuit of a three-phase smart meter according to any one of claims 1 to 9, characterized in that: The method comprises the following steps: Obtain three-phase alternating current provided by a three-phase power supply unit, and connect it to a detection unit through three contact switches of the unit under test; The detection unit is used to rectify and isolate the three-phase alternating current, and output it to the main control unit; The duty cycle of the output signal of the detection unit is detected by the main control unit, and the relay state of the unit under test is determined according to the duty cycle.
Citation Information
Cited By
Three-phase meter relay state detection circuit, method and electric energy meter
CN122592185A