BQ76920 AFE board

Hello,

This post is about a new project that i’m using as a start-point for a bigger one.
The final target will be a BMS system for a 10S or 15S battery, like the one that’s used in electric bikes / push-bikes

After checking the datasheets and the available parts, I’ve decided to use the following system setup:

I’ve decided to start with a 5S chip for 2 reasons: I had a 4S pack available to play with (a pack used for a modified car vacuum cleaner) and because I wanted to limit the amount of available energy and potential damage if something went wrong.

Another requirement, as the pack would not be accessible after install, was to have some sort of radio connection available on the battery side – so the user can connect to the BMS when the pack is isolated

For that I chose an ESP32 as I had one gathering dust next to my keyboard, and because I was hoping to use some already available libraries for BQ769X0 chips picked from the OpenSolar project


The schematic is based on the datasheet examples, so there’s nothing to special.
I’ve decided to divide the schematic into functional blocks:

The balance section was designed with 220 ohms resistors, but for testing I’ve updated them to 47 ohms.
The same section provides input protection for the AFE chip.

The AFE section is a 1:1 datasheet copy and I’ve included the charge / discharge mosfets.
I had an unpleasant surprise, but I was somehow expecting it: when you close the CHG fet for example, It’s internal diode is still there – you’ll have to close both FET’s at once. Another annoying thing is the way the communication CRC works when you try to read a block of data – you don’t get one CRC at the end, you get a CRC byte after each data byte
The REGOUT 3.3V output is used as an enable signal for the 3.3V buck converter to keep the entire AFE board in the lowers power mode when the chip is in “shipping” mode

The 3.3V buck supply is another 1:1 copy from the datasheet.
I’ve managed to find all recommended parts. I’ve only changed the input and output capacitors to ceramic ones, but I’ll switch to normal ones in the next iteration, as they are too expensive and fragile.
I did not encounter any problem with this part – it can power an ESP32 with WIFI on and I can’t detect any heat build-up.

The full schematic is available as a PDF document: bq76920.pdf
The following documents where very useful during the design phase: BQ769x0 datasheet, bq769x0 BMS Configurations for Cordless Appliances, bq769x0 Family Top 10 Design Considerations, I2C Communication Sample Code for the bq76940 and bq76920, bq76930, bq76940 AFE FAQ

The PCB was designed to fit over a 2×4 cell configuration (4S2P) so I could fit it over the back that I’ll use for testing. It’s a 2 layer board with most of the parts on the top layer. The only things that could not fit where the zenner diodes. Maybe they can be arranged on the top as well, but I was too lazy to work too much on the boad

The connectors are JST PH with 2.0mm pitch. I only have even number of pins, so GND signals are duplicated on the data connector.
I’ve kept the MCU board separated for this iteration, because I want to be able to test several options.
For now, I’ll be using the ESP32 as it’s very powerfull, it has the local SPIFFS that can be used for logging, it has WIFI and BT and that’s very useful during debug.

This is a clip of me assembling the first board. It’s filmed by the microscope I’m using to solder

The code is based on the Arduino environment because I was to lazy to make a classic Makefile project from scratch. Also, the available libraries are very useful, RemoteDebug especially
I’ve rewritten the AFE interface library, based on the OpenSolar one, because it was trying to do to many things in the low level driver.
The new code is just an interface with the AFE – there is no smart stuff at that level.
For now the main loop handles IRQ reaction and all “real-time” stuff.
It is still at prototype level, and there’s a lot of room for optimization.
I’ve spent most of the time testing the AFE protection features (and associated code)

The cpu has a lot of spare power, so one of the plans is to use it for a SEPIC charger that will move all the battery charging stuff next to the cells where all data is available. That should allow for some “smart” charging: adapt to the available power supply, condition the cells when they are too cold or over discharged, allow for better balancing – stop the charge until all cells are balanced, do some wear tracking and allow for fast charging.

There are a lot of things that can be added, but for now I’ll keep working on the basic stuff, and not start 10 different branches that will never end.
The current code is here: bq76920.tar.gz

Comments are disabled