# Hacking an eight cell battery monitor

My goal is to monitor each cell voltage of a seven cell li-ion battery and send this to a Linux board, specifically the Jetson TX2, over i2c. There does not seem to be any off the shelf component that will measure the voltage of all 7 cells. I obviously can't just use an 8 channel adc because of the battery voltage is too large. I have thought about using individual voltage dividers to an adc, but initially thought that would be to messy.

I have an eight cell battery alarm that cycles through each cell voltage on a seven segment display, but there is no designated output. Here are pictures: I found a question on this Stack Exchange concerning a very similar alarm, but the smaller ic was labeled. Here is the link to that: Modifying a chip on a bought voltage measurer

The labeled chip is an Atmel 1206 24C02N, which is an I2C EEPROM. Mine seemed to have the same pinout, so I thought I'd see if anything interesting was happening there. I hooked it up to an oscilloscope with channel 1 as SCL and channel 2 as SCA. Here is a picture of one of the triggers:

I then tried sniffing the I2C with a Bus Pirate v3. Here is the result of between 5 to 10 seconds of sniffing: https://pastebin.com/XbWLkKh7. 0xA0 would be the address to write to the EEPROM as all three of the address pins are low, and the first 4 bits according to the data sheet are 1010. 0xA1 would be the read address, but that never shows up. Also the format of communication doesn't seem to be anything found in the datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/doc0180.pdf I'm kind of stuck as of what to do with this now.

Why does it keep writing the same things over and over? Is this information even useful? Does the EEPROM even see the voltage levels that I'm looking for? This is my first time dealing with I2C on this level, so any help/direction would be appreciated!

I realize that using voltage dividers and an 8 channel adc would be a lot easier at this point, but I'd still like to understand if this is a feasible operation, as in could I actually do something to this board to get useful battery voltage information over some protocol. Thanks for any help!

• If the chip is an EEProm, it has nothing to do with measuring the voltage, it is simply used to store initialization values when the BMS starts. There would be no reason to keep writing to it (you'd wear it out). You need to be tracking access to the EEProm when the BMS starts, but figuring out the data returned will be a challenge. The unit you have seems to be only measuring the cell voltages, and not doing any balancing (no FETs for each cell). You could start with this TI project for a BMS: ti.com/tool/TIDA-00792 – Jack Creasey Jan 10 at 6:50
• What do you mean when saying that voltage dividers are "too messy"? What kind of engineering is that? – Elliot Alderson Jan 10 at 13:30
• @ElliotAlderson To be honest, I was over thinking it. I was thinking that using voltage dividers would cause each divided cell voltage to be at a different level at the adc and I would have to program the resistor values into the code. I realize now that, using voltage dividers, I could half the second cell, 1/3 the third cell 1/4 the fourth cell etc. and then just multiply them in the code. That's what I'm going to end up doing. – levivk Jan 10 at 20:44
• @JackCreasey Thanks for the link, but it seems to complicated for our purposes. We are planning to not have a BMS on board and instead use a balancing charger. If there is no reason for the repeated writes, do you think my error is in sniffing the I2C bus or my interpretation of the data? – levivk Jan 10 at 20:50
• @levivk, in case you do not have this info ..... in the I2C dump file that you posted ..... these are the meanings of the brackets [ ] and the +and - ..... [ start, ] stop, + ack, - nack ....................... github.com/BusPirate/Bus_Pirate/blob/master/Firmware/i2c.c line 53 – jsotola Jan 11 at 5:53