<<

Technically Speaking AUTOMOTIVE ELECTRICAL & AIR CONDITIONING NEWS www.aaen.com.au Common

Lock Lock types of CAN Mirror

This article is the second in a series of articles by Instrument panel Heat Rain Roof Jason Turner Lighting control Engine Seat and Clinton Central body Smith from control gateway Wiper Boot

REDARC. They are writing about the Seat latest in CAN and developments in this rapidly changing field. Climate control Heat Demister Turner & Smith are degree qualified Electronics Design Engineers from REDARC Technologies who design, HS-CAN develop and manufacture smart LS-CAN Mirror electronic products for the Automotive LIN Industry. In their work at REDARC, they Switch panel Lock Lock have gained significant experience in Motor Control Area Network (CAN) training and consulting, module design, development and manufacturing. cross from one to another, as well as this type of CAN is close to the speed of LIN The experience gained by this pair in converting the messages to match the type (which is also a single wire protocol) it is this area has been further enhanced by used on the bus it is crossing to. more common for LIN to be used as the cost of implementation is less than CAN. representing REDARC at both the 14th In this example we can see that there are International CAN Conference (ICC) two different types of CAN busses (HS-CAN The last type of CAN we will discuss is held in November 2013 in Paris, France and LS-CAN) as well as another type of bus called SAE J1939-11 (and 15). Technically and the 13th ICC held in March 2012 in called LIN, which we will examine later. speaking, this type of CAN is not really a Hambach, Germany. new type as it conforms fully to ISO 11898‑2 Let’s take a look at some common types (or HS-CAN), however it goes into more The conference, conducted by CAN of CAN, or more correctly: common ‘CAN detail than HS-CAN. In this standard, the in (CiA) who is the standards’, starting with is set to a fixed 250kbps, and the international users’ and manufacturers’ HS‑CAN. organization that develops and supports ‘-11’ standard defines shielded twisted CAN-based higher-layer protocols, covers High speed CAN is probably the most pair wires, whereas the ‘-15’ standard many CAN-based topics with presenters common type of CAN. It doesn’t have a defines unshielded twisted pair; other and attendees representing companies defined bit rate, but the term encompasses than that the two are identical. This is the from all aspects of CAN development , all bit rates up to and including 1Mbps. It physical standard you will find is used as from chip-makers to system designers, uses the standard two-wire twisted pair the main CAN bus in heavy vehicles, and automotive OEMs, to designers, and of physical layer and is often found in cars and since the standard is so specific, it explains course end-of-line product designers. industrial applications. It is defined by the why it is so compatible across the entire REDARC has previously been represented standard ISO 11898-2. trucking industry. This physical standard is associated with an application layer at these conferences since 2005. Fault tolerant CAN, also known by the protocol also known as J1939, but has name low speed CAN (LS-CAN) is similar This article will discuss some common the suffix ‘-71’. We will also discuss that to HS-CAN in almost every way, except types of CAN, or more correctly, common standard later on. ‘CAN physical layer standards’. that it operates up to a maximum bit rate of 125kbps. By operating at a lower speed, We have discussed “physical layers” and IRSTLY, LET’S LOOK AT an example of it is more fault tolerant and can handle “application layers”, but what exactly Fhow CAN is used in a vehicle as shown more significant faults, such as losing one are these? These terms relate to what is in the picture above. A vehicle rarely uses of the CAN wires. FT-CAN uses different called the “Seven Layer Open Systems just a single CAN bus. Normally a vehicle will transceivers to HS-CAN that are able to Interconnection Model” or OSI Model. This use multiple busses separated into groups fully support this functionality. Devices on is all just a fancy way of breaking down defined by factors such as priority, safety, and a FT-CAN bus generally are not so timing how critical timing is for the devices on the 5.0 critical, so the slower bus speed has little 4.5 bus. This way the characteristics of the bus 4.0 effect. FT-CAN is defined by ISO 11898-3. 3.5 CAN_H 3.0 can be tailored to suit the requirements of the 2.5 2.0 devices, and we can ensure that low priority Another type is single wire CAN, which – Voltage 1.5 1.0 CAN_L as the name implies – only uses one wire. 0.5 tasks such as turning on your seat warmer 0.0 don’t interfere with higher priority tasks such Again, to compensate for this and ensure Recessive Dominant Recessive as changing gears. reliability, the bit rate is dropped to a maximum of 40kbps. This type of CAN is Time The separate busses are usually connected 2 used mostly in automotive applications and 1 Recessive Dominant Recessive to gateways that decide what messages can is defined by SAE J2411. However, since Result 0

