Node communication circuit, node circuit and communication system
Through the main control module and the serial port of the communication module and the RS232 communication module is used, the problem of node addressing is easily disturbed, the reliability of node addressing and long-distance automatic addressing are realized, and the stability of the communication system is improved.
Patent Information
- Application Number
- CN202422474121.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2034-10-12
AI Technical Summary
In the prior art, the node address addressing scheme is easily disturbed by external interference, resulting in misjudgment, and the IO port cascade scheme is limited in distance, while the PWM port cascade scheme is difficult to read signals, making it difficult to achieve reliable node addressing.
The main control module is used to connect to the communication module serial port, the RS232 communication module is used, and encode and transmit through the address communication pin. The RS232 transceiver and its peripheral circuit are introduced into the node communication circuit to improve anti-interference ability and stability.
It improves the anti-interference ability and stability of the node communication circuit, realizes the reliability of long-distance automatic addressing, and reduces the addressing complexity.
Smart Images

Figure CN223217859U_ABST
Abstract
Description
Technical Field
[0001] The utility model belongs to the technical field of communication circuits, and in particular relates to a node communication circuit, a node circuit and a communication system. Background Art
[0002] In large-scale communication systems, there is usually a master and multiple slaves (also called nodes). In practical applications, the layout of nodes is usually random. In order to ensure that the node data can be correctly mapped to the node load in the communication system and to ensure the accuracy and effectiveness of data transmission, each node needs to be assigned a unique tag to record its location on the bus, that is, node addressing.
[0003] Currently, there are two commonly used node addressing schemes:
[0004] a. The main control module and the communication module in the node are cascaded using a common IO (Input Output) port. The host reads the input and output data of the communication module through the main control module of each node to achieve automatic addressing of each node;
[0005] b. The main control module and the communication module in the node are cascade-connected using PWM (Pulse-Width Modulation) ports to achieve automatic addressing of each node.
[0006] However, in the process of using the existing technology, the inventors found that the existing technology has at least the following problems:
[0007] When the main control module and the communication module in the node use the IO port cascade solution to implement node addressing, the distance between the node loads cannot be too far, and the high and low levels of the bus are greatly affected by external interference, which is easy to misjudge; when the main control module and the communication module in the node use the PWM port cascade solution to implement node addressing, the probability of interference can be reduced to a certain extent, but there are certain difficulties in reading the PWM signal, which is not conducive to the implementation of node addressing. Utility Model Content
[0008] In order to solve the above technical problems at least to a certain extent, the utility model provides a node communication circuit, a node circuit and a communication system.
[0009] In order to achieve the above purpose, the utility model adopts the following technical solutions:
[0010] A node communication circuit includes a main control module and a communication module. The main control module is connected to the communication module via a serial port. The communication module adopts an RS232 communication module. The address communication pin of the communication module is used to connect to the communication module of other node communication circuits.
[0011] In a possible design, the main control module uses an STM32F042F4P6 single-chip microcomputer and its peripheral circuits.
[0012] In a possible design, the communication module uses a MAX3232ESE+T type RS232 transceiver and its peripheral circuits.
[0013] In one possible design, the peripheral circuit of the RS232 transceiver includes a first resistor, a second resistor, a first TVS diode and a second TVS diode. Pin 11 of the RS232 transceiver is electrically connected to the serial communication transmitting pin USART1_TX of the main control module through the first resistor, and pin 12 of the RS232 transceiver is electrically connected to the serial communication receiving pin USART1_RX of the main control module through the second resistor. The address communication pin of the communication module includes an address receiving pin Addr_in and an address output pin Addr_out. Pin 13 of the RS232 transceiver is the address receiving pin Addr_in of the communication module. Pin 13 of the RS232 transceiver is grounded through the first TVS diode. Pin 14 of the RS232 transceiver is the address output pin Addr_out of the communication module, and pin 14 of the RS232 transceiver is grounded through the second TVS diode.
[0014] In one possible design, the peripheral circuit of the RS232 transceiver also includes a first capacitor, a second capacitor, a third capacitor, a fourth capacitor and a fifth capacitor; pin 1 of the RS232 transceiver is electrically connected to pin 3 of the RS232 transceiver through the first capacitor; pin 4 of the RS232 transceiver is electrically connected to pin 5 of the RS232 transceiver through the second capacitor; pin 6 of the RS232 transceiver is electrically connected to pin 15 of the RS232 transceiver through the fourth capacitor, pin 15 of the RS232 transceiver is grounded, pin 2 of the RS232 transceiver is electrically connected to pin 16 of the RS232 transceiver through the third capacitor, pin 16 of the RS232 transceiver is used to connect to an external power supply module, and pin 15 of the RS232 transceiver is also electrically connected to pin 16 of the RS232 transceiver through the fifth capacitor.
[0015] A node circuit comprises the node communication circuit as described in any one of the above items.
[0016] In one possible design, the node circuit also includes a node load, and the node load is electrically connected to the main control module.
[0017] A communication system comprises a node communication circuit as described in any one of the above items, wherein there are multiple node communication circuits, and the multiple node communication circuits are cascade-connected.
[0018] In one possible design, the communication system further includes a host circuit, which is cascade-connected to a plurality of the node communication circuits.
[0019] In one possible design, the communication system further includes a host circuit, which is communicatively connected to the plurality of node communication circuits via a communication bus.
[0020] The beneficial effects of the present invention are primarily reflected in its ability to enhance the anti-interference capability and stability of node communication circuits, thereby facilitating the reliability of node addressing. Specifically, during implementation, the main control module and the communication module are connected via serial ports, replacing the prior art solution of connecting the main control module and the communication module via IO or PWM ports. This improves the anti-interference capability of the node communication circuit. Furthermore, in the present invention, each node communication circuit is connected via an address communication pin, and each node can encode and transmit its address via the address communication pin, facilitating the long-distance automatic addressing of the communication system and enhancing the reliability of node addressing. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 This is a circuit diagram of the main control module in Example 1;
[0022] Figure 2 is a circuit schematic diagram of the communication module in Example 1;
[0023] Figure 3 3 is a circuit diagram of the communication system in Example 3. DETAILED DESCRIPTION
[0024] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the present invention will be briefly introduced below in conjunction with the drawings and the description of the embodiments or the prior art. Obviously, the following description of the structures of the drawings is only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention.
[0025] Example 1:
[0026] This embodiment provides a node communication circuit, including a main control module and a communication module. The main control module is connected to the communication module via a serial port. The communication module adopts an RS232 communication module. The address communication pin of the communication module is used to connect to the communication module of other node communication circuits.
[0027] This embodiment can improve the anti-interference capability and stability of the node communication circuit, and can facilitate the reliability of node addressing. Specifically, during the implementation of this embodiment, the main control module and the communication module are connected via a serial port, replacing the technical solution of the prior art in which the main control module and the communication module are connected via an IO port or a PWM port, which can help improve the anti-interference capability of the node communication circuit. At the same time, in this embodiment, the communication circuits of each node are connected via an address communication pin, and each node can encode and transmit its address via the address communication pin, which can facilitate the long-distance automatic addressing of the communication system and improve the reliability of node addressing.
[0028] like Figure 1 As shown, in this embodiment, the main control module adopts the STM32F042F4P6 type single-chip microcomputer U1 and its peripheral circuits. It should be noted that the STM32F042F4P6 type single-chip microcomputer U1 is a microcontroller unit that integrates a 48MHz high-performance ARM Cortex-M0 32-bit RISC core, high-speed embedded memory, and a variety of enhanced peripherals and I / O. All devices provide standard communication interfaces, one USB full-speed device, one CAN, one 12-bit analog-to-digital converter, four general-purpose 16-bit timers, one 32-bit timer, and one advanced control PWM timer.
[0029] Specifically, in this embodiment, the peripheral circuit of the single-chip microcomputer U1 includes a third resistor R1, and pin 1 of the single-chip microcomputer U1 is grounded through the third resistor R1; pin 4 of the single-chip microcomputer U1 is a reset pin, used to receive a reset signal sent externally to achieve power-on reset of the main control module; pins 19 and 20 of the single-chip microcomputer U1 are debugging and programming pins; pins 5 and 16 of the single-chip microcomputer U1 are used to connect to an external power supply module.
[0030] like Figure 2 As shown, in this embodiment, the communication module uses a MAX3232ESE+T RS232 transceiver U2 and its peripheral circuits. It should be noted that in this embodiment, RS232 transceiver U2 has a proprietary low-dropout transmitter output stage that utilizes a dual charge pump to achieve true RS232 performance at a 3.0V to 5.5V supply voltage. It only requires four 0.1μF external charge pump capacitors to ensure RS232 output levels at a 120kbps data rate.
[0031] Specifically, the peripheral circuit of the RS232 transceiver U2 includes a first resistor R2, a second resistor R3, a first TVS (Transient Voltage Suppressors, transient voltage suppression) diode D1 and a second TVS diode D2, pin 11 of the RS232 transceiver U2 is electrically connected to the serial communication sending pin USART1_TX of the main control module through the first resistor R2, and pin 12 of the RS232 transceiver U2 is electrically connected to the serial communication receiving pin USART1_RX of the main control module through the second resistor R3. The address communication pin of the communication module includes an address receiving pin Addr_in and an address output pin Addr_out. Pin 13 of the RS232 transceiver U2 is the address receiving pin Addr_in of the communication module, and pin 13 of the RS232 transceiver U2 is grounded through the first TVS diode D1. Pin 14 of the RS232 transceiver U2 is the address output pin Addr_out of the communication module, and pin 14 of the RS232 transceiver U2 is grounded through the second TVS diode D2. It should be noted that, in this embodiment, the serial communication transmit pin USART1_TX of the main control module is also pin 8 of the single-chip microcomputer U1, and the serial communication receive pin USART1_RX of the main control module is also pin 9 of the single-chip microcomputer U1. In this embodiment, the first resistor R2, the second resistor R3, the first TVS diode D1, and the second TVS diode D2 are all used to protect the RS232 transceiver U2. Specifically, the first resistor R2 and the second resistor R3 are current-limiting resistors used to protect the RS232 transceiver U2. The first TVS diode D1 and the second TVS diode D2 are used to protect the RS232 transceiver U2 from overvoltage or power spikes by short-circuiting when high voltage occurs, thereby ensuring the stability and reliability of bus communication.
[0032] In addition, the peripheral circuit of the RS232 transceiver U2 further includes a first capacitor C1, a second capacitor C2, a third capacitor C3, a fourth capacitor C4 and a fifth capacitor C5; Pin 1 of the RS232 transceiver U2 is electrically connected to Pin 3 of the RS232 transceiver U2 via the first capacitor C1; Pin 4 of the RS232 transceiver U2 is electrically connected to Pin 5 of the RS232 transceiver U2 via the second capacitor C2; Pin 6 of the RS232 transceiver U2 is electrically connected to Pin 1 of the RS232 transceiver U2 via the The fourth capacitor C4 is electrically connected to pin 15 of the RS232 transceiver U2, which is grounded. Pin 2 of the RS232 transceiver U2 is electrically connected to pin 16 of the RS232 transceiver U2 via the third capacitor C3. Pin 16 of the RS232 transceiver U2 is used to connect to an external power module. Pin 15 of the RS232 transceiver U2 is also electrically connected to pin 16 of the RS232 transceiver U2 via the fifth capacitor C5. It should be noted that in this embodiment, the first capacitor C1, the second capacitor C2, the third capacitor C3, and the fourth capacitor C4 are used to generate the RS232 voltage level required by the RS232 transceiver U2, and the fifth capacitor C5 is used to filter noise in the +3.3V input of the external power module to ensure stable operation of the RS232 transceiver U2.
[0033] Example 2:
[0034] This embodiment provides a node circuit, including the node communication circuit as described in any one of the embodiment 1.
[0035] In this embodiment, the node circuit further includes a node load, which is electrically connected to the main control module. It should be noted that in this embodiment, the node load can be, but is not limited to, a data acquisition device, a touch screen, a power amplifier, and other loads, and is not limited here.
[0036] Example 3:
[0037] This embodiment provides a communication system, such as Figure 3 As shown, it includes the node communication circuit as described in any one of Example 1, there are multiple node communication circuits, and the multiple node communication circuits are cascade-connected.
[0038] In this embodiment, the address output pin Addr_out of the previous node communication circuit is connected to the address receiving pin Addr_in of the next node. The address receiving pin Addr_in of each node communication circuit is automatically set to 1 when no data is received. After the address 1 of the current node communication circuit is confirmed, the current node communication circuit sends out data information containing the address through its address output pin Addr_out; after any node communication circuit receives data information containing the address, the address of the node communication circuit is automatically set to the previous node address + 1; and so on, until the automatic addressing of all node communication circuits in the communication system is completed, the complexity and addressing difficulty of the communication system are reduced, and the reliability of node addressing is improved.
[0039] In addition, in this embodiment, after all addresses are programmed, the host circuit can compare the total number of node addresses with the preset total number of nodes. If the numbers are consistent, the addressing is successful. If the numbers are inconsistent, manual inspection is required to ensure that the wiring between the communication circuits of each node is correct.
[0040] In one embodiment, the communication system further includes a host circuit, which is cascade-connected to a plurality of the node communication circuits.
[0041] In another embodiment, the communication system further includes a host circuit, which is communicatively connected to each of the plurality of node communication circuits via a communication bus. Specifically, in this embodiment, the host circuit may be, but is not limited to, a communication bus such as a CAN (Controller Area Network, an internationally standardized serial communication protocol) or an RS485 communication bus, communicatively connected to each of the plurality of node communication circuits, so that the host circuit receives data such as an address of each node communication circuit and controls the node loads connected to each node communication circuit.
[0042] Finally, it should be noted that the above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention shall be included in the scope of protection of the present invention.
Claims
1. A node communication circuit, characterized in that: It includes a main control module and a communication module. The main control module is connected to the communication module via a serial port. The communication module adopts an RS232 communication module. The address communication pin of the communication module is used to connect to the communication module of other node communication circuits.
2. A node communication circuit according to claim 1, characterized in that: The main control module adopts an STM32F042F4P6 single chip microcomputer (U1) and its peripheral circuits.
3. The node communication circuit according to claim 1, wherein: The communication module adopts a MAX3232ESE+T type RS232 transceiver (U2) and its peripheral circuits.
4. A node communication circuit according to claim 3, characterized in that: The peripheral circuit of the RS232 transceiver (U2) includes a first resistor (R2), a second resistor (R3), a first TVS diode (D1) and a second TVS diode (D2); pin 11 of the RS232 transceiver (U2) is electrically connected to the serial communication sending pin USART1_TX of the main control module through the first resistor (R2); pin 12 of the RS232 transceiver (U2) is electrically connected to the serial communication receiving pin USART1_RX of the main control module through the second resistor (R3); and the ground of the communication module is connected to the ground of the communication module. The address communication pins include an address receiving pin Addr_in and an address output pin Addr_out, pin 13 of the RS232 transceiver (U2) is the address receiving pin Addr_in of the communication module, pin 13 of the RS232 transceiver (U2) is grounded via the first TVS diode (D1), pin 14 of the RS232 transceiver (U2) is the address output pin Addr_out of the communication module, and pin 14 of the RS232 transceiver (U2) is grounded via the second TVS diode (D2).
5. A node communication circuit according to claim 3, characterized in that: The peripheral circuit of the RS232 transceiver (U2) further includes a first capacitor (C1), a second capacitor (C2), a third capacitor (C3), a fourth capacitor (C4) and a fifth capacitor (C5); pin 1 of the RS232 transceiver (U2) is electrically connected to pin 3 of the RS232 transceiver (U2) via the first capacitor (C1); pin 4 of the RS232 transceiver (U2) is electrically connected to pin 5 of the RS232 transceiver (U2) via the second capacitor (C2); pin 6 of the RS232 transceiver (U2) is electrically connected to pin 7 of the RS232 transceiver (U2) via the second capacitor (C2); The fourth capacitor (C4) is electrically connected to pin 15 of the RS232 transceiver (U2), pin 15 of the RS232 transceiver (U2) is grounded, pin 2 of the RS232 transceiver (U2) is electrically connected to pin 16 of the RS232 transceiver (U2) through the third capacitor (C3), pin 16 of the RS232 transceiver (U2) is used to connect to an external power module, and pin 15 of the RS232 transceiver (U2) is also electrically connected to pin 16 of the RS232 transceiver (U2) through the fifth capacitor (C5).
6. A node circuit, characterized in that: The node communication circuit comprises the node communication circuit according to any one of claims 1 to 5.
7. The node circuit according to claim 6, characterized in that: The node circuit further includes a node load, and the node load is electrically connected to the main control module.
8. A communication system, characterized in that: The node communication circuit comprises the node communication circuit according to any one of claims 1 to 5, wherein there are multiple node communication circuits, and the multiple node communication circuits are cascade-connected.
9. A communication system according to claim 8, characterized in that: The communication system further includes a host circuit, which is cascade-connected to a plurality of the node communication circuits.
10. A communication system according to claim 8, characterized in that: The communication system further includes a host circuit, which is communicatively connected to the plurality of node communication circuits via a communication bus.