Communication protocols in electronics and cars: UART, I²C, SPI, RS-485, D-Bus, CAN, LIN — an overview
Contents 7
An overview of the protocols that chips, boards and modules use to talk to each other, from two chips on the same board to dozens of control units in a car. For each one:
- how many wires, what speed and distance, where you meet it;
- how to recognise it on a board with a multimeter, without powering anything up blindly;
- what to listen to it with.
Separately: buses in home appliances (including D-Bus in Bosch and Siemens) and in cars: CAN, LIN, K-Line, FlexRay, MOST, Ethernet and the OBD-II connector.
draft — an overview, to be extended
Summary table
| Protocol | Wires (besides ground) | Typical speed | Distance | Where you meet it |
|---|---|---|---|---|
| UART | 2: TX and RX | 9600 – 115,200 bit/s | tens of cm | debug headers, GPS, Bluetooth and GSM modules |
| RS-232 | 2 or more | up to 115,200 bit/s | up to ~15 m | old PCs, UPSs, machine tools, industrial equipment |
| RS-485 | 2: pair A and B | 9600 bit/s – 10 Mbit/s | up to ~1200 m | energy meters, industrial automation, Modbus |
| I²C | 2: SDA and SCL | 100 / 400 kbit/s, 1 Mbit/s | within a board | EEPROMs, sensors, real-time clocks, displays |
| SPI | 4: SCK, MOSI, MISO, CS | a few to tens of MHz | within a board | flash memory, ADCs, displays, SD cards |
| 1-Wire | 1 | ~16 kbit/s | up to tens of m | DS18B20 temperature sensors, iButton keys |
| D-Bus (BSH) | 1 data wire + supply | 9600 bit/s | within an appliance | Bosch and Siemens dishwashers, washing machines |
| CAN | 2: pair CAN_H and CAN_L | 125 – 500 kbit/s, up to 1 Mbit/s | tens of m | cars, trucks, industrial controllers |
| CAN FD | 2: the same pair | data up to several Mbit/s | tens of m | newer cars |
| LIN | 1 | up to 20 kbit/s | up to ~40 m | window lifters, mirrors, rain sensors in cars |
| K-Line | 1 | 10.4 kbit/s | within a car | diagnostics on older cars |
| FlexRay | 2 per channel (up to 2 channels) | 10 Mbit/s | within a car | chassis and braking in higher-end cars |
| MOST | optical fibre | 25 – 150 Mbit/s | within a car | infotainment in older premium cars |
| Automotive Ethernet | 1 pair | 100 Mbit/s – 1 Gbit/s | ~15 m | cameras, infotainment, diagnostics on newer cars |
The figures are typical, not limits: every standard has variants, and speed always depends on cable length.
How they differ
Three questions describe almost any bus:
- One signal per wire or a pair of wires. Single-ended signals (UART, I²C, SPI, LIN) measure voltage against a shared ground. That is simple but sensitive to noise, so it works well within a board or an appliance. Differential ones (RS-485, CAN, FlexRay, Ethernet) send the signal as the voltage difference across a twisted pair: noise is induced equally on both wires and cancels out. That is why they reach tens or hundreds of metres.
- Two devices or many. UART and RS-232 connect exactly two devices. I²C, RS-485, CAN, LIN and D-Bus are buses: many nodes share the same wires, and every message carries an address or identifier.
- Who talks. In I²C, SPI and LIN the master always starts the conversation. In CAN anyone may talk, and when two start at once the message with the more important identifier wins, without losing data. In FlexRay each node has its own time slot assigned in advance, so latency is always the same.
Protocols within a board or appliance
UART, the serial port
The simplest and most common. Two signal wires, transmit (TX) and receive (RX), are crossed over: the TX of one goes to the RX of the other. There is no separate clock, so both sides must agree on the speed in advance: 9600, 19,200, 115,200 bit/s. When idle the line sits high, at 3.3 or 5 V.
On boards, UART most often shows up as a debug header: three or four pads next to labels TX, RX, GND. To listen, use a USB adapter based on a CH340, CP2102 or FT232. ⚠ The adapter's logic level must match the board's: 5 V on the input of a 3.3 V microcontroller can damage it.
RS-232 and RS-485
These are the same UART with different voltage levels. RS-232 is the old PC COM port: ±3 to ±15 V, up to about 15 m. It is converted from UART with a chip such as the MAX232 or MAX3232. RS-485 is a differential pair A and B: up to about 1200 m and dozens of devices on one pair. You find it in energy meters, solar inverters and industrial automation, most often carrying the Modbus RTU protocol. A long line gets a 120 Ω resistor at each end.
I²C
Two wires: data (SDA) and clock (SCL). Both are pulled up to the supply by resistors, and devices only pull the line down to ground, which is why dozens of chips can share the same two wires. Each has its own address (usually 7 bits). The speed is 100 or 400 kbit/s, less often 1 Mbit/s. Typical devices: EEPROMs such as the 24C08, temperature and pressure sensors, real-time clocks, small displays.
How to recognise it with a multimeter: two lines, each connected to the supply through a resistor of a few kilohms (often 4.7 kΩ, marked 472). That is exactly how we checked the EEPROM pins on the dishwasher board (part one).
SPI
Four wires: clock (SCK), data from the master (MOSI), data to the master (MISO) and chip select (CS), one per device. There are no addresses: CS decides who the master is talking to. The speed ranges from a few to tens of megahertz, so SPI is used for flash memory, fast ADCs, displays and SD cards. An 8-pin flash chip (25Q…) is almost always SPI.
1-Wire
One data wire plus ground; a device can even draw its power from that same wire. The speed is low, but many sensors can hang on one wire, each with its own factory-programmed 64-bit number. The best-known example is the DS18B20 temperature sensor.
Home appliance buses: D-Bus in Bosch and Siemens
Big appliance makers have their own internal buses, usually documented not by the manufacturer but by enthusiasts. The best studied is the D-Bus of BSH (Bosch, Siemens, Neff, Gaggenau), from the hn/bsh-home-appliances project:
| What | How |
|---|---|
| wires | three: ground, a supply for the nodes, a single data wire |
| who is on the bus | the control board, the button panel, Wi-Fi modules, the floor time projector |
| exchange | all nodes take turns on one wire, like UART: 9600 bit/s, 8N1 |
| message | length, node address, command, data, CRC16 checksum |
| acknowledge | the receiver answers an addressed message immediately with one byte |
⚠ Next to the data wire (5 V levels) the same connector carries the node supply: about 13.5 V in dishwashers and 9 V in washing machines. Picking the wrong pin will destroy a 3.3 V adapter, so use the multimeter first.
In essence it is a UART with transmit and receive joined on one shared wire, plus addresses and a checksum: the simplest possible bus for a few nodes. How we found D-Bus in the dishwasher board firmware is in part three of the board article.
Not to be confused with D-Bus on Linux, where the name means messaging between programs on the same computer.
Protocols in cars
A modern car has dozens of electronic control units: engine, gearbox, brakes, airbags, climate, doors, infotainment. One bus for all of them does not work: the brakes need speed and guaranteed latency, a window lifter needs a few bytes a second, and a camera needs hundreds of megabits. So a car has several buses of different kinds, linked by a central gateway module.
CAN
The car's main bus since the 1990s. A differential pair, CAN_H and CAN_L, usually twisted. A message has no recipient address, only an identifier saying what it contains (11 or 29 bits) and up to 8 data bytes; each module decides for itself which messages it cares about. The lower the identifier, the more important the message: if two start sending at once, it wins without any data being lost.
| What | Value |
|---|---|
| speed | engine and chassis usually 500 kbit/s; cabin 100–125 kbit/s |
| idle | CAN_H and CAN_L both around 2.5 V |
| sending a "0" | CAN_H ≈ 3.5 V, CAN_L ≈ 1.5 V |
| ends of the bus | a 120 Ω resistor at each |
| with the car switched off | a meter reads ≈ 60 Ω between CAN_H and CAN_L (two 120 Ω in parallel) |
CAN FD is the newer version: up to 64 bytes per message, with the data sent faster than the header, up to several megabits per second. Same wires.
LIN
A cheap single-wire bus for simple nodes: window lifters, mirrors, rain and light sensors, steering wheel buttons. One master polls up to 15 slaves; the speed is up to 20 kbit/s. When idle the line sits at nearly battery voltage (~12 V). It is essentially the same UART but with 12 V levels, so ⚠ do not connect a USB UART adapter directly to LIN; you need a transceiver chip (TJA1020/TJA1021 or similar).
K-Line
The single-wire diagnostic line of older cars (ISO 9141 and ISO 14230/KWP2000): 10.4 kbit/s, 12 V levels. Newer cars moved diagnostics to CAN, but K-Line still turns up in cars from the 2000s and in motorcycles.
FlexRay
A faster and more predictable bus than CAN, for systems where guaranteed latency matters: active suspension, brakes, steering. Up to 10 Mbit/s per channel, two channels for redundancy, each module given its own time slot. You find it in higher-end cars, BMW and Audi among them.
MOST
An optical ring bus for infotainment: audio, navigation, CD changer, amplifier. It was common in premium cars of the 2000s and 2010s and is now being replaced by Ethernet. The giveaway on a module is an optical connector with two light guides.
Automotive Ethernet
Ordinary Ethernet, but over a single twisted pair (100BASE-T1 and 1000BASE-T1) instead of two or four. It runs to cameras, infotainment and driver-assistance modules. Separately, newer cars use ordinary Ethernet (100BASE-TX) through the OBD connector for fast diagnostics and module programming, the BMW F series for example.
The OBD-II connector
The 16-pin diagnostic connector under the steering wheel. Mandatory on petrol cars in the EU since 2001, on diesels since 2004, and in the US since 1996. The main pins are the same in every car:
| Pin | What |
|---|---|
| 4 | chassis ground |
| 5 | signal ground |
| 6 | CAN_H |
| 14 | CAN_L |
| 7 | K-Line |
| 15 | L-Line (auxiliary line of older protocols) |
| 2, 10 | J1850 (older American cars) |
| 16 | +12 V from the battery |
The other pins are up to the manufacturer: extra CAN buses, Ethernet or service lines.
Recognising a bus with a multimeter
Before connecting anything, it is worth finding out what kind of line you are looking at. Everything below is measured against ground; resistance is measured with the device switched off.
| What the meter shows | Most likely |
|---|---|
| one line, idle at 3.3 or 5 V, the voltage "flickers" during traffic | UART TX |
| two lines, each tied to the supply through a few kΩ | I²C |
| a pair, both lines idle at the same ~2.5 V | CAN |
| a pair, A and B idle at least 0.2 V apart | RS-485 |
| one line around 12 V in a car, going to a door or mirror module | LIN (or K-Line if it is a diagnostic line) |
| a PC or old device output idling at −5 to −12 V against ground | RS-232 |
The resistance across a pair, 60 or 120 Ω, occurs on both CAN and RS-485, depending on how many terminating resistors are on that stretch. That is why the voltage is what tells them apart.
⚠ A high voltage on the line, 12 V on LIN and K-Line or up to ±15 V on RS-232, or 9–13.5 V on the D-Bus supply next to the data wire, will damage a 3.3 V microcontroller or adapter input. Multimeter first, then connect.
What to listen with
| Tool | What it does |
|---|---|
| USB UART adapter (CH340, CP2102, FT232) | UART; with a transceiver also RS-485, LIN, D-Bus |
| 8-channel logic analyser (a few dollars) | sees any low-voltage line; the software decodes UART, I²C, SPI, CAN |
| USB-CAN adapter or an MCP2515 board | listen to and send CAN messages |
| ELM327 diagnostic adapter | diagnostics through OBD-II: CAN, K-Line, J1850 |
| ESP32 with a transceiver | permanent listening and your own logic: CAN (built-in controller), LIN, D-Bus |
It is almost always worth starting with a logic analyser: it sends nothing, only listens, so there is no risk of disturbing the traffic.
Article changelog
- 2026-11-11 — first draft: summary table, differences, board and appliance protocols, D-Bus, car buses, OBD-II, recognising a bus with a multimeter, what to listen with.