Your Car, Your Computer: ECUs and the Controller Area Network
Just like a large organization with many departments, your car has many systems that must communicate with each other in order to run properly. This is handled by the Controller Area Network.
In years past, a shade-tree mechanic could diagnose and repair his own automobile with some degree of simplicity.
I spent many hours as a youngster working alongside my father on our own vehicles – swapping parts, adjusting timing, manipulating fuel mixtures, working on brakes – you name it. He had been an aviation mechanic in WWII, and worked 32 years as an electrician in a factory.
Today, even that extensive background might not be enough. This kind of work requires a lot more technical sophistication and computer know-how.
Your car has become more than a mechanical conveyance – it is a computer system of great complexity. In fact, your car could even contain a collection of computer nodes linked along a bus network architecture. The nodes are referred to as Electronic control units (ECU), and the bus topology is called the Controller Area Network (CAN).
Electronic Control Units
ECU is the generic term for devices that control electrical systems in today’s automobiles. There are many types of ECUs, and their functions vary. Some highly engineered cars may contain as many as 100 ECUs. These perform various functions, including:
Automatic climate control.
Anti-lock brake system control.
The nomenclature may differ among vehicle manufacturers. The ECU that manages the engine is either called the engine control module (ECM) or the engine control unit (ECU). This duplicate use of ECU to refer to either a generic electronic control unit or the specific engine control module can be the source of confusion. Often the engine control module and the unit that controls the transmission are combined in an ECU called the powertrain control module (PCM). Many people think of the ECM or the PCM as the “Central Processing Unit (CPU)” of the automobile.
The truth is that the various ECUs installed throughout the car perform distinct operations, and function as individual nodes within the automobile network architecture. And that’s just the beginning! (For more about the technology found in modern cars, check out this feature about autonomous vehicles, (“Are These Autonomous Vehicles Ready For Our World?”) and think about how much of this kind of tech already gets put into models rolling off of the lines!)
Manufacturers have pursued ambitious goals in improving and advancing the technology of their vehicles. Now, the use of ECUs and related systems has led to a new sea change toward what’s called “lidar” or “laser radar,” where sophisticated groupings of sensors help the vehicle to “see” what is around it, for the implementation of lane departure warnings, automatic braking and other features mentioned above.
Car makers are also innovating the ways that drivers communicate with their vehicles, through systems of biometrics and cutting-edge controls that make steering wheels and key ignitions obsolete.
ECUs make these improvement processes automatic and implemented in real time. In a closed-loop system, multiple sensors gather information from the network and send commands to actuators that provide the interventions required to attain the best results. The output of the sensors tells the system what the car is doing; then the input of new instructions makes the necessary corrections. The ECUs take advantage of the information provided by sensors, such as the:
Engine coolant temperature sensor.
Air temperature sensor.
Manifold absolute pressure sensor.
Mass air flow sensor.
Idle air controller.
The components of an ECU include analog-to-digital converters, digital-to-analog converters, signal conditioners, communication chips, instrument clusters and smart sensors. Information that may come in as analog can be converted to digital for electronic processing. All this data is sent along a bus topology called a controller area network.
Controller Area Networks
This is actually a digital computer network that communicates with the various ECUs throughout the automobile. Each ECU node handles the input and output of information as it interfaces with the mechanical and electrical components of the vehicle. Such inputs as ambient temperature, coolant temperature, air flow and acceleration position are processed and become actuated as fuel injection, ignition timing, turbo boost and so on. CAN networks provide a continuous feedback loop.
The CAN protocol stack can be compared to the OSI model’s two lower layers. The OSI physical layer correlates to three physical layers in the CAN model. The data link layer finds parity with the logical link control (LLC) and media access control (MAC) layers in CAN. You can find more information about the technology in ISO 11898-1:2015 - Road vehicles - Controller Area Network (CAN).
The Controller Area Network bus was introduced by Robert Bosch GmbH in 1983. Each CAN node includes a microcontroller, a CAN controller, and a CAN transceiver. CAN is a message-based protocol that uses either an 11-bit identifier (standard format) or a 29-bit identifier (extended format with 18 extra bits). CAN bus components include hardware and software (actually firmware), which can actually be tweaked and modified with additional chips or software commands.
CAN uses an arbitration process to regulate traffic which is similar to CSMA/CD in the Ethernet protocol. Within the vehicle technology, CAN may be supplemented by other methods such as Flexray, which uses TDMA and operates up to 10 megabits per second, or Local Interconnect Network (LIN), which is a single-wire serial network protocol. There has been some consideration to replace Flexray with Ethernet, which would provide some notable advantages. CAN bus is one of five protocol standards recognized by the technology known as onboard diagnostics (OBD).
Onboard Diagnostics (OBD)
OBD-II superseded the original OBD in 1996. Initially targeted at managing emissions to meet government regulations, the newer standard has evolved to include a host of functionalities. As a digital diagnostic, OBD-II makes use of a large database of codes, which you can find at www.troublecodes.net. For example, the code P0171 is a generic powertrain code that means “the system is too lean.” The five-digit codes are represented this way:
[Alpha] – area (Body, Chassis, Powertrain, U – network)
# - manufacturer’s code
# - system
# - trouble specific
# - trouble specific
You can pull the OBD-II codes from your vehicle in various ways. Most auto parts stores will bring out a device that plugs into a computer port under your dash. Or you could get a scanner tool yourself and read the code as explained by Wikihow. You can even hack into your car’s computer with the right cable, your laptop and dedicated software. Some of the graphic interfaces can provide tremendous insight into the inner workings of your car-computer. Just be aware that any hacking you may do is at your own risk and not recommended by the car manufacturer or this website! (To learn about cloud connectivity in vehicles, see Cloud Computing for Vehicles: Tomorrow's High-Tech Car.)
We have said that your car is a computer. To be more precise, your car is actually made of multiple computers in a complex network. The microprocessors in your late-model automobile may provide sophisticated engine control, advanced diagnostics, new safety or comfort features and even reduction in wiring. The benefits of this state-of-the-art vehicle computing offer tremendous advantages – but some would say that the simplicity of home vehicle repair is long gone.
When I worked alongside my dad as a youngster, I could never have imagined that my understanding could hold a candle to his when it comes to car repairs. Now I’m wondering if all those years as a network engineer may apply here.
I’m also wondering how long it will take for cars to become self-aware – like David Hasselhoff’s car KITT in the TV series "Knight Rider."
You can’t stop progress.