Communication control device, method, and unit of a machine group

By reconnecting the receive and transmit pins of the RS485 chip when the UART pins of the master control chip are limited, and by combining the RS485 chip without receive enable and pull-up and pull-down resistors, the problem that the communication module cannot directly listen to the slave data is solved, realizing data listening and control between the master and slave, and reducing communication costs.

CN113253652BActive Publication Date: 2026-03-20GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-21
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

In existing technologies, external communication modules can only enable communication between the master and slave devices or between the master and the communication module. They cannot directly monitor slave data or control the slave device, resulting in high communication costs.

Method used

By reconnecting the receive and transmit pins of the RS485 chip when the UART pins of the main control chip are limited, and combining the RS485 chip without receive enable with pull-up and pull-down resistors, data monitoring and control of the master and all slave devices can be achieved without increasing the number of UART pins of the main control chip.

Benefits of technology

This technology enables external communication modules to monitor and control data from the host and all slave devices without increasing communication costs, thereby improving the resource utilization of the main control chip and reducing the cost of product development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113253652B_ABST
    Figure CN113253652B_ABST
Patent Text Reader

Abstract

The application discloses a kind of communication control device, method and unit of unit, the device includes: first communication module, in the case where main control module controls slave, the operating state of host and slave is monitored;In the case where main control module does not control slave, sends second control instruction, controls host and slave, and the operating state of host and slave is monitored;Second communication module, in the case where main control module sends first control instruction, the first control instruction sent by main control module is anti-interference processing;In the case where first communication module sends second control instruction, the second control instruction sent by main control module is anti-interference processing.The scheme, by not needing to increase the UART pin of main control module, using current second communication module, so that first communication module can realize the data monitoring and control of host and all slaves, and communication cost is not increased.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of communication control, and particularly relates to a communication control device and method of a machine set and the machine set. BACKGROUND

[0002] The machine set refers to a group of machines, such as a compressor set, a refrigeration set, a generator set, etc., which is generally driven by a prime mover to compress a compressor and further includes an auxiliary set to form a system. For example, an air conditioning set can include a master machine and one or more slave machines.

[0003] When the machine set (such as an air conditioning set) is started, the externally connected communication module is required to control the running states of the master machine and all slave machines, and the running states of the master machine and the slave machines need to be monitored so as to control and understand the running states of the machine set by the user.

[0004] In the related scheme, the externally connected communication module is directly connected in parallel with the receiving pin and the sending pin of the RS485 chip (i.e., the receiving pin of the communication module is connected with the sending pin of the RS485 chip, and the sending pin of the communication module is connected with the receiving pin of the RS485 chip), and then connected with the UART (i.e., universal asynchronous receiver-transmitter) pin of the master control IC (i.e., master control chip, such as MCU), which can only realize the communication between the master machine and the slave machine, or can only realize the communication between the master machine and the communication module. The communication module cannot directly monitor the data of the slave machine and control the slave machine. In this case, in order to realize the monitoring of the data and the control of the machine set, it is necessary to increase the UART pin of the master control chip or increase the RS485 chip conversion, which inevitably increases the communication cost.

[0005] The above content is only used to assist in understanding the technical solutions of the present application and does not represent the acknowledgement of the above content as prior art. SUMMARY

[0006] The present application aims to provide a communication control device and method of a machine set and the machine set, so as to solve the problem that in the communication circuit between the master machine and the slave machine, the externally connected communication module is directly connected in parallel with the receiving pin and the sending pin of the RS485 chip, which can only realize the communication between the master machine and the slave machine or can only realize the communication between the master machine and the communication module, cannot directly monitor the data of the slave machine and control the slave machine, and in order to realize the monitoring of the data and the control of the machine set, it is necessary to increase the UART pin of the master control chip or increase the RS485 chip conversion, which exists the problem of high communication cost, so as to realize the effect that the externally connected communication module can monitor and control the data of the master machine and all slave machines without increasing the UART pin of the master control chip by using the current RS485 chip, and without increasing the communication cost.

[0007] The application provides a communication control device of a machine group, the machine group comprising a master and a slave; the master has a master control module; the communication control device of the machine group comprises a first communication module and a second communication module; wherein a sending pin of the first communication module is connected to a sending pin of the master control module; the sending pin is a communication interface for sending data; a receiving pin of the first communication module is connected to a receiving pin of the master control module; the receiving pin is a communication interface for receiving data; the second communication module is connected to the master control module; the master control module is configured to send a first control instruction to control the slave; the first communication module is configured to listen to the running state of the master and the slave when the master control module controls the slave; when the master control module does not control the slave, the first communication module sends a second control instruction to control the master and the slave and listens to the running state of the master and the slave; the second communication module is configured to perform anti-interference processing on the first control instruction sent by the master control module when the master control module sends the first control instruction; and perform anti-interference processing on the second control instruction sent by the second communication module when the first communication module sends the second control instruction.

[0008] In some embodiments, the number of slaves is more than one; when the number of slaves is one, the slave is connected to the master control module through the second communication module; when the number of slaves is more than two, if the distance between the slave and the master is within a set distance range, the slave is directly connected to the master control module or connected to the master control module through the second communication module; if the distance between the slave and the master is beyond the set distance range, the slave is connected to the master control module through the second communication module.

[0009] In some embodiments, when the slave is directly connected to the master control module, the transmitting pin of the slave is connected to the transmitting pin of the master control module; the receiving pin of the slave is connected to the receiving pin of the master control module; when the slave is connected to the master control module through the second communication module, the communication interface of the slave is connected to the differential signal interface of the second communication module; the transmitting pin of the second communication module is connected to the receiving pin of the master control module; the receiving pin of the second communication module is connected to the transmitting pin of the master control module; the transmitting pin of the first communication module is connected to the transmitting pin of the master control module; the receiving pin of the first communication module is connected to the receiving pin of the master control module; the transmitting pin of the master control module and the receiving pin of the master control module are connected to the first communication module and the second communication module respectively as a UART pin of the master control module.

