How Cars Work

On the Same Wire

CHAPTER EIGHT

We left Chapter 7 with a problem. A modern car has fifty to a hundred small computers in it. Each one does its own job. None of them are very smart on its own.

But many of the things a car does well require several computers to cooperate. The stability control system from the last chapter — the one that catches the car if it starts to slide sideways — needs to know how much the driver has turned the steering wheel (from the steering computer), how fast each wheel is spinning (from the brake computer), how hard the engine is pulling (from the ECU), and how fast the car is rotating around its own axis (from the yaw sensor). It uses all four of those numbers, many times per second, to figure out whether the car is going where it should be going.

That information lives in four different places in the car. The stability computer needs to gather it all.

To do that, the computers need to talk to each other.

This chapter is about how they do.

Wires everywhere

The first idea you might have is straightforward. Just connect every computer to every other computer with a wire. The brake computer wires directly to the stability computer. The ECU wires directly to the dashboard. The lane camera wires directly to the steering. And so on.

This works for two computers. It works for three, with three connections. For four, you need six connections. For ten, forty-five. For a hundred — the number in a typical modern car — you need 4,950 connections.

That is a lot of wires.

It is also a lot of weight (copper is heavy), a lot of cost, a lot of plugs, and a lot of places where something can come loose. Modern cars don’t do this.

One shared line

What modern cars do instead is run two thin wires through the entire car, and connect every computer to those same two wires. Every computer talks on the same shared line. The shared line is called a bus. In a car, the most common one is called the CAN bus, short for Controller Area Network. It was invented in the 1980s by a German engineering company called Bosch.

Here is how it works. Every message sent on the CAN bus has two parts: an ID number (which says what the message is about — “wheel speeds,” “engine RPM,” “steering angle,” and so on) and the data itself (the actual values).

When a computer wants to send a message, it puts the message on the wire. Every other computer on the bus receives it — every single one. The computers that don’t care about that message just ignore it. The computers that do care read the message and act on it.

It is like the public address system at a school. The PA broadcasts an announcement to every classroom in the building. Every teacher and every student hears it. Most of them ignore it. But the kids it is actually for — “Will the third grade please report to the gym?” — pay attention. The PA doesn’t have to address each student personally. It sends one message, and the listeners filter.

The CAN bus is the PA system of the car. One channel, every computer listening, each one filtering for what it cares about.

All 13 chapters of How Cars Work · Library · All courses