Make CAN Beyond Automotive into Industrial

Since the first Controller Area Network (CAN) emerged in 1987, what was once an automotive networking interface has now expanded into industrial applications. With the widening footprint have come a demand for transceivers with longer bus lengths, more bus nodes, higher data throughput and greater voltage isolation.

With more than 20 semiconductor companies now offering devices, designers have many decisions to make and need to fully understand the nuances of the specification and its latest iterations before selecting the optimum device. To that end, we will dig into the specification and topics such as asymmetry, before bringing you up to speed on some interesting CAN devices and how to take full advantage of them.

Why CAN?

The controller area network (CAN bus) was first developed in the early 1980s at Robert Bosch GmbH. The first CAN controller chips were introduced in the market in 1987 and the first vehicle to implement the CAN bus was on the road in 1988. In the almost 30 years since, usage of the CAN bus has become ubiquitous in vehicles all over the world and in various forms of transportation, including busses, trains, planes and ships.

It is also widely used in many industrial settings such as plant automation, agriculture and heavy equipment, medical devices, elevators, and lift control. It is highly suitable for many embedded control applications as a low cost, low protocol overhead, deterministic network that features error detection and retransmission.

More than 20 semiconductor companies offer devices that support the CAN bus and there are many tool vendors and commercial and open source versions of software available – from drivers up through middleware and higher level protocol stacks.

Let’s take a look at some of the characteristics of the CAN bus that makes it useful in so many settings.

CAN architecture

CAN is a multi-master serial bus that connects two or more electronic modules or nodes. The bus interconnect is (usually) a two-wire twisted pair with differential signaling. The CAN physical layer transceiver converts the CAN protocol logical ones and zeros to dominant and recessive bits on the bus, as shown in Figure 1.

Diagram of CAN bus signaling 

Figure 1: CAN bus signaling. The two CAN pins (CAN_H and CAN_L) form a differential pair. The bus is driven to the dominant state (logic 0) by the transceiver open-drain driver. In the recessive state, the lines are not driven and hence fall back to their nominal voltage. (Source: Digi-Key Electronics)

The CAN transceiver driver is an open-drain configuration, which allows multiple drivers to act on the bus at one time without conflict. The natural (undriven) state of the bus is the recessive state (logic 1). When a node drives the bus, the recessive state is overridden to the dominant state, which represents a logic 0.

CAN messaging is accomplished by a collection of bits known as frames. There are four frame types but the primary type is the data frame, as shown in Figure 2.

Image of format of a CAN data frame

Figure 2: Format of a CAN Data Frame. New frames begin with the SOF (Start of Frame) after the IFS (Interframe Space) of the previous frame. (Source: Digi-Key Electronics)

All nodes can attempt to transmit at the same time but only one message is allowed on the bus at a time. This is made possible by the arbitration field.

After the Start of Frame synch bit, all transmitting nodes send their message identifier during the arbitration phase. The identifier represents the priority of the message – the lower the number, the higher the priority (remember, dominant bits win over recessive). The lowest identifier wins the arbitration. The losers stop transmitting and queue their message up to try again in the next frame.

The winner continues on to send a control field (which represents the number of data bytes to follow), the data, and the cyclic redundancy check (CRC) bits. During the acknowledgement (ACK) field, all receiving nodes that received the message without an error send a 0 bit.

This direct in-frame response is one of the powerful features of CAN: transmitting nodes know right away if they had an error-free transmission. However, this imposes a limit on the bit rate because the two-way propagation time for the total bus length must not be longer than the acknowledgement dominant pulse.

Another limit of what is now called Classical CAN networks is that the number of data bits per message is limited to a maximum of eight. This was adequate for vehicle nodes when CAN was first introduced, but today’s systems, both inside and outside the vehicle, typically deal with larger data sizes. The 8-byte limit also impacts bus efficiency. To send 64 bits of data, 46 or more protocol bits are used for arbitration, control, CRC, etc.

CAN FD to the rescue

CAN Flexible Data, or CAN FD, was introduced in 2012 to help address some of these limitations of Classical CAN. CAN FD allows transmission of a CAN data frame with two different bit rates: a slower rate for the arbitration, control and acknowledgement, fields, and a faster rate for the data field.

Since the acknowledgement is included in the slower rate the data field bit rate can be higher since it is not impacted by the two-way prop delay on the bus, only the transmitter and receiver delays and bus characteristics limit the data rate. This method also allows for backward compatibility with existing CAN controllers. In addition, CAN FD data frames support up to 64 bytes of data along with additional CRC bits, maintaining a hamming distance of six, even with the longer data field.

CAN transceiver specs are spelled out in ISO 11898-2. The latest version of this document added prop delay specs for the transmitter and receiver portions of transceivers and defined the total loop delay (TXD to RXD) to be less than 255 ns. Since CAN drivers are not the push-pull type, the transmitter and the receiver delays are not symmetric for dominant-to-recessive and recessive-to-dominant transitions.