[0010] In some embodiments, the first communication module comprises a control chip and a first communication interface; wherein the control chip is connected to the master control module through the first communication interface.

[0011] In some embodiments, the master control module comprises a master control chip and a second communication interface; wherein the master control chip is connected to the second communication module; the master control chip is connected to the first communication module through the second communication interface.

[0012] In some embodiments, the second communication module comprises an RS485 communication chip, a first pull-up module, a second pull-up module, a first pull-down module and a second pull-down module; the RS485 communication chip is a RS485 chip without receiving enable; wherein the R pin of the RS485 chip is connected to a direct current power supply through the first pull-up module and is also connected to the receiving pin of the master control module; the INV pin of the RS485 chip is connected to the ground through the first pull-down module and is also connected to the INV pin of the master control module; the DE pin of the RS485 chip is connected to the ground through the second pull-down module and is also connected to the DE pin of the master control module; the D pin of the RS485 chip is connected to a direct current power supply through the second pull-up module and is also connected to the transmitting pin of the master control module.

[0013] In some embodiments, the first communication module controls the master and the slave and monitors the running state of the master and the slave, including: in the case of being sent by the first communication module and received by the master control module, if the level of the second control instruction sent by the first communication module is a first set level, the D pin of the RS485 chip is the first set level; the second control instruction is processed by the RS485 chip and is received by the master control module and the first communication module from the R pin of the RS485 chip, realizing the control of the master and the slave and the monitoring of the running state of the master and the slave; the first set level is a high level or a low level.

[0014] In some embodiments, the first communication module monitors the running state of the master and the slave, and further includes: in the case of being received by the first communication module and sent by the master control module, if the first control instruction sent by the master control module is a first set level, the D pin of the RS485 chip is the first set level; the signal of the first set level obtained after the first control instruction is processed by the RS485 chip is received by the master control module and the first communication module respectively, realizing the monitoring of the running state of the master and the slave.

[0015] In order to match the above device, the application further provides a machine group, which comprises the communication control device of the machine group.

[0016] In order to match the above machine group, the application further provides a communication control method of a machine group, which comprises: when the master calls the slave, the master is controlled to open the transmission enable; when the slave responds, the transmission enable of the master is pulled down, the RS485 chip in the second communication module enters a receiving state, and after the slave receives the slave calling data sent by the master, the slave responds to the master in the stage of pulling down the transmission enable of the RS485 chip.

[0017] In some embodiments, it further includes: in the case of accessing a new slave, the new slave is directly connected to the master control module of the master, after the master calls the new slave, the new slave enters the stage of responding to the new slave calling data sent by the master, the transmission enable of the RS485 chip is pulled up, and the signals of the receiving pin and the transmission pin of the RS485 chip are kept consistent; the response signal of the new slave is transmitted to the receiving pin in the UART pin of the master, so that the master performs a reading operation.

[0018] In some embodiments, further comprising: in the case that the slave accesses the second communication module, the UART line of the host is configured as a floating input and an open drain output.

[0019] Thus, the scheme of the present application, by connecting the receiving pin of the RS485 chip with the sending pin of the externally connected communication module and the sending pin of the host control chip respectively under the condition that the UART pin of the host control chip is limited, and connecting the sending pin of the RS485 chip with the sending pin of the externally connected communication module and the sending pin of the host control chip respectively, so that the externally connected communication module can monitor and control the data of the host and all slaves, thereby, by not increasing the UART pin of the host control chip, the externally connected communication module can realize the data monitoring and control of the host and all slaves by using the current RS485 chip, and the communication cost is not increased.

[0020] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent to those skilled in the art from the description, or can be learned by practice of the present application.

[0021] The technical scheme of the present application will be further described in detail below with the help of the accompanying drawings and embodiments. BRIEF DESCRIPTION OF DRAWINGS

[0022] Figure 1 Structure schematic view of an embodiment of the communication control device of the present application;

[0023] Figure 2 Structure schematic view of an embodiment of the communication circuit for multi-way monitoring and control;

[0024] Figure 3 Communication waveform schematic view of the RS485 chip;

[0025] Figure 4 Structure schematic view of the communication module when sending data;

[0026] Figure 5 Structure schematic view of the communication module when receiving data.

[0027] In combination with the accompanying drawings, the reference signs in the embodiments of the present application are as follows:

[0028] 1-slave; 2-RS485 chip (i.e. RS485 communication chip); 3-host control chip of the host (such as the MCU of the host); 4-main controller module of the communication module; 5-main control chip of the communication module (i.e. control chip IC2 of the slave); 6-host main controller. DETAILED DESCRIPTION

[0029] In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be described below in connection with the specific embodiments of the present application and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0030] According to the embodiments of the present application, a communication control device of a machine group is provided. Referring to Figure 1 The device of the present application is shown in a structural schematic diagram of an embodiment. The machine group comprises a master and a slave. The master has a master control module, such as a master control chip MCU 3 of the master and a communication interface (COM-PC) of the master. The communication control device of the machine group comprises a first communication module and a second communication module. The first communication module is, for example, a master controller module 4 of the communication module. The second communication module is, for example, a 485 communication circuit composed of an RS485 chip 2, an upper pull resistor module and a lower pull resistor module.

[0031] The sending pin of the first communication module is connected to the sending pin of the master control module. The sending pin is a communication interface for sending data.

[0032] The receiving pin of the first communication module is connected to the receiving pin of the master control module. The receiving pin is a communication interface for receiving data.

[0033] The second communication module is connected to the master control module.

[0034] The master control module is configured to send a first control instruction to control the slave.

[0035] The first communication module is configured to listen to the running states of the master and the slave when the master control module controls the slave. When the master control module does not control the slave, the first communication module sends a second control instruction to control the master and the slave and listens to the running states of the master and the slave.

[0036] The second communication module is configured to perform anti-interference processing on the first control instruction sent by the master control module when the master control module sends the first control instruction. When the first communication module sends the second control instruction, the second communication module performs anti-interference processing on the second control instruction sent by the second communication module.

[0037] Thus, by using the current second communication module without increasing the UART pin of the main control module, the first communication module can realize data monitoring and control of the host and all slaves, and the communication cost is not increased. Specifically, by using the existing 485 communication circuit (i.e. the communication circuit of the RS485 chip) under the condition that the UART pin of the host control chip is limited, a certain or multiple slaves do not need to additionally increase the 485 communication circuit, and the data monitoring and control of all groups can be realized, so that the data of the host and all slaves can be monitored and controlled through the external communication module. Through the operation mode of the host, the condition that the UART pin of the host control chip is insufficient when the data monitoring and control of the host and multiple slaves need to be realized is solved, the resource utilization rate of the host control chip is improved, and the cost of developing products is reduced.

[0038] In some embodiments, the number of slaves is more than one.

[0039] When the number of slaves is one, the slave is connected to the main control module through the second communication module.

[0040] When the number of slaves is more than two, if the distance between the slave and the host is within a set distance range, the slave can be directly connected to the main control module or connected to the main control module through the second communication module. If the distance between the slave and the host is outside the set distance range, the slave needs to be connected to the main control module through the second communication module.

[0041] Thus, by using the existing 485 communication circuit (i.e. the communication circuit of the RS485 chip) under the condition that the UART pin of the host control chip is limited, the data of the host and all slaves can be monitored and controlled, and the RS485 chip can be used to resist interference at the remote end while the near end directly communicates through the serial port, so that the near end can communicate without increasing the RS485 chip. The near end refers to the distance between the slave and the host within a set distance, such as 1 meter. The remote end refers to the distance between the slave and the host outside a set distance, such as 1 meter.

[0042] In some embodiments, when the slave is directly connected to the main control module, the transmission pin of the slave is connected to the transmission pin of the main control module, and the receiving pin of the slave is connected to the receiving pin of the main control module.

[0043] In the case that the slave machine is connected to the master control module through the second communication module, the communication interface of the slave machine is connected to the differential signal interface (such as the A pin and the B pin of the RS485 chip) of the second communication module. The transmitting pin of the second communication module is connected to the receiving pin of the master control module. The receiving pin of the second communication module is connected to the transmitting pin of the master control module; the transmitting pin of the first communication module is connected to the transmitting pin of the master control module; and the receiving pin of the first communication module is connected to the receiving pin of the master control module. The transmitting pin of the master control module and the receiving pin of the master control module are connected to the first communication module and the second communication module, respectively, as a UART pin of the master control module.

[0044] Thus, when the host machine is used to listen to and control the slave machine through a UART pin (such as the RXD pin and the TXD pin of the host machine control chip 3) of the host machine control chip, the listening and control between the slave machine and the slave machine are simultaneously achieved, and the utilization rate of the UART pin of the host machine control chip is improved.

[0045] In some embodiments, the first communication module comprises a control chip and a first communication interface. The control chip is, for example, a chip IC2. The first communication interface is, for example, a communication module controller module (CN3) 4.

[0046] The control chip is connected to the master control module through the first communication interface.

[0047] In some embodiments, the master control module comprises a host control chip and a second communication interface. The host control chip is, for example, a MCU 3. The second communication interface is, for example, a communication interface (COM-PC) of the host machine.

[0048] The host control chip is connected to the second communication module. The host control chip is connected to the first communication module through the second communication interface.

[0049] In some embodiments, the second communication module comprises an RS485 communication chip, a first pull-up module (such as a pull-up resistor R68), a second pull-up module (such as a pull-up resistor R69), and a first pull-down module (such as a pull-down resistor R76) and a second pull-down module (such as a pull-down resistor R70). The RS485 communication chip is a RS485 chip without receiving enable.

[0050] The R pin of the RS485 chip is connected to the receiving pin of the master control module through the first pull-up module and a direct current power supply.

[0051] The INV pin of the RS485 chip is connected to the INV pin of the main control module through the first pull-down module and then grounded.

[0052] The DE pin of the RS485 chip is connected to the DE pin of the main control module through the second pull-down module and then grounded.

[0053] The D pin of the RS485 chip is connected to the transmission pin of the main control module through the second pull-up module and then connected to the DC power supply.

[0054] For example, the RS485 communication circuit includes an RS485 chip (i.e., 485 communication chip U8), pull-up resistor R68, pull-up resistor R69, pull-down resistor R76, and pull-down resistor R70. The pull-up resistor R68 and the pull-up resistor R69 are respectively connected to the 1 pin and the 4 pin of the RS485 chip, and the signal is pulled up to a high level in the circuit. The pull-down resistor R76 and the pull-down resistor R70 are respectively connected to the 2 pin and the 3 pin of the RS485 chip, and the signal is pulled down to a low level in the circuit.

[0055] Two main control chips (such as the main control chip 3 of the host and the control chip IC2 of the slave) simultaneously control the transmission and reception of a RS485 chip: the receiving pin of the RS485 chip 2 is respectively connected to the receiving pin of the communication module and the main MCU (i.e., the main control chip 3). The transmission pin of the RS485 chip 2 is respectively connected to the transmission pin of the communication module and the main MCU. The receiving pin and the transmission pin of the RS485 chip 2 are used for receiving and transmitting data, and simultaneously realize signal conversion. The pull-up resistor R68 and the pull-up resistor R69 are respectively connected to the 1 pin and the 4 pin of the RS485 chip, and the signal is pulled up to a high level in the communication circuit. The pull-down resistor R76 and the pull-down resistor R70 are respectively connected to the 2 pin and the 3 pin of the RS485 chip 2, and the signal is pulled down to a low level in the communication circuit.

