Wiki page: https://openinverter.org/wiki/16-cell_BMS
So here is another idea:
- Use a high performance Sigma/Delta ADC (MCP3421)
- The ADC is floating with its own DC-DC power supply
- Construct a discrete multiplexer that can connect a given cell to the ADC
- The mux is inherently safe to not create short circuits using 74 series logic
- The active cell can also be charged from the 200mA DC-DC converter that also powers the ADC, so we have a sort of low power active balancing
- Everything is implemented in discrete logic that does not require flashing firmware
- ADC, MUX and balancing switch all speak I2C
- multiple modules can be cascaded and one of them gets a master daughter board
I'm still in the schematic stage. Currently trading off the number of channels. The more channels you have, the higher voltage mosfets are needed increasing cost. The less channels you have the less the cost of the ADC other central components is divided up. So there is a sweat spot somewhere in between. The presented schematic displays 26 channels but I do consider dropping back to 16. What do you think is most practical?
The ADC allows trading off between speed and accuracy. At best it takes 4 samples per second at 18-bit accuracy or like 100 per sec (if I remember correctly) at 12 bits. So for SoC estimation the high accuracy mode can be used and during normal operation the high speed mode.
Software pipeline:
Features implemented:
- CAN bootloader for SW updates
- CAN communication via Daves OI CAN tool
- Reading of all 16 cell voltages, obtainable via CAN SDO
- Calculation of min/max/average/total/delta
- Addressing scheme for chaining multiple modules
- Communication between multiple modules (to be extended) (min/max/avg/tempmin/tempmax periodically sent via CAN)
- Crude balancing scheme (using bleeding and charging) trying to match cell voltages at whichever voltage they are at
- Current sensing with Coulomb counting
- Temperature measurement, only supported sensor is that from Nissan Leaf. More could be ported from inverter
- Configurable SoC lookup points
- Configurable SoC dependent charge current lookup points
- Configurable min/max cell voltage configurable
- 3 balancing schemes: dissipative/additive, only dissipative, only additive (or none at all)
- Keep BMS running even with car shut off if a lot of balancing is needed (on ESS applications the BMS runs 24/7 anyway)
- Limit current depending on cell temperatures
- Limit charge current depending on length of charging session (seen some OEM cars do that)
- Calculate "state of energy" i.e. % of kWh left vs. % of Ah left
- Add diagnostics: cell reversed polarity, cell over voltage, cell not connected, cell poor connection (compare voltage with bleed resistor on/off), ADC comm error, balancer comm error, comm error with sub module(s) etc.
- Add more temperature sensors
- Incrementally estimate total capacity by taking a SoC estimate, then after a good deal of charge/discharge take another SoC estimate and see how much energy has flown through the current sensor since the first estimate. IIR filter with last capacity estimation.
- Implement top balancing e.g. by remembering the voltages at charge end, then estimate how much charge should be added/subtracted from each cell so that they end up equal at the top end. That way balancing can take place at any voltage.
- Store estimates etc. before shutting down
- Try using timer to bitbang i2c (currently gpio operations are used with delays...)
- Slow down sampling rate e.g. when no current is flowing to draw less energy from cells
- Improve balancing scheme so that more time is spent balancing cells that need it most