CN111181828B - Device for realizing CAN bus communication star connection - Google Patents

Device for realizing CAN bus communication star connection Download PDF

Info

Publication number
CN111181828B
CN111181828B CN202010106334.2A CN202010106334A CN111181828B CN 111181828 B CN111181828 B CN 111181828B CN 202010106334 A CN202010106334 A CN 202010106334A CN 111181828 B CN111181828 B CN 111181828B
Authority
CN
China
Prior art keywords
node
processing unit
logic processing
delay
nodes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010106334.2A
Other languages
Chinese (zh)
Other versions
CN111181828A (en
Inventor
牟常伟
胡钰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Anke Medical Technology Co ltd
Original Assignee
Nanjing Anke Medical Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Anke Medical Technology Co ltd filed Critical Nanjing Anke Medical Technology Co ltd
Priority to CN202010106334.2A priority Critical patent/CN111181828B/en
Publication of CN111181828A publication Critical patent/CN111181828A/en
Application granted granted Critical
Publication of CN111181828B publication Critical patent/CN111181828B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/44Star or tree networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention provides a device for realizing CAN bus communication star connection, which comprises a logic processing unit and at least two CAN nodes, wherein the CAN nodes are respectively connected with the logic processing unit, and the logic processing unit is used for carrying out logic processing on received signals on a bus to realize the star connection function. The network layout of the traditional CAN bus CAN be simplified, the wiring cost and the wiring difficulty CAN be reduced, and stable communication CAN be realized during the multi-node complex network layout of the CAN bus.

Description

Device for realizing CAN bus communication star connection
Technical Field
The invention relates to the technical field of CAN communication, in particular to a device for realizing CAN bus communication star connection.
Background
The CAN bus belongs to the field bus category, CAN carry out network connection on various intelligent machines, carries out unified control, has safe, effective and timely control functions, CAN provide functions of unified control or multi-master control and the like of a plurality of ports, and is widely applied to the fields of automobiles, aviation, navigation, factory automation, industrial mechanical control, medical appliances and the like at present. However, with the continuous expansion of the application range of the CAN bus, the traditional wiring form of the CAN bus gradually highlights its own defects, the wiring of a complex system is not only high in cost, but also very difficult, if the number of nodes is large, the bus cable becomes long, the transmission of bus signals is affected, and when the CAN nodes are combined into a star network, the length of each branch line cannot be too long.
In addition, the CAN node realized by the ARM soft core is very common in the CAN network, at present, the CAN node equipment realized by the ARM soft core needs to convert signals into CAN H and CAN L through a conversion chip when needing to access a CAN bus, if the CAN node realized by the ARM soft core CAN be directly accessed into the CAN network, the cost CAN be saved, the energy consumption CAN be reduced, and the communication stability CAN be improved due to one-stage less connection conversion.
Disclosure of Invention
The purpose of the invention is as follows: in order to overcome the defects of the prior art, the invention provides a device for realizing CAN bus communication star connection, which CAN realize the star connection function by carrying out logic processing on received signals on a bus, simplify the network layout of the traditional CAN bus, reduce the wiring cost and the wiring difficulty, and realize stable communication when the CAN bus is provided with multiple nodes and complicated network layout.
The technical scheme is as follows: in order to achieve the technical effects, the technical scheme provided by the invention is as follows:
a device for realizing CAN bus communication star connection comprises a logic processing unit and at least two CAN nodes, wherein the types of the CAN nodes comprise a common CAN node and a soft core ARM node; the soft core ARM node is directly connected with the logic processing unit; the CAN node is connected with the logic processing unit through a CAN transceiver, wherein CAN _ H and CAN _ L cables of the common CAN node are respectively connected with CAN _ H and CAN _ L pins of the CAN transceiver, and the CAN transceiver is connected with the logic processing unit through RX and TX pins;
the logic processing unit controls communication among all nodes through a state machine, after the operation is started, the state machine always sends a recessive bit 1 to all nodes, all nodes judge that a bus enters an idle state when receiving continuous 11 recessive bits 1, at the moment, if a node needing to occupy the bus sends data to the logic processing unit, if only one CAN node A sends data, the CAN node A occupies the bus, and if a plurality of CAN nodes send data at the same time, the logic processing unit enters an arbitration stage;
in the arbitration phase, the logic processing unit processes signals of each CAN node as follows:
if the CAN node A is a common CAN node, the logic processing unit takes (RXA | (-TXA _ delay)) as an action signal of the CAN node A acting on other CAN nodes; where RXA is an actual output signal of CAN node a, | represents an or operation in a logical operation, — represents an inverted symbol, TXA represents a signal received by CAN node a, TXA _ delay represents a delay of time duration, which is performed on signal TXA, and delay ═ delay*+f×L,delay*The maximum propagation delay of the CAN transceiver is represented, f multiplied by L represents wiring delay, f is a delay parameter, and L is the wiring length between the CAN node and the CAN transceiver;
if the CAN node A is a soft core ARM node, the logic processing unit takes the RXA as an action signal of the CAN node A to act on other CAN nodes;
the signal finally sent to a CAN node B by the logic processing unit is the logical AND of the action signals acted on the node B by other nodes; according to an arbitration principle specified by a CAN protocol, each CAN node finally wins in arbitration to obtain a bus control right; (ii) a
After the arbitration phase is finished, the bus is occupied by a certain CAN node, and after the occupation is finished, the bus returns to an idle state to wait for the start of the next communication.
Further, the maximum delay time delay does not exceed 20% of the bit length.
Further, each CAN node interface of the logic processing unit has a data input terminal RX and a data output terminal TX; each data input terminal RX is connected to a pull-up resistor.
Further, 120 ohm impedance matching is adopted between CAN _ H and CAN _ L of the CAN transceiver.
Has the advantages that: compared with the prior art, the invention has the following advantages:
1. the logic processing unit is used for carrying out logic processing on signals among the connected CAN nodes, so that the bus function is realized through the logic processing unit, the star connection of each CAN node is realized, and bus wiring is not needed;
2. the device for realizing CAN bus communication star connection has flexible access CAN node equipment form, uses corresponding logic codes and reserves different node interfaces, and CAN access the node equipment with interfaces of CAN _ H and CAN _ L and CAN access the CAN equipment realized by ARM soft core.
3. When the CAN node realized by the ARM soft core is accessed, the node signal does not need to be converted into CAN _ H and CAN _ L signals through a conversion chip, so that the cost CAN be saved, the energy consumption CAN be reduced, and the communication stability CAN be improved.
4. The method for forming the star network is simple and reliable, the impedance matching of the branch nodes with unequal lengths is simple, calculation is not needed, and the impedance matching fixed rule is 120 ohms.
5. The invention has flexible wiring mode of forming a star network and greatly reduces the limitation on the length of the connecting line from each node to the logic processing unit.
6. The invention CAN simplify the network layout of the traditional CAN bus, reduce the wiring cost and the wiring difficulty, and realize the stable communication of the CAN bus during multi-node complex network layout;
7. when the invention forms a star network, no concentrator is needed to be added for network topology division.
Drawings
Fig. 1 is a diagram illustrating an exemplary structure of a device for implementing a CAN bus communication star connection according to the present invention.
Detailed Description
The invention will be further described with reference to the accompanying drawings and specific embodiments. It is to be understood that the present invention may be embodied in various forms, and that there is no intention to limit the invention to the specific embodiments illustrated, but on the contrary, the intention is to cover some exemplary and non-limiting embodiments shown in the attached drawings and described below.
Fig. 1 shows an example of an apparatus for implementing CAN bus communication star connection according to the present invention, including: the system comprises a logic processing unit, a node 1, a node 2 and a node 3, wherein the node 1, the node 2 and the node 3 are connected to the logic processing unit, and a reserved node interface is reserved in the logic processing unit; in the nodes 1, 2 and 3, the node 3 is a CAN node realized by an ARM soft core, namely a soft core ARM node, the nodes 1 and 2 are common nodes, namely nodes accessed to a logic processing unit through a CAN transceiver, the three nodes form a star network topology structure, the logic processing unit performs corresponding logic judgment and processing on the communication signal access of each node to realize bus communication among the CAN nodes, and when one of the three nodes has a fault, the other two nodes communicate normally. When the reserved node is not accessed, the communication of other three nodes is not influenced, and when the reserved node is accessed, the four nodes can normally communicate.
The device for realizing CAN bus communication star connection shown in FIG. 1 works according to the following principle:
the logic processing unit controls communication among all nodes through a state machine, after the operation is started, the state machine always sends a hidden bit 1 to all nodes, each node judges that a bus enters an idle state when receiving continuous 11 hidden bits 1, at the moment, if a node needing to occupy a CAN bus sends data to the logic processing unit, and if only one node sends data, the bus is directly occupied by the CAN node; if a plurality of CAN nodes send data simultaneously, the logic processing unit enters an arbitration phase.
In the arbitration phase, the logic processing unit mainly ensures that the CAN node with the highest priority occupies the bus, and normally, the confirmation of the bus for the node priority is judged according to the arbitration frame (namely, the ID field of the CAN node) of the node: for example, CAN node a and CAN node B, whose ID segments are both dominant 0 in the first bit, now assuming that node a has a higher priority than node B, the first bits of the a and B arbitration frames (i.e., data output to the bus) are the same, and priority is to be dropped at the next level, since a has a higher priority, the next level of a must be dominant 0 and the next level of B must be recessive 1. Node A and node B arbitrate according to the arbitration principle specified by the CAN protocol, and the arbitration result is that B fails in arbitration and A occupies the bus.
However, since the normal CAN node is connected to the logic processing unit through the CAN transceiver, the output of the CAN transceiver is affected by the output signal of the connected normal CAN node and also by the level received by the CAN transceiver from the logic processing unit. The effect is formed by: there will be a delay inside the CAN transceiver, and the time of this delay is denoted as delay*,delay*From the time when the signal of the logic processing unit enters the input terminal of the CAN transceiver to the time when the signal acts on the CANH terminal and the CANL terminal of the CAN transceiver, that is, the signal of the logic processing unit received by the CAN transceiver, to the time when the signal reaches the CANH terminal and the CANL terminal of the CAN transceiver and affects the output of the CAN transceiver, there is a delay between the signal and the CANH terminal*. And the data output by the CAN nodes connected with the CANH end and the CANL end of the CAN transceiver immediately act on the CANH end and the CANL end of the CAN transceiver. Based on the effect of this delay, the output data of the CAN transceiver would be such that: transfusion systemThe output signal is determined by the current signal of the CAN node and the signal input to the CAN transceiver by the logic processing unit, and in delay*Before time and at delay*After the time, the signal output by the logic processing unit has a jump effect on the CANH end and CANL end of the CAN transceiver, so that the final output data of the CAN transceiver is in delay*Before and after the jump occurs, the jump is not processed and directly acts on other nodes to influence the arbitration result of the bus.
To eliminate this jump, the present invention uses a signal opposite to the jump signal to superimpose the signal output from the CAN transceiver, thereby eliminating the jump.
Based on the above analysis, the present invention performs bus arbitration using the following method:
if the CAN node A is a common CAN node, the logic processing unit takes (RXA | (-TXA _ delay)) as an action signal of the CAN node A acting on other CAN nodes; where RXA is an actual output signal of CAN node a, | represents an or operation in a logical operation, — represents an inverted symbol, TXA represents a signal received by CAN node a, TXA _ delay represents a delay of time duration, which is performed on signal TXA, and delay ═ delay*+f×L,delay*The maximum propagation delay of the CAN transceiver is represented, f multiplied by L represents the wiring delay, f is a delay parameter, and L is the wiring length between the CAN node and the CAN transceiver.
delay*The maximum cyclic delay determination may be selected according to the selected CAN transceiver manual, and f × L represents the wiring delay. Taking the CAN transceiver TJA1051 as an example, as CAN be seen from the data manual, the maximum propagation delay is 220ns, and the minimum propagation delay is 40ns, so 220ns is taken as delay*Time. Considering the wiring length again, if the CAN transceiver and the logic processing unit are on the same circuit board, the wiring is very short, and in this case, only delay is needed*The time is slightly enlarged, the enlarged time is wiring delay and is in direct proportion to the wiring length, and the calculation formula is f multiplied by L. When the CAN transceiver and the logic processing unit are not on the same circuit board, the wiring delay increases with the increase of the length of the cable from the CAN transceiver to the logic processing unitThe maximum delay time is not more than 20% of the bit length, the maximum delay time is the sum of the inherent delay and the wiring delay of the CAN transceiver, and the bit length is related to the selected baud rate, for example, the selected baud rate is 500K, the length of the bit is 1S/500K, and the length of the bit is 2 us.
In this embodiment, in the star network topology shown in fig. 1, impedance matching of each node branch with different lengths is simple, and an impedance matching fixed rule of 120 ohms is used, that is, 120 ohms impedance matching is adopted between CAN _ H and CAN _ L of a CAN transceiver. The CAN node interface CAN be reserved on the logic processing unit CPLD circuit board, and the interface form CAN be designed according to the requirements, so that the expansion is very convenient.
In one or more embodiments of the device for implementing CAN bus communication star connection according to the present invention, each CAN node interface of the logic processing unit has a data input RX and a data output TX; each data input end RX is connected with a pull-up resistor in series, when a CAN node is not connected or fails, because the pull-up resistor exists, a recessive level 1 is sent, and the logic operation results of other signals are not influenced.
It is to be understood that the features listed above for the different embodiments may be combined with each other to form further embodiments within the scope of the invention, where technically feasible. Furthermore, the particular examples and embodiments of the invention described are non-limiting, and various modifications may be made in the structure, steps, and sequence set forth above without departing from the scope of the invention.
The above-described embodiments, particularly any "preferred" embodiments, are possible examples of implementations, and are presented merely for a clear understanding of the principles of the invention. Many variations and modifications may be made to the above-described embodiments without departing substantially from the spirit and principles of the technology described herein, and such variations and modifications are to be considered within the scope of the invention.

Claims (4)

1. A device for realizing CAN bus communication star connection is characterized by comprising a logic processing unit and at least two CAN nodes, wherein the types of the CAN nodes comprise a common CAN node and a soft core ARM node; the soft core ARM node is directly connected with the logic processing unit; the CAN node is connected with the logic processing unit through a CAN transceiver, wherein CAN _ H and CAN _ L cables of the common CAN node are respectively connected with CAN _ H and CAN _ L pins of the CAN transceiver, and the CAN transceiver is connected with the logic processing unit through RX and TX pins;
the logic processing unit controls communication among all nodes through a state machine, after the operation is started, the state machine always sends recessive bit 1 to all nodes, all nodes judge that a bus enters an idle state when receiving continuous 11 recessive bit 1, at the moment, if a node needing to occupy the bus sends data to the logic processing unit, if only one CAN node A sends data, the CAN node A occupies the bus, and if a plurality of CAN nodes send data at the same time, the logic processing unit enters an arbitration stage;
in the arbitration phase, the logic processing unit processes signals of each CAN node as follows:
if the CAN node A is a common CAN node, the logic processing unit takes (RXA | (-TXA _ delay)) as an action signal of the CAN node A acting on other CAN nodes; where RXA is an actual output signal of CAN node a, | represents an or operation in a logical operation, — represents an inverted symbol, TXA represents a signal received by CAN node a, TXA _ delay represents a delay of time duration, which is performed on signal TXA, and delay ═ delay*+f×L,delay*The maximum propagation delay of the CAN transceiver is represented, f multiplied by L represents wiring delay, f is a delay parameter, and L is the wiring length between the CAN node and the CAN transceiver;
if the CAN node A is a soft core ARM node, the logic processing unit takes the RXA as an action signal of the CAN node A to act on other CAN nodes;
the signal finally sent to a CAN node B by the logic processing unit is the logical AND of the action signals acted on the node B by other nodes; according to an arbitration principle specified by a CAN protocol, each CAN node finally wins in arbitration to obtain a bus control right;
after the arbitration phase is finished, the bus is occupied by a certain CAN node, and after the occupation is finished, the bus returns to an idle state to wait for the start of the next communication.
2. The apparatus of claim 1, wherein the maximum delay time delay is not more than 20% of the bit length.
3. The apparatus of claim 1, wherein each CAN node interface of the logic processing unit has a data input RX and a data output TX; each data input terminal RX is connected to a pull-up resistor.
4. The device of claim 3 wherein the CAN transceiver is configured to use 120 ohm impedance matching between CAN _ H and CAN _ L.
CN202010106334.2A 2020-02-20 2020-02-20 Device for realizing CAN bus communication star connection Active CN111181828B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010106334.2A CN111181828B (en) 2020-02-20 2020-02-20 Device for realizing CAN bus communication star connection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010106334.2A CN111181828B (en) 2020-02-20 2020-02-20 Device for realizing CAN bus communication star connection

Publications (2)

Publication Number Publication Date
CN111181828A CN111181828A (en) 2020-05-19
CN111181828B true CN111181828B (en) 2021-06-25

Family

ID=70656651

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010106334.2A Active CN111181828B (en) 2020-02-20 2020-02-20 Device for realizing CAN bus communication star connection

Country Status (1)

Country Link
CN (1) CN111181828B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201541272U (en) * 2009-11-16 2010-08-04 北京经纬恒润科技有限公司 Controller area network bus star-shaped network connector and FPGA
CN202145277U (en) * 2011-07-06 2012-02-15 湖北三江航天险峰电子信息有限公司 CAN bus communication control system
CN102752180A (en) * 2012-06-18 2012-10-24 中国电子科技集团公司第十研究所 Method for achieving controller area network (CAN) bus network nodes
CN104424053A (en) * 2013-08-27 2015-03-18 上海机电工程研究所 ARM embedded type control system and control method based on redundancy architecture
CN207051704U (en) * 2017-08-09 2018-02-27 江西科技学院 Can controller

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104750068B (en) * 2015-02-13 2018-08-21 湖北锐世数字医学影像科技有限公司 A kind of data transmission and control device of multinode sensor network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201541272U (en) * 2009-11-16 2010-08-04 北京经纬恒润科技有限公司 Controller area network bus star-shaped network connector and FPGA
CN202145277U (en) * 2011-07-06 2012-02-15 湖北三江航天险峰电子信息有限公司 CAN bus communication control system
CN102752180A (en) * 2012-06-18 2012-10-24 中国电子科技集团公司第十研究所 Method for achieving controller area network (CAN) bus network nodes
CN104424053A (en) * 2013-08-27 2015-03-18 上海机电工程研究所 ARM embedded type control system and control method based on redundancy architecture
CN207051704U (en) * 2017-08-09 2018-02-27 江西科技学院 Can controller

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CAN总线星型网络拓扑结构研究与设计;张振德;《中国优秀硕士学位论文全文数据库 信息科技辑》;20111215;全文 *
基于FPGA的CAN控制器软核的设计与实现;吴从中等;《电路与系统学报》;20110615;第16卷(第3期);全文 *

Also Published As

Publication number Publication date
CN111181828A (en) 2020-05-19

Similar Documents

Publication Publication Date Title
CN102880143B (en) Single control area network (CAN) controller hot-redundant CAN bus system and implementation method thereof
US20040017815A1 (en) Physical layer device having a serdes pass through mode
CN1333560C (en) High-performance optical fibre CAN communication system for strong electromagnetism interference environment
CN104301191A (en) Bus system
CN108702557B (en) Robot system
CN207896980U (en) Communication structure and communication system
CN107980223B (en) Ethernet interconnection circuit and device
CN111181828B (en) Device for realizing CAN bus communication star connection
US6609172B1 (en) Breaking up a bus to determine the connection topology and dynamic addressing
CN115442178B (en) Multi-axis servo bus control circuit and multi-axis servo system
CN116684389A (en) Address automatic allocation method and host, slave and communication equipment with same
CN109725568B (en) Controller expansion bus device
US4835776A (en) Communication filter
JP2003198572A (en) Deterministic field bas and process for management of such a bus
CN113194048B (en) Device for dynamically switching CPU and GPU topology and use method
CN105812216B (en) PBUS transformerless EtherCAT communication circuit and application method
CN115695069A (en) Logic ring-shaped CAN bus networking and intelligent reconstruction method
CN212811729U (en) On-board communication circuit and device based on CAN communication
CN213367785U (en) On-board communication circuit and device based on CAN communication
CN115328834A (en) Method, equipment and communication system for high-speed, real-time and redundant reliable communication
CN209447019U (en) RS485 equipment connects circuit and system
CN209118135U (en) A kind of automobile-used CAN bus telecommunication circuit of electrical salf-walking
CN209860929U (en) Communication bus structure
CN215067812U (en) CAN network based on CAN controller and gate circuit are constituteed
CN113169923A (en) On-board communication circuit and device based on CAN communication

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant