The good old traditional analog days are in the past. Today, digital technology dictates many aspects of human lives. From entertainment to transportation, there is no escape from the digital age. Twist your key to start your engine and you’re saturated with information, everything from comfort airflow control to severe engine malfunction.
Back then, car sensors were minimal and system upgrades were simple. Fast forward a couple decades and automobiles have become more technologically developed and environmentally conscious. All but the most basic vehicles have in-vehicle computers that rely on various sensors to deliver real-time precision adjustments. However, connecting all individual sensors would be too complex, so a central communication network became necessary to efficiently run the vehicle. Therefore, in 1983, a group of engineers at Robert Bosch GmbH German engineering and electronics company worked on the CAN bus protocol to deliver a communication system between electronic control units (ECU) located throughout a vehicle that would enable system-wide data transmission.
What Is CAN Bus Technology?
The CAN bus is a message-based protocol that connects individual systems, sensors, and controllers within a network to enable smooth flow of communication. The CAN, controller network area, acts as a central nervous system connecting all parts of the body whereas the bus is the communication system that allows for data transfer between these individual components. This minimizes the workload on the controlling computer to allow for efficient data transfer and communication in a system disconnected from a central network hosting device.
CAN Bus Communication
The CAN bus protocol is a peer-to-peer network that bypasses the need for a master controller. Individual nodes have access to freely read and write data on the network. As soon as a CAN node is ready to transmit data, it checks for bus traffic and then writes a CAN frame onto the network. Each node uses an arbitration ID to identify messages and indicate priority. Depending on the arbitration ID, a CAN node decides whether to accept the frame. When a CAN node correctly receives a message, it tags an ACK bit (Acknowledgement slot) onto the end of the transmission. The corresponding node that sent the message will search for the presence of an ACK bit on the bus and will reattempt if no acknowledgement tag is detected.
If there are multiple nodes sending messages onto the bus at the same time, the message with the lowest arbitration ID gets priority access. Lower priority nodes will have to wait until the bus traffic clears before trying to transmit the message again.
CAN bus Physical Layers
The physical layer defines the physical specifications of a device and correspond to certain electrical layers. While there are 7 independent layers that control communications at different levels of abstraction, the most important is the physical layer. Other layers can be implemented later in the software or hardware as chip functions, but the physical layer is tied to the hardware.
The physical layer is a basic hardware that controls certain aspects of CAN network such as signaling schemes and capable impedance. It converts two signaling states, dominant (logically 0) and recessive (logically 1), into electrical pulses for possible CAN bus messaging. While there are several different physical layers, the most widely used are
- High speed CAN
- Networks are implemented with two wires, allowing for communication transfer rates up to 1Mbit/s
- Devices using high-speed CAN: antilock brake systems, engine control modules, emissions systems
- Low-speed CAN
- Networks are implemented with two wires, can communicate with devices at rates up to 125 kbit/s
- While the communication speed is lower, it offers transceivers with fault-tolerant capabilities as a trade off
- Devices using low-speed CAN: comfort applications such as climate control, opening and closing doors
- Single-wire CAN Hardware
- Able to communicate with devices at rates up to 33.3 kbit/s
- Does not require high performance with applications in comfort devices like seat and mirror adjusters
- Software-selectable CAN Hardware
- Can configure the software-selectable CAN interface to use any of the onboard transceivers. You can choose your own external CAN transceiver.
Understanding CAN Bus Messaging
The CAN bus network uses a broadcast type of system to send messages between nodes. This means that there’s no way to just send a message to a specific node and all nodes constantly pick up every transmission on the bus. However, CAN hardware provides local screening so that nodes can sort through the traffic and selectively respond to priority messages using a bit-wise arbitration. These CAN messages are identified according to four varieties: data frame, remote frame, error frame, and overload frame. In the interest of brevity, we will only discuss data frames, the most common message type.
Each data frame is comprised of major parts
- Arbitration field: indicates message priority when two or more nodes are on collision for bus access. Frames are available in two formats
- CAN 2.0A, standard format which uses a 11-bit arbitration ID and one remote transmission (RTR) bit, dominant for data frames
- CAN 2.0B, extended format which uses a 29-bit arbitration ID (including two recessive bits: SRR and IDE) and the RTR bit
- Data field: contains 0-8 bytes of data
- CRC field contains a 15-bit redundancy checksum for error detection
- Acknowledgement slot: any CAN controller that correctly receive message sends ACK bit at end of message
- Presence of ACK bit means that one or more nodes, not necessarily the intended addressee, on bus has properly received message
CAN Bus Benefits
The CAN Bus protocol greatly reduces the amount of wiring necessary to allow system components to effectively communicate. Instead of using a vehicle harness containing miles of wiring, it utilizes a high-speed (25kbps – 1Mbps) twisted pair wiring system. It offers great flexibility since each ECU has an individual chip that enables it to receive all transmitted messages, decide relevance, and act accordingly. Previously mentioned, this is an integral factor for CAN Bus communication since it is a broadcast type of network.
Additionally, the ratio to price performance makes it one of the most affordable and reliable network systems. It doesn’t rely on analog wiring, so it requires fewer cables and connectors, cutting down on points of failure. Fewer cables and wires makes it a more simplified system that can be easily regulated. Not to mention it also makes the system robust towards failure of subsystems and electromagnetic interference, greatly reducing time for maintenance.
With easy modifications and inclusion of additional nodes, it is the main cost-effective choice for automobile manufacturers.
Standard vs Extended CAN Frame Structure
The standard CAN frame format originally defined length of arbitration field as 11-bits but later divided it into CAN 2.0A and CAN 2.0B. CAN 2.0A was recognized as the standard Bosch released specifications used in passenger cars whereas the latter CAN 2.0B was an extended format used primarily for heavy vehicles. The basic difference between the two is in the arbitration field bit length. Modern CAN controllers usually implement the 2.0B extended format as the 2.0A type controller cannot receive 29-bit arbitration. CAN bus 2.0B controllers are backward compatible with 2.0A and may even exist on the same bus so long as they don’t transmit extended frames.
A CAN 2.0A ("standard CAN") Data Frame
A CAN 2.0B("extended CAN") Data Frame.
Future of CAN Bus
The CAN bus protocol was initially designed as an alternative to field-bus technology in automobiles that would improve functionality. The first car to ever feature this technology was the BMW 850 Coupe that entered the market in 1986. It was able to reduce in-vehicle wiring by 2km, which consequently significantly reduced its weight by over 50kg. Not to mention, the vehicle systems and sensors were able to communicate with each other at speeds up to 25kbps - 1Mbps. The initial public introduction of the CAN bus protocol was a success, but it also introduced a slew of new problems as well. It had made after market installations nearly impossible since the vehicles had become increasingly complex.
Yet decades later nearly every new utility vehicle and consumer automobile is built with the CAN bus protocol in mind. Modern developments in technology such as cloud computing and cellular networking have improved the CAN bus protocol, acting as a repulsion towards its extinction. Automated industrial manufacturers have begun integrating the CAN bus protocol as a part of a distributed control system that enables inter-system communication throughout a facility. Even automobile manufactures have used the CAN bus standard for telematics navigation and real-time GPS location. And with the next technology expansion of the Internet of Things (IoT), it will be integral for complex networking systems, like the CAN bus protocol, to ensure installation longevity and generational compatibility with future
While the CAN bus protocol is not an end-to-end solution, its adaptability and various applications ensure it's here to stay.
CAN and the Internet of Things
Today, CAN bus technology is evident not only in consumer vehicles, but in everything that moves, from industrial trucks to underground mining vehicles. And over the last few years, we have experienced a growing demand for connected smart cars thanks to the IoT explosion. The use of IoT technology in automobiles has improved diagnostic, maintenance, and communication between cars and smart city infrastructure.
Companies are beginning to branch out into endless possibilities as demands for new in-vehicle functions and driver conveniences continue to grow, such as autonomous driving assistance and telematics for navigation. Sensory data from IoT connectivity is going to be a transformative force at both commercial and consumer level, opening new opportunities for innovation in fleet management and agriculture. Coupled with CAN bus technology, data from IoT sensors can be collected and analyzed for increased productivity and overall cost savings. For instance, the CAN bus protocol allows transportation logistics companies to track the fuel consumption of their cross-country trucking fleets, as well as monitor engine temperatures and geofencing services.
Premio In-Vehicle Computers
As the speed for real-time data becomes an essential requirement, so does the complexity of the backend technology. A CAN bus system design makes it ideal for companies investing in IoT connected cars because it provides a tremendous amount of value through data at a performance-to-cost ratio. Next-gen in-vehicle edge computing applications can tap into the existing CAN bus network for predictive analytics that is driving forward new innovation.
Premio’s rugged in-vehicle computers are a great example of rugged edge computing solutions that can analyze and process large amounts of data from various sensors and devices through an underlying CAN bus network, ensuring a continuous flow of information. They are internationally certified through E-mark and EN50155, and are able to withstand the toughest vehicular environment, allowing them to operate in a variety of edge computing applications.
Learn more about Premio Rugged Industrial Computers that are powering the future of IoT, Edge Computing, and Industry 4.0. Contact us now!