A Master-Slave Communication Method for Smart Circuit Breakers Based on SPI

CN122570403APending Publication Date: 2026-08-14XJ GRP CORP +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-30
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

本发明的目的是提供一种基于SPI的智能断路器主从通信方法,旨在解决现有智能断路器应用标准SPI协议存在的通信模式单一,无法兼顾不同业务需求以及从机数据上传的触发机制不完善的问题

Benefits of technology

1、双SPI通信模式的设计实现了与智能断路器异构业务需求的精准适配,第一SPI通信模式聚焦计量数据读取、第二SPI通信模式聚焦参数配置,避免了传统单一SPI通信模式对不同业务的冗余解析,提升了整体通信效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122570403A_ABST
    Figure CN122570403A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of intelligent circuit breaker technology and aims to solve the problems of the existing intelligent circuit breaker application standard SPI protocol, which has a single communication mode, cannot meet different business needs, and has an imperfect triggering mechanism for slave data upload. The present invention provides an SPI-based master-slave communication method for intelligent circuit breakers, the method comprising: based on the slave's SPI communication request, the master sends a data read communication message to the slave, the data read communication message being based on a first SPI communication mode; the slave receives the data read communication message, reads cached metering data based on the data read communication message, and sends the metering data to the master; based on the host computer's parameter configuration instruction, the master sends a parameter configuration message to the slave, the parameter configuration message being based on a second SPI communication mode; the slave receives the parameter configuration message, parses the parameter configuration message, and performs parameter configuration operations based on the parsing result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent circuit breaker technology, and more specifically to a master-slave communication method for intelligent circuit breakers based on SPI. Background Technology

[0002] Serial Peripheral Interface (SPI) is a synchronous, serial communication bus protocol widely used for short-distance communication between microcontrollers, sensors, memory, and various peripheral chips. As a core protection device in power distribution systems, the collaborative communication between the master and slave units of intelligent circuit breakers is a key technological foundation for achieving accurate metering, leakage current protection, and parameter control. With the increasing sophistication of intelligent circuit breaker functions, a master-slave architecture has become the mainstream design: the master unit handles core functions such as opening and closing control, fault response, and uplink communication, while the slave unit focuses on acquiring electrical parameters of the line. The two units interact via SPI, a protocol that benefits from high communication speed, simple hardware implementation, and low protocol overhead.

[0003] Existing SPI communication solutions mostly adopt a fixed request and response pattern, failing to optimize for the heterogeneous business characteristics of batch reading of metering data and precise parameter configuration of smart circuit breakers. This results in redundancy and inefficiency during metering data reading, and lag and inaccurate command execution during parameter configuration, failing to adapt to the differentiated needs of the two businesses. The slave device, acting as the metering and leakage current data acquisition end, needs to actively initiate metering data upload requests. However, in the standard SPI protocol, the slave device is a passive device and cannot actively trigger communication. Existing triggering methods either rely on master polling, leading to untimely metering data uploads, or add extra hardware circuitry, increasing design complexity, and cannot efficiently integrate with the SPI communication logic. Summary of the Invention

[0004] (a) Purpose of the invention The purpose of this invention is to provide a master-slave communication method for smart circuit breakers based on SPI, which aims to solve the problems of the existing standard SPI protocol for smart circuit breakers having a single communication mode, failing to meet different business needs, and having an imperfect triggering mechanism for slave data upload.

[0005] (II) Technical Solution To address the above problems, this invention provides a master-slave communication method for intelligent circuit breakers based on SPI, the method comprising: Based on the slave's SPI communication request, the master sends a data read communication message to the slave, and the data read communication message is based on the first SPI communication mode; The slave device receives the data read communication message, reads the cached metering data based on the data read communication message, and sends the metering data to the host. Based on the parameter configuration instructions from the host computer, the host sends a parameter configuration message to the slave device, and the parameter configuration message is based on the second SPI communication mode; The slave device receives the parameter configuration message, parses the parameter configuration message, and performs parameter configuration operations based on the parsing result.

[0006] Preferably, the method further includes: The slave device collects metering data and stores it in its own cache. When the cached metering data reaches the preset upload condition, the slave device initiates an SPI communication request to the master device.

