The controller area network (CAN) bus has gained popularity in applications such as process control, automation, medical, and manufacturing due to high immunity to EMI and its ability to find and repair data errors. Because a CAN bus often runs over long distance interconnecting multiple systems, isolation between the bus and the systems connected to it becomes crucial. Isolation protects against dangerous electrical transients and eliminates ground loops, responsible for data errors due to ground potential differences. This article gives a brief overview of CAN’s physical layer and the importance of system isolation. This article also explains the functional principle of a digital isolator and introduces an isolated CAN transceiver.
CAN Bus Overview
The CAN bus protocol is defined by the international standardization organization (ISO) in the ISO11898 standard as a two-wire, serial communications bus using asynchronous data transmission. The standard specifies a maximum data rate of 1 Mbps at 40 meters of cable length and up to 30 bus nodes. Non-return-to-zero (NRZ) encoding is used for data transmission to assure high noise immunity and compact messages with a minimum number of signal transitions.
The protocol is of the carrier-sense multiple access type (CSMA), supported by collision detection and arbitration on message priority (CD+AMP). CSMA means that each bus node must monitor bus activity for a prescribed time interval before trying to send a message. CD+AMP means that in the case of two or more nodes trying to access the bus simultaneously, a data collision is detected and resolved through bit-wise arbitration, based on the preprogrammed priority in a message’s identifier field.
A message consists of a data frame controlled by start and stop bits (Figure 1). In between these bits the frame contains fields for identification, control, data, cyclic redundancy check and acknowledgement.
One of the protocol’s main features is the message identifier field (MID) through which a non-destructive bit-wise arbitration is performed to assure no data is lost during bus access collisions.
To perform arbitration the protocol defines the two digital logic states on the bus as recessive for logic high, or a one, and as dominant for logic low, or a zero. Furthermore, the protocol is designed to allow every bus node to listen and to transmit at the same time.
Because a dominant bit always overwrites a recessive bit on the bus, for a node to gain access priority over other participating nodes, its message identifier field must contain a high number of dominant bits than the MIDs of competing nodes.
With each node listening to the bus while sending its own message, every node sending a “1” (recessive bit) while detecting a “0” (dominant bit), stops transmitting immediately. Once the node with the highest priority has won the arbitration, it continues to send the remainder of the message frame.
Bus Signal Levels
As shown in Figure 2, CAN transceivers use open-drain output stages with internal pull-up resistors connected to approximately half the supply voltage (VCC/2 + 10%) to create a differential bus signal at CANH (high) and CANL (low).
When transmitting a dominant bit, both output transistors conduct, producing voltage levels of VCC – 0.9V typical at CANH and 1.5V typical at CANL. The resulting differential output voltage VOD constitutes a dominant bit and thus, logic low (Figure 3). To transmit a recessive bit, both transistors become high-impedance and only the VCC/2 potential is applied via the pull-up resistors to both outputs CANH and CANL, which represents logic high, or a one.
A unique feature of CAN is that at the transceiver control side, or the single-ended side, a voltage present at the driver input represents a one, and no voltage represents a zero. At the driver output, however, zero differential bus voltage (recessive) represents a one, while a fully developed differential bus voltage represents a zero.
The standard specifies a maximum cable length of 40 meters at a data rate of 1 Mbps. This is because the arbitration scheme requires that the wave front of the signal can propagate to the most remote node and back again before a bit is sampled. However, by reducing the data rate it is possible to accomplish far greater distances. Table 1 lists some approximated cable lengths versus their maximum applicable data rates.
Table 1. Cable length versus Data Rate:
ISO11898 is defined for the use of twisted cable, shielded or unshielded, with a characteristic cable impedance of Z0 = 120? nominal. Thus, an industrial RS-485 cable, such as the Belden 3107A shown in Figure 4, is perfectly suited for CAN bus applications.
Every CAN bus must be terminated with termination resistors of RT = 120? at each cable end to assure minimum reflections. Stubs, basically representing unterminated line branches, should be kept as short as possible, but must not exceed 0.3 meters in length (Figure 5).
High noise levels on a network bus have the potential to destroy bus transceivers. This noise comes primarily from two sources, ground loops and electrical line surges.
Ground loops occur when bus node circuits at remote locations use their local ground as reference potential. In this case signal return currents cannot flow back to the ground potential of the sourcing driver on a direct path. Instead they are forced to return via the complex ground network of the electrical installation and, thus, become susceptible to directly coupled, large switching currents of electric machinery.
Connecting multiple local grounds directly through a ground wire makes matters worse. Because these grounds often possess significant differences in voltage levels, a low-impedance ground wire will cause high, unintended compensation currents to flow, which can damage or destroy components.
Electrical surges are usually the result of inductive-coupled currents into the network cable. In particular, long cable runs are highly susceptible to these surges as the cable might pass electrical equipment switching large currents, or might run close to high-current carrying conductors.
Other surges include electrostatic discharges (ESD) caused by humans during installation and maintenance work, or by direct or indirect lightning strikes.
Protecting a network against this destructive energy requires the galvanic isolation of the bus system from the local node circuitry. Modern digital isolators accomplish this goal by incorporating capacitive isolation barriers with up to 4kV of peak isolation and a transient immunity of up to 50 kV/µs.
The galvanic isolation barrier of a digital isolator uses capacitive isolation technology. Figure 6 shows a simplified block diagram of the signal paths. This section consists of two channels, a high-speed channel (shown in blue) transferring data rates from 100 kbps to 150 Mbps, and a low-speed channel (shown in orange) providing a bandwidth from less than 100 kbps down to dc.
Both channels have in common that they require input-signal pulses that are fast enough to cross the small capacitors of the isolation barrier. By crossing the barrier, the input pulses are differentiated into fast transients and then applied to a flip-flop, where they are reconverted into pulses identical in shape and phase to the original signal prior to the barrier.
The difference between the signal processing in the high-speed channel and the processing in the low-speed channel is that in the high-speed channel input signals are applied directly to the isolation barrier.
In the low-speed channel slower signals are pulse-width modulated to higher frequencies before they cross the isolation barrier. Because pulse-width modulation (PWM) introduces a carrier frequency component, a low-pass filter (LPF) is required at the output of the low-speed channel to filter out the carrier frequency and to receive the original input signal.
In order to determine whether a high- or low-speed signal needs to be processed, the high-speed channel possesses a watch-dog timer (WD) which checks for consecutive high-speed signal edges. If the watch-dog timing window runs out, the watch-dog automatically switches the isolator output from the high-speed to the low-speed channel.
Isolated CAN Transceivers
Because digital isolators use 3V/5V logic switching technology and do not accommodate the differential signals of the CAN bus, they must be placed on the single-ended, logic side of a CAN transceiver (Figure 7).
Also modern CAN transceivers offer many features and performance improvements over the original version shown in Figure 2, and as such might require the isolation of control signals in addition to the standard data channels for transmit and receive.
The transceiver control input “S” in Figure 7 allows a CAN controller to program the transceiver for two different modes of operation: high-speed or silent mode. Hence, this control path must be made available to the controller via an additional isolator channel.
The high-speed mode is selected by applying a logic low level to S. If a high logic level is applied, the device enters a listen-only silent mode during which the driver is switched off while the receiver remains fully functional. In silent mode, all bus activity is passed on by the receiver output to the local protocol controller. When data transmission is required, the controller reverses this low-current mode by placing a logic-low on the S pin to resume full operation.
Figure 8 shows the latest achievement in CAN transceiver design which includes the integration of the isolation barrier with a high-performance transceiver featuring over-temperature, cross-wire, over-voltage and loss-of-ground protection from –27V to 40V, a common-mode range from –12 V to 12 V, and the ability to withstand voltage transients from –200 V to 200 V.
Furthermore, a dominant-time-out circuit prevents the driver from blocking network communication due to hardware or software failure. The time-out circuit is triggered by a falling edge on TXD. If no rising edge occurs before the time-out constant of the circuit expires, the driver is disabled. The circuit is then reset by the next rising edge on TXD.
With the introduction of fully integrated isolated CAN transceivers, the protection of a CAN network from dangerous electrical transients has just become easier. Texas Instruments offers a wide portfolio of robust, digital isolators and high-performance CAN transceivers for exactly this task.
• To download this application note, “Introduction to the Controller Area Network (CAN),” (SLOA101A) July 2008, visit: www.ti.com/sloa101a-ca.
A tour on the CAN Protocol can be found on: www.kvaser.com
About the Author
Thomas Kugelstadt is a Senior Applications Engineer at Texas Instruments where he is responsible for defining new, high-performance analog products and developing complete system solutions that detect and condition low-level analog signals in industrial systems. During his 20 years with TI, he has been assigned to various international application positions in Europe, Asia and the U.S. Thomas is a Graduate Engineer from the Frankfurt University of Applied Science.