ISO 11898-2 now specifies maximum asymmetry for the delays, as well as the transceiver internal loop time. This is important because the asymmetry leads to a shortening of the recessive bit, which becomes the limiting factor in the data rate. To properly design the network, the asymmetry limits need to be known.

The ISO 11898-2 transmitter delay asymmetry spec is defined as the resulting recessive bit width when driving a 60 Ω, 100 pF bus load, as shown in Table 1.

Data Phase Bit Rate Bit Nominal Width Bus Recessive Min Buss Recessive Max

2 Mbit/s
500 ns
370 ns
570 ns

5 Mbit/s
200 ns
110 ns
225 ns

Table 1: The transmitter delay is specified when driving a 60 Ω 100 pF bus load. (Source: ISO 11898-2)

The receiver delay asymmetry, expressed as a deviation from the nominal bit time, is shown in Table 2.

Data Phase Bit Rate Min Deviation from Normal Max Deviation from Normal

2 Mbit/s
-65 ns
40 ns

5 Mbit/s
-45 ns
15 ns

Table 2: Receiver delay asymmetry expressed as a deviation from the nominal bit time. (Numbers derived from ISO 11898-2)

Adding the min and max deviations to the nominal gives the worst-case min and max recessive bit widths (excluding other network factors such as ringing), as shown in Table 3.

Data Phase Bit Rate Bit Nominal Width Bus Recessive Min Bus Recessive Max Min Deviation from Normal Max Deviation from Normal

2 Mbit/s
500 ns
435 ns
530 ns
-65 ns
30 ns

5 Mbit/s
200 ns
155 ns
210 ns
-45 ns
10 ns

Table 3: Worst-case min and max recessive bit widths are derived by adding the min and max deviations. (Numbers derived from ISO 11898-2)

Notice that the asymmetry specified for the 5 Mbit/s data rate is tighter than the 2 Mbit/s. Higher-data-rate transceivers can be used in lower-data-rate networks to take advantage of this.

The loop-delay asymmetry within a single CAN transceiver is usually less than the worst-case calculation shown above and is specified in CAN FD transceivers data sheets for the data bit rates they support.

CAN FD transceivers that support the higher data rates are now in the market. The MCP2542FD from Microchip Technology is an example, see Figure 3.

Diagram of MCP2542FD CANFD transceiver from Microchip

Figure 3: The MCP2542FD CANFD transceiver from Microchip supports transmissions of up to 8 Mbits/s with improved prop delays and loop-delay asymmetry. (Source: Microchip Technology) 

Its transceiver loop delay (TXD input transition to RXD output) is 120 ns vs. the ISO 11989-2 spec of 255 ns. The loop-delay asymmetry (taken from the data sheet) is also improved, as shown in Table 4.

Data Phase Bit Rate Bit Nominal Width Bus Recessive Min Bus Recessive Max

2 Mbit/s
500 ns
450 ms
550 ms

5 Mbit/s
200 ns
160 ms
220 ms

8 Mbit/s
200 ns
85 ns
140 ns

Table 4: Loop-delay asymmetry taken from MCP2542FD transceiver datasheet. (Source: Microchip Technology)

There is no ISO 11989-2 spec for 8 Mbit/s transceivers today, but by anticipating the need, the MCP2564FD offers improved performance at the lower bit rates. It also has very low (4 µA) standby current and wake-up-on-bus activity. There is also a version that supports the CAN bus Wake Up Pattern (WUP) per the ISO 11898-2 spec.

Implications for industrial uses

The primary driver for the CAN FD spec was to support larger data payloads at a faster rate for module flash programming at the end of a car assembly line. With Classical CAN this can take several hours running at 500 kbit/s. By using a 32-byte data payload offered by CAN FD, a 4x improvement can be made just by expanding the payload and increasing the data rate to 2 Mbit/s. Using a 64-byte payload and 5 Mbit/s, a greater than 10x bandwidth improvement is possible.

Since the equivalent of eight Classical CAN data frames can be sent with one CAN FD frame, the protocol overhead is significantly reduced. This bus efficiency improvement can be quite beneficial in industrial settings, especially if the data rate is lower due to long bus lines. With less overhead bits, more data can be transferred at a slower data rate, and still maintain latency requirements.

A further advantage of CAN FD’s larger data size is improved support of data coherency. An example of this is in multi-axis motion controllers where it is necessary to have a time synchronous view of the controller positions. These data sets are larger than can be transferred on one Classical CAN frame, but fit within a CAN FD frame. Again the bus efficiency improvement of combining this data into one message transfer is another benefit.

The ISO 11898 standard is specified for a max cable length of 40 meters, max stub length of 0.3 meters and 30 nodes max for a 1 Mbit/s arbitration-phase bit rate. This is adequate for automotive applications, but these constraints don’t fit many industrial use cases. Fortunately bus speed, bus length, wire size and number of nodes can be adjusted with careful network design.

