RS485 master-slave multi-center communication system based on built-in interphone
By configuring two microcontroller MCUs for each machine communication device in the aircraft communication system and establishing a ring network, the problem that the traditional RS485 bus topology cannot achieve multi-center communication is solved, the reliability and communication continuity of the system are improved, and the cost is reduced reduces cost and complexity.
Patent Information
- Application Number
- CN202322628368.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-26
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2033-09-26
AI Technical Summary
The traditional RS485 bus topology cannot realize multi-center communication, causing the aircraft communication system to interrupt communications when the central node fails, resulting in a lack of reliability.
Design an RS485 master-slave multi-center communication system based on the intercom device. By configuring two microcontroller MCUs in each machine communication device and establishing a ring network, free switching between multiple central nodes is achieved to ensure communication. Continuity.
It improves the reliability of the aircraft communication system, realizes multi-center communication, reduces process costs, and simplifies the state switching of the transceiver controller.
Smart Images

Figure CN221633768U
Abstract
Description
Technical Field
[0001] The utility model belongs to the technical field related to RS485 communication, and in particular relates to an RS485 master-slave multi-center communication system based on an intercom. Background Art
[0002] RS485 bus is widely used in the aviation industry due to its advantages such as high communication rate, long communication distance, simple wiring and support for multi-node communication. RS485 bus has two wiring modes: two-wire and four-wire. The four-wire can only realize point-to-point communication and is rarely used. Now the two-wire connection method is mostly used. The two-wire bus topology is mostly a bus structure, that is, a bus is used to connect multiple nodes in series, and star or ring networks are not supported.
[0003] As the human-machine interaction terminal of the entire aircraft system, the machine communication device (hereinafter referred to as "ACP") undertakes the important mission of information exchange with a large number of external devices. Since there are more than one machine communication devices in the aircraft system, if all machine communication devices are interconnected with external devices, it will not only make the aircraft wiring complicated and not conducive to weight reduction, but also cause a sharp increase in the communication volume between the machine communication devices and external devices. Therefore, in actual use, one machine communication device is often used as a central node to interconnect with external devices, and other non-central devices communicate with external devices through forwarding by the central node. In the design of the entire aircraft system, in order to improve the reliability of the aircraft communication system operation, it is usually necessary to back up the central node, that is, to design two central nodes. When one of the central nodes is hung up, the system can immediately switch the central node to another machine communication device to ensure normal communication between the machine communication device and the external device. However, the traditional bus topology only contains one central node, which can no longer meet the bus communication requirements of multiple centers.
[0004] In view of this, the inventor provides an RS485 master-slave multi-center communication system based on an intercom to solve the above technical problems. Utility Model Content
[0005] The purpose of the utility model is to overcome the shortcomings of the above-mentioned prior art and to propose an RS485 master-slave multi-center communication system based on an in-flight intercom. The communication system solves the problem that the traditional RS485 bus topology structure cannot realize multi-center communication. The communication system configures two RS485 devices for each machine communication device, and realizes information interaction between multiple machine communication devices by establishing a ring network between multiple machine communication devices. The ring network enables free switching between multiple central nodes, thereby improving the reliability of the operation of the aircraft communication system.
[0006] In order to achieve the above purpose, the utility model adopts the following technical solutions:
[0007] An RS485 master-slave multi-center communication system based on an intercom, comprising N intercom devices, wherein N is an integer greater than or equal to 2, each of the intercom devices comprising a plurality of single-chip microcomputers MCU, a plurality of transceiver controllers and a plurality of RS485 devices, each of the single-chip microcomputers MCU is connected to the RS485 device via the transceiver controller, and controls the RS485 device to execute instructions;
[0008] Each of the machine communication devices is provided with a single-chip microcomputer MCU in a master mode and / or a single-chip microcomputer MCU in a slave mode. The single-chip microcomputer MCU in the master mode of any machine communication device is connected to the single-chip microcomputer MCU in the slave mode of other machine communication devices to form a ring network, and the single-chip microcomputer MCU in the master mode and the single-chip microcomputer MCU in the slave mode can switch modes at the same time. The ring network can enable information exchange between multiple machine communication devices;
[0009] When the machine communication device contains at least one single-chip microcomputer MCU in master mode, the machine communication device is a central node, and the central node interacts with the terminal communication device, and the ring network enables free switching between multiple central nodes; when the machine communication device only contains a single-chip microcomputer MCU in slave mode, the machine communication device is a slave node.
[0010] Furthermore, there are three machine communication devices, and each machine communication device is provided with two single-chip microcomputers MCU, namely single-chip microcomputer MCU1 and single-chip microcomputer MCU2.
[0011] Furthermore, when the single-chip microcomputer MCU is in the master mode, the transceiver controller is in the sending state, and when the single-chip microcomputer MCU is in the slave mode, the transceiver controller is in the receiving state.
[0012] Further, the three machine communication devices are ACP1, ACP2 and ACP3, and the three machine communication devices are connected to form a ring network;
[0013] The single-chip microcomputers MCU1 and MCU2 in the ACP1 are both in master mode, the single-chip microcomputer MCU1 in the ACP2 is in slave mode, the single-chip microcomputer MCU2 is in master mode, and the single-chip microcomputers MCU1 and MCU2 in the ACP3 are in slave mode;
[0014] The specific process of connecting into the ring network is as follows:
[0015] The single-chip microcomputer MCU1 in the master mode in the ACP1 is connected to the single-chip microcomputer MCU1 in the slave mode in the ACP2, the single-chip microcomputer MCU2 in the master mode in the ACP2 is connected to the single-chip microcomputer MCU1 in the slave mode in the ACP3, and the single-chip microcomputer MCU2 in the master mode in the ACP1 is connected to the single-chip microcomputer MCU2 in the slave mode in the ACP3.
[0016] Furthermore, the specific process of simultaneously switching modes of the single-chip microcomputer MCU in the master mode and the single-chip microcomputer MCU in the slave mode is as follows:
[0017] The single-chip microcomputer MCU1 in the master mode executes the communication program A1, and sends data to the central node or the slave node in the ring network by controlling the RS485 device. After the data is sent, the single-chip microcomputer MCU1 in the master mode switches to the slave mode;
[0018] The single-chip microcomputer MCU2 in the master mode executes the communication program A2, and sends data to the central node or the slave node in the ring network by controlling the RS485 device. After the data is sent, the single-chip microcomputer MCU2 in the master mode switches to the slave mode;
[0019] The single-chip microcomputer MCU1 in slave mode receives data by controlling the RS485 device. After the data is received, the single-chip microcomputer MCU1 in slave mode switches to master mode to further execute the communication program B1;
[0020] The single-chip microcomputer MCU2 in slave mode receives data by controlling the RS485 device. After the data is received, the single-chip microcomputer MCU2 in slave mode switches to master mode to further execute the communication program B2.
[0021] Furthermore, the communication programs A1 and A2 are used to determine a central node, and to send information to slave nodes or central nodes in the ring network through the central node.
[0022] Furthermore, the communication programs B1 and B2 are used to determine the current RS485 device serial port receiving idle interrupt status and the central node, and send information to the slave nodes or the central node in the ring network through the central node.
[0023] Compared with the prior art, the utility model has the following beneficial effects:
[0024] The invention discloses an RS485 master-slave multi-center communication system based on an in-flight intercom. The communication system solves the problem that the traditional RS485 bus topology structure cannot realize multi-center communication. The prior art bus topology structure containing only one center node is modified into a bus topology structure containing multiple center nodes. That is, two single-chip microcomputers MCU are arranged in the in-flight communication device. Each single-chip microcomputer MCU is connected to the RS485 device through a transceiver controller. By connecting multiple in-flight communication devices, a ring network is established to realize information interaction between the in-flight communication devices. The ring network enables free switching between multiple center nodes. When a center node fails, the system can immediately switch to another center node to ensure normal communication between the in-flight communication device and the terminal communication device, thereby improving the reliability of the operation of the entire aircraft communication system. The communication system has a low cost in the process of realization and the state switching of the transceiver controller is simple. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The accompanying drawings herein are incorporated into and constitute a part of this specification, and together with the description, are used to explain the principles of the present utility model.
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the utility model or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0027] Figure 1 This is a schematic diagram of the RS485 master-slave multi-center connection mode of the communication system of the utility model;
[0028] Figure 2 It is a schematic diagram of the master mode and the slave mode of the single-chip microcomputer MCU in the communication system of the utility model after switching simultaneously;
[0029] Figure 3 It is a schematic diagram of four communication devices of the communication system of the utility model connected into a ring network;
[0030] Figure 4 This is a flow chart of the communication program A1 of the utility model executed on the single-chip microcomputer MCU1;
[0031] Figure 5 This is a flow chart of the communication program A2 of the utility model executed on the single-chip microcomputer MCU2;
[0032] Figure 6 This is a flow chart of the communication program B1 of the utility model executed on the single-chip microcomputer MCU1;
[0033] Figure 7This is a flow chart of the communication program B2 of the utility model executed on the single-chip microcomputer MCU2. DETAILED DESCRIPTION
[0034] Here, exemplary embodiments will be described in detail, and the embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present utility model. Instead, they are only examples of devices consistent with some aspects of the present utility model as detailed in the attached claims.
[0035] See also Figures 1 to 7 , the embodiment of the utility model provides an RS485 master-slave multi-center communication system based on an intercom, comprising N intercom devices, N being an integer greater than or equal to 2, each intercom device comprising a plurality of single-chip microcomputers MCU, a plurality of transceiver controllers and a plurality of RS485 devices, each single-chip microcomputer MCU is connected to the RS485 device through the transceiver controller, and controls the RS485 device to execute instructions;
[0036] Each machine communication device is provided with a single-chip microcomputer MCU in a master mode and / or a single-chip microcomputer MCU in a slave mode. The single-chip microcomputer MCU in the master mode of any machine communication device is connected to the single-chip microcomputer MCU in the slave mode of other machine communication devices to form a ring network, and the single-chip microcomputer MCU in the master mode and the single-chip microcomputer MCU in the slave mode can switch modes at the same time, that is, the single-chip microcomputer MCU in the master mode is switched to the single-chip microcomputer MCU in the slave mode, and the single-chip microcomputer MCU in the slave mode is switched to the single-chip microcomputer MCU in the master mode. The ring network can enable information exchange between multiple machine communication devices. Specifically, the RS485 device connected to the single-chip microcomputer MCU in the master mode sends information to the RS485 device connected to the single-chip microcomputer MCU in the slave mode;
[0037] When the machine communication device contains at least one master mode single-chip microcomputer MCU, the machine communication device is a central node, and the central node exchanges information with the terminal communication device, and enables free switching between multiple central nodes through the ring network; when the machine communication device only has a slave mode single-chip microcomputer MCU, the machine communication device is a slave node, and the slave node does not send data but only receives data.
[0038] Specifically, there are three machine communication devices, and each machine communication device is equipped with two single-chip microcomputers MCU. Each single-chip microcomputer MCU is connected to the RS485 device through a transceiver controller. The three machine communication devices are connected to each other through their respective RS485 devices to form a ring network, such as Figure 1 As shown, the three machine communication devices are ACP1, ACP2 and ACP3, which are connected to form a ring network;
[0039] Among them, the single-chip microcomputers MCU1 and MCU2 in ACP1 are both in master mode, the single-chip microcomputer MCU1 in ACP2 is in slave mode and the single-chip microcomputer MCU2 is in master mode, and the single-chip microcomputers MCU1 and MCU2 in ACP3 are in slave mode;
[0040] The specific process of connecting into a ring network is as follows:
[0041] The single-chip microcomputer MCU1 in the master mode in ACP1 is connected to the single-chip microcomputer MCU1 in the slave mode in ACP2, the single-chip microcomputer MCU2 in the master mode in ACP2 is connected to the single-chip microcomputer MCU1 in the slave mode in ACP3, and the single-chip microcomputer MCU2 in the master mode in ACP1 is connected to the single-chip microcomputer MCU2 in the slave mode in ACP3.
[0042] In the embodiment of the utility model, when the single-chip microcomputer MCU is in the master mode, the transceiver controller is in the sending state, and when the single-chip microcomputer MCU is in the slave mode, the transceiver controller is in the receiving state;
[0043] The specific process of the master mode MCU and the slave mode MCU switching modes at the same time is as follows:
[0044] The single-chip microcomputer MCU1 in the master mode executes the communication program A1, and sends data to the central node or the slave node in the ring network by controlling the RS485 device. After the data is sent, the single-chip microcomputer MCU1 in the master mode switches to the slave mode;
[0045] The single-chip microcomputer MCU2 in the master mode executes the communication program A2, and sends data to the central node or the slave node in the ring network by controlling the RS485 device. After the data is sent, the single-chip microcomputer MCU2 in the master mode switches to the slave mode;
[0046] The MCU1 in slave mode receives data by controlling the RS485 device. After the data is received, the MCU1 in slave mode switches to master mode and further executes the communication program B1.
[0047] The MCU2 in slave mode receives data by controlling the RS485 device. After the data is received, the MCU2 in slave mode switches to master mode and further executes the communication program B2.
[0048] In addition, if Figure 2 As shown, a ring network is shown after the single-chip microcomputer MCU in the master mode and the single-chip microcomputer MCU in the slave mode are switched simultaneously.
[0049] Specifically, Figure 3 As shown, four machine communication devices are listed to be connected into a ring network, and the four machine communication devices are ACP1, ACP2, ACP3 and ACP4;
[0050] Among them, the single-chip microcomputers MCU1 and MCU2 in ACP1 are both in master mode, the single-chip microcomputer MCU1 in ACP2 is in slave mode and MCU2 is in master mode, the single-chip microcomputer MCU1 in ACP3 is in slave mode and MCU2 is in master mode, and the single-chip microcomputers MCU1 and MCU2 in ACP4 are both in slave mode;
[0051] The specific process of connecting four machine communication devices into a ring network is as follows:
[0052] The single-chip microcomputer MCU1 in the master mode in ACP1 is connected to the single-chip microcomputer MCU1 in the slave mode in ACP2, the single-chip microcomputer MCU2 in the master mode in ACP2 is connected to the single-chip microcomputer MCU1 in the slave mode in ACP3, the single-chip microcomputer MCU2 in the master mode in ACP3 is connected to the single-chip microcomputer MCU2 in the slave mode in ACP4, and the single-chip microcomputer MCU2 in the master mode in ACP1 is connected to the single-chip microcomputer MCU1 in the slave mode in ACP4.
[0053] In the embodiment of the utility model, communication programs A1 and A2 are used to determine the central node, and send information to the slave node or the central node in the ring network through the central node; communication programs B1 and B2 are used to determine the RS485 device serial port receiving idle interrupt status, and further determine the central node, and send information to the slave node or the central node in the ring network through the central node.
[0054] like Figures 4 to 7 As shown, in the embodiment of the utility model, the specific process of the communication program A1 is as follows: the sending buffer area of the RS485 device in the single-chip microcomputer MCU1 is filled with data, and then it is determined whether the single-chip microcomputer MCU1 is placed on ACP1. If it is ACP1, the RS485 device executes the forwarding data command and sends data to the single-chip microcomputer MCU1 in ACP2 through the serial port; if it is not ACP1, the RS485 device stores the sent data in its own receiving buffer area and does not execute the forwarding data command;
[0055] The specific process of communication program A2 is as follows: the sending buffer of the RS485 device in the single-chip microcomputer MCU2 is filled with data, and then it is determined whether the single-chip microcomputer MCU2 is placed on ACP3. If it is ACP3, the RS485 device stores the sending data in its own receiving buffer and does not execute the forwarding data command; if it is not ACP3, the single-chip microcomputer MCU2 in ACP1 sends data to the single-chip microcomputer MCU2 in ACP3 through the RS485 device serial port, and the single-chip microcomputer MCU2 in ACP2 sends data to the single-chip microcomputer MCU1 in ACP3 through the RS485 device serial port;
[0056] The specific process of the communication program B1 is as follows: determine whether the RS485 device serial port of the single-chip microcomputer MCU1 is in the receiving idle interrupt state. If it is verified that the serial port is not in the receiving idle interrupt state, program B1 is not executed; if it is verified that the serial port is in the receiving idle interrupt state, then determine whether the single-chip microcomputer MCU1 is placed on ACP1. If it is ACP1, the RS485 device stores the sent data in its own receiving buffer area and does not execute the forwarding data command; if it is not ACP1, determine whether the RS485 device sending buffer area is empty. If the RS485 device sending buffer area is empty, the RS485 device does not execute the forwarding data command; if the RS485 device sending buffer area is not empty, the RS485 device executes the forwarding data command, and sends data through the serial port, and the serial port receives data for parsing;
[0057] The specific process of communication program B2 is: determine whether the RS485 device serial port of the single-chip microcomputer MCU2 is in the receiving idle interrupt state. If it is verified that the serial port is not in the receiving idle interrupt state, program B2 will not be executed; if it is verified that the serial port is in the receiving idle interrupt state, then determine whether the single-chip microcomputer MCU2 is placed on ACP3. If it is not ACP3, the RS485 device will store the sent data in its own receiving buffer area and will not execute the forwarding data command; if it is ACP3, determine whether the RS485 device sending buffer area is empty. If the RS485 device sending buffer area is empty, the RS485 device will not execute the forwarding data command; if the RS485 device sending buffer area is not empty, the RS485 device will execute the forwarding data command, and send data through the serial port, and the serial port receives data for parsing.
[0058] Preferably, in the embodiment of the utility model, when the central node ACP1 fails, the ring network of the RS485 master-slave multi-center communication system will switch the central node to another central node ACP2, and communicate normally with the terminal communication equipment through the central node ACP2, thereby improving the reliability of the operation of the entire aircraft communication system.
[0059] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention.
[0060] It should be understood that the present invention is not limited to the above-described contents, and various modifications and changes can be made without departing from its scope. The scope of the present invention is limited only by the appended claims.
Claims
1. An RS485 master-slave multi-center communication system based on an intercom, characterized in that: The device comprises N machine communication devices, wherein N is an integer greater than or equal to 2, each of the machine communication devices comprises a plurality of single-chip microcomputers MCU, a plurality of transceiver controllers and a plurality of RS485 devices, each of the single-chip microcomputers MCU is connected to the RS485 device through the transceiver controller, and controls the RS485 device to execute instructions; Each of the machine communication devices is provided with a single-chip microcomputer MCU in a master mode and / or a single-chip microcomputer MCU in a slave mode. The single-chip microcomputer MCU in the master mode of any machine communication device is connected to the single-chip microcomputer MCU in the slave mode of other machine communication devices to form a ring network, and the single-chip microcomputer MCU in the master mode and the single-chip microcomputer MCU in the slave mode can switch modes at the same time. The ring network can enable information exchange between multiple machine communication devices; When the machine communication device contains at least one single-chip microcomputer MCU in master mode, the machine communication device is a central node, and the central node interacts with the terminal communication device, and the ring network enables free switching between multiple central nodes; when the machine communication device only contains a single-chip microcomputer MCU in slave mode, the machine communication device is a slave node.
2. The RS485 master-slave multi-center communication system based on the intercom according to claim 1 is characterized in that: There are three machine communication devices, and each machine communication device is provided with two single-chip microcomputers MCU, namely, single-chip microcomputer MCU1 and single-chip microcomputer MCU2.
3. The RS485 master-slave multi-center communication system based on the intercom according to claim 2 is characterized in that: When the single-chip microcomputer MCU is in the master mode, the transceiver controller is in the sending state, and when the single-chip microcomputer MCU is in the slave mode, the transceiver controller is in the receiving state.
4. The RS485 master-slave multi-center communication system based on the intercom according to claim 3 is characterized in that: The three machine communication devices are ACP1, ACP2 and ACP3, and the three machine communication devices are connected to form a ring network; The single-chip microcomputers MCU1 and MCU2 in the ACP1 are both in master mode, the single-chip microcomputer MCU1 in the ACP2 is in slave mode, the single-chip microcomputer MCU2 is in master mode, and the single-chip microcomputers MCU1 and MCU2 in the ACP3 are in slave mode; The specific process of connecting into the ring network is as follows: The single-chip microcomputer MCU1 in the master mode in the ACP1 is connected to the single-chip microcomputer MCU1 in the slave mode in the ACP2, the single-chip microcomputer MCU2 in the master mode in the ACP2 is connected to the single-chip microcomputer MCU1 in the slave mode in the ACP3, and the single-chip microcomputer MCU2 in the master mode in the ACP1 is connected to the single-chip microcomputer MCU2 in the slave mode in the ACP3.