[0056] Therefore, by using a RS485 chip without receiving enable, changing the wiring order of the receiving pin and the transmission pin, utilizing the characteristics of the RS485 chip, and cooperating with the host timing change, the host can communicate with the remote slave containing the RS485 chip through one UART pin, and the slave with the communication circuit without the RS485 chip can also realize communication, thereby improving the utilization rate of the UART pin of the main control chip and the selectivity of the 485 communication circuit whether the slave needs anti-interference.

[0057] In some embodiments, the first communication module controls the host and the slave and monitors the running state of the host and the slave, including: in the case of being sent by the first communication module and being received by the host control module, if the level of the second control instruction sent by the first communication module is a first set level, the D pin of the RS485 chip is the first set level. The second control instruction is processed by the RS485 chip and is received by the host control module and the first communication module from the R pin of the RS485 chip, so as to control the host and the slave and monitor the running state of the host and the slave. The first set level is a high level or a low level.

[0058] Specifically, the communication module sends and the control chip MCU (i.e. the host control chip 3 of the host) receives: the communication module sends data, when the data sent by the communication module is a high level (or a low level), the D pin of the RS485 chip is a high level (or a low level), the high level (or low level) signal is input from the D pin of the RS485 chip, the high level (or low level) signal is output from the R pin of the RS485 chip after being converted by the RS485 chip, and the high level (or low level) signal is respectively received by the MCU and the receiving pin of the IC2, so as to control and monitor the sent data at the same time.

[0059] In some embodiments, the first communication module monitors the running state of the host and the slave, and further includes: in the case of being received by the first communication module and being sent by the host control module, if the first control instruction sent by the host control module is a first set level, the D pin of the RS485 chip is the first set level. The signal of the first set level obtained after the first control instruction is processed by the RS485 chip is respectively received by the host control module and the first communication module, so as to monitor the running state of the host and the slave.

[0060] Specifically, the communication module receives and the host control chip MCU (i.e. the host control chip 3 of the host) sends: when the MCU sends data in the circuit, the input voltage of the D pin of the RS485 chip is also a high level (or a low level) when the MCU sends pin outputs a high level (or a low level), and the high level (or low level) signal is converted by the RS485 chip, and the high level (or low level) signal is respectively received by the host MCU and the communication module. The communication module realizes data monitoring.

[0061] Through a large number of experiment verifications, by adopting the technical scheme of the application, under the condition of limited UART pins of the main control chip, the receiving pins of the RS485 chip are connected with the sending pins of the external communication module and the sending pins of the main control chip respectively, and the sending pins of the RS485 chip are connected with the sending pins of the external communication module and the sending pins of the main control chip respectively, so that the external communication module can monitor and control the data of the host and all slaves, thereby, by using the current RS485 chip without increasing the UART pins of the main control chip, the external communication module can realize the data monitoring and control of the host and all slaves, and the communication cost is not increased.

[0062] According to the embodiments of the application, a machine group corresponding to the communication control device of the machine group is also provided. The machine group can include the communication control device of the machine group described above.

[0063] In the related scheme, the external communication module refers to some modules for human-computer interaction, such as WIFI (a wireless local area network technology created based on IEEE 802.11 standard) module and the like. The communication module is used to control the running state of the host and all slaves, and to monitor the running state of the host and slaves, including: realizing the control and information interaction through the 485 communication mode. The control of the running state of the host and all slaves is to send a command to the machine group that wants to be operated, to realize the change of the running state mode of the machine group. The monitoring of the running state of the host and slaves is to collect the data of the running state of the machine group, so as to realize the storage and analysis of the data. The running state refers to the mode of the machine group, for example, the refrigeration, heating and air supply of the air conditioner.

[0064] Considering the connection mode of the communication module and the RS485 chip in the related scheme, in order to realize the control and monitoring, it is necessary to increase the UART pins of the main control chip or increase the RS485 chip conversion, so as to realize the monitoring of the data and the control of the machine group. However, increasing the UART pins of the main control chip or increasing the RS485 chip conversion will increase the product cost and the complexity of software processing.

[0065] Wherein, since the UART pins of the master chip are integrated in the master chip, increasing the UART pins of the master chip requires replacing the master chip with more UART pins. Corresponding to the communication information of each UART pin, the master chip receives and processes the communication information and then forwards the communication information to the external device connected with other UART pins. For example, in order to realize monitoring of the host data and all slave data, the UART pins of the master chip need to be increased so that the communication module and the RS485 chip are connected to the UART pins of the master chip respectively, data processing and conversion are realized through the master chip, slave state information is sent to the communication module, and data monitoring is completed.

[0066] UART communication is normal cross communication of A pin and B pin, that is, A pin transmits and B pin receives, and B pin transmits and A pin receives. If C pin is added, all communication of A pin, B pin and C pin cannot be realized, for example, if AB and AC can communicate, BC cannot communicate. RS485 communication is signal communication on the 485 bus after the UART signal is converted through the RS485 chip. This communication can also communicate without crossing. In addition, the communication corresponding to the transmission or reception of each slave needs a RS485 chip to convert into 485 communication, which is high in cost.

[0067] In addition, if the above method is used, the processing method is to first collect all the returned data of the slaves, then process the data internally through the master chip, and then send the collected data to the monitoring communication device module after the data is interpreted by software, and then to the machine group device, which increases the complexity of software processing.

[0068] It can be seen that, in the related scheme, the connection mode of the communication module and the RS485 chip can only realize single data transmission and control between the host and the slave or between the host and the communication module in the case of sharing one RS485 chip, and cannot realize direct control of the communication module on the slave operation and direct monitoring of the data information in the slave operation process without conversion through the RS485 chip.

