CAN looped network controller and CAN looped network system
By introducing a CAN ring network controller into the CAN bus system, using cables to connect nodes and implementing data bridging, the cost and complexity problems of optical fiber hubs in the prior art are solved, and low-cost, easy-to-construction CAN bus ring topological communication is realized.
Patent Information
- Application Number
- CN202422372057.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2034-09-27
AI Technical Summary
The existing CAN bus ring topology scheme requires the addition of fiber optic hubs, which leads to high costs, complex construction and difficult maintenance, and strong fiber dependence, making it impossible to realize ring topology in cable transmission scenarios.
A CAN ring network controller is adopted, including an MCU control module, first and second CAN transceivers and power supply modules, and each node is connected through a cable to form a ring topology structure, and the data bridge function is realized in the controller, which automatically switches when the detection line is disconnected.
Reduces equipment costs, improves versatility, simplifies construction and maintenance, realizes ring topological communication under cable transmission, and reduces fault points.
Smart Images

Figure CN223309860U_ABST
Abstract
Description
Technical Field
[0001] The utility model discloses a controller, in particular to a CAN ring network controller and a CAN ring network system. Background Art
[0002] The CAN (Controller Area Network) protocol was proposed by Bosch in 1986 to meet the communication needs of electronic devices within automobiles. Features of the CAN protocol include multi-master communication, high reliability, real-time performance, and robust error detection and handling capabilities. With technological advancements, the CAN protocol has been widely adopted in fields such as industrial automation and fire protection systems. With the increasing demand for reliable fieldbus communication, the ring network topology improves communication reliability and fault tolerance. Data is transmitted along the ring, ensuring data transmission and processing even if part of the network fails, and has gained widespread recognition.
[0003] Existing solutions to achieve a CAN bus ring topology require adding a ring-capable fiber optic hub to each node. This converts the electrical CAN communication signals into optical signals for fiber optic communication. Each node's fiber optic hub's optical interface is then connected to the interface of the adjacent node's fiber optic hub, connecting all nodes one by one in a master-slave configuration to form a closed ring. This creates a CAN bus ring topology. Damage or disconnection at any point in the line will not affect normal communication at other nodes, demonstrating the advantages of a ring network. This approach is costly. The existing CAN bus ring topology requires adding fiber optic hubs and other equipment to each node, significantly increasing system costs. Due to the high dependence on fiber, existing solutions can only use fiber optic transmission, making a ring topology impossible in scenarios using cable transmission. Installation, construction, and maintenance are complex. The existing solution requires installing a fiber optic hub at each node, and the power supply and installation of the hub significantly increase the difficulty and cost of construction. Furthermore, the doubling of the number of devices means the number of system failure points doubles, significantly increasing the complexity of subsequent maintenance. Summary of the Invention
[0004] In view of the above-mentioned disadvantages of the prior art that in order to realize the CAN bus ring topology structure, it is necessary to add a fiber optic hub that supports the ring network, which is costly, the present invention provides a new CAN ring network controller and a CAN ring network system, which uses a CAN ring network controller to be added to the existing CAN bus system, and each node is connected hand in hand and finally returns to the CAN ring network controller.
[0005] The technical solution adopted by the utility model to solve its technical problems is: a CAN ring network controller, the controller includes an MCU control module, a first CAN transceiver, a second CAN transceiver and a power supply module, the first CAN transceiver and the second CAN transceiver are respectively connected to the MCU control module through a serial interface, the first CAN transceiver and the second CAN transceiver are connected to the CAN node as an interface, and the power supply module is used for power supply.
[0006] A CAN ring network system includes the above-mentioned CAN ring network controller and one or more CAN nodes. The CANH interface and CANL interface of a first CAN transceiver in the CAN ring network controller are respectively connected to the CANH interface and CANL interface of a second CAN transceiver via cables. The CAN nodes are respectively connected to the cables to form a CAN ring network system.
[0007] The technical solution adopted by the utility model to solve its technical problems further includes:
[0008] The MCU control module adopts a single chip microcomputer U34, and a crystal oscillator X3 is connected to the clock port of the single chip microcomputer U34.
[0009] The single chip microcomputer U34 uses two groups of multiplexed data ports to be connected to the first CAN transceiver and the second CAN transceiver respectively.
[0010] The first CAN transceiver and the second CAN transceiver respectively adopt the CAN bus transceiver U25, and the TXD interface and RXD interface of the CAN bus transceiver U25 are respectively connected to the isolation module, and the CANH interface and CANL interface of the CAN bus transceiver U25 are connected to the protection module. The CANH interface and CANL interface of the CAN bus transceiver U25 are used to connect to the CAN node.
[0011] The isolation module includes an optocoupler U24 and an optocoupler U27. The light-emitting diode end of the optocoupler U24 is connected to the TX interface in the serial interface of the MCU control module, the phototransistor end of the optocoupler U24 is connected to the TXD interface of the CAN bus transceiver U25, the phototransistor end of the optocoupler U27 is connected to the RX interface in the serial interface of the MCU control module, the light-emitting diode end of the optocoupler U27 is connected to the RXD interface of the CAN bus transceiver U27, and the TXD interface of the CAN bus transceiver U25 is connected to the positive pole of the power supply module through the pull-up resistor R64.
[0012] The protection module includes a common-mode inductor L8, a transient suppression diode D21, a transient suppression diode D22 and a transient suppression diode D23. The common-mode inductor L8 is connected in series on the CANH interface and CANL interface lines of the CAN bus transceiver U25. The transient suppression diode D21 is connected between the CANH interface and CANL interface of the CAN bus transceiver U25. The transient suppression diode D22 is connected between the CANH interface and the signal ground of the CAN bus transceiver U25. The transient suppression diode D23 is connected between the CANL interface and the signal ground of the CAN bus transceiver U25.
[0013] The protection module further includes a power isolation module U26, which is connected between the power supply module and the CAN transceiver.
[0014] The power supply module includes a voltage converter U33 and a voltage regulator chip U32. The voltage converter U3 converts the external power supply into a +5V power supply to power the first CAN transceiver and the second CAN transceiver. The voltage regulator chip U32 converts the +5V power supply into a +3.3V power supply to power the MCU control module.
[0015] The beneficial effect of the utility model is that the utility model adopts a CAN ring network controller to be added to the existing CAN bus system, each node is connected hand in hand and finally returns to the CAN ring network controller, thereby realizing CAN ring network topology communication.
[0016] After adopting the utility model to realize the CAN bus ring topology structure, compared with the existing technology, the entire system only needs to add one device, namely the CAN ring network controller, which greatly reduces the equipment cost; the ring network can be realized without relying on optical fiber communication, which greatly improves the versatility of the solution; since only one device needs to be added to realize the ring network, compared with the existing technical solution of adding one device to each node, the construction and installation work is greatly simplified, the number of system failure points is reduced, and the complexity of subsequent system maintenance is further simplified.
[0017] When the utility model is in use, no optical terminal or other photoelectric conversion equipment is required, and no conversion into optical fiber is required. The CAN ring topology communication is realized by cable connection.
[0018] The utility model adopts two independent CAN interfaces controlled by the MCU in the CAN ring network controller to connect the head and tail ends of the ring line. When the ring network line is disconnected, the CAN ring network controller acts as a bridge. The data packets received by any CAN port are sent to the other CAN port in full, connecting the normal communication connection of all nodes at both ends of the disconnected line.
[0019] When the utility model is in use, a method for detecting the disconnection of a ring line in a Can ring network controller is used, wherein one port sends a detection signal at a fixed time, and the other port returns a response signal after receiving it. When the port times out and fails to receive the detection signal, or times out and fails to receive the returned response signal, it is determined that the ring line is disconnected.
[0020] By adopting the method concept of the utility model, the ring network topology control of other types of bus communications can be realized without photoelectric conversion.
[0021] The present invention will be further described below with reference to the accompanying drawings and specific implementation methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 This is the system topology diagram of this utility model.
[0023] Figure 2 This is the system topology diagram when the line of the utility model is equivalent to normal.
[0024] Figure 3 This is the system topology diagram when the circuit of the utility model is equivalent to an open circuit.
[0025] Figure 4 This is a block diagram of the controller circuit of this utility model.
[0026] Figure 5 This is a partial circuit diagram of the power supply module in the controller of this utility model.
[0027] Figure 6 This is a partial circuit schematic diagram of the isolation module, transceiver and protection module in the controller of this utility model.
[0028] Figure 7 This is a partial circuit schematic diagram of the MCU control module in the controller of this utility model.
[0029] Figure 8 This is a flow chart of the application of this utility model. DETAILED DESCRIPTION
[0030] This embodiment is a preferred implementation of the present utility model. Other embodiments whose principles and basic structures are the same or similar to those of this embodiment are within the protection scope of the present utility model.
[0031] Please refer to the attached Figure 1 To the attached Figure 8 The utility model mainly protects a CAN ring network controller, which mainly includes an MCU control module, a first CAN transceiver, a second CAN transceiver and a power supply module. The first CAN transceiver and the second CAN transceiver are respectively connected to the MCU control module through a serial interface, and the first CAN transceiver and the second CAN transceiver are connected to the CAN node as an interface. The power supply module is used for power supply.
[0032] In this embodiment, the MCU control module adopts a single-chip microcomputer U34, a crystal oscillator X3 is connected to the clock port of the single-chip microcomputer U34, and the single-chip microcomputer U34 adopts two groups of multiplexed data ports to be connected to the first CAN transceiver and the second CAN transceiver respectively.
[0033] The circuit structure of the first CAN transceiver and the second CAN transceiver is the same. One of the groups is taken as an example for explanation below. In this embodiment, the CAN transceiver adopts the CAN bus transceiver U25 with model SIT1050T. The TXD interface and RXD interface of the CAN bus transceiver U25 are respectively connected with optocouplers as isolation modules, wherein the light-emitting diode end of the optocoupler U24 is connected to the TX interface in the serial interface of the MCU control module, the phototransistor end of the optocoupler U24 is connected to the TXD interface of the CAN bus transceiver U25, the phototransistor end of the optocoupler U27 is connected to the RX interface in the serial interface of the MCU control module, the light-emitting diode end of the optocoupler U27 is connected to the RXD interface of the CAN bus transceiver U27, and the TXD interface of the CAN bus transceiver U25 is connected to the positive pole of the power supply module through the pull-up resistor R64. The CANH interface and CANL interface of the CAN bus transceiver U25 are used to connect to the CAN node. A protection module is connected to the CANH interface and CANL interface of the CAN bus transceiver U25. The protection module includes a common-mode inductor L8, a transient suppression diode D21, a transient suppression diode D22 and a transient suppression diode D23. The common-mode inductor L8 is connected in series on the CANH interface and CANL interface lines of the CAN bus transceiver U25. The transient suppression diode D21 is connected between the CANH interface and CANL interface of the CAN bus transceiver U25. The transient suppression diode D22 is connected between the CANH interface and the signal ground of the CAN bus transceiver U25. The transient suppression diode D23 is connected between the CANL interface and the signal ground of the CAN bus transceiver U25. The protection module can protect against spike pulses and the like that appear in the line.
[0034] In this embodiment, the protection module further includes a power isolation module U26. The power isolation module U26 is connected between the power supply module and the CAN transceiver to perform power isolation protection.
[0035] In this embodiment, the power supply module includes a voltage converter U33 and a voltage regulator chip U32. The voltage converter U3 converts the external power supply into a +5V power supply to power the first CAN transceiver and the second CAN transceiver. The voltage regulator chip U32 converts the +5V power supply into a +3.3V power supply to power the MCU control module.
[0036] The utility model also protects a CAN ring network system, which mainly includes the above-mentioned CAN ring network controller and one or more CAN nodes. The CANH interface and CANL interface of the first CAN transceiver in the CAN ring network controller are respectively connected to the CANH interface and CANL interface of the second CAN transceiver through cables, and the CAN nodes are respectively connected to the cables, thereby forming a CAN ring network.
[0037] In the present invention, all CAN device nodes are connected to the CAN ring network bus line in a hand-in-hand manner, and then the starting end and the end end of the CAN line are connected to the CAN ring network controller, respectively connected to the Can A port (i.e., the CANH interface and CANL interface of the first CAN transceiver) and the Can B port (i.e., the CANH interface and CANL interface of the second CAN transceiver). When the line is intact, the Can A and Can B ports only receive information from each node by default and do not perform other operations; when the line is disconnected somewhere, the Can ring network controller detects the line fault and immediately enables the sending function of the Can A and Can B ports, that is, the data received by the Can A port is sent to the Can B port, and similarly, the data received by the Can B port is sent to the Can A port. At this time, the Can ring network controller plays a bridging role, thereby maintaining normal communication among all nodes. Figure 2 This is the equivalent diagram when the line is normal, and the Can ring network controller is equivalent to an open circuit; Figure 3 This is the equivalent diagram when the line between node 1 and node 2 is disconnected. The Can ring network controller is equivalent to a closed switch, connecting the device nodes at both ends of the broken line.
[0038] The power supply module provides DC3.3V power to the MCU control module and DC5V power to the isolation module. The MCU control module controls two Can communication links. Each Can communication link includes an isolation module, a Can transceiver, and a protection module. The Can transceiver output signal passes through the protection module and is connected to the Can port.
[0039] The input end of the power supply module inputs a DC power supply in the range of DC6V~DC40V. After rectification by the rectifier bridge D27, a buck DC-DC step-down circuit outputs a stable DC5V voltage. The DC5V voltage is mainly used to power the isolation module. The DC5V voltage then passes through the linear regulator U32 (model LM1117IMPX-3.3) to output a precise DC3.3V voltage to power the MCU control module.
[0040] The isolation module, CAN transceiver circuit, and CAN interface form a CAN communication link. The isolation module circuit includes the protective power isolation module U26, signal isolation optocoupler U24, and signal isolation optocoupler U27. The isolation circuit is used to isolate various noise and interference from the fieldbus to prevent it from affecting the internal control circuit. The CAN transceiver circuit uses the SIT1050T chip to convert TTL levels and CAN differential signals. The protection module circuit consists of a common-mode inductor and a TVS transient suppression diode. The common-mode inductor primarily filters common-mode high-frequency noise. The two TVS diodes connected to the ground and the TVS diode between the CAN communication lines respectively discharge common-mode surges and differential-mode surges, thereby protecting the entire communication circuit from damage caused by external surges and high-frequency noise signals, which could also affect communication quality.
[0041] The MCU control module is comprised of the high-performance Arm chip U34 and its minimum system at its core, connected to the control signals of the communication section. The X3 crystal oscillator and capacitors C66 and C67 form the chip's clock source circuit; resistor R81 and capacitor C70 form the power-on reset circuit, ensuring chip power-up stability; inductor L11 and capacitors C71, C69, and C68 form an LC filter circuit that provides a low-ripple, highly accurate reference voltage for the MCU. The MCU's four I / O ports, PA11, PA12, PB12, and PB13, are connected to the transmit and receive signals of the two CAN links, respectively, for data transmission and reception.
[0042] The two CAN ports are connected to the start and end of the field ring line respectively. The CAN ring network controller has two working modes: standby mode and bridge mode. In standby mode, the MCU cyclically executes the following tasks: controlling the first CAN transceiver to send detection signals and receive response signals at regular intervals, reading the detection signal sent by the first CAN transceiver from the second CAN transceiver, and returning the response signal. If no response signal is received from the first CAN transceiver for a long time, it is determined that the ring line is broken. At this time, the CAN ring network controller enters bridge mode. In bridge mode, if the first CAN transceiver receives a response signal, it exits bridge mode and enters standby mode.
[0043] In bridge mode, in addition to continuing to send detection signals and receive response signals to the first Can transceiver, the MCU also receives communication frames from all node devices on the Can ring bus, and forwards the data frames received by any Can transceiver to another port as is, thereby bridging the two ends of the disconnected ring bus without affecting the communication between all node devices.
[0044] When the CAN ring network controller enters the bridge mode, two problems need to be solved. One is that when the ring line is not disconnected, entering the bridge mode is likely to cause data to be sent in a circular oscillation, causing the system communication line to be paralyzed; the other is how to accurately and quickly detect and determine whether the ring line is disconnected and enter the bridge mode without powering off or human intervention.
[0045] The utility model adopts a CAN ring network controller to be added to the existing CAN bus system, and each node connects two nodes hand in hand and finally returns to the CAN ring network controller, thereby realizing CAN ring network topology communication.
[0046] After adopting the utility model to realize the CAN bus ring topology structure, compared with the existing technology, the entire system only needs to add one device, namely the CAN ring network controller, which greatly reduces the equipment cost; the ring network can be realized without relying on optical fiber communication, which greatly improves the versatility of the solution; since only one device needs to be added to realize the ring network, compared with the existing technical solution of adding one device to each node, the construction and installation work is greatly simplified, the number of system failure points is reduced, and the complexity of subsequent system maintenance is further simplified.
Claims
1. A CAN ring network controller, characterized by: The controller includes an MCU control module, a first CAN transceiver, a second CAN transceiver and a power supply module. The first CAN transceiver and the second CAN transceiver are respectively connected to the MCU control module through a serial interface. The first CAN transceiver and the second CAN transceiver are connected to the CAN node as interfaces. The power supply module is used for power supply.
2. The CAN ring network controller according to claim 1, wherein: The MCU control module adopts a single chip microcomputer U34, and a crystal oscillator X3 is connected to the clock port of the single chip microcomputer U34.
3. The CAN ring network controller according to claim 2, wherein: The single chip microcomputer U34 uses two groups of multiplexed data ports to be connected to the first CAN transceiver and the second CAN transceiver respectively.
4. The CAN ring network controller according to claim 1, wherein: The first CAN transceiver and the second CAN transceiver respectively adopt the CAN bus transceiver U25, and the TXD interface and RXD interface of the CAN bus transceiver U25 are respectively connected to the isolation module, and the CANH interface and CANL interface of the CAN bus transceiver U25 are connected to the protection module. The CANH interface and CANL interface of the CAN bus transceiver U25 are used to connect to the CAN node.
5. The CAN ring network controller according to claim 4, characterized in that: The isolation module includes an optocoupler U24 and an optocoupler U27. The light-emitting diode end of the optocoupler U24 is connected to the TX interface in the serial interface of the MCU control module, the phototransistor end of the optocoupler U24 is connected to the TXD interface of the CAN bus transceiver U25, the phototransistor end of the optocoupler U27 is connected to the RX interface in the serial interface of the MCU control module, the light-emitting diode end of the optocoupler U27 is connected to the RXD interface of the CAN bus transceiver U27, and the TXD interface of the CAN bus transceiver U25 is connected to the positive pole of the power supply module through the pull-up resistor R64.
6. The CAN ring network controller according to claim 4, characterized in that: The protection module includes a common-mode inductor L8, a transient suppression diode D21, a transient suppression diode D22 and a transient suppression diode D23. The common-mode inductor L8 is connected in series on the CANH interface and CANL interface lines of the CAN bus transceiver U25. The transient suppression diode D21 is connected between the CANH interface and CANL interface of the CAN bus transceiver U25. The transient suppression diode D22 is connected between the CANH interface and the signal ground of the CAN bus transceiver U25. The transient suppression diode D23 is connected between the CANL interface and the signal ground of the CAN bus transceiver U25.
7. The CAN ring network controller according to claim 6, characterized in that: The protection module further includes a power isolation module U26, which is connected between the power supply module and the CAN transceiver.
8. The CAN ring network controller according to claim 1, wherein: The power supply module includes a voltage converter U33 and a voltage regulator chip U32. The voltage converter U3 converts the external power supply into a +5V power supply to power the first CAN transceiver and the second CAN transceiver. The voltage regulator chip U32 converts the +5V power supply into a +3.3V power supply to power the MCU control module.
9. A CAN ring network system, characterized by: The system includes a CAN ring network controller according to any one of claims 1 to 8 and one or more CAN nodes, wherein the CANH interface and the CANL interface of the first CAN transceiver in the CAN ring network controller are respectively connected to the CANH interface and the CANL interface of the second CAN transceiver via cables, and the CAN nodes are respectively connected to the cables to form a CAN ring network system.