We’ve looked at what a CANBus offers and why we use it, but what does it look like at an analogue electrical level?
A digital comms bus system is a way of transmitting High (1) and Zero (0) values between two devices. The simplest analogy is that of turning a light on and off at a regular interval to represent the ‘bits’ that make up a message. We’ll break down the message content in a later blog, but for now, how do we get the light to switch on and off?
CANBus is a two-wire system with every device simultaneously connected to the ‘Hi’ and ‘Lo’ lines. To reduce unwanted voltage spikes, the wires are normally twisted. Anything that receives or transmits data, rotates or can move will create voltage spikes which are referred to as signal noise. The CANBus system is very tolerant of noise which is one of its advantages over other systems in an automotive application. The CANBus is also tolerant of changes in the supply voltage, I doubt a driver would want the engine to turn off because they had turned the headlights on!
The waveform above shows how part of a typical High-Speed CANBus message might look like when measured with an oscilloscope. In the ISO11898-2 High-Speed signal, you can see the ‘Hi’ and ‘Lo’ voltages return to the 2.5v reference line to create the logically ‘High’ bit. The voltages then move in an opposed manner to create the Hi and Lo dominant voltage which is interpreted as a logically ‘Zero’ bit.
The Low-Speed waveform looks considerably different, but the principle is the same. The waveform doesn’t return to the 2.5v reference voltage which means the speed at which data that can be sent is less as it takes longer for a device to determine if the signal is logically High or Zero.
By having the recessive and dominant voltages relative to each other and not a fixed reference point, the absolute voltage of the Hi and Lo lines at a given point is not critical, which allows for cheaper hardware.
For any device, there are two parts of the connection to the CANBus. A CAN transceiver converts the electrical pulses to logical values (‘0’ and ‘1’). The CAN controller manages the conversion of received and transmitted values into messages for the micro-controller.
In order to work with the CANBus you don’t need to know the low-level waveform arrangement, but what is important is;
- There are two main bus types, Low and High speed which have different arrangements.
- The speed of transmission on both bus types run is too great to measure data with a standard multimeter.