[0007] Preferably, the preset upload conditions include reaching a preset collection period or the data cache amount reaching a preset cache amount threshold.

[0008] Preferably, the master and slave devices are connected via SPI communication. The slave device initiates an SPI communication request to the master device by sending a low-level signal through the SPI pin.

[0009] Preferably, the metering data includes at least one of power factor, voltage, and current.

[0010] Preferably, the method further includes: The slave device feeds back the execution status of the parameter configuration operation to the master device via the SPI bus; After the host confirms the successful issuance of the parameter configuration command based on the execution status, the current SPI communication ends.

[0011] Preferably, the parameter configuration instructions include at least one of the following: slave transformer threshold adjustment instruction, data acquisition cycle adjustment instruction, and SPI communication transmission length adjustment instruction.

[0012] Preferably, the method further includes: Based on the leakage protection request from the slave device, the master device controls the opening and closing mechanism to perform the opening operation; Based on the slave's SPI communication request, the master sends a leakage fault reading communication message to the slave, and the leakage fault reading communication message is based on the first SPI communication mode; The slave device receives the leakage fault read communication message, reads the cached leakage fault data based on the leakage fault communication request message, and sends the leakage fault data to the host.

[0013] Preferably, the method further includes: The slave device detects line leakage fault data through a leakage current transformer and stores the leakage fault data in a cache area; When the detected leakage fault data exceeds the preset leakage threshold, the slave device initiates a leakage protection request and an SPI communication request.

[0014] Preferably, the method further includes: The host receives the leakage fault data, performs fault investigation and recording based on the leakage fault data, and generates a fault handling completion signal. The slave device receives the fault handling completion signal and initiates a closing request; Based on the closing request from the slave device, the master device controls the opening and closing mechanism to perform the closing operation.

[0015] (III) Beneficial Effects The above-described technical solution of the present invention has the following beneficial technical effects: 1. The dual SPI communication mode design achieves precise adaptation to the heterogeneous business requirements of smart circuit breakers. The first SPI communication mode focuses on metering data reading, and the second SPI communication mode focuses on parameter configuration, avoiding the redundant parsing of different services by the traditional single SPI communication mode and improving the overall communication efficiency.

[0016] 2. SPI communication is initiated only by the master and conforms to the master-slave communication rules of the standard SPI protocol. Combined with the standardized packaged SPI driver, it ensures the standardization and compatibility of master-slave communication and adapts to the hardware replacement needs of microcontroller units from different brands.

[0017] 3. Through the uncoupled collaboration of metering data reading and parameter configuration, the two communication modes are triggered and executed independently, avoiding interference between the execution of one business and the other. For example, batch reading of metering data will not affect the accuracy of parameter configuration, thus improving the reliability of business processing. Attached Figure Description

[0018] Figure 1 This is a flowchart of the first SPI communication mode of the SPI-based master-slave communication method for smart circuit breakers provided by the present invention; Figure 2 This is a flowchart of the second SPI communication mode of the SPI-based master-slave communication method for smart circuit breakers provided by the present invention; Figure 3 This is a flowchart of the metering data reading process provided by the present invention; Figure 4 This is a flowchart of the parameter configuration provided by the present invention; Figure 5 This is a flowchart of the leakage protection process provided by the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments and the accompanying drawings. It should be understood that these descriptions are merely exemplary and not intended to limit the scope of the invention. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.

[0020] The accompanying drawings illustrate layer structure diagrams according to embodiments of the present invention. These drawings are not to scale, and some details have been enlarged for clarity, and some details may have been omitted. The shapes of the various regions and layers shown in the drawings, as well as their relative sizes and positional relationships, are merely exemplary and may deviate from reality due to manufacturing tolerances or technical limitations. Furthermore, those skilled in the art can design regions / layers with different shapes, sizes, and relative positions as needed.