[0069] In some embodiments, the scheme of the present application provides a multi-way monitoring and control communication circuit, which can monitor and control the data of the host and all slaves through an external communication module. The scheme solves the problem of monitoring all data of the host and the slave and controlling the host and the slave in the case of limited UART pins of the master chip, realizes remote anti-interference through the RS485 chip while near-end direct serial communication in a single UART pin, and enables the near-end to communicate without increasing the RS485 chip. Wherein, the near-end refers to a distance between the slave and the host within a set distance, such as 1 meter. The remote end refers to a distance between the slave and the host outside a set distance, such as 1 meter.

[0070] In the scheme of the present application, in the case of limited UART pins of the master chip, in the existing 485 communication circuit (i.e. the communication circuit of the RS485 chip), without additional increase of the 485 communication circuit of the slave, the data monitoring and control of all the machine groups can be realized. Through the operation mode of the host, the case of insufficient UART pins of the master chip when the data monitoring and control of the host and multiple slaves need to be realized is solved, the resource utilization rate of the master chip is improved, and the cost of developing products is reduced.

[0071] In the scheme of the present application, when one UART pin (such as the RXD pin and the TXD pin of the master control chip 3 of the host) of the master control chip of the host is used to monitor and control the slave, the monitoring and control between the slave and the slave are realized synchronously. Moreover, by using the RS485 chip without receiving enable, the wiring order of the receiving pin and the sending pin is changed, the characteristics of the RS485 chip are utilized, and the timing of the host is changed to realize that when the host communicates with the remote slave containing the RS485 chip through one UART pin, the communication with the slave of the communication circuit without the RS485 chip in the near end is realized synchronously, the utilization rate of the UART pin of the master control chip is improved, and the selectivity of whether the slave needs the anti-interference 485 communication circuit is improved.

[0072] The specific implementation process of the scheme of the present application will be exemplarily described below in combination with the examples shown in the accompanying drawings. Figures 2 to 5

[0073] Figure 2 The structure diagram of one embodiment of the multi-way monitoring and control communication circuit is shown in FIG. 1. As shown in FIG. 1, the multi-way monitoring and control communication circuit comprises a slave 1, a host master controller 6, and a master controller module (CN3) 4 of a communication module. The number of the slaves 1 connected with the RS485 chip 2 can be multiple. Figure 2

[0074] ​​In the host main controller 6, there are: RS485 chip 2 (i.e. chip U8) and its peripheral circuit, the host's communication interface (COM-PC), the host's main control chip (such as main MCU) 3. The peripheral circuit of RS485 chip 2 includes: pull-up resistor R68 and pull-up resistor R69, pull-down resistor R76 and pull-down resistor R70. In the communication module's main controller module 4, there are the communication module's main control chip 5 (i.e. the slave's control chip IC2) and the communication module's communication interface (CN3). The RS485 communication circuit includes: RS485 chip (i.e. 485 communication chip U8), pull-up resistor R68, pull-up resistor R69, pull-down resistor R76, pull-down resistor R70, pull-up resistor R68 and pull-up resistor R69 are connected with the 1 pin and the 4 pin of RS485 chip respectively, and the signal is pulled up to high level in the circuit; pull-down resistor R76 and pull-down resistor R70 are connected with the 2 pin and the 3 pin of RS485 chip respectively, and the signal is pulled down to low level in the circuit.

[0075] Pins A and B of slave device 1 are connected to pins 6 and 7 of RS485 chip 2, respectively. Pin 8 of RS485 chip 2 is connected to the DC power supply VCC, pin 2 of RS485 chip 2 is grounded, pin 1 of RS485 chip 2 is connected to the DC power supply VCC via pull-up resistor R68, and pin 4 of RS485 chip 2 is connected to the DC power supply VCC via pull-up resistor R69. Pin 2 of RS485 chip 2 is grounded via pull-down resistor R76, and pin 3 of RS485 chip 2 is grounded via pull-down resistor R70. Pin 1 of RS485 chip 2 is also connected to the RXD pin (data receive pin) of the host's master control chip 3, pin 2 of RS485 chip 2 is also connected to the INV pin (level toggle pin) of the host's master control chip 3, pin 3 of RS485 chip 2 is also connected to the DE pin (driver output enable pin) of the host's master control chip 3, and pin 4 of RS485 chip 2 is also connected to the TXD pin (data transmit pin) of the host's master control chip 3. Pin 1 of RS485 chip 2 is also connected to terminal 2 of the host's communication interface (COM-PC), and pin 4 of RS485 chip 2 is also connected to terminal 3 of the host's communication interface (COM-PC). Terminal 1 of the host's communication interface (COM-PC) is grounded, and terminal 4 of the host's communication interface (COM-PC) is connected to the DC power supply VCC. Terminal 1 of the host's communication interface (COM-PC) is connected to terminal 1 of the communication module's communication interface (CN3); terminal 2 of the host's communication interface (COM-PC) is connected to terminal 2 of the communication module's communication interface (CN3); terminal 3 of the host's communication interface (COM-PC) is connected to terminal 3 of the communication module's communication interface (CN3); and terminal 4 of the host's communication interface (COM-PC) is connected to terminal 4 of the communication module's communication interface (CN3). The second terminal of the communication interface (CN3) of the communication module is connected to the JRXD pin (receive pin) of the main control chip 5 of the communication module; the third terminal of the communication interface (CN3) of the communication module is connected to the JTXD pin (transmit pin) of the main control chip 5 of the communication module.

[0076] exist Figure 2 In the example shown, two master control chips (such as the master control chip 3 of the host and the control chip IC2 of the slave) simultaneously control the transmission and reception of one RS485 chip:

[0077] The receive pins of RS485 chip 2 are connected to the receive pins of the communication module and the main MCU (i.e., main control chip 3), respectively; the transmit pins of RS485 chip 2 are also connected to the transmit pins of the communication module and the main MCU, respectively. The receive and transmit pins of RS485 chip 2 are used to receive and transmit data, and simultaneously perform signal conversion. Pull-up resistors R68 and R69 are connected to pins 1 and 4 of the RS485 chip, respectively, to pull the signal to a high level in the communication circuit; pull-down resistors R76 and R70 are connected to pins 2 and 3 of the RS485 chip 2, respectively, to pull the signal to a low level in the communication circuit.

[0078] Figure 3 This is a schematic diagram of the communication waveforms of the RS485 chip. The R pin (RO pin) of RS485 chip 2 is the output pin of the receiver, and the D pin (DI pin) of RS485 chip 2 is the input pin of the driver. When connected to a microcontroller, it only needs to be connected to the RXD and TXD pins of the microcontroller respectively. The DE pin of RS485 chip 2 is the enable pin for the driver to transmit. When the DE pin is logic 1, the device is in the transmitting state. The A pin and B pin of RS485 chip 2 are the differential signal terminals for receiving and transmitting, respectively. When the level of pin A is higher than the level of pin B, it represents that the transmitted data is 1; when the level of pin A is lower than the level of pin B, it represents that the transmitted data is 0.

[0079] Figure 4 A schematic diagram of the structure when the communication module sends data. (Example) Figure 4 As shown, the communication module sends data, which is then received by the control chip MCU (i.e., the main control chip 3 of the host computer).

[0080] The communication module sends data. When the data sent by the communication module is high level (or low level), the RS485 chip pin D is high level (or low level). The high level (or low level) signal is input from the RS485 chip pin D. After being converted by the RS485 chip, the high level (or low level) signal is output from the RS485 chip read terminal R. The high level (or low level) signal is received by the MCU and IC2 receive pins respectively, realizing control while monitoring the sent data.

[0081] Figure 5 This is a schematic diagram of the structure when the communication module receives data. (Example:) Figure 5 As shown, the communication module receives data, and the host control chip MCU (i.e., the host's main control chip 3) sends data:

[0082] When the MCU in the circuit sends data, the MCU sends a high (or low) level signal, and the input voltage at the D pin of the RS485 chip is also high (or low). After conversion by the RS485 chip, the high (or low) level signal will be received by the master MCU and the communication module, respectively. The communication module realizes data monitoring.

[0083] In the examples shown in FIGS. 1 to 3, A is 485 bus data A; B is 485 bus data B; R is the receiving pin of 485; INV is the level inversion pin; DE is the 485 data transmission enable pin; and D is the 485 data transmission pin. Figure 4 Figure 5 In the examples shown in FIGS. 1 to 3, A is 485 bus data A; B is 485 bus data B; R is the receiving pin of 485; INV is the level inversion pin; DE is the 485 data transmission enable pin; and D is the 485 data transmission pin.

[0084] In the above embodiment, the multi-way monitoring and control communication circuit can be used for a controller with a chip supply voltage of 3.3V (or 5V), a communication detection board with a detection board power input voltage of 12V (or 5V), or a communication detection board with a chip supply voltage of 3.3V (or 5V). When an upper pull resistor needs to be connected in the line, the power voltage of the upper pull resistor should be consistent with the power of the MCU.

[0085] In the above embodiment, the slave 1 and the circuit connected with the communication RS485 chip 2 are adjusted according to the actual use, and the circuit can be designed by itself to meet the requirements of 485 communication.

[0086] In some embodiments, the overall implementation of the scheme of the present application is as follows:

[0087] In normal communication, the master host points to the slave data, and the master host TX (i.e., the data transmission pin) points to the slave data. When the slave is called, the master host control is turned on to send the enable signal, and the called data is in the enable signal envelope. When the slave replies, the master host sends the enable signal to be low, and the RS485 chip enters the receiving state. At this time, after the slave receives the master host data, the slave replies to the master host data in the low phase of the transmission enable of the RS485 chip.

[0088] When a new slave is connected, the slave does not need to resist interference of the 485 communication circuit, and the communication circuit is as shown in FIG. 4. Figure 2 ​The example shown, the communication module of the host chip 5 is directly connected in the host and 485 communication circuit, at this time the slave TX does not connect the host RX (i.e. data receiving pin), and the TX is connected to the TX, RX is connected to the RX. At this time, when communicating with the slave containing the 485 communication circuit, the host naming step is normal as described above, when the slave without RS485 chip communicates with the host, the host enters the response stage after naming the slave, at this time, the RS485 chip still keeps the transmission enable high, and when the RS485 chip transmission enable is pulled high, the signals of the RX end and the TX end of the RS485 chip remain consistent. The reply signal of the slave can be transmitted through the special nature of the RS485 chip (i.e. when the transmission enable of the RS485 chip is pulled high, the signals of the RX end and the TX end of the RS485 chip remain consistent), so that the reply signal of the slave on the TX line is synchronized to the reply signal on the RX line. At this time, the reply signal of the slave can be transmitted to the RX of the host UART, at this time, the host can be configured to read, and the communication timing is as shown in the example. Figure 3 The example shown. And here, both types of slaves (i.e. slaves with RS485 chips and slaves without RS485 chips) can be accumulated, and by adjusting the host communication timing, new slave communication can be achieved.

[0089] Here, the accumulation refers to the number of slaves, i.e. slaves without RS485 chips. Because when the RS485 chip is writing enabled, i.e. the DE chip select signal is pulled high, the data on the RX will be consistent with the data on the TX. At this time, by using this feature, when the host names the slave without RS485 chip, the DE chip select signal is normally pulled high to write enable, and when the slave replies, special operation is performed, i.e. the DE write enable is pulled high, so that the data on the RX line of the slave without RS485 chip (here, because the RS485 chip is normally connected to the MCU, i.e. RX is connected to TX, TX is connected to RX, but the slave without RS485 chip is connected in reverse, i.e. RX is connected to RX, TX is connected to TX, these slaves are in the same communication network, so the RX of the slave with RS485 chip and the slave without RS485 chip is connected to TX, and the TX is connected to RX) is synchronized to the RX of the RS485 chip through the write enable of the RS485 chip, i.e. the reply signal is synchronized to the read, and the network of the two lines of write, so that the host MCU can read the TX signal of the slave without RS485 chip when the RX of the slave without RS485 chip is connected to RX.

[0090] And after the slave access communication circuit, there is no protection signal pull-up and pull-down resistance, prevent damage to the communication data, normal and RS485 chip communication, UART line reading is pull-up input, push-pull output, at this time, in order to ensure the communication characteristics, configured as suspended input, open drain output. For example: according to the write enable of RS485 chip, the data received by the RX data terminal of 485 chip is synchronized to the TX terminal of 485 chip. The read of UART line is configured as suspended input, open drain output.

[0091] Since the processing and functions realized by the unit of the embodiment are basically corresponding to the embodiments, principles and examples of the device shown in the foregoing Figure 1 The description of the embodiment does not describe the related description in the foregoing embodiments, which is not described here.

[0092] Through a large number of test verifications, by using the technical scheme of the application, under the condition that the UART pin of the master control chip is limited, the receiving pin of the RS485 chip is connected with the sending pin of the external communication module and the sending pin of the master control chip respectively, and the sending pin of the RS485 chip is connected with the sending pin of the external communication module and the sending pin of the master control chip respectively, so that the external communication module can monitor and control the data of the host and all slaves, the host and multiple slaves can be monitored and controlled, and under the condition that the UART pin of the master control chip is insufficient, the resource utilization rate of the master control chip is improved, and the cost of developing products is reduced.

[0093] According to the embodiment of the application, a communication control method of a unit corresponding to the unit is also provided. The communication control method of the unit can include: when the host calls the slave, the host is controlled to open the sending enable; when the slave replies, the sending enable of the host is pulled down, the RS485 chip in the second communication module enters a receiving state, and after the slave receives the slave calling data sent by the host, the slave replies to the host in the stage of pulling down the sending enable of the RS485 chip.

[0094] Specifically, in normal communication, when the host calls, the host end TX (i.e. data sending pin) calls the slave data, when calling the slave, the host end control opens the sending enable, so that the calling data is in the enable signal envelope; when the slave replies, the host sending enable signal is pulled down, the RS485 chip enters a receiving state, at this time, after the slave receives the host data, the slave replies to the host data in the stage of pulling down the sending enable of the RS485 chip.

[0095] In some embodiments, further comprising: in the case of accessing a new slave, the new slave is directly connected to the master control module of the host, after the host finishes calling the new slave, the new slave enters a stage of responding to the new slave calling data sent by the host, the transmission enable of the RS485 chip is kept high, and the signals of the receiving pin and the transmission pin of the RS485 chip are kept consistent; the response signal of the new slave is transmitted to the receiving pin in the UART pin of the host, so that the host performs a read operation.

[0096] Specifically, when a new slave is accessed, the slave does not need to resist interference of the 485 communication circuit, the master control chip 5 of the communication module is directly connected in the host and the 485 communication circuit, at this time, the TX of the slave is not connected to the RX (i.e. the data receiving pin) of the host, but the TX is connected to the TX and the RX is connected to the RX. At this time, when communicating with the slave containing the 485 communication circuit, the host calling step is normal as described above, when the slave without the RS485 chip communicates with the host, after the host finishes calling the slave, the slave enters a responding stage, at this time, the transmission enable of the RS485 chip is still kept high, and when the transmission enable of the RS485 chip is high, the signals of the RX end and the TX end of the RS485 chip are kept consistent. The response signal of the slave can be transmitted to the RX of the host UART through the particularity of the RS485 chip (i.e. when the transmission enable of the RS485 chip is high, the signals of the RX end and the TX end of the RS485 chip are kept consistent), so that the response signal of the slave on the TX line is synchronized to the response signal on the RX line. At this time, the response signal of the slave can be transmitted to the RX of the host UART, at this time, the host can be configured to perform a read operation. And here, the two types of slaves (i.e. the slave with the RS485 chip and the slave without the RS485 chip) can be accumulated, and only the communication timing of the host needs to be adjusted to achieve the communication of the new slave.

[0097] In some embodiments, further comprising: in the case of the slave accessing the second communication module, the UART line of the host is configured as a suspended input and an open drain output.

[0098] Specifically, after the slave accesses the communication circuit, there is no pull-up and pull-down resistance of the protection signal to prevent damage to the communication data, when normally communicating with the RS485 chip, the read of the UART line is a pull-up input and a push-pull output, at this time, in order to ensure the communication characteristics, it is configured as a suspended input and an open drain output.

[0099] Since the processing and functions realized by the method of the embodiment are basically corresponding to the foregoing embodiments, principles and examples of the machine set, the description of the embodiment is not described in detail, and the related description in the foregoing embodiments can be referred to, which is not described herein.

[0100] Through a large number of experiment verifications, by adopting the technical scheme of the embodiment, under the condition of limited UART pins of the main control chip, the receiving pins of the RS485 chip are connected with the sending pins of the external communication module and the sending pins of the main control chip respectively, and the sending pins of the RS485 chip are connected with the sending pins of the external communication module and the sending pins of the main control chip respectively, so that the external communication module can monitor and control the data of the host and all slaves, when the host communicates with the remote slave containing the RS485 chip through one UART pin, the communication with the slave of the near end communication circuit without the RS485 chip is realized synchronously, the utilization rate of the chip UART pin is improved, and the selectivity of whether the slave needs the anti-interference 485 communication circuit is improved.

[0101] In conclusion, those skilled in the art can easily understand that the above-mentioned advantageous modes can be freely combined and superimposed without conflict.

[0102] The above only describes the embodiments of the present application and is not used to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of claims of the present application.

Claims

1. A communication control device for a generator unit, characterized in that, The generator set includes: a master unit and a slave unit; the master unit has a master control module; the communication control device of the generator set includes: a first communication module and a second communication module; wherein, The transmit pin of the first communication module is connected to the transmit pin of the main control module; the transmit pin is a communication interface used for transmitting data. The receiving pin of the first communication module is connected to the receiving pin of the main control module; the receiving pin is a communication interface for receiving data. The second communication module is connected to the main control module; The main control module is configured to send a first control command to control the slave device; The first communication module is configured to monitor the operating status of the host and the slave when the master control module controls the slave; and to send a second control command to control the host and the slave and monitor the operating status of the host and the slave when the master control module does not control the slave. The second communication module is configured to perform anti-interference processing on the first control command sent by the main control module when the main control module sends the first control command; and to perform anti-interference processing on the second control command sent by the second communication module when the first communication module sends the second control command; the main control module includes a main control chip; the second communication module includes an RS485 chip; By connecting the receive pins of the RS485 chip to the transmit pins of the first communication module and the main control chip respectively, and connecting the transmit pins of the RS485 chip to the transmit pins of the first communication module and the main control chip respectively, the first communication module can monitor and control the data of the master and all slaves without increasing the number of UART pins of the main control chip, and by utilizing the existing RS485 chip, the first communication module can monitor and control the data of the master and all slaves without increasing the communication cost.

2. The communication control device for the unit according to claim 1, characterized in that, The number of slave devices is one or more; When there is only one slave device, the slave device is connected to the main control module via the second communication module; When there are two or more slave devices, if the distance between the slave device and the master device is within a set distance range, the slave device is directly connected to the master control module or connected to the master control module through the second communication module; if the distance between the slave device and the master device is outside the set distance range, the slave device is connected to the master control module through the second communication module.

3. The communication control device for the unit according to claim 2, characterized in that, in, When the slave device is directly connected to the master control module, the slave device's transmit pin is connected to the master control module's transmit pin; the slave device's receive pin is connected to the master control module's receive pin. When the slave device is connected to the master control module via the second communication module, the slave device's communication interface is connected to the differential signal interface of the second communication module; the transmit pin of the second communication module is connected to the receive pin of the master control module; the receive pin of the second communication module is connected to the transmit pin of the master control module; the transmit pin of the first communication module is connected to the transmit pin of the master control module; the receive pin of the first communication module is connected to the receive pin of the master control module; the transmit pin and the receive pin of the master control module serve as one UART pin of the master control module, respectively connected to the first communication module and the second communication module.

4. The communication control device for the unit according to any one of claims 1 to 3, characterized in that, The first communication module includes: a control chip and a first communication interface; wherein, The control chip is connected to the main control module through the first communication interface.

5. The communication control device for the unit according to any one of claims 1 to 3, characterized in that, The main control module includes: a main control chip and a second communication interface; wherein, The main control chip is connected to the second communication module; the main control chip is connected to the first communication module through the second communication interface.

6. The communication control device for the unit according to any one of claims 1 to 3, characterized in that, The second communication module includes: an RS485 communication chip, a first pull-up module, a second pull-up module, a first pull-down module, and a second pull-down module; the RS485 communication chip is an RS485 chip without receive enable; wherein, The R pin of the RS485 chip is connected to a DC power supply via the first pull-up module and is also connected to the receive pin of the main control module. The INV pin of the RS485 chip is grounded after passing through the first pull-down module and is also connected to the INV pin of the main control module. The DE pin of the RS485 chip is grounded after passing through the second pull-down module, and is also connected to the DE pin of the main control module; The D pin of the RS485 chip is connected to a DC power supply via the second pull-up module and is also connected to the transmit pin of the main control module.

7. The communication control device for the unit according to claim 6, characterized in that, The first communication module controls the host and the slave device, and monitors the operating status of the host and the slave device, including: When the second control command sent by the first communication module and received by the main control module is at a first set level, the D pin of the RS485 chip is at the first set level. After the second control command is processed by the RS485 chip, it is received by the main control module and the first communication module from the R pin of the RS485 chip, thereby controlling the host and the slave and monitoring the operating status of the host and the slave. The first set level is either high or low.

8. The communication control device for the unit according to claim 6, characterized in that, The first communication module, which monitors the operating status of the host and the slave, further includes: When the first control command sent by the main control module is received by the first communication module and sent by the main control module, if the first control command sent by the main control module is at a first set level, then the D pin of the RS485 chip is at the first set level; the signal at the first set level obtained after the first control command is processed by the RS485 chip is received by the main control module and the first communication module respectively, so as to realize the monitoring of the operating status of the host and the slave.

9. A generating unit, characterized in that, include: The communication control device for the unit as described in any one of claims 1 to 8.

10. A communication control method for a generator unit as described in claim 9, characterized in that, include: When the host calls the slave device, the host is controlled to enable transmission. When the slave device responds, the master device's transmit enable is pulled low, and the RS485 chip in the second communication module enters the receive state. After the slave device receives the slave device name call data sent by the master device, during the phase when the RS485 chip's transmit enable is pulled low, the slave device responds to the master device.

11. The communication control method for a generator unit according to claim 10, characterized in that, Also includes: When a new slave device is connected, it is directly connected to the main control module of the host. After the host completes the naming of the new slave device, the new slave device enters the stage of responding to the new slave device naming data sent by the host, keeping the transmit enable of the RS485 chip high, and keeping the signals of the receive and transmit pins of the RS485 chip consistent. The response signal of the new slave device is transmitted to the receive pin of the host's UART pin, enabling the host to perform a read operation.

12. The communication control method for a generator unit according to claim 10 or 11, characterized in that, Also includes: When the slave device is connected to the second communication module, the host's UART line is configured as floating input and open-drain output.

Citation Information

Patent Citations

  • Air conditioning system centralized control method and air conditioning system

    CN112283914A

  • Wireless radio frequency communication device of water heater

    CN212208542U

  • Communication control device of unit and unit

    CN214954608U