Industry organizations such as CAN in Automation (CiA) publish specs and recommendations for expanded network configurations. For example, the CiA 102 CAN Physical Layer for Industrial Applications document recommends the following standard bit rates, shown in Table 5.

Bit Rate Nominal bit time

1 Mbit/s
1 μs

800 kbit/s
1.25 μs

500 kbit/s
2 μs

250 kbit/s
4 μs

125 kbit/s
8 μs

50 kbit/s
20 μs

20 kbit/s
50 μs

10 kbit/s
100 μs

Table 5: Recommended arbitration phase bit rate for industrial applications. All nodes on the bus must operate at the same data rate.  (Source: CAN in Automation)

In addition, CiA 303 gives recommendations for standard DC parameters for networks of less than 64 nodes, as shown in Table 6. CiA also gives recommendations for larger node networks.

Bus length [m] Bus cable1 Termination resistance [Ω] Bit-rate [kbit/s] Length-related resistance [mΩ/m] Cross-section [mm²]

0 to 40
70
0.25 to 0.34
124
1000 at 40 m

40 to 300
<60
0.34 to 0.6
150 to 300
<e;500 at 100 m

300 to 600
<40
0.5 to 0.6
150 to 300
>100 at 500 m

600 to 1000
<26
0.75 to 0.8
150 to 300
>50 at 1 km

Table 6: CiA 303 recommendations for standard DC parameters for networks of 64 nodes. (Source: CAN in Automation)

1 Recommended cable AC parameters: 120-Ω impedance and 5-ns/m specific line delay

Table 2: Recommendations for bus cable parameters, termination resistance and max bit rate for extended bus lengths.

CAN FD transceivers such as the MCP2564FD are ideal for longer bus lengths because their improved propagation delay and loop delay symmetry provide additional bus margin, enable faster data rates or allow more nodes on the network.

Another CAN FD transceiver with industrial benefits is the TCAN337G single transceiver from Texas Instruments (Figure 4).

Diagram of TCAN337G from Texas Instruments

Figure 4: Functional block diagram of the TCAN337G from Texas Instruments. Its enhanced driver and receiver specs make it suitable for CAN networks with a large number of nodes. (Courtesy of Texas Instruments)

The TCAN337G matches the ISO 11989-2 specs for 2 Mbit/s and 5 Mbit/s data rates, but has an improved driver spec that allows it to meet the minimum differential bus voltage with a 50 Ω load instead of the nominal 60 Ω load. The minimum differential input resistance is 30 kΩ, three times higher than most transceivers. The end result of these improvements is that if all the transceivers were TCAN337G devices, up to 120 nodes could be placed on a network with a coupling resistance of 330 Ω (up to 1000 meters long).

The TCAN337G also features a Fault pin that reports TXD and RXD dominant timeout faults, thermal shutdown and low-voltage lockout conditions, making it useful for high-reliability systems. The device can also be put to sleep in a low-power state and supports the ISO 11898 CAN bus wakeup up pattern (WUP).

High-voltage systems found in electric or hybrid vehicles, power-generation or energy-storage systems require galvanically isolated networks to prevent shock hazards. This is typically done through optical isolators. However, the delay time through these isolators increases the loop delay of the transceiver, making them unsuitable for CAN FD applications. The TJA1052i from NXP solves this problem with a novel capacitive isolation technique that can provide up to 5 kV (RMS) isolation, see Figure 5.

Diagram of NXP Semiconductors TJA1052i

Figure 5: For high-voltage systems, the TJA1052i CAN FD transceiver from NXP uses capacitive galvanic isolation to get 5 kV isolation with short delay times to support CAN FD data rates. (Courtesy of NXP Semiconductors) 

The isolation is placed between the RXD and TXD pins and the rest of the circuitry. On the input signal side of the barrier (for example the TXD pin), an RF oscillator is enabled if the input signal is a 1 (or recessive). This signal is then capacitively coupled across the barrier where it is received by an RF demodulator. The presence of the demodulated signal indicates a recessive state; absence of the RF energy is the dominant state. The scheme works in the same way for RXD except the RF oscillator and demodulator are on the opposite sides of the barrier. This method of isolation adds very little delay, allowing the TJA1052i to support CAN FD rates of both 2 Mbits/s and 5 Mbits/s.

Galvanically isolating the transceiver can also improve CAN signal integrity in noisy environments. High inverter switching currents can induce large ground noise that can be coupled onto signal lines and corrupt data transmissions. Isolating these signals eliminates that source of message corruption that can dramatically improve throughput in noisy systems.

Conclusion

Since the first products appeared, the CAN bus continues to evolve to meet new requirements. With CAN FD, component manufacturers continue to innovate to enable networks optimized for specific applications with greater performance requirements. With over 20 supplier families to choose from and supported by an extensive and robust tool chain, CAN is positioned to support industrial networking needs now and well into the future.

  • Make CAN Beyond Automotive into Industrial已关闭评论
    A+
发布日期:2019年07月14日  所属分类:参考设计