Communication Protocols for a Battery Management System (BMS)

Lithium ion battery



In this article, we go over the major communication protocols that you may use or find when working with a battery management system.

When working with a BMS, you usually use a BMS IC. Depending on the BMS IC being used to control your BMS, you may need to connect to an external microcontroller or another external IC.

These ICs need to be able to communicate with each other to send and/or receive information from one another. For example, you may have a BMS IC that doesn't have the capability of measuring current. Therefore, you use an external IC that measures current. This current data then needs to be fed to the BMS IC. Or, another example, is you have a microcontroller connected to the BMS IC that reads the data from the IC to make decisions governing the BMS.

So communication protocols are vital for a battery management system with multiple ICs to be able to communicate with each other.





UART

UART, which stands for Universal Asynchronous Receiver/Transmitter, is the most widely used communication protocol used in battery management systems.

UART is a form of serial communication, which means bits are sent one after another sequentially instead of multiple bits sent at once which is what occurs with parallel communication.

The UART communication is widely used for communication between a microcontroller and the BMS IC in a BMS. It is also used for communication between the microcontroller and the GSM, bluetooth, or WIFI modules. It is also used extensively for debugging purposes when developing the firmware of a BMS to check particular sections or lines of code; using UART, the output of code can be printed and displayed on a screen.

In UART communication, two UARTs communicate directly with each other.

UARTs transmit data asynchronously, which means there is no clock signal to synchronize the output of bits from the transmitting UART to the sampling of bits by the receiving UART.

UARTs do not operate on clock signals but with baud rates. The baud rate is the speed of data transfer expressed in the number of bits per second that the communication occurs in. The baud rates must be set equally on the transmitting and receiving ends in order for communication to work. The baud rates can only vary by about 10% before the timing of the bits goes too far off.

Only 2 wires are needed to transmit data between 2 UART devices. For example, if we have 2 devices, device 1 and device 2, each device has 2 connections, Rx and Tx. The Tx of each device connects to the Rx of the other device. This way the transmitting data of one device goes to the receiving end of the other device, thus, establishing communication.



I2C

I2C, Inter-Integrated Circuits communication, is a protocol used for IC to IC communication.

I2C is intended primarily for short-distance communication between 2 ICs (Integrated Circuits) on the same printed circuit board (PCB).

I2C allows Multi Master - Multi Slave topology.

The I2C is a standard bidirectional interface that uses a controller known as the master to communicate with slave devices. Examples of slave devices include things such as an RTC clock, an EEPROM, flash memory, or SD card memory. The device that generates the clock is the master device, while all other devices are slave devices.

Each device on the I2C bus has a specific device address to differentiate between other devices that are on the same I2C bus.

A device can have one or multiple registers where data is stored, written, or read.

The physical I2C interface consists of the serial clock (SCL) and serial data (SDA) lines. Both SDA and SCL lines must be connected to VCC through a pull-up resistor.

Being that the SDA line is bidirectional, it functions to transmit data or receive data.



SPI

SPI, Serial Peripheral Interface, is a master-slave type protocol that provides a simple and low cost interface between a microcontroller and its peripherals.

The SPI protocol uses a dedicated clock signal that is created by the master device to synchronize the transmitter and receiver or Master and Slave.

One device is considered the Master of the bus (usually a microcontroller) and all the other devices (peripheral ICs or even other microcontrollers) are considered as slave devices.

The microcontroller can communicate with the BMS IC via SPI communication, along with other peripheral devices that can communicate with SPI communication. These applications omc;ide memory devices such as SD cards, MMC, EEPROM, or Flash, sensors such as tmeperature or pressure sensors, control devices such as ADC, DAC, digital POTs, and audio codec, and other devices such as touch screen devices, LCD devcies, RTC, or video game controllers.

SPI communication uses 4 lines for each device. There is an input data line (receiving data), and output data line (transmitting data), a clock line, and a chip select line to identify which slave device the master is trying to communicate with. If there are multiple SPI slave devices connected to the master, then the chip select line functions to select the specific slave device either to transmit data to it or receive data from it.

Specifically, the pins of a SPI bus are MOSI (Master Out, Slave In), MISO (Master In, Slave Out), SCLK (Serial clock), and CS or SS (Chip Select or Slave Select). The MOSI is how the master device transmit data to the slave and the MISO is how the master device reads information from a slave device.

SPI communication is a full-duplex communication that occurs with very high speeds. By full duplex, it is meant that the transmission and receiving of data can occur simultaneously. This is advantageous over UART or I2C communication, in which there can only be transmission or receiving of data that can occur at a given time but not both simultaneously. The disadvantage of SPI is that 4 wires are required instead of 2 for UART and I2C.



CAN

CAN, Controller Area Network, is the most widely used communication protocol in the automotive industry. CAN communication are used frequently in automotive applications because it removes all signal noises such as electromagnetic noises. It also removes a host of wire harnesses from a system. It is one of the most robust and reliable communication protocols.

CAN applications can be used in simple to extremely complex applications.

They are used in both gasoline and electric vehicles.

The CAN protocol is used with a chip that allows for CAN communication. Texas Instruments is one manufacturer which makes CAN chips that allow for CAN communication between devices. One example of this is the TCAN1042-Q1 Automotive Fault Protected CAN Transceiver with CAN FD. To get a better idea of this chip, you can view the datasheet at the following link: TCAN1042-Q1 Automotive fault-protected CAN transceiver with flexible data-rate

The microcontroller connects to the CAN chip, which then connects to the outside devices.

The CAN chip has TXD and RXD pins, which allow it to communicate with the micrcontroller. The TXD pin is for the transmission of data and the RXD pin is for the receiving of data.

So these are the most common and most used communication protocols for battery management systems.

Related Resources



HTML Comment Box is loading comments...