JUNE/JULY 2014 Technically Speaking AUTOMOTIVE ELECTRICAL & AIR CONDITIONING NEWS www.aaen.com.au communication systems into smaller parts, or layers, which can then be standardised Application to make networking easier. These layers CANopen SAE J1939-71 (-73) DeviceNet CAL CAN application layer are: application, presentation, session, Presentation transport, network, data link and physical. CIP data management services (DeviceNet) Most types of communications systems Session conform to this sort of structure, though CIP message routing (DeviceNet) they may not define every single layer. Transport CAN is a prime example of this. Only SAE J1939-21 DeviceNet transport the bottom two layers are defined by the Network standard (CAN specification 2.0). You can SAE J1939-31 DeviceNet transport see I’ve listed a couple of the physical Data standards I previously mentioned, ISO 11898-1 SAE J1939-21 in particular ISO11898 which defines a 5V CAN differential pair standard; both the J1939 and Physical ISO 11898-2 SAE J1939-11 (-15) DeviceNet physical layer DeviceNet physical layers shown here are based on ISO11898. If we observe the voltage levels on the While these two bottom layers are what is bus, we can see that when no nodes are known as CAN, on their own they are not transmitting the voltage level on the two bus much use. For these layers to be useful, lines are the same. This is what is known there must be some form of Higher Level as the ‘recessive’ state and corresponds Protocol to use them, and this is where to a logical ‘1’ read by devices on the bus. the CAN Application Layer appears. It is When a device transmits a logical ‘0’ the application layer that defines what (e.g. to start sending a message) then the messages are and what they mean. transceiver pulls the two CAN lines towards If we take sending a friend a hand-written their respective limits; this is known as the letter as an example and look at it in terms ‘dominant’ state. of the OSI model, the physical layer would In simple terms you could view it as if only be represented by the actual page as well the dominant bits are transmitted and then bus length, these are bit rate, the number of as the ink on that page. The data-link layer the recessive bits are simply the gaps in nodes on the bus and the layout of the bus. would be represented by the Latin character between where the bus is allowed to return set (alphabet); and the words, sentences and to its default state. By viewing it in this way, Assuming a bus has a relatively small phrases that make sense of all this would be it is clear to see that if one device tries to number of nodes, and uses the standard the application layer. The other layers in- transmit a dominant bit at the same time straight-line topology mentioned earlier, between make up the delivery method, for as another tries to transmit a recessive bit, a rough guide of the maximum bus length example the postal system. then the dominant bit would ‘win’. versus data rate is as follows:

The three application layer protocols listed If we look at CAN high with respect to Data rate Maximum bus length here are the ones we’ll look at later, and are CAN low (as they are differential), we see 1Mbps 40 metres three of the most common CAN application approximately zero volts for a recessive layers in use. bit, and nominally two volts for a dominant 500kbps 100 metres But first, let’s look at the physical and data- bit (though the acceptable range is 0.9V to 250kbps 200 metres link layers. While different standards specify 5V). Don’t get confused by this, a recessive 125kbps 500 metres different connectors and the like, most bit is still represented by a logical ‘1’, 62.5kbps 1 kilometre standards use the same configuration for and dominant as logical ‘0’, despite the the bus itself, that is a two wire differential subtraction of the signals making it look like 10kbps 5 kilometres it is the other way around – this is simply (twisted pair) bus with an impedance of 120 By decreasing the data rate, you can due to the way the transceivers work. Ohms on either end. significantly increase the length of the bus. These terminating resistors are usually So you can see what an actual CAN bus That being said, while this guide shows what placed in devices that appear at either end looks like, here is a screen capture of a real is technically possible, most standards will of the bus, and that are unlikely to ever be CAN message from an . specify maximum bus lengths to be much less than this to ensure reliability. For removed from the bus – such as the engine As with any communication system, there example, J1939 operates at 250kbps but the ECU or perhaps the Transmission ECU. are limitations. In the case of CAN there are standard specifies a maximum bus length of Other devices can then be added to the bus three main limiting factors when it comes to between the two end nodes. 40m (1m drop length, max 30 nodes). That covers how the physical part of a CAN

CAN_H bus is constructed and in our next article we

will focus on the data aspect of CAN. Ʊ

120 Ʊ 120 If you have any questions or would CAN_L like further information please do not hesitate to email Jason Turner at REDARC - [email protected] - CAN node 1 CAN node 3 CAN node 4 CAN node 2 or call (08) 8322 4848. e.g. engine ECU e.g. instrument cluster e.g. on-board dianostics e.g. transmission ECU

JUNE/JULY 2014