Control method of smart meter auxiliary terminal, smart meter
By combining the MCU with the replaceable auxiliary terminal control module, flexible configuration and function calling of the auxiliary terminals of the smart meter are realized, which solves the problem of fixed functions in traditional smart meters and improves the flexibility of wiring methods and resource utilization efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN INHEMETER
- Filing Date
- 2025-09-28
- Publication Date
- 2026-07-24
AI Technical Summary
The fixed functions of auxiliary terminals in traditional smart meters result in a lack of flexibility in wiring methods and waste of resources. When they cannot meet specific customer needs, hardware and software adjustments are required, increasing risks.
It adopts an MCU and a replaceable auxiliary terminal control module, and realizes intelligent control of each auxiliary terminal by configuring the direction and function of the wiring terminals, supporting flexible configuration and function calling.
It enables flexible configuration of auxiliary terminal functions and terminal orientation, avoids hardware and software adjustments, ensures normal function execution, and improves the flexibility of wiring methods and resource utilization efficiency.
Smart Images

Figure CN121348849B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart meter technology, specifically to a control method for auxiliary terminals of a smart meter and a smart meter itself. Background Technology
[0002] Auxiliary terminals are an indispensable component of smart meters and the core of their intelligence. Numerous signals need to be input and output through auxiliary terminals to achieve functions such as real-time output of electrical pulses, control of external circuit breakers, control of alarm devices, reception of external pulse inputs, and processing of external event inputs. However, in traditional applications, the function of each auxiliary terminal is usually fixed, resulting in inflexible wiring methods, limited functionality, and a tendency to waste terminal resources. Especially when customers have specific requirements for the number of terminal inputs and outputs that existing solutions cannot meet, it is necessary not only to adjust the hardware to change the terminal's input and output functions but also to modify the software to adapt to the new hardware. This is not only time-consuming but also increases the risks associated with software modifications. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a control method for auxiliary terminals of a smart meter and a smart meter that can configure the input / output mode and function of each auxiliary terminal to realize intelligent control of the auxiliary terminals.
[0004] To solve the above-mentioned technical problems, the first technical solution adopted by the present invention is as follows:
[0005] A control method for an auxiliary terminal of a smart meter includes an I / O interface used by the auxiliary terminal in an MCU, a replaceable auxiliary terminal control module, input terminals, and output terminals; the output terminals are connected to the I / O interface via the replaceable auxiliary terminal control module.
[0006] The MCU configures the terminals through the replaceable auxiliary terminal control module. If the function of the currently configured terminal does not match the terminal direction set at the factory, the configuration is rejected.
[0007] When the MCU calls a specified function to the terminal block through the replaceable auxiliary terminal control module, if the called specified function is consistent with the function configured on the terminal block, the terminal block executes the specified function.
[0008] Optionally, the number of terminals for both the input class and the output class is greater than or equal to 2.
[0009] Optionally, the terminal orientation of the input type terminals and the output type terminals is fixed at the factory and cannot be modified after leaving the factory.
[0010] Optionally, the MCU configures the input type terminals for external event input via the replaceable auxiliary terminal control module, and configures the output type terminals for control event output.
[0011] Optionally, the external event input includes an external pulse input; the control event output includes a relay tripping output, an energy pulse output, a control of an external circuit breaker, a control of an alarm device, and a time-switching output.
[0012] Optionally, it also includes:
[0013] Initialize the terminal block interface; initialize the terminal block function.
[0014] Optionally, the terminal block function initialization includes:
[0015] Configure the functions of each terminal block in the MCU driver.
[0016] Optionally, it also includes:
[0017] If the function of the currently configured terminal block matches the terminal direction set at the factory, the current configuration is accepted, and the terminal block function initialization step is executed.
[0018] The second technical solution adopted in this invention is:
[0019] A smart meter includes an I / O interface used by an auxiliary terminal in an MCU, a replaceable auxiliary terminal control module, input terminals, and output terminals; the output terminals are respectively connected to the I / O interface via the replaceable auxiliary terminal control module.
[0020] It also includes a computer-readable storage medium; the computer-readable storage medium stores a computer program, which, when executed by the MCU, is capable of implementing the steps included in the control method for the auxiliary terminal of the smart meter according to any one of claims 1 to 8.
[0021] The advantages of this invention are as follows: Compared to existing auxiliary terminals with fixed and single functions, this invention adds a terminal direction configuration to each terminal, which is completed at the factory. The MCU can configure the function of each terminal through a replaceable auxiliary terminal control module, as long as the direction required for the configured function is consistent with the terminal direction of the terminal. Therefore, this invention enables flexible configuration of the terminal direction (output / input mode) and function of each terminal, ensuring that the functional implementation logic of the auxiliary terminal matches its terminal direction, thus ensuring that the auxiliary terminal function can be executed normally; thereby achieving intelligent control of the auxiliary terminals. Attached Figure Description
[0022] Figure 1 A schematic diagram of the hardware structure of a control method for an auxiliary terminal of a smart meter provided in an embodiment of the present invention;
[0023] Figure 2 A flowchart illustrating a control method for an auxiliary terminal of a smart meter provided in an embodiment of the present invention;
[0024] Figure 3 This is a schematic diagram of the structure of a smart meter provided in an embodiment of the present invention. Detailed Implementation
[0025] To explain in detail the technical principles, implementable specific solutions, possible application scenarios, and achievable objectives and effects of the present invention, the following detailed description is provided in conjunction with the listed specific embodiments and accompanying drawings. The embodiments described herein are merely illustrative of the technical solutions of the present invention and are therefore intended to explain the invention, and should not be construed as limiting the invention.
[0026] To better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the 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. Rather, these embodiments are provided to enable a more thorough understanding of the present invention and to fully convey the scope of the invention to those skilled in the art.
[0027] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.
[0028] Explanation of technical terms involved in this invention:
[0029] The replaceable auxiliary terminal control module, in this invention, is a module that implements auxiliary circuitry between the terminals and the MCU's I / O ports. Its main function is to convert the open / closed states of external terminals into high and low levels recognizable by the MCU's I / O ports, and to use the high and low levels of the MCU's I / O ports to control the opening and closing operations of the terminals. Furthermore, it allows for flexible replacement of components as needed. For example, depending on the type of device connected externally to the terminals, the module's control device can be replaced from an optocoupler to a magnetic latching relay or an electrical latching relay, thus avoiding the risks and costs associated with modifying the motherboard hardware.
[0030] Figure 1 This is a schematic diagram of the hardware structure of a control method for an auxiliary terminal of a smart meter provided in an embodiment of the present invention.
[0031] This invention provides a control method for auxiliary terminals of a smart meter, based on... Figure 1 The hardware structure implementation is shown. For example... Figure 1 As shown, the control system for implementing the control method of the auxiliary terminal of a smart meter includes: an I / O interface (i.e., an input / output interface) used by the auxiliary terminal in the MCU, a replaceable auxiliary terminal control module, input terminals, and output terminals; the output terminals and the output terminals are respectively connected to the I / O interface via the replaceable auxiliary terminal control module.
[0032] In some specific embodiments, the number of terminals of the output type and the number of terminals of the output type are both greater than or equal to 2. For simplicity, in... Figure 1 The auxiliary terminals are represented by input type (1…n) and output type (1…n) respectively.
[0033] In some specific embodiments, the replaceable auxiliary terminal control module mainly consists of an optocoupler and a relay group.
[0034] The control system described above has the following hardware design requirements:
[0035] (1) The microcontroller used for auxiliary terminals, i.e., the I / O interface of the MCU used for terminal input and output control, must be clearly defined, and the corresponding control relationship cannot be changed. For example: I / O PO1 controls terminal 1, PO2 controls terminal 2, ... PON controls terminal n. No matter how the requirements change, PO1 to PON can only be used for terminal control, and the corresponding relationship of P01 always being used to control terminal 1, P02 always being used to control terminal 2, ... P0n always being used to control terminal n must also be met.
[0036] (2) In the replaceable auxiliary terminal control module, the input detection logic of the terminals used for input functions (i.e., input-type terminals) must be consistent. That is, the open / closed state of the terminal must correspond to the high / low level detected by the MCU's I / O port. For example, when there is an external signal input, the MCU's I / O port needs to detect a low level; therefore, all input terminals must detect a low level on the corresponding MCU I / O port when a signal is input. Similarly, the output logic of the terminals used for output functions must be consistent. That is, the high / low level output by the MCU's I / O port must correspond to the open / closed state of the terminal. For example, when the MCU's I / O port outputs a high level, the terminal needs to be in a closed state; therefore, all output terminals must be in a closed state when the MCU's I / O port outputs a high level.
[0037] Based on the control system described above, this embodiment provides a control method for the auxiliary terminal of a smart meter, which includes at least the following:
[0038] 1. Terminal Block Direction Configuration: At the factory stage, the terminal block direction can be configured for each terminal block to identify input and output terminals with defined directions. Specifically, the terminal block's hardware settings (i.e., function definition) determine whether it's used for input detection or output signals, and the terminal direction of each terminal block is then fixed accordingly. This configuration cannot be modified after leaving the factory. For example, if a terminal block's hardware is set to perform input detection, its terminal direction is fixed as input, classifying it as an input terminal block.
[0039] In some specific implementations, the method further includes, prior to configuring the terminal block orientation:
[0040] 1-1. Terminal Block Function Definition: Plan the functions that each terminal block will support in the future, and configure the terminal block hardware accordingly. For example, external pulse input, relay tripping output, etc.
[0041] 2. Terminal Block Function Configuration: A function configuration option is added to each terminal to set the function that the terminal block should perform. Specifically, during system program operation (whether before or after factory release), the MCU can configure the terminal block function through the replaceable auxiliary terminal control module. If the direction required for the currently configured terminal block function does not match the terminal direction set at the factory, the function configuration is rejected; if they match, the current function configuration is accepted. In other words, for input-type terminal blocks, only external event input functions can be configured; for output-type terminal blocks, only control event output functions can be configured.
[0042] 3. Terminal Block Function Call: The function call of the terminal block is implemented through function encapsulation. Specifically, when a specified function of the terminal block needs to be used, the MCU will call the specified function of the terminal block through the replaceable auxiliary terminal control module. If the currently called specified function is consistent with the function configured for the terminal block, the terminal block will execute the specified function; otherwise, no operation will be performed.
[0043] The control method for the auxiliary terminals of the smart meter provided in this embodiment realizes the configurability of the input / output mode (i.e., port direction) and function of each auxiliary terminal, thereby realizing the intelligent control of the auxiliary terminals.
[0044] Figure 2 This is a flowchart illustrating a control method for an auxiliary terminal of a smart meter, as provided in an embodiment of the present invention.
[0045] The embodiments of the present invention are based on Figure 1 The control system and the above embodiments provide a complete control flow for the auxiliary terminals of a smart meter. For example... Figure 2 As shown, it includes:
[0046] S1: Beginning;
[0047] After the system program starts, it will initialize and begin running.
[0048] S2: Terminal block orientation initialization;
[0049] Configure the I / O input and output direction for each terminal block.
[0050] S3: Terminal block function initialization;
[0051] Configure the terminal block function into the MCU driver, and then execute S41 and S42 simultaneously.
[0052] S41: Terminal block configuration;
[0053] During system program operation, terminal block configuration can be performed via host computer software:
[0054] a. Set the I / O direction of the wiring terminals;
[0055] After setting the terminal direction of the terminal block, determine whether it is in factory settings. If so, complete the terminal direction setting for the terminal block and then return to step S2 to re-initialize the terminal block direction. If not, reject the setting.
[0056] It is understood that the I / O direction setting of the terminal blocks should be based on the actual hardware configuration, and incorrect settings may cause the terminal block functions to fail. To avoid user error, this configuration can only be made by the manufacturer in the factory setting and cannot be modified after leaving the factory.
[0057] b. Configure terminal block functions;
[0058] After setting the function of the terminal block, it is determined whether the currently configured function matches the terminal direction set by the terminal block. If they do not match, the setting is rejected; if they match, the setting is accepted, and then the process returns to step S3 to re-initialize the terminal block function.
[0059] It is understood that a function is allowed to be set only when the I / O direction required by the terminal function is consistent with the terminal I / O direction set for that terminal, in order to ensure the realization of the terminal function.
[0060] As a specific example, if the terminal I / O direction is set to output, but the terminal function is set to external event input (which requires the I / O direction to be input), the smart meter will detect that the I / O direction required by the function is inconsistent with the terminal I / O direction set, and therefore reject the setting of the terminal function.
[0061] As another specific example, if the terminal I / O direction is set to input, and the terminal function is set to external event input (which requires the I / O direction to be input), the smart meter will detect that the I / O direction required by the function is consistent with the terminal I / O direction set, and therefore accept the terminal function setting.
[0062] S42: Perform terminal block function;
[0063] When it is necessary to control the output signal of the terminal block or detect the input signal, the corresponding terminal function execution function is called. For example, when it is necessary to control the relay to trip, the relay trip output control function of the terminal block is called; when it is necessary to detect external event input, the external event input function of the terminal block is called, and so on. When the called terminal function is consistent with the terminal function set on the terminal block, the terminal block executes the function; otherwise, it does not execute and waits for the next loop judgment.
[0064] As a specific example, after successfully setting the terminal block's function to relay trip output, when the tariff changes, the terminal block's time-of-use switching function needs to be invoked. Because the invoked terminal block function (time-of-use switching) is inconsistent with the terminal function (relay output control) set for that terminal block, the time-of-use switching function cannot be executed. When the smart meter needs to invoke the terminal block's relay output control function to trip the circuit breaker due to unpaid bills, because the invoked terminal function (relay output control) is consistent with the terminal function (relay output control) set for the invoked terminal block, the relay trip output control can be executed through that terminal block, outputting a trip signal.
[0065] As another concrete example, after successfully setting the terminal block's function as an external event input, when the rate changes, the terminal's time-switching function needs to be called. Since the called terminal function (time-switching) is inconsistent with the terminal function (external event input) set for that terminal block, the time-switching function cannot be executed. When the program reaches the external event input detection function, it needs to call the terminal block's external event input function. Because the called terminal function (external event input) is consistent with the terminal function (external event input) set for the corresponding called terminal block, the external event input detection function can be executed through that terminal block to detect signal changes.
[0066] Figure 3 This is a schematic diagram of the structure of a smart meter provided in an embodiment of the present invention. Figure 3 As shown, the smart meter in this embodiment includes: an I / O interface used by the auxiliary terminal in the MCU, a replaceable auxiliary terminal control module, input terminals, and output terminals; the output terminals and the output terminals are respectively connected to the I / O interface via the replaceable auxiliary terminal control module;
[0067] It also includes: MCUs and computer-readable storage media.
[0068] The computer-readable storage medium is used to store a computer-readable and executable computer program;
[0069] The MCU, after executing the computer program stored in the computer-readable storage medium, is capable of implementing all the steps included in the control method for the auxiliary terminals of the smart meter described in any of the above embodiments. The specific steps will not be repeated here; please refer to the descriptions in the above embodiments for details.
[0070] Those skilled in the art will understand that all or part of the processes in the above technical solutions can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the methods described above. After being executed by a processor, the program can also achieve the beneficial effects of the corresponding methods.
[0071] The storage medium can be a hard disk, optical disc, read-only memory (ROM), or random access memory (RAM), etc.
[0072] In summary, the control method and smart meter for auxiliary terminals provided by this invention support configuration of the interface direction and function of each auxiliary terminal, enabling intelligent control of the auxiliary terminals of the smart meter. Therefore, the function of the auxiliary terminals is no longer fixed but can be flexibly configured according to actual usage scenarios, avoiding waste of terminal resources and eliminating the need to adjust the hardware configuration and system software program of the terminals due to specific requirements.
[0073] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A control method for auxiliary terminals of a smart meter, characterized in that, This includes the I / O interface used by the auxiliary terminals in the MCU, a replaceable auxiliary terminal control module, input terminals, and output terminals; the input terminals and the output terminals are respectively connected to the I / O interface via the replaceable auxiliary terminal control module. The MCU configures the terminals through the replaceable auxiliary terminal control module. If the function of the currently configured terminal does not match the terminal direction set at the factory, the configuration is rejected. When the MCU calls a specified function to the terminal block through the replaceable auxiliary terminal control module, if the called specified function is consistent with the function configured on the terminal block, the terminal block executes the specified function. The MCU configures the input type terminals as external event inputs and the output type terminals as control event outputs through the replaceable auxiliary terminal control module. The external event inputs include external pulse inputs; the control event outputs include relay tripping outputs, power pulse outputs, control of external circuit breakers, control of alarm devices, and time-switching outputs.
2. The control method for the auxiliary terminal of a smart meter as described in claim 1, characterized in that, The number of terminals for both the input class and the output class is greater than or equal to 2.
3. The control method for the auxiliary terminals of a smart meter as described in claim 1, characterized in that, The terminal orientation of the input and output terminals is fixed at the factory and cannot be modified after leaving the factory.
4. The control method for the auxiliary terminals of a smart meter as described in claim 1, characterized in that, Also includes: Initialize the terminal block interface; initialize the terminal block function.
5. The control method for the auxiliary terminal of a smart meter as described in claim 4, characterized in that, The initialization of the terminal block function includes: Configure the functions of each terminal block in the MCU driver.
6. The control method for the auxiliary terminals of a smart meter as described in claim 5, characterized in that, Also includes: If the function of the currently configured terminal block matches the terminal direction set at the factory, the current configuration is accepted, and the terminal block function initialization step is executed.
7. A smart meter, characterized in that, This includes the I / O interface used by the auxiliary terminals in the MCU, a replaceable auxiliary terminal control module, input terminals, and output terminals; the input terminals and the output terminals are respectively connected to the I / O interface via the replaceable auxiliary terminal control module. It also includes a computer-readable storage medium; the computer-readable storage medium stores a computer program, which, when executed by the MCU, is capable of implementing the steps included in the control method for the auxiliary terminal of the smart meter according to any one of claims 1 to 6.