Hello,
It's nice to see someone else accomplish the same basic DIY battery protection system in much the same way.
I too use CellLog8's and an ArduinoMega1280 (for additional serial ports for debugging interface) but scalable down to a simple Atmega328.
Not sure if you solved this but Analog Devices has a nice Hall Based current sensor good to 100A and very accurate, combined with time constant you have your columb counter and state of charge in much more accurate for I think the part is AD216 but google it out - I snatched one from a burn EagleTree v3 Logger PCB so I dont know the cost in single or bulk.
One other thing I design BMS for lower capacity but much higher voltage eBike LEV packs. I can tell you that unless you put a normally biased off transistor on the power to the optocouplers and use only cells 1-6 to power the CellLog8s you will have an issue of drain over time when not in use. I have a failsafe which disables the cell log 8 power (more biased transistors), use a switching 5v regulator per 6S block to ensure even power draw but even that disables in shut down mode. Mode is reset when charger is connected again but it prevents cells not in use on a shelf from self discharging and becoming useless.
There are purported fixes for the inbalanced draw on cells 7 and 8 of the CellLog8s but they have never worked for me (testing against a 10AH or 5AH Lipo 15-20S Pack).
Additionally balancing is not adressed in this BMS but in looking at your rough code and hardware setup - a daughter board could be set up to balance the cells fairly simply.
Glad to see someone else integrating off the shelf tech - I looked at ALL the cell monitor ASIC, stackable or other and they all had errors and issues (ever try to address a 6 ASIC stack using i2C and controlling the bus via an arduino, you have to revert back to Cc code and that's more difificult that it sounds.
Well if I can be of assistance with prototyping, design, manfacturering, etc... let me know
-Mike