Getting Started with AFE’s for BMS design.
Analog Front End IC’s are becoming more popular from major IC manufacturers. These chips are designed to wrap all the analogue circuitry required for the design and operation of a BMS system up into a small package. Reducing design and programming time for the designer(s). This forfill a useful segment of the market where the application may want different design parameters to a normal BMS design, or even just for learning the operation modes of a BMS. Texas Instruments makes a series of chips in the BQ769x0 line. These 3 forms of the chip cover usage cases for 3 to 15 series cells in the battery pack. However other manufacturers have created similar devices. Some, like TI, integrate the ADC and voltage reference on the same IC. For other brands a separate external ADC is required, this allows for higher accuracy at the cost of increased circuit complexity.
These AFE’s contain inputs to measure the cell voltage of each individual cell position in the cell stack, this means that they contain circuitry to remove the offset of the voltage from each battery. So that each reading is in the 0-5V range and allows each battery to be treated without special code. Reducing the complexity of any code performing the monitoring. The TI IC’s also provide an input for a current shunt, with a recommended range of +-200mV input. The AFE’s has a small digital state machine internally that manages the sequential measurement of all the voltages present at the input to the IC, along with providing the I2C interface.
In most of these systems, when fully implemented (Either single IC or multi-chip solution), the core feature set covers:
- Measurement of each battery in the stack’s voltage
- Balancing circuitry for each battery
- Current shunt measurement
- Temperature measurement (Usually via NTC thermistor)
In the case of the BQ769x0 series of ICs, the battery measurement is taken using a 14bit ADC and the current shunt is measured using a 16bit ADC. By using the long sample times, the IC works to remove the high-frequency component in any measurements (such as motor switching noise).
Basic BMS operation
The most basic BMS systems available on the market from cheap sources, usually have minimal protections.
Off the shelf, cheap BMS units
These units are often available through the usual purchasing channels. They often work really well for common use cases, especially in value for money. However, these BMS units are built mostly from cheap solutions and so have some flaws.
Current shunt sensing
They use comparator on the current shunt to shut down the battery bank output if a set current is exceeded, and often do not have any protection against high levels of current over time. This means that they often do not perform well in applications where a trip based on a current over time as well as peak current is desired. This is a common requirement to protect wiring on the unit, as short bursts of high current may be allowed when kick starting a system or under short but loads.
Often shortcuts are also used in the battery protection/balancing circuits. These units have two comparators for voltage levels, Undervoltage and overvoltage. When either of these limits is met, the unit triggers a disconnection of the battery. The units that feature balancing often use passive discharge resistor that is connected to the cell once it exceeds a set voltage (often around 4.2V). This requires the power supply used for charging of the system to use a relatively low current when charging to avoid over charging.
Designing a Better BMS using an AFE
I am going to cover a rough guide to designing and working through the creation of a BMS for a lithium battery pack. This is the beginning of a series of notes on the creation of a BMS I am looking at manufacturing.
When looking at the design of a BMS, it is first critical to define the parameters for the design.
Proposed design criteria
- 9-15S LiPo battery (BQ76940)
- 100mA balance current
- 40A continuous duty current shunt, 50A peak
- PCB area less than 10x10cm panel
- LED SOC indication
- Ability to communicate to an external display to show detailed information
- Temperature sensing inside the battery pack
- Track the health of the pack
For this design, I have selected the BQ76940 as the AFE. As probably indicated by the title of this page.
As we are looking at approximately 100mA of balancing current per cell in the stack we will use external N-Channel MOSFET’s to switch this current. Using off the shelf 47-ohm resistors (Part of the common, cheap E series) gives this approximate current for balancing discharge. On a 47 ohm resistor, with a 4.35V lithium cell, we can expect approximately 90mA of discharge current. Remembering that typically we top-balance, i.e. we balance at the full charge voltage. The resistor will dissipate just less than half a watt. This means the resistor will need to be a 1210 size or larger when we lay out the board (or multiple smaller resistors in parallel).
In the datasheet, the recommended input range of the SRN/SRP inputs is 200mV and a maximum of 270mV. With our design criteria of 40A continuous and 50A peak, we want to select a current shunt value to maximise the precision of the current measurements but avoid saturating the input. The easy approach (if you are lucky) is to use the current and input voltages to derive the resistances. For 40A: 200mV/40A = 0.005 Ohms (5 milliohms). For 50A: 270mV/50A = 0.0054 Ohms
For this design, we are lucky that the 40A resistor is a nice fit for the 50A peak measurement as well (250mV). If this is not the case when you look into designing your system, you need to decide on a trade off, using a smaller resistance will reduce the resolution during normal runtime. Whereas having a larger resistance can lead to errors when the input is saturated.
When we come to design the PCB we will want to know the package size for our resistor. This is calculated using I^2R, so for our selected value of 5 milliohms. 50A^2 * 0.005 = 12.5W. This is a large dissipation which will cause heating if the package is too small. One option for a high wattage current shunt resistor is to use a piece of resistive wire, and calibrate the value once the PCB is made. Another option is to use a smaller resistor value. This will reduce the power dissipation in the resistor by a linear scale. It will also reduce the accuracy of the current input linearly too. Thus this is sometimes an option and sometimes it is not acceptable. Further, there are off the shelf available current shunt units that can be purchases easily that provide a
I use the peak current for the power rating, even though the resistor will hopefully typically have the lower 40A current flowing through it (8W). However, in all designs, we need tolerance for both errors and tolerance in the parts that are used.
If we use an off the shelf controller IC then we will need to select one that supports a LED display output. The AFE provides a regulated voltage output that we can use to power the LED display. This avoids any extra regulation circuitry.
For the design of the BMS, we are going to want some way for our battery pack to communicate to the outside world. This can either be I2C (And SMBus) or UART style outputs. At this point in the design, either of these is workable as we have not decided what the BMS will talk to.
For this design I will look primarily at working with the companion controller from TI as this will be the most likely path for new users. I will also look at implimenting your own controller as this is what is used on the LiPro Micro for example. The companion controller for the BQ769x0 AFE’s is the BQ78350-R1. This is available in a TSSOP package as well, so is appropriate for hand assembly without issue.
The companion controller impliemts all the required features and exposes these over a SMBus interface that we can interface to for calibration / setup. This interface is also designed to provide information as required for other systems.