Take CAN and RS485 as examples to summarize their respective advantages and doubts "Why CAN can replace RS485"

In recent years, the CAN bus has been gradually recognized by engineers, and with its outstanding features, it has gradually replaced the bus such as RS485. This article will take CAN and RS485 as examples to summarize their respective advantages, and solve the problem "Why CAN can replace RS485".

Fieldbus was developed internationally in the early 1990s. It is widely used in fieldbus technology process automation, manufacturing automation, building automation and other fields of field intelligent device interconnection communication network.

Figure 1 Point-to-point connection

When using point-to-point communication, there are many connections and complicated lines. Two or two connections require two or two connections, and n(n-1)/2 lines are required.

Figure 2 bus connection method

Information is transmitted on a common channel, and the recipient of the message receives all the information from the channel and filters the information sent to itself according to the rules. The connection is small and the structure is clear, only ≤n+1 lines are needed.

At present, the mainstream bus modes of industrial sites include RS232, RS485, CAN, Devicenet, etc. What are the characteristics and applications of so many bus types? This article compares and analyzes the most commonly used RS485 and the popular CAN bus to help you choose a more suitable communication solution.

Take CAN and RS485 as examples to summarize their respective advantages. "Why CAN can replace RS485"

Figure 3 Current mainstream fieldbus

CAN is the abbreviation of ControlAreaNetwork, which was first introduced by BOSCH in Germany, and is used for data communication between internal measurement and execution components of automobiles.

First, CAN field bus

Take CAN and RS485 as examples to summarize their respective advantages. "Why CAN can replace RS485"

Figure 4 CAN in the car network topology

CAN bus features:

International standard industrial grade field bus, reliable transmission and high real-time performance;

Long transmission distance (up to 10Km), fast transmission rate (up to 1MHz bps);

A single bus can connect up to 110 nodes, and can easily expand the number of nodes;

Multi-master structure, the status of each node is equal, convenient regional networking, high bus utilization;

High real-time, non-destructive bus arbitration technology, high priority nodes without delay;

The faulty CAN node will automatically close and cut off the connection with the bus, without affecting the communication of the bus;

The message is short frame structure and has hardware CRC check, the interference probability is small, and the data error rate is extremely low;

Automatically detecting whether the message is sent successfully or not, can be automatically retransmitted by hardware, and the transmission reliability is high;

The hardware message filtering function only receives the necessary information, reduces the burden on the CPU, and simplifies the software preparation;

The communication medium can be a common twisted pair cable, a coaxial cable or an optical fiber;

The CAN bus system has a simple structure and a very high cost performance.

Second, RS485 bus

RS-485 is developed from RS-422. It can be used in two different ways: two-wire and four-wire. The two-wire system can realize true multi-point two-way communication. When using a four-wire connection, only point-to-multipoint communication can be achieved. That is, there can only be one master (Master) and the rest as slaves (Slave).

RS485 interface standard features:

RS-485 electrical characteristics: The voltage difference between the two lines is ± (2-6) V, the interface signal level is reduced, the chip of the interface circuit is not easily damaged, and the level is compatible with the TTL level, which is convenient TTL circuit connection;

The maximum transmission rate of RS-485 data is 10Mbps;

The RS-485 interface is a combination of balanced driver and differential receiver, which has enhanced anti-common-mode dry capability, that is, good anti-noise interference;

The maximum transmission distance of the RS-485 interface is 4000 feet, which is actually up to 3000 meters. The RS-485 interface allows up to 128 transceivers to be connected on the bus. That is, it has multi-station capability, but only one transmitter can transmit at any time on the RS-485 bus;

The RS-485 interface has good anti-noise, long transmission distance and multi-station capability, making it the preferred serial interface;

A half-duplex network consisting of RS485 interfaces generally requires only two connections, and the interfaces are transmitted by shielded twisted pair.

Third, the comparison between CAN bus and RS485

1, speed and distance: CAN and RS485 at a high rate of 1Mbit / S transmission distance is not more than 100M, can be said that the distance on the high speed is similar. However, when the low-speed CAN is 5Kbit/s, the distance can reach 10KM. The enhanced RS485 transceiver can transmit more than 10KM at the lowest rate (both without relay), and the two are indistinguishable in long-distance transmission.

Take CAN and RS485 as examples to summarize their respective advantages. "Why CAN can replace RS485"

Figure 5 CAN long-distance communication advantages in smart home applications

2, bus utilization: RS485 is a single master-slave structure, that is, there can only be one host on a bus, communication is initiated by it, it does not have the next command, the following nodes can not be sent, and must be answered after the end, after receiving the reply The host asks the next node, in order to prevent multiple nodes from sending data to the bus, causing data confusion. The CAN-bus is a multi-master-slave structure. Each node has a CAN controller. When multiple nodes send, the ID number is automatically arbitrated by sending the ID number, so that the bus data can be implemented well, and one node is sent out, and another node is sent. A node can detect that the bus is idle and send it immediately, which saves the host's query, improves the bus utilization, and enhances the speed. Therefore, in systems with high requirements such as automobiles, CAN bus, or other similar buses are used.

3. Error detection mechanism: RS485 only specifies the physical layer, but no data link layer, so it is unrecognizable for errors unless there are physical errors such as short circuits. This is easy to cause a node to be destroyed, desperately send data to the bus (always send 1), which causes the entire bus to collapse. So once RS485 is broken, this bus network is hung. The CAN bus has a CAN controller that can detect any error on the bus, automatically convert the error state, and close the bus in time to protect the bus. If other node errors or self-errors are detected, an error frame will be sent to the bus to prompt other nodes. This data is wrong, so be careful. In this way, once a CAN program runs away, its controller automatically locks and protects the bus. Therefore, in a network with high security requirements, CAN is very strong.

4, device price: With the rapid development of CAN bus, the current price of CAN isolated transceiver has a trend with the price of RS485, RS485 transceiver gradually lost the price advantage.

5. Development difficulty: CAN has a perfect communication protocol. The underlying mechanism is realized by the CAN controller chip and its interface chip. The R&D engineers only need to understand the application layer oriented to the customer, which greatly reduces the development difficulty of the system and shortens the development cycle. . The RS-485 protocol only has an electrical protocol. The customer development needs to develop the link layer and the application layer by itself, which is difficult to develop.

Fourth, summary comparison

Take CAN and RS485 as examples to summarize their respective advantages. "Why CAN can replace RS485"

Rack Battery Cabinets

Rack Battery Cabinets,Hot Swap Battery,Plastic Front-Panels,Steel Enclosures

Shenzhen Unitronic Power System Co., Ltd , https://www.unitronicpower.com