[0021] Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0022] In the description of this invention, it should be noted that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0023] Combination Figure 1 and Figure 2This invention provides a master-slave communication method for an intelligent circuit breaker based on SPI, comprising: a master sending a data read communication message to the slave based on an SPI communication request from the slave, the data read communication message being based on a first SPI communication mode; the slave receiving the data read communication message, reading cached metering data based on the data read communication message, and sending the metering data to the master; that is, when the slave needs to upload metering data, it first initiates an SPI communication request to the master. After receiving the request, the master sends a data read communication message to the slave. This message itself does not carry valid instruction content; its main function is to trigger clock synchronization and bus activation for SPI communication. After receiving the message, the slave does not parse the message content but directly reads the latest collected metering data from the cache and returns it to the master via the SPI bus. Based on parameter configuration instructions from the host computer, the master sends a parameter configuration message to the slave, the parameter configuration message being based on a second SPI communication mode; the slave receives the parameter configuration message, parses the parameter configuration message, and performs parameter configuration operations based on the parsing result. When the host computer, such as the operation and maintenance system, needs to adjust the parameters of the slave device, the host encapsulates the parameter configuration instructions into a parameter configuration message and sends it to the slave device via the SPI bus. The slave device fully parses the message, extracts the instruction content, and executes the corresponding configuration operation, such as adjusting the current transformer threshold or modifying the acquisition cycle.

[0024] It should be noted that the specific method by which the slave device identifies data reading communication messages and parameter configuration messages is not limited here. In optional scenarios, after receiving a message, the slave device determines the action to be performed based on the second byte of the message. That is, after the master initiates SPI communication, if the slave device detects that the second byte of the message is 0x00, it determines that it is a data reading communication message and will not parse the message sent by the master, but directly read the metering data from its own data buffer. After the master initiates SPI communication, it encapsulates the parameter configuration instructions into a parameter configuration message and sends it to the slave device. After receiving the message, if the slave device detects that the second byte of the message is 0x01, it determines that it is a parameter configuration message, parses the parameter configuration message sent by the master, and performs the corresponding parameter configuration operation according to the message content.

[0025] This approach enables the dual SPI communication mode design to precisely adapt to the heterogeneous business requirements of smart circuit breakers. The first SPI communication mode focuses on metering data reading; the slave device does not need to parse the master's messages and directly returns cached data, eliminating the parsing redundancy in the request-response mode of traditional SPI communication and significantly improving the efficiency of metering data reading. The second SPI communication mode focuses on parameter configuration; the slave device performs complete parsing and verification of parameter configuration messages, ensuring the accuracy and reliability of parameter configuration and avoiding configuration errors caused by misparsing. SPI communication is initiated only by the master, conforming to the master-slave communication rules of the standard SPI protocol. Combined with a standardized encapsulated SPI driver, it ensures the standardization and compatibility of master-slave communication, adapting to the hardware replacement needs of different brands of microcontroller units. Through the decoupled collaboration of metering data reading and parameter configuration, the two communication modes are triggered and executed independently, avoiding interference between the execution of one business and the other. For example, batch reading of metering data will not affect the accuracy of parameter configuration, improving the reliability of business processing.

[0026] In a preferred embodiment, the method further includes: the slave device collecting metering data and storing it in its own buffer; when the buffered metering data reaches a preset upload condition, the slave device initiates an SPI communication request to the master device. Specifically, the slave device collects metering data of the power distribution line in real time through the metering acquisition unit, stores it in its own dedicated metering data buffer after analog-to-digital conversion, and has built-in buffered data detection logic to continuously monitor the metering data storage status in the buffer. When the data reaches the preset upload condition, the slave device actively initiates an SPI communication request to the master device through hardware or software, providing a prerequisite for triggering the first SPI communication mode.

[0027] This method enables the slave device to actively initiate SPI communication requests, resolving the data upload delay issue caused by the slave device passively waiting for the master to poll in traditional SPI communication. This ensures the real-time nature of metering data. More importantly, the logic of caching metering data before uploading prevents data loss and ensures data integrity. Even if the communication request is not immediately responded to, the collected data can be temporarily stored in the cache. The closed-loop logic of acquisition and triggering automates and ensures continuous metering data acquisition without manual intervention, improving the automation level of the smart circuit breaker. Simultaneously, the slave device completes data acquisition, caching, and trigger detection locally without consuming master resources, reducing communication redundancy between master and slave devices and improving the master's resource utilization.

[0028] In the preferred scenario, the preset upload conditions include reaching a preset acquisition period or the data cache size reaching a preset cache size threshold. Specifically, the slave device has a built-in dual-dimensional trigger condition detection logic, including acquisition period detection in the time dimension and cache size threshold detection in the data volume dimension. The acquisition period in the time dimension ensures that metering data is uploaded at fixed time intervals, adapting to the power distribution system's need for timed monitoring of metering data; the cache size threshold in the data volume dimension ensures that metering data is not lost due to cache overflow, adapting to the need for batch data acquisition under high sampling rates.

[0029] This approach enables flexible adaptation of data acquisition and uploading through a two-dimensional triggering condition. It balances the power distribution system's need for timely monitoring of metering data with the requirement for data integrity under high sampling rates, overcoming the limitations of single triggering conditions. For example, a single acquisition cycle might lead to buffer overflow at high sampling rates, while a single buffer threshold might result in untimely data uploads at low sampling rates. Simultaneously, it enhances the flexibility of the triggering logic, adapting to the metering needs of different power distribution lines. For instance, acquisition cycle triggering can be used for lines with stable power loads, while buffer threshold triggering can be used for lines with large power load fluctuations. Furthermore, the buffer threshold can be matched with the fixed transmission length of SPI communication, enabling batch uploading of metering data in whole frames. This avoids fragmented data transmission, reduces host parsing redundancy, and improves the efficiency of metering data reading.

[0030] In a preferred embodiment, the master and slave devices are connected via SPI communication, for example, by establishing a physical communication connection through a four-wire SPI bus. The master controls the timing of the SPI bus. The slave device initiates an SPI communication request to the master by sending a low-level signal through the SPI pin. That is, the slave device configures a dedicated SPI occupancy pin and initiates the SPI communication request to the master by pulling the SPI occupancy pin low and outputting a low-level signal. The master identifies the communication request by detecting the level change of this pin.

[0031] Specifically, the master and slave devices are physically connected directly via the SPI bus. The clock line and chip select line of the SPI bus are controlled by the master to achieve precise control of the communication timing. The SPI pin of the slave device is configured as GPIO open-drain output mode, and the corresponding detection pin of the master is configured as GPIO input mode and connected with a pull-up resistor, and supports falling edge interrupt triggering. When the slave device meets the preset upload conditions, it pulls the SPI pin low to a low level through the microcontroller unit. After the master detects the falling edge interrupt of the pin, it immediately recognizes it as an SPI communication request.

[0032] This method employs hardware pin level triggering to initiate communication requests, achieving high-speed master-slave signal transmission with a response latency significantly lower than software instruction triggering, thus improving the real-time response to communication requests. By using SPI to occupy pins, no additional hardware circuitry or chips are required, simplifying hardware design and reducing hardware costs. Simultaneously, it allows for deep integration of the triggering logic and SPI communication logic, avoiding compatibility issues between additional hardware and the SPI bus. The master uses falling-edge interrupt triggering to detect pin levels, eliminating the need for continuous pin status polling, reducing CPU resource consumption, improving master operating efficiency, and allowing the master to simultaneously handle other core functions such as protection control and uplink communication. The hardware design of slave pulling-low pins and master pulling-up detection enhances the anti-interference capability of signal transmission, preventing false signal triggering in the complex electromagnetic environment of the power distribution system and ensuring the reliability of communication requests.

[0033] In a preferred embodiment, the metering data includes at least one of power factor, voltage, and current. Specifically, the slave device collects electrical parameters of the power distribution line through a metering transformer. The collected metering data includes at least one of power factor, voltage, and current. The collected analog data is converted into digital data after analog-to-digital conversion and stored in the slave device's metering data buffer for the master device to read in the first SPI communication mode.

[0034] This method collects metering data covering the core electrical parameters of the power distribution system. Power factor, voltage, and current are selected as the core acquisition indicators, balancing the comprehensiveness of electrical quantities with the simplicity of acquisition. It eliminates the need to collect redundant electrical parameters, reduces the acquisition and buffering pressure on slave devices, and improves acquisition efficiency. At the same time, it provides comprehensive and reliable data support for power consumption monitoring, electricity billing, and load analysis of the power distribution system, meeting the metering requirements of smart circuit breakers as core protection devices for power distribution.

