Posted on

Controller Area Network or CAN bus is a robust communications protocol that allows microcontrollers to communicate without a central computer. The origin of this protocol arose from the automotive industry. In the old days, vehicles were far more simple and most systems were mechanical in design and actuation, however today’s vehicles have utilized the electronic revolution and are littered with computers and electronic components. These devices have made vehicles increasingly more safe, efficient, and easier to use. However each upside comes with a downside, the computers and electronic components cannot operate by themselves, they need commands and in order to give these commands, a wire needs to be connected to them to convey the electrical message.

When you are producing hundreds of thousands or even millions of vehicles, you want to minimize costs. One clever way that the introduction of CAN has reduced costs is to minimize wire material. CAN communication occurs over a single wire (all devices are grounded to the chassis of the vehicle), and the messages are sent by modulating the signal between high and low. However, this CAN communication isn’t device specific, instead it is more like a cafeteria where everybody is speaking at the same table but you only respond if a question is addressed to you. Instead of connecting every microcontroller to the main computer, each device can be daisy-chained together because all the communications happen on the same wire. This reduces the amount of wire required for each vehicle. This simplifies the routing of wires, the costs of wire material, and the unexpected benefit of reducing weight.

The wiring simplicity after CAN adoption

There are several different forms of CAN nowadays with maximum speeds of up to 1Mbit/second, however the single wire CAN I described above is usually limited to about 50kbit/second. This is an issue for the most modern of cars. For autonomously driving cars, they rely heavily on a distributed array of sensors that are feeding the central computer data about the environment around them. These sensors require a lot of bandwidth and for those automobiles, they tend to require ethernet or other higher throuput protocols.

For my purposes, knowing just the basics of CAN should suffice. I intend to hack the CAN system in my current car so that I can access some features remotely. The final goal would be to remotely start the vehicle and set the temperature and activate the heated seats prior to leaving for the morning commute. Tune in later to see that write up.