[0035] In a preferred embodiment, the method further includes: the slave device feeding back the execution status of the parameter configuration operation to the master device via the SPI bus; that is, after the slave device parses the parameter configuration message and performs the parameter configuration operation, it generates corresponding execution status information based on the execution result of the operation and feeds back the information to the master device via the SPI bus; the master device terminates the current SPI communication after confirming that the parameter configuration command has been successfully issued based on the execution status. The master device has built-in execution status recognition logic to receive and recognize the execution status of the slave device. When it confirms that the parameter configuration command has been successfully issued, it actively terminates the current SPI communication, thereby releasing the SPI bus resources.

[0036] This method allows the master to know the actual result of parameter configuration through feedback from the slave device's execution status, avoiding the lack of feedback in traditional parameter configuration. The master terminates communication upon successful confirmation, enabling on-demand release of SPI bus resources and preventing invalid communication from continuously occupying bus resources, thus ensuring bus utilization. This forms a fully closed-loop control logic for parameter configuration, guaranteeing its validity and traceability. Simultaneously, the immediate termination of communication upon master confirmation ensures on-demand release of SPI bus resources, preventing invalid communication from occupying bus resources, ensuring uninterrupted communication channels for other services, and improving bus resource utilization. Furthermore, the execution status feedback provides a basis for the parameter configuration retry mechanism. If the master detects configuration failure or instruction parsing error, it can re-initiate the second SPI communication mode to send instructions, improving the success rate of parameter configuration and ensuring its accuracy.

[0037] In a preferred embodiment, the parameter configuration instructions include at least one of the following: a slave transformer threshold adjustment instruction, a data acquisition cycle adjustment instruction, and an SPI communication transmission length adjustment instruction. Specifically, the host computer generates parameter configuration instructions for the slave device based on the operational requirements of the power distribution system. The instruction type includes at least one of the following: transformer threshold adjustment, data acquisition cycle adjustment, and SPI communication transmission length adjustment. After receiving the instructions from the host computer, the master computer encapsulates them into a parameter configuration message and sends it to the slave device via the second SPI communication mode. The slave device parses the message and executes the corresponding parameter adjustment operation. For the remote dynamic configuration of the slave device's core operating parameters, dedicated configuration instructions are designed for the slave device's metering and leakage current data acquisition and uploading, as well as the SPI communication link. This enables remote parameter distribution and local execution, allowing the smart circuit breaker to adjust its operating parameters according to changes in the power distribution scenario without requiring on-site hardware or software modifications.

[0038] This method allows configuration commands to cover the core aspects of slave device data acquisition and communication, enabling refined and personalized configuration of intelligent circuit breaker operating parameters. This allows the intelligent circuit breaker to adapt to the operational needs of different power distribution lines and different power consumption scenarios. For example, for lines with high leakage risk, the leakage current transformer threshold can be lowered to improve protection sensitivity. More importantly, it supports remote dynamic parameter adjustment without on-site operation, improving the convenience of power distribution system operation and maintenance and reducing maintenance costs, especially suitable for outdoor, high-altitude, and remote power distribution line operation and maintenance. Furthermore, parameter adjustment is achieved through software commands, without modifying the hardware structure or replacing components, improving system flexibility and scalability, and extending the service life of the intelligent circuit breaker. In addition, the adjustable SPI communication transmission length allows the SPI bus to adapt to different data transmission needs; for example, the transmission length can be increased when reading metering data in batches, and decreased when simplifying parameter configuration, improving communication efficiency.

[0039] In a preferred embodiment, the method further includes: based on the leakage protection request from the slave device, the master device controls the tripping and closing mechanism to perform a tripping operation; based on the SPI communication request from the slave device, the master device sends a leakage fault reading communication message to the slave device, the leakage fault reading communication message being based on a first SPI communication mode; the slave device receives the leakage fault reading communication message, reads the cached leakage fault data based on the leakage fault communication request message, and sends the leakage fault data to the master device. Specifically, after the slave device initiates a leakage protection request, the master device's protection control module triggers the tripping and closing mechanism to perform a tripping operation, disconnecting the faulty line; subsequently, the slave device initiates an SPI communication request, and the master device, using the first SPI communication mode, sends a leakage fault reading communication message to the slave device; after receiving the message, the slave device retrieves the leakage fault data from the cache and transmits it to the master device via the SPI bus, thereby realizing the reading of the fault data.

[0040] In one implementation, the slave device is configured with a dedicated protection pin. When a leakage fault is detected, the slave device pulls the pin low to initiate a leakage protection request. After the master device's protection module detects the low level of the protection pin, it immediately sends a tripping command to the tripping mechanism, driving the tripping coil to energize and disconnect the faulty line. At the same time, the slave device pulls the SPI occupied pin low to initiate an SPI communication request. After the master device completes the tripping, it reuses the first SPI communication mode and sends a leakage fault reading communication message to the slave device. After receiving the message, the slave device retrieves data such as the leakage current value and the fault occurrence time from the fault data buffer and transmits it back to the master device via the SPI bus.

[0041] This method achieves deep integration of leakage current protection and SPI communication, resolving the issues of disconnection between leakage current detection and communication, delayed fault signal transmission, and untimely protection in traditional smart circuit breakers, thus enhancing the safety protection capabilities of the power distribution system. Simultaneously, by employing a host-controlled hardware for rapid response combined with software data reading, hardware pins enable microsecond-level transmission of fault signals, and the opening and closing mechanism is directly controlled by the host, achieving local rapid execution of fault protection and ensuring timely opening protection. Software SPI communication enables the reading of fault data, ensuring fault traceability and providing a basis for subsequent fault investigation. Furthermore, reading leakage current fault data through the first SPI communication mode eliminates the need for additional communication modes, simplifying the host's dual-mode communication logic, reducing software development and maintenance costs, and maintaining a simple master-slave communication mode while improving communication stability.

[0042] In a preferred embodiment, the method further includes: the slave device detects line leakage fault data through a leakage current transformer and stores the leakage fault data in a buffer; when the detected leakage fault data exceeds a preset leakage threshold, the slave device initiates a leakage protection request and an SPI communication request.

[0043] Specifically, the slave device collects leakage fault data of the power distribution line in real time through a leakage current transformer, such as leakage current value. After analog-to-digital conversion, the data is stored in its own dedicated fault data buffer. The slave device has built-in leakage fault threshold detection logic to continuously monitor leakage fault data. When the detected data exceeds the preset leakage threshold, it immediately initiates a leakage protection request to the master device and simultaneously initiates an SPI communication request, providing triggering conditions for subsequent tripping protection and fault data reading. In one embodiment, the slave device collects leakage current of the power distribution line in real time through a 0.5-level precision leakage current transformer with a sampling rate configured at 4kHz. The collected analog signal is converted into a digital signal after analog-to-digital conversion and stored in the fault data buffer. The slave device has built-in leakage threshold detection program, for example, with a preset leakage threshold of 30mA. When the detected leakage current value exceeds 30mA, it immediately pulls down the protection pin to initiate a leakage protection request and simultaneously pulls down the SPI occupied pin to initiate an SPI communication request. The level changes of the two pins are triggered synchronously.

[0044] This method utilizes the real-time acquisition characteristics of leakage current transformers to achieve timely fault detection, caches fault data to prevent data loss, and initiates leakage protection requests and SPI communication requests synchronously to ensure that the host executes trip protection first and then reads fault data, achieving coordinated triggering of protection and data reading; the two requests are initiated through dedicated hardware pins, ensuring the independence and timeliness of signal transmission.

[0045] In a preferred embodiment, the method further includes: the host receiving leakage fault data, performing fault investigation and recording based on the leakage fault data, and generating a fault handling completion signal; the slave receiving the fault handling completion signal and initiating a closing request; and the host controlling the opening and closing mechanism to perform a closing operation based on the slave's closing request. Specifically, after receiving the leakage fault data transmitted by the slave, the host parses the data, locates and records the fault, and can also report the fault data to the host computer for maintenance personnel to investigate. After the fault is handled, the host generates a fault handling completion signal and sends it to the slave. After receiving the signal, the slave initiates a closing request to the host, i.e., pulls the protection pin high. After detecting the closing request, the host controls the opening and closing mechanism to perform a closing operation, restoring the normal power supply to the distribution line.

[0046] This method establishes a closed-loop process for handling leakage faults, achieving automated and integrated processing from fault detection to power restoration. This enhances the intelligence and automation level of the power distribution system and reduces manual intervention. Simultaneously, the main unit investigates and records leakage fault data, providing crucial information for later maintenance and optimization of the power distribution system. For example, analyzing the fault's occurrence time, line, and leakage current value can identify insulation defects and improve the system's operational stability. The issuance of fault handling completion signals ensures that the slave unit only initiates a closing request after the fault has been resolved, preventing secondary safety hazards caused by unresolved faults. It also enables centralized management of power restoration; the main unit can decide whether to close the circuit based on the overall operating status of the power distribution system. For instance, if leakage risks still exist, the closing request can be rejected, improving the safety of power restoration.

[0047] It should be understood that the specific embodiments described above are merely illustrative or explanatory of the principles of the invention and do not constitute a limitation thereof. Therefore, any modifications, equivalent substitutions, improvements, etc., made without departing from the spirit and scope of the invention should be included within the protection scope of the invention. Furthermore, the appended claims are intended to cover all variations and modifications falling within the scope and boundaries of the appended claims, or equivalent forms of such scope and boundaries.

Claims

1. A master-slave communication method for an intelligent circuit breaker based on SPI, characterized in that, The method includes: Based on the slave's SPI communication request, the master sends a data read communication message to the slave, and the data read communication message is based on the first SPI communication mode; The slave device receives the data read communication message, reads the cached metering data based on the data read communication message, and sends the metering data to the host. Based on the parameter configuration instructions from the host computer, the host sends a parameter configuration message to the slave device, and the parameter configuration message is based on the second SPI communication mode; The slave device receives the parameter configuration message, parses the parameter configuration message, and performs parameter configuration operations based on the parsing result.

2. The SPI-based master-slave communication method for smart circuit breakers according to claim 1, characterized in that, The method further includes: The slave device collects metering data and stores it in its own cache. When the cached metering data reaches the preset upload condition, the slave device initiates an SPI communication request to the master device.

3. The SPI-based master-slave communication method for smart circuit breakers according to claim 2, characterized in that, The preset upload conditions include reaching a preset collection period or the data cache amount reaching a preset cache amount threshold.

4. The SPI-based master-slave communication method for smart circuit breakers according to claim 2, characterized in that, The master and slave devices are connected via SPI communication. The slave device initiates an SPI communication request to the master device by sending a low-level signal through the SPI pin.

5. The SPI-based master-slave communication method for smart circuit breakers according to claim 1, characterized in that, The metering data includes at least one of power factor, voltage, and current.

6. The SPI-based master-slave communication method for smart circuit breakers according to claim 1, characterized in that, The method further includes: The slave device feeds back the execution status of the parameter configuration operation to the master device via the SPI bus; After the host confirms the successful issuance of the parameter configuration command based on the execution status, the current SPI communication ends.

7. The SPI-based master-slave communication method for intelligent circuit breakers according to claim 1, characterized in that, The parameter configuration instructions include at least one of the following: slave transformer threshold adjustment instruction, data acquisition cycle adjustment instruction, and SPI communication transmission length adjustment instruction.

8. The SPI-based master-slave communication method for smart circuit breakers according to claim 1, characterized in that, The method further includes: Based on the leakage protection request from the slave device, the master device controls the opening and closing mechanism to perform the opening operation; Based on the slave's SPI communication request, the master sends a leakage fault reading communication message to the slave, and the leakage fault reading communication message is based on the first SPI communication mode; The slave device receives the leakage fault read communication message, reads the cached leakage fault data based on the leakage fault communication request message, and sends the leakage fault data to the host.

9. The SPI-based master-slave communication method for intelligent circuit breakers according to claim 8, characterized in that, The method further includes: The slave device detects line leakage fault data through a leakage current transformer and stores the leakage fault data in a cache area; When the detected leakage fault data exceeds the preset leakage threshold, the slave device initiates a leakage protection request and an SPI communication request.

10. The SPI-based master-slave communication method for smart circuit breakers according to claim 9, characterized in that, The method further includes: The host receives the leakage fault data, performs fault investigation and recording based on the leakage fault data, and generates a fault handling completion signal. The slave device receives the fault handling completion signal and initiates a closing request; Based on the closing request from the slave device, the master device controls the opening and closing mechanism to perform the closing operation.