martinbogo / pt-battery-diagnostics

Arduino sketch, library, BOM, and Gerber files for i2/x2 Segway battery diagnostics
MIT License
22 stars 12 forks source link

Incorrect Cell Voltage Readings #2

Closed gmulberry closed 4 years ago

gmulberry commented 5 years ago

I have a good battery on my workbench which is green on the charger and is sitting at 76.75 volts. The serial monitor reports every other cell group with roughly the same voltage, however they don't sum to anywhere close to 76 volts, and if there actually are cells at ~0.4 volts, I'm sure the charger would not report a green light. Below is the output from the serial monitor, which is consistent between calls of "V":

Cell Group [0] Voltage is 0.43 Cell Group [1] Voltage is 2.54 Cell Group [2] Voltage is 0.44 Cell Group [3] Voltage is 2.54 Cell Group [4] Voltage is 0.43 Cell Group [5] Voltage is 2.54 Cell Group [6] Voltage is 0.44 Cell Group [7] Voltage is 2.54 Cell Group [8] Voltage is 0.44 Cell Group [9] Voltage is 2.54 Cell Group [10] Voltage is 0.44 Cell Group [11] Voltage is 2.54 Cell Group [12] Voltage is 0.44 Cell Group [13] Voltage is 2.54 Cell Group [14] Voltage is 0.44 Cell Group [15] Voltage is 2.54 Cell Group [16] Voltage is 0.44 Cell Group [17] Voltage is 2.54 Cell Group [18] Voltage is 0.44 Cell Group [19] Voltage is 2.54 Cell Group [20] Voltage is 0.44 Cell Group [21] Voltage is 2.54 Cell Group [22] Voltage is 0.44

martinbogo commented 5 years ago

Thanks! This helps a lot.

I'm going to add a debug option to output the raw captured data so I can see what's going on.

Will post the updated code in a couple.of hours. Please re-run and post the drbug output.

-M

On Sun, Jan 27, 2019, 10:25 AM gmulberry <notifications@github.com wrote:

I have a good battery on my workbench which is green on the charger and is sitting at 76.75 volts. The serial monitor reports every other cell group with roughly the same voltage, however they don't sum to anywhere close to 76 volts, and if there actually are cells at ~0.4 volts, I'm sure the charger would not report a green light. Below is the output from the serial monitor, which is consistent between calls of "V":

Cell Group [0] Voltage is 0.43 Cell Group [1] Voltage is 2.54 Cell Group [2] Voltage is 0.44 Cell Group [3] Voltage is 2.54 Cell Group [4] Voltage is 0.43 Cell Group [5] Voltage is 2.54 Cell Group [6] Voltage is 0.44 Cell Group [7] Voltage is 2.54 Cell Group [8] Voltage is 0.44 Cell Group [9] Voltage is 2.54 Cell Group [10] Voltage is 0.44 Cell Group [11] Voltage is 2.54 Cell Group [12] Voltage is 0.44 Cell Group [13] Voltage is 2.54 Cell Group [14] Voltage is 0.44 Cell Group [15] Voltage is 2.54 Cell Group [16] Voltage is 0.44 Cell Group [17] Voltage is 2.54 Cell Group [18] Voltage is 0.44 Cell Group [19] Voltage is 2.54 Cell Group [20] Voltage is 0.44 Cell Group [21] Voltage is 2.54 Cell Group [22] Voltage is 0.44

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/martinbogo/i2-battery-diagnostics/issues/2, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPVKXE-HqjEkoUE0p7mlq4eegbOznv6ks5vHdMOgaJpZM4aUzjz .

martinbogo commented 5 years ago

Question.. did you have the battery attached to the charger when measuring?

On Sun, Jan 27, 2019, 12:23 PM Martin Bogomolni <martinbogo@gmail.com wrote:

Thanks! This helps a lot.

I'm going to add a debug option to output the raw captured data so I can see what's going on.

Will post the updated code in a couple.of hours. Please re-run and post the drbug output.

-M

On Sun, Jan 27, 2019, 10:25 AM gmulberry <notifications@github.com wrote:

I have a good battery on my workbench which is green on the charger and is sitting at 76.75 volts. The serial monitor reports every other cell group with roughly the same voltage, however they don't sum to anywhere close to 76 volts, and if there actually are cells at ~0.4 volts, I'm sure the charger would not report a green light. Below is the output from the serial monitor, which is consistent between calls of "V":

Cell Group [0] Voltage is 0.43 Cell Group [1] Voltage is 2.54 Cell Group [2] Voltage is 0.44 Cell Group [3] Voltage is 2.54 Cell Group [4] Voltage is 0.43 Cell Group [5] Voltage is 2.54 Cell Group [6] Voltage is 0.44 Cell Group [7] Voltage is 2.54 Cell Group [8] Voltage is 0.44 Cell Group [9] Voltage is 2.54 Cell Group [10] Voltage is 0.44 Cell Group [11] Voltage is 2.54 Cell Group [12] Voltage is 0.44 Cell Group [13] Voltage is 2.54 Cell Group [14] Voltage is 0.44 Cell Group [15] Voltage is 2.54 Cell Group [16] Voltage is 0.44 Cell Group [17] Voltage is 2.54 Cell Group [18] Voltage is 0.44 Cell Group [19] Voltage is 2.54 Cell Group [20] Voltage is 0.44 Cell Group [21] Voltage is 2.54 Cell Group [22] Voltage is 0.44

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/martinbogo/i2-battery-diagnostics/issues/2, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPVKXE-HqjEkoUE0p7mlq4eegbOznv6ks5vHdMOgaJpZM4aUzjz .

gmulberry commented 5 years ago

I have tried it connected to the charger as well as to a 12V supply on the bat enable pin. Both result in the same behavior. Seems to be the same on a different battery as well.

martinbogo commented 5 years ago

Found a bug in the code -- I was splitting the values 4/12 bits instead of 5/11 bits, even though I was shifting 11 bits correctly to derive the cell group ID number.

I have also updated the code to reflect LiFePO4 chemistry -- max voltage is now scaled to 3.65V with 2047 steps.

Update, and run the code w/ debug menu option, let's see what values you're getting back on i2c.

My battery is a red-light rev AH battery make 01/06/14 with a lot of dead cells inside, so the following output is plausable. I'll need to recharge one of my live cells and instrument it to see if I get different values.

`Segway Battery Diagnostics (C) 2019 Martin Bogomolni martinbogo@gmail.com MIT License

RECCOMENDED : Use a 12V power supply to your Arduino then provide 12V from VIN to BAT ENABLE (J5) to activate the Segway Battery BMS and read voltages.

If battery does not respond, briefly disconnect the BAT ENABLE pin and try again.

Connect SCL (j6) and SDA (J7) to Arduino I2C pins.

V) Read cell group voltages D) Read cell group voltages with lots of debug Info

Press key to select menu item: Cell Group [0] Checksum byte binary/hex [0b1100101]/[65] MSB binary/hex [0b0]/[0x0], LSB binary/hex[0b100]/[0x4], Word binary [0b100] 11 bit voltage binary/decimal [0b100]/[4] Cell Group [1] Checksum byte binary/hex [0b11100001]/[E1] MSB binary/hex [0b1000]/[0x8], LSB binary/hex[0b0]/[0x0], Word binary [0b100000000000] 11 bit voltage binary/decimal [0b0]/[0] Cell Group [2] Checksum byte binary/hex [0b11010011]/[D3] MSB binary/hex [0b10111]/[0x17], LSB binary/hex[0b11111111]/[0xFF], Word binary [0b1011111111111] 11 bit voltage binary/decimal [0b11111111111]/[2047] Cell Group [3] Checksum byte binary/hex [0b1010000]/[50] MSB binary/hex [0b11000]/[0x18], LSB binary/hex[0b1]/[0x1], Word binary [0b1100000000001] 11 bit voltage binary/decimal [0b1]/[1] Cell Group [4] Checksum byte binary/hex [0b11001001]/[C9] MSB binary/hex [0b100000]/[0x20], LSB binary/hex[0b0]/[0x0], Word binary [0b10000000000000] 11 bit voltage binary/decimal [0b0]/[0] Cell Group [5] Checksum byte binary/hex [0b11000001]/[C1] MSB binary/hex [0b101000]/[0x28], LSB binary/hex[0b0]/[0x0], Word binary [0b10100000000000] 11 bit voltage binary/decimal [0b0]/[0] Cell Group [6] Checksum byte binary/hex [0b110011]/[33] MSB binary/hex [0b110111]/[0x37], LSB binary/hex[0b11111111]/[0xFF], Word binary [0b11011111111111] 11 bit voltage binary/decimal [0b11111111111]/[2047] Cell Group [7] Checksum byte binary/hex [0b10110000]/[B0] MSB binary/hex [0b111000]/[0x38], LSB binary/hex[0b1]/[0x1], Word binary [0b11100000000001] 11 bit voltage binary/decimal [0b1]/[1] Cell Group [8] Checksum byte binary/hex [0b10101000]/[A8] MSB binary/hex [0b1000000]/[0x40], LSB binary/hex[0b1]/[0x1], Word binary [0b100000000000001] 11 bit voltage binary/decimal [0b1]/[1] Cell Group [9] Checksum byte binary/hex [0b10111000]/[B8] MSB binary/hex [0b1001111]/[0x4F], LSB binary/hex[0b11100010]/[0xE2], Word binary [0b100111111100010] 11 bit voltage binary/decimal [0b11111100010]/[2018] Cell Group [10] Checksum byte binary/hex [0b10010011]/[93] MSB binary/hex [0b1010111]/[0x57], LSB binary/hex[0b11111111]/[0xFF], Word binary [0b101011111111111] 11 bit voltage binary/decimal [0b11111111111]/[2047] Cell Group [11] Checksum byte binary/hex [0b10000]/[10] MSB binary/hex [0b1011000]/[0x58], LSB binary/hex[0b1]/[0x1], Word binary [0b101100000000001] 11 bit voltage binary/decimal [0b1]/[1] Cell Group [12] Checksum byte binary/hex [0b101]/[5] MSB binary/hex [0b1100000]/[0x60], LSB binary/hex[0b100]/[0x4], Word binary [0b110000000000100] 11 bit voltage binary/decimal [0b100]/[4] Cell Group [13] Checksum byte binary/hex [0b1111111]/[7F] MSB binary/hex [0b1101000]/[0x68], LSB binary/hex[0b10]/[0x2], Word binary [0b110100000000010] 11 bit voltage binary/decimal [0b10]/[2] Cell Group [14] Checksum byte binary/hex [0b11111001]/[F9] MSB binary/hex [0b1110000]/[0x70], LSB binary/hex[0b0]/[0x0], Word binary [0b111000000000000] 11 bit voltage binary/decimal [0b0]/[0] Cell Group [15] Checksum byte binary/hex [0b100010]/[22] MSB binary/hex [0b1111000]/[0x78], LSB binary/hex[0b1001111]/[0x4F], Word binary [0b111100001001111] 11 bit voltage binary/decimal [0b1001111]/[79] Cell Group [16] Checksum byte binary/hex [0b11100011]/[E3] MSB binary/hex [0b10000111]/[0x87], LSB binary/hex[0b11111111]/[0xFF], Word binary [0b1000011111111111] 11 bit voltage binary/decimal [0b11111111111]/[2047] Cell Group [17] Checksum byte binary/hex [0b1100001]/[61] MSB binary/hex [0b10001000]/[0x88], LSB binary/hex[0b0]/[0x0], Word binary [0b1000100000000000] 11 bit voltage binary/decimal [0b0]/[0] Cell Group [18] Checksum byte binary/hex [0b11011001]/[D9] MSB binary/hex [0b10010000]/[0x90], LSB binary/hex[0b0]/[0x0], Word binary [0b1001000000000000] 11 bit voltage binary/decimal [0b0]/[0] Cell Group [19] Checksum byte binary/hex [0b1100101]/[65] MSB binary/hex [0b10011000]/[0x98], LSB binary/hex[0b1101100]/[0x6C], Word binary [0b1001100001101100] 11 bit voltage binary/decimal [0b1101100]/[108] Cell Group [20] Checksum byte binary/hex [0b1001001]/[49] MSB binary/hex [0b10100000]/[0xA0], LSB binary/hex[0b0]/[0x0], Word binary [0b1010000000000000] 11 bit voltage binary/decimal [0b0]/[0] Cell Group [21] Checksum byte binary/hex [0b111011]/[3B] MSB binary/hex [0b10101111]/[0xAF], LSB binary/hex[0b11111111]/[0xFF], Word binary [0b1010111111111111] 11 bit voltage binary/decimal [0b11111111111]/[2047] Cell Group [22] Checksum byte binary/hex [0b11011]/[1B] MSB binary/hex [0b10110000]/[0xB0], LSB binary/hex[0b11110]/[0x1E], Word binary [0b1011000000011110] 11 bit voltage binary/decimal [0b11110]/[30] Cell Group [0] Voltage is 0.01 Cell Group [1] Voltage is 0.00 Cell Group [2] Voltage is 3.65 Cell Group [3] Voltage is 0.00 Cell Group [4] Voltage is 0.00 Cell Group [5] Voltage is 0.00 Cell Group [6] Voltage is 3.65 Cell Group [7] Voltage is 0.00 Cell Group [8] Voltage is 0.00 Cell Group [9] Voltage is 3.47 Cell Group [10] Voltage is 3.65 Cell Group [11] Voltage is 0.00 Cell Group [12] Voltage is 0.01 Cell Group [13] Voltage is 0.00 Cell Group [14] Voltage is 0.00 Cell Group [15] Voltage is 0.14 Cell Group [16] Voltage is 3.65 Cell Group [17] Voltage is 0.00 Cell Group [18] Voltage is 0.00 Cell Group [19] Voltage is 0.19 Cell Group [20] Voltage is 0.00 Cell Group [21] Voltage is 3.65 Cell Group [22] Voltage is 0.05 Battery Voltage is [22.13] `

My actual cell voltage at the terminals is currently 11.8V when I use the multimeter, so I'm stumped a bit here as well.

martinbogo commented 5 years ago

I just took a good battery off my Segway i2 -- it's a Rev AF battery and it outputs the following debug info. The "voltage" is the raw integer from the 11 bits rather than applying any scaling factor.

Segway Battery Diagnostics (C) 2019 Martin Bogomolni martinbogo@gmail.com MIT License

RECCOMENDED : Use a 12V power supply to your Arduino then provide 12V from VIN to BAT ENABLE (J5) to activate the Segway Battery BMS and read voltages.

If battery does not respond, briefly disconnect the BAT ENABLE pin and try again.

Connect SCL (j6) and SDA (J7) to Arduino I2C pins.

V) Read cell group voltages D) Read cell group voltages with lots of debug Info

Press key to select menu item: Cell Group [0] Checksum byte binary/hex [0b111000]/[38] MSB binary/hex [0b1]/[0x1], LSB binary/hex[0b10110000]/[0xB0], Word binary [0b110110000] 11 bit voltage binary/decimal [0b110110000]/[432] Cell Group [1] Checksum byte binary/hex [0b101111]/[2F] MSB binary/hex [0b1001]/[0x9], LSB binary/hex[0b10110001]/[0xB1], Word binary [0b100110110001] 11 bit voltage binary/decimal [0b110110001]/[433] Cell Group [2] Checksum byte binary/hex [0b100110]/[26] MSB binary/hex [0b10001]/[0x11], LSB binary/hex[0b10110010]/[0xB2], Word binary [0b1000110110010] 11 bit voltage binary/decimal [0b110110010]/[434] Cell Group [3] Checksum byte binary/hex [0b100000]/[20] MSB binary/hex [0b11001]/[0x19], LSB binary/hex[0b10110000]/[0xB0], Word binary [0b1100110110000] 11 bit voltage binary/decimal [0b110110000]/[432] Cell Group [4] Checksum byte binary/hex [0b11001]/[19] MSB binary/hex [0b100001]/[0x21], LSB binary/hex[0b10101111]/[0xAF], Word binary [0b10000110101111] 11 bit voltage binary/decimal [0b110101111]/[431] Cell Group [5] Checksum byte binary/hex [0b10001110]/[8E] MSB binary/hex [0b101001]/[0x29], LSB binary/hex[0b10110010]/[0xB2], Word binary [0b10100110110010] 11 bit voltage binary/decimal [0b110110010]/[434] Cell Group [6] Checksum byte binary/hex [0b110]/[6] MSB binary/hex [0b110001]/[0x31], LSB binary/hex[0b10110010]/[0xB2], Word binary [0b11000110110010] 11 bit voltage binary/decimal [0b110110010]/[434] Cell Group [7] Checksum byte binary/hex [0b1111111]/[7F] MSB binary/hex [0b111001]/[0x39], LSB binary/hex[0b10110001]/[0xB1], Word binary [0b11100110110001] 11 bit voltage binary/decimal [0b110110001]/[433] Cell Group [8] Checksum byte binary/hex [0b11110111]/[F7] MSB binary/hex [0b1000001]/[0x41], LSB binary/hex[0b10110001]/[0xB1], Word binary [0b100000110110001] 11 bit voltage binary/decimal [0b110110001]/[433] Cell Group [9] Checksum byte binary/hex [0b11101110]/[EE] MSB binary/hex [0b1001001]/[0x49], LSB binary/hex[0b10110010]/[0xB2], Word binary [0b100100110110010] 11 bit voltage binary/decimal [0b110110010]/[434] Cell Group [10] Checksum byte binary/hex [0b1100110]/[66] MSB binary/hex [0b1010001]/[0x51], LSB binary/hex[0b10110010]/[0xB2], Word binary [0b101000110110010] 11 bit voltage binary/decimal [0b110110010]/[434] Cell Group [11] Checksum byte binary/hex [0b11011111]/[DF] MSB binary/hex [0b1011001]/[0x59], LSB binary/hex[0b10110001]/[0xB1], Word binary [0b101100110110001] 11 bit voltage binary/decimal [0b110110001]/[433] Cell Group [12] Checksum byte binary/hex [0b11010111]/[D7] MSB binary/hex [0b1100001]/[0x61], LSB binary/hex[0b10110001]/[0xB1], Word binary [0b110000110110001] 11 bit voltage binary/decimal [0b110110001]/[433] Cell Group [13] Checksum byte binary/hex [0b11001110]/[CE] MSB binary/hex [0b1101001]/[0x69], LSB binary/hex[0b10110010]/[0xB2], Word binary [0b110100110110010] 11 bit voltage binary/decimal [0b110110010]/[434] Cell Group [14] Checksum byte binary/hex [0b1000110]/[46] MSB binary/hex [0b1110001]/[0x71], LSB binary/hex[0b10110010]/[0xB2], Word binary [0b111000110110010] 11 bit voltage binary/decimal [0b110110010]/[434] Cell Group [15] Checksum byte binary/hex [0b111111]/[3F] MSB binary/hex [0b1111001]/[0x79], LSB binary/hex[0b10110001]/[0xB1], Word binary [0b111100110110001] 11 bit voltage binary/decimal [0b110110001]/[433] Cell Group [16] Checksum byte binary/hex [0b10111000]/[B8] MSB binary/hex [0b10000001]/[0x81], LSB binary/hex[0b10110000]/[0xB0], Word binary [0b1000000110110000] 11 bit voltage binary/decimal [0b110110000]/[432] Cell Group [17] Checksum byte binary/hex [0b101110]/[2E] MSB binary/hex [0b10001001]/[0x89], LSB binary/hex[0b10110010]/[0xB2], Word binary [0b1000100110110010] 11 bit voltage binary/decimal [0b110110010]/[434] Cell Group [18] Checksum byte binary/hex [0b10100110]/[A6] MSB binary/hex [0b10010001]/[0x91], LSB binary/hex[0b10110010]/[0xB2], Word binary [0b1001000110110010] 11 bit voltage binary/decimal [0b110110010]/[434] Cell Group [19] Checksum byte binary/hex [0b11111]/[1F] MSB binary/hex [0b10011001]/[0x99], LSB binary/hex[0b10110001]/[0xB1], Word binary [0b1001100110110001] 11 bit voltage binary/decimal [0b110110001]/[433] Cell Group [20] Checksum byte binary/hex [0b10111]/[17] MSB binary/hex [0b10100001]/[0xA1], LSB binary/hex[0b10110001]/[0xB1], Word binary [0b1010000110110001] 11 bit voltage binary/decimal [0b110110001]/[433] Cell Group [21] Checksum byte binary/hex [0b1110]/[E] MSB binary/hex [0b10101001]/[0xA9], LSB binary/hex[0b10110010]/[0xB2], Word binary [0b1010100110110010] 11 bit voltage binary/decimal [0b110110010]/[434] Cell Group [22] Checksum byte binary/hex [0b10000110]/[86] MSB binary/hex [0b10110001]/[0xB1], LSB binary/hex[0b10110010]/[0xB2], Word binary [0b1011000110110010] 11 bit voltage binary/decimal [0b110110010]/[434] Cell Group [0] Checksum byte binary/hex [0b111000]/[38] MSB binary/hex [0b1]/[0x1], LSB binary/hex[0b10110000]/[0xB0], Word binary [0b110110000] 11 bit voltage binary/decimal [0b110110000]/[432] Cell Group [1] Voltage value is 433 Cell Group [2] Voltage value is 433 Cell Group [3] Voltage value is 432 Cell Group [4] Voltage value is 431 Cell Group [5] Voltage value is 434 Cell Group [6] Voltage value is 434 Cell Group [7] Voltage value is 433 Cell Group [8] Voltage value is 433 Cell Group [9] Voltage value is 433 Cell Group [10] Voltage value is 434 Cell Group [11] Voltage value is 433 Cell Group [12] Voltage value is 432 Cell Group [13] Voltage value is 434 Cell Group [14] Voltage value is 433 Cell Group [15] Voltage value is 433 Cell Group [16] Voltage value is 432 Cell Group [17] Voltage value is 434 Cell Group [18] Voltage value is 434 Cell Group [19] Voltage value is 433 Cell Group [20] Voltage value is 433 Cell Group [21] Voltage value is 434 Cell Group [22] Voltage value is 434 Cell Group [0] Voltage value is 432 Cell Group [1] Voltage value is 433

gmulberry commented 5 years ago

Here's what I'm getting now:

Cell Group [0] Voltage is 0.78 Cell Group [1] Voltage is 0.78 Cell Group [2] Voltage is 0.78 Cell Group [3] Voltage is 0.78 Cell Group [4] Voltage is 0.78 Cell Group [5] Voltage is 0.78 Cell Group [6] Voltage is 0.78 Cell Group [7] Voltage is 0.78 Cell Group [8] Voltage is 0.78 Cell Group [9] Voltage is 0.78 Cell Group [10] Voltage is 0.78 Cell Group [11] Voltage is 0.78 Cell Group [12] Voltage is 0.78 Cell Group [13] Voltage is 0.78 Cell Group [14] Voltage is 0.78 Cell Group [15] Voltage is 0.78 Cell Group [16] Voltage is 0.78 Cell Group [17] Voltage is 0.78 Cell Group [18] Voltage is 0.78 Cell Group [19] Voltage is 0.78 Cell Group [20] Voltage is 0.78 Cell Group [21] Voltage is 0.78 Cell Group [22] Voltage is 0.78 Battery Voltage is [17.98] Cell Group [0] Checksum byte binary/hex [0b110010]/[32] MSB binary/hex [0b1]/[0x1], LSB binary/hex[0b10110110]/[0xB6], Word binary [0b110110110] 11 bit voltage binary/decimal [0b110110110]/[438] Cell Group [1] Checksum byte binary/hex [0b10101010]/[AA] MSB binary/hex [0b1001]/[0x9], LSB binary/hex[0b10110110]/[0xB6], Word binary [0b100110110110] 11 bit voltage binary/decimal [0b110110110]/[438] Cell Group [2] Checksum byte binary/hex [0b100010]/[22] MSB binary/hex [0b10001]/[0x11], LSB binary/hex[0b10110110]/[0xB6], Word binary [0b1000110110110] 11 bit voltage binary/decimal [0b110110110]/[438] Cell Group [3] Checksum byte binary/hex [0b11010]/[1A] MSB binary/hex [0b11001]/[0x19], LSB binary/hex[0b10110110]/[0xB6], Word binary [0b1100110110110] 11 bit voltage binary/decimal [0b110110110]/[438] Cell Group [4] Checksum byte binary/hex [0b10010100]/[94] MSB binary/hex [0b100001]/[0x21], LSB binary/hex[0b10110100]/[0xB4], Word binary [0b10000110110100] 11 bit voltage binary/decimal [0b110110100]/[436] Cell Group [5] Checksum byte binary/hex [0b10001010]/[8A] MSB binary/hex [0b101001]/[0x29], LSB binary/hex[0b10110110]/[0xB6], Word binary [0b10100110110110] 11 bit voltage binary/decimal [0b110110110]/[438] Cell Group [6] Checksum byte binary/hex [0b10]/[2] MSB binary/hex [0b110001]/[0x31], LSB binary/hex[0b10110110]/[0xB6], Word binary [0b11000110110110] 11 bit voltage binary/decimal [0b110110110]/[438] Cell Group [7] Checksum byte binary/hex [0b1111001]/[79] MSB binary/hex [0b111001]/[0x39], LSB binary/hex[0b10110111]/[0xB7], Word binary [0b11100110110111] 11 bit voltage binary/decimal [0b110110111]/[439] Cell Group [8] Checksum byte binary/hex [0b1110010]/[72] MSB binary/hex [0b1000001]/[0x41], LSB binary/hex[0b10110110]/[0xB6], Word binary [0b100000110110110] 11 bit voltage binary/decimal [0b110110110]/[438] Cell Group [9] Checksum byte binary/hex [0b1101001]/[69] MSB binary/hex [0b1001001]/[0x49], LSB binary/hex[0b10110111]/[0xB7], Word binary [0b100100110110111] 11 bit voltage binary/decimal [0b110110111]/[439] Cell Group [10] Checksum byte binary/hex [0b11100001]/[E1] MSB binary/hex [0b1010001]/[0x51], LSB binary/hex[0b10110111]/[0xB7], Word binary [0b101000110110111] 11 bit voltage binary/decimal [0b110110111]/[439] Cell Group [11] Checksum byte binary/hex [0b1011010]/[5A] MSB binary/hex [0b1011001]/[0x59], LSB binary/hex[0b10110110]/[0xB6], Word binary [0b101100110110110] 11 bit voltage binary/decimal [0b110110110]/[438] Cell Group [12] Checksum byte binary/hex [0b1010010]/[52] MSB binary/hex [0b1100001]/[0x61], LSB binary/hex[0b10110110]/[0xB6], Word binary [0b110000110110110] 11 bit voltage binary/decimal [0b110110110]/[438] Cell Group [13] Checksum byte binary/hex [0b11001010]/[CA] MSB binary/hex [0b1101001]/[0x69], LSB binary/hex[0b10110110]/[0xB6], Word binary [0b110100110110110] 11 bit voltage binary/decimal [0b110110110]/[438] Cell Group [14] Checksum byte binary/hex [0b11000001]/[C1] MSB binary/hex [0b1110001]/[0x71], LSB binary/hex[0b10110111]/[0xB7], Word binary [0b111000110110111] 11 bit voltage binary/decimal [0b110110111]/[439] Cell Group [15] Checksum byte binary/hex [0b111001]/[39] MSB binary/hex [0b1111001]/[0x79], LSB binary/hex[0b10110111]/[0xB7], Word binary [0b111100110110111] 11 bit voltage binary/decimal [0b110110111]/[439] Cell Group [16] Checksum byte binary/hex [0b10110010]/[B2] MSB binary/hex [0b10000001]/[0x81], LSB binary/hex[0b10110110]/[0xB6], Word binary [0b1000000110110110] 11 bit voltage binary/decimal [0b110110110]/[438] Cell Group [17] Checksum byte binary/hex [0b10101001]/[A9] MSB binary/hex [0b10001001]/[0x89], LSB binary/hex[0b10110111]/[0xB7], Word binary [0b1000100110110111] 11 bit voltage binary/decimal [0b110110111]/[439] Cell Group [18] Checksum byte binary/hex [0b100001]/[21] MSB binary/hex [0b10010001]/[0x91], LSB binary/hex[0b10110111]/[0xB7], Word binary [0b1001000110110111] 11 bit voltage binary/decimal [0b110110111]/[439] Cell Group [19] Checksum byte binary/hex [0b11001]/[19] MSB binary/hex [0b10011001]/[0x99], LSB binary/hex[0b10110111]/[0xB7], Word binary [0b1001100110110111] 11 bit voltage binary/decimal [0b110110111]/[439] Cell Group [20] Checksum byte binary/hex [0b10010010]/[92] MSB binary/hex [0b10100001]/[0xA1], LSB binary/hex[0b10110110]/[0xB6], Word binary [0b1010000110110110] 11 bit voltage binary/decimal [0b110110110]/[438] Cell Group [21] Checksum byte binary/hex [0b10001001]/[89] MSB binary/hex [0b10101001]/[0xA9], LSB binary/hex[0b10110111]/[0xB7], Word binary [0b1010100110110111] 11 bit voltage binary/decimal [0b110110111]/[439] Cell Group [22] Checksum byte binary/hex [0b1]/[1] MSB binary/hex [0b10110001]/[0xB1], LSB binary/hex[0b10110111]/[0xB7], Word binary [0b1011000110110111] 11 bit voltage binary/decimal [0b110110111]/[439]

Measuring with the actual meter tells me I have 78 Volts for the total battery now. It is a rev AH.

If I try with another good battery rev (AJ), which measures 77 volts, I get this:

Cell Group [10] Voltage is 0.76 Cell Group [11] Voltage is 0.76 Cell Group [12] Voltage is 0.76 Cell Group [13] Voltage is 0.76 Cell Group [14] Voltage is 0.76 Cell Group [15] Voltage is 0.76 Cell Group [16] Voltage is 0.76 Cell Group [17] Voltage is 0.76 Cell Group [18] Voltage is 0.76 Cell Group [19] Voltage is 0.76 Cell Group [20] Voltage is 0.76 Cell Group [21] Voltage is 0.76 Cell Group [22] Voltage is 0.76 Cell Group [0] Voltage is 0.76 Cell Group [1] Voltage is 0.76 Cell Group [2] Voltage is 0.76 Cell Group [3] Voltage is 0.76 Cell Group [4] Voltage is 0.76 Cell Group [5] Voltage is 0.76 Cell Group [6] Voltage is 0.76 Cell Group [7] Voltage is 0.76 Cell Group [8] Voltage is 0.76 Cell Group [9] Voltage is 0.76 Battery Voltage is [17.50] Cell Group [10] Checksum byte binary/hex [0b1101100]/[6C] MSB binary/hex [0b1010001]/[0x51], LSB binary/hex[0b10101100]/[0xAC], Word binary [0b101000110101100] 11 bit voltage binary/decimal [0b110101100]/[428] Cell Group [11] Checksum byte binary/hex [0b1100100]/[64] MSB binary/hex [0b1011001]/[0x59], LSB binary/hex[0b10101100]/[0xAC], Word binary [0b101100110101100] 11 bit voltage binary/decimal [0b110101100]/[428] Cell Group [12] Checksum byte binary/hex [0b1011111]/[5F] MSB binary/hex [0b1100001]/[0x61], LSB binary/hex[0b10101001]/[0xA9], Word binary [0b110000110101001] 11 bit voltage binary/decimal [0b110101001]/[425] Cell Group [13] Checksum byte binary/hex [0b11010110]/[D6] MSB binary/hex [0b1101001]/[0x69], LSB binary/hex[0b10101010]/[0xAA], Word binary [0b110100110101010] 11 bit voltage binary/decimal [0b110101010]/[426] Cell Group [14] Checksum byte binary/hex [0b1001101]/[4D] MSB binary/hex [0b1110001]/[0x71], LSB binary/hex[0b10101011]/[0xAB], Word binary [0b111000110101011] 11 bit voltage binary/decimal [0b110101011]/[427] Cell Group [15] Checksum byte binary/hex [0b1000100]/[44] MSB binary/hex [0b1111001]/[0x79], LSB binary/hex[0b10101100]/[0xAC], Word binary [0b111100110101100] 11 bit voltage binary/decimal [0b110101100]/[428] Cell Group [16] Checksum byte binary/hex [0b10111111]/[BF] MSB binary/hex [0b10000001]/[0x81], LSB binary/hex[0b10101001]/[0xA9], Word binary [0b1000000110101001] 11 bit voltage binary/decimal [0b110101001]/[425] Cell Group [17] Checksum byte binary/hex [0b10110100]/[B4] MSB binary/hex [0b10001001]/[0x89], LSB binary/hex[0b10101100]/[0xAC], Word binary [0b1000100110101100] 11 bit voltage binary/decimal [0b110101100]/[428] Cell Group [18] Checksum byte binary/hex [0b10101100]/[AC] MSB binary/hex [0b10010001]/[0x91], LSB binary/hex[0b10101100]/[0xAC], Word binary [0b1001000110101100] 11 bit voltage binary/decimal [0b110101100]/[428] Cell Group [19] Checksum byte binary/hex [0b10100100]/[A4] MSB binary/hex [0b10011001]/[0x99], LSB binary/hex[0b10101100]/[0xAC], Word binary [0b1001100110101100] 11 bit voltage binary/decimal [0b110101100]/[428] Cell Group [20] Checksum byte binary/hex [0b10011111]/[9F] MSB binary/hex [0b10100001]/[0xA1], LSB binary/hex[0b10101001]/[0xA9], Word binary [0b1010000110101001] 11 bit voltage binary/decimal [0b110101001]/[425] Cell Group [21] Checksum byte binary/hex [0b10010101]/[95] MSB binary/hex [0b10101001]/[0xA9], LSB binary/hex[0b10101011]/[0xAB], Word binary [0b1010100110101011] 11 bit voltage binary/decimal [0b110101011]/[427] Cell Group [22] Checksum byte binary/hex [0b10001101]/[8D] MSB binary/hex [0b10110001]/[0xB1], LSB binary/hex[0b10101011]/[0xAB], Word binary [0b1011000110101011] 11 bit voltage binary/decimal [0b110101011]/[427] Cell Group [0] Checksum byte binary/hex [0b1000000]/[40] MSB binary/hex [0b1]/[0x1], LSB binary/hex[0b10101000]/[0xA8], Word binary [0b110101000] 11 bit voltage binary/decimal [0b110101000]/[424] Cell Group [1] Checksum byte binary/hex [0b110101]/[35] MSB binary/hex [0b1001]/[0x9], LSB binary/hex[0b10101011]/[0xAB], Word binary [0b100110101011] 11 bit voltage binary/decimal [0b110101011]/[427] Cell Group [2] Checksum byte binary/hex [0b101101]/[2D] MSB binary/hex [0b10001]/[0x11], LSB binary/hex[0b10101011]/[0xAB], Word binary [0b1000110101011] 11 bit voltage binary/decimal [0b110101011]/[427] Cell Group [3] Checksum byte binary/hex [0b100101]/[25] MSB binary/hex [0b11001]/[0x19], LSB binary/hex[0b10101011]/[0xAB], Word binary [0b1100110101011] 11 bit voltage binary/decimal [0b110101011]/[427] Cell Group [4] Checksum byte binary/hex [0b11111]/[1F] MSB binary/hex [0b100001]/[0x21], LSB binary/hex[0b10101001]/[0xA9], Word binary [0b10000110101001] 11 bit voltage binary/decimal [0b110101001]/[425] Cell Group [5] Checksum byte binary/hex [0b10101]/[15] MSB binary/hex [0b101001]/[0x29], LSB binary/hex[0b10101011]/[0xAB], Word binary [0b10100110101011] 11 bit voltage binary/decimal [0b110101011]/[427] Cell Group [6] Checksum byte binary/hex [0b1101]/[D] MSB binary/hex [0b110001]/[0x31], LSB binary/hex[0b10101011]/[0xAB], Word binary [0b11000110101011] 11 bit voltage binary/decimal [0b110101011]/[427] Cell Group [7] Checksum byte binary/hex [0b100]/[4] MSB binary/hex [0b111001]/[0x39], LSB binary/hex[0b10101100]/[0xAC], Word binary [0b11100110101100] 11 bit voltage binary/decimal [0b110101100]/[428] Cell Group [8] Checksum byte binary/hex [0b1111111]/[7F] MSB binary/hex [0b1000001]/[0x41], LSB binary/hex[0b10101001]/[0xA9], Word binary [0b100000110101001] 11 bit voltage binary/decimal [0b110101001]/[425] Cell Group [9] Checksum byte binary/hex [0b1110101]/[75] MSB binary/hex [0b1001001]/[0x49], LSB binary/hex[0b10101011]/[0xAB], Word binary [0b100100110101011] 11 bit voltage binary/decimal [0b110101011]/[427]

martinbogo commented 5 years ago

Well, at least our readings are now consistent. I know those 11 bits correspond to to the mV in the battery. Uploading a new version shortly.

martinbogo commented 5 years ago

I have uploaded version 1.03 which just outputs the raw values from the registers. I did a register scan, and I found a "mirror" register that has the same information! Both register 0x96 and 0x56 return 23 values and need to be read 3 times.

I feel that I'm missing something obvious here with the value returned. I'm fairly certain the first byte only contains a checksum, and that all the information we need is contained in the last 11 bits.

I should take a ride on the segway and drain this battery a bit, then see what changes. There has to be a clear correspondence.

I'm also poking the other registers to find which ones have the thermistor/temp sensors.

martinbogo commented 5 years ago

This is what I am currently getting:

(C) 2019 Martin Bogomolni <martinbogo@gmail.com>
MIT License

RECCOMENDED : Use a 12V power supply to your Arduino then
provide 12V from VIN to BAT ENABLE (J5) to activate the
Segway Battery BMS and read voltages.

If battery does not respond, briefly disconnect the BAT
ENABLE pin and try again.

Connect SCL (j6) and SDA (J7) to Arduino I2C pins.

V) Read raw cell group voltages
D) Read raw cell group voltages with lots of debug Info

Press key to select menu item:
Cell Group [17] Checksum byte binary/hex [0b10101111]/[AF] MSB binary/hex [0b10001001]/[0x89], LSB binary/hex[0b10110001]/[0xB1], Word binary [0b1000100110110001] 11 bit voltage binary/decimal [0b110110001]/[433]
Cell Group [18] Checksum byte binary/hex [0b10101000]/[A8] MSB binary/hex [0b10010001]/[0x91], LSB binary/hex[0b10110000]/[0xB0], Word binary [0b1001000110110000] 11 bit voltage binary/decimal [0b110110000]/[432]
Cell Group [19] Checksum byte binary/hex [0b10100000]/[A0] MSB binary/hex [0b10011001]/[0x99], LSB binary/hex[0b10110000]/[0xB0], Word binary [0b1001100110110000] 11 bit voltage binary/decimal [0b110110000]/[432]
Cell Group [20] Checksum byte binary/hex [0b10011001]/[99] MSB binary/hex [0b10100001]/[0xA1], LSB binary/hex[0b10101111]/[0xAF], Word binary [0b1010000110101111] 11 bit voltage binary/decimal [0b110101111]/[431]
Cell Group [21] Checksum byte binary/hex [0b10001111]/[8F] MSB binary/hex [0b10101001]/[0xA9], LSB binary/hex[0b10110001]/[0xB1], Word binary [0b1010100110110001] 11 bit voltage binary/decimal [0b110110001]/[433]
Cell Group [22] Checksum byte binary/hex [0b111]/[7] MSB binary/hex [0b10110001]/[0xB1], LSB binary/hex[0b10110001]/[0xB1], Word binary [0b1011000110110001] 11 bit voltage binary/decimal [0b110110001]/[433]
Cell Group [0] Checksum byte binary/hex [0b111001]/[39] MSB binary/hex [0b1]/[0x1], LSB binary/hex[0b10101111]/[0xAF], Word binary [0b110101111] 11 bit voltage binary/decimal [0b110101111]/[431]
Cell Group [1] Checksum byte binary/hex [0b110000]/[30] MSB binary/hex [0b1001]/[0x9], LSB binary/hex[0b10110000]/[0xB0], Word binary [0b100110110000] 11 bit voltage binary/decimal [0b110110000]/[432]
Cell Group [2] Checksum byte binary/hex [0b101000]/[28] MSB binary/hex [0b10001]/[0x11], LSB binary/hex[0b10110000]/[0xB0], Word binary [0b1000110110000] 11 bit voltage binary/decimal [0b110110000]/[432]
Cell Group [3] Checksum byte binary/hex [0b100001]/[21] MSB binary/hex [0b11001]/[0x19], LSB binary/hex[0b10101111]/[0xAF], Word binary [0b1100110101111] 11 bit voltage binary/decimal [0b110101111]/[431]
Cell Group [4] Checksum byte binary/hex [0b10011010]/[9A] MSB binary/hex [0b100001]/[0x21], LSB binary/hex[0b10101110]/[0xAE], Word binary [0b10000110101110] 11 bit voltage binary/decimal [0b110101110]/[430]
Cell Group [5] Checksum byte binary/hex [0b10000]/[10] MSB binary/hex [0b101001]/[0x29], LSB binary/hex[0b10110000]/[0xB0], Word binary [0b10100110110000] 11 bit voltage binary/decimal [0b110110000]/[432]
Cell Group [6] Checksum byte binary/hex [0b1000]/[8] MSB binary/hex [0b110001]/[0x31], LSB binary/hex[0b10110000]/[0xB0], Word binary [0b11000110110000] 11 bit voltage binary/decimal [0b110110000]/[432]
Cell Group [7] Checksum byte binary/hex [0b0]/[0] MSB binary/hex [0b111001]/[0x39], LSB binary/hex[0b10110000]/[0xB0], Word binary [0b11100110110000] 11 bit voltage binary/decimal [0b110110000]/[432]
Cell Group [8] Checksum byte binary/hex [0b1111001]/[79] MSB binary/hex [0b1000001]/[0x41], LSB binary/hex[0b10101111]/[0xAF], Word binary [0b100000110101111] 11 bit voltage binary/decimal [0b110101111]/[431]
Cell Group [9] Checksum byte binary/hex [0b1110000]/[70] MSB binary/hex [0b1001001]/[0x49], LSB binary/hex[0b10110000]/[0xB0], Word binary [0b100100110110000] 11 bit voltage binary/decimal [0b110110000]/[432]
Cell Group [10] Checksum byte binary/hex [0b1101000]/[68] MSB binary/hex [0b1010001]/[0x51], LSB binary/hex[0b10110000]/[0xB0], Word binary [0b101000110110000] 11 bit voltage binary/decimal [0b110110000]/[432]
Cell Group [11] Checksum byte binary/hex [0b1100001]/[61] MSB binary/hex [0b1011001]/[0x59], LSB binary/hex[0b10101111]/[0xAF], Word binary [0b101100110101111] 11 bit voltage binary/decimal [0b110101111]/[431]
Cell Group [12] Checksum byte binary/hex [0b1011001]/[59] MSB binary/hex [0b1100001]/[0x61], LSB binary/hex[0b10101111]/[0xAF], Word binary [0b110000110101111] 11 bit voltage binary/decimal [0b110101111]/[431]
Cell Group [13] Checksum byte binary/hex [0b1010000]/[50] MSB binary/hex [0b1101001]/[0x69], LSB binary/hex[0b10110000]/[0xB0], Word binary [0b110100110110000] 11 bit voltage binary/decimal [0b110110000]/[432]
Cell Group [14] Checksum byte binary/hex [0b1001000]/[48] MSB binary/hex [0b1110001]/[0x71], LSB binary/hex[0b10110000]/[0xB0], Word binary [0b111000110110000] 11 bit voltage binary/decimal [0b110110000]/[432]
Cell Group [15] Checksum byte binary/hex [0b1000001]/[41] MSB binary/hex [0b1111001]/[0x79], LSB binary/hex[0b10101111]/[0xAF], Word binary [0b111100110101111] 11 bit voltage binary/decimal [0b110101111]/[431]
Cell Group [16] Checksum byte binary/hex [0b10111001]/[B9] MSB binary/hex [0b10000001]/[0x81], LSB binary/hex[0b10101111]/[0xAF], Word binary [0b1000000110101111] 11 bit voltage binary/decimal [0b110101111]/[431]
Cell Group [17] Voltage value is 433
Cell Group [18] Voltage value is 432
Cell Group [19] Voltage value is 432
Cell Group [20] Voltage value is 431
Cell Group [21] Voltage value is 433
Cell Group [22] Voltage value is 433
Cell Group [0] Voltage value is 431
Cell Group [1] Voltage value is 432
Cell Group [2] Voltage value is 432
Cell Group [3] Voltage value is 431
Cell Group [4] Voltage value is 430
Cell Group [5] Voltage value is 432
Cell Group [6] Voltage value is 432
Cell Group [7] Voltage value is 432
Cell Group [8] Voltage value is 431
Cell Group [9] Voltage value is 432
Cell Group [10] Voltage value is 432
Cell Group [11] Voltage value is 431
Cell Group [12] Voltage value is 431
Cell Group [13] Voltage value is 432
Cell Group [14] Voltage value is 432
Cell Group [15] Voltage value is 432
Cell Group [16] Voltage value is 431
martinbogo commented 5 years ago

Perhaps the scaling value for this number is 8, to give milivolts -- but I'm doubtful.

gmulberry commented 5 years ago

If I adjust the scaling to (8.0 / 1023.0) I get very close to the expected values for cell voltages. Maybe there are really only 10 bit ADCs? The value of 8.0 volts for the max was found by inputting 1 volt into one of the cells and leaving the others intact. This returned a value of 128. 2 volts gave approximately 250 and 3 volts gave around 390. It doesn't seem perfectly linear and seems to vary between different batteries, but is definitely much closer to the real cell levels now. Below is an example output from one of my batteries now:

Cell Group [0] Voltage is 2.51 Cell Group [1] Voltage is 2.49 Cell Group [2] Voltage is 3.05 Cell Group [3] Voltage is 3.07 Cell Group [4] Voltage is 3.10 Cell Group [5] Voltage is 3.11 Cell Group [6] Voltage is 3.18 Cell Group [7] Voltage is 3.23 Cell Group [8] Voltage is 3.12 Cell Group [9] Voltage is 3.11 Cell Group [10] Voltage is 3.21 Cell Group [11] Voltage is 3.21 Cell Group [12] Voltage is 3.14 Cell Group [13] Voltage is 3.14 Cell Group [14] Voltage is 3.21 Cell Group [15] Voltage is 3.25 Cell Group [16] Voltage is 3.15 Cell Group [17] Voltage is 3.15 Cell Group [18] Voltage is 2.64 Cell Group [19] Voltage is 3.28 Cell Group [20] Voltage is 3.21 Cell Group [21] Voltage is 3.21 Cell Group [22] Voltage is 3.25

martinbogo commented 5 years ago

Absent any other theory, lets go with that. I will make that adjustment in the code now and let's see how it pans out for other people using the tool. I am going to mask off the top 6 bits, and leave 10 bits for the ADC, scaling with 8. If this holds true, we'll stick with that.

If anyone else comes across this thread and has a better/different theory on the scaling factor, please chime in. I'll leave this issue open for a while.

martinbogo commented 5 years ago

I just pushed version 1.10 and tested it with a slightly discharged and freshly charged battery. The resultant readings of the cell group voltages and pack voltages are close, given the limitations of doing floating point math on an Arduino.

@gmulberry give it a try, see if the 1.10 version of the code works as expected

martinbogo commented 5 years ago

This is the current output from my good Segway battery, using the updated code. Battery on the bench measured 76.96 volts on the multimeter, so I think this is close.

Segway Battery Diagnostics
(C) 2019 Martin Bogomolni <martinbogo@gmail.com>
MIT License

RECCOMENDED : Use a 12V power supply to your Arduino then
provide 12V from VIN to BAT ENABLE (J5) to activate the
Segway Battery BMS and read voltages.

If battery does not respond, briefly disconnect the BAT
ENABLE pin and try again.

Connect SCL (j6) and SDA (J7) to Arduino I2C pins.

V) Read raw cell group voltages
D) Read raw cell group voltages with lots of debug Info

Press key to select menu item:
Cell Group [17] Voltage millivolt: 3354
Cell Group [18] Voltage millivolt: 3346
Cell Group [19] Voltage millivolt: 3346
Cell Group [20] Voltage millivolt: 3339
Cell Group [21] Voltage millivolt: 3354
Cell Group [22] Voltage millivolt: 3346
Cell Group [0] Voltage millivolt: 3339
Cell Group [1] Voltage millivolt: 3346
Cell Group [2] Voltage millivolt: 3346
Cell Group [3] Voltage millivolt: 3339
Cell Group [4] Voltage millivolt: 3331
Cell Group [5] Voltage millivolt: 3346
Cell Group [6] Voltage millivolt: 3346
Cell Group [7] Voltage millivolt: 3346
Cell Group [8] Voltage millivolt: 3339
Cell Group [9] Voltage millivolt: 3346
Cell Group [10] Voltage millivolt: 3346
Cell Group [11] Voltage millivolt: 3339
Cell Group [12] Voltage millivolt: 3339
Cell Group [13] Voltage millivolt: 3346
Cell Group [14] Voltage millivolt: 3346
Cell Group [15] Voltage millivolt: 3339
Cell Group [16] Voltage millivolt: 3339
Pack voltage: 76.90 V
Cell Group [17] Checksum byte binary/hex [0b10110011]/[B3] MSB binary/hex [0b10001001]/[0x89], LSB binary/hex[0b10101101]/[0xAD], Word binary [0b1000100110101101] 10 bit voltage binary/decimal [0b110101101]/[429]
Cell Group [18] Checksum byte binary/hex [0b10101100]/[AC] MSB binary/hex [0b10010001]/[0x91], LSB binary/hex[0b10101100]/[0xAC], Word binary [0b1001000110101100] 10 bit voltage binary/decimal [0b110101100]/[428]
Cell Group [19] Checksum byte binary/hex [0b10100100]/[A4] MSB binary/hex [0b10011001]/[0x99], LSB binary/hex[0b10101100]/[0xAC], Word binary [0b1001100110101100] 10 bit voltage binary/decimal [0b110101100]/[428]
Cell Group [20] Checksum byte binary/hex [0b10011101]/[9D] MSB binary/hex [0b10100001]/[0xA1], LSB binary/hex[0b10101011]/[0xAB], Word binary [0b1010000110101011] 10 bit voltage binary/decimal [0b110101011]/[427]
Cell Group [21] Checksum byte binary/hex [0b10010011]/[93] MSB binary/hex [0b10101001]/[0xA9], LSB binary/hex[0b10101101]/[0xAD], Word binary [0b1010100110101101] 10 bit voltage binary/decimal [0b110101101]/[429]
Cell Group [22] Checksum byte binary/hex [0b10001100]/[8C] MSB binary/hex [0b10110001]/[0xB1], LSB binary/hex[0b10101100]/[0xAC], Word binary [0b1011000110101100] 10 bit voltage binary/decimal [0b110101100]/[428]
Cell Group [0] Checksum byte binary/hex [0b111101]/[3D] MSB binary/hex [0b1]/[0x1], LSB binary/hex[0b10101011]/[0xAB], Word binary [0b110101011] 10 bit voltage binary/decimal [0b110101011]/[427]
Cell Group [1] Checksum byte binary/hex [0b110100]/[34] MSB binary/hex [0b1001]/[0x9], LSB binary/hex[0b10101100]/[0xAC], Word binary [0b100110101100] 10 bit voltage binary/decimal [0b110101100]/[428]
Cell Group [2] Checksum byte binary/hex [0b101100]/[2C] MSB binary/hex [0b10001]/[0x11], LSB binary/hex[0b10101100]/[0xAC], Word binary [0b1000110101100] 10 bit voltage binary/decimal [0b110101100]/[428]
Cell Group [3] Checksum byte binary/hex [0b100101]/[25] MSB binary/hex [0b11001]/[0x19], LSB binary/hex[0b10101011]/[0xAB], Word binary [0b1100110101011] 10 bit voltage binary/decimal [0b110101011]/[427]
Cell Group [4] Checksum byte binary/hex [0b10011110]/[9E] MSB binary/hex [0b100001]/[0x21], LSB binary/hex[0b10101010]/[0xAA], Word binary [0b10000110101010] 10 bit voltage binary/decimal [0b110101010]/[426]
Cell Group [5] Checksum byte binary/hex [0b10100]/[14] MSB binary/hex [0b101001]/[0x29], LSB binary/hex[0b10101100]/[0xAC], Word binary [0b10100110101100] 10 bit voltage binary/decimal [0b110101100]/[428]
Cell Group [6] Checksum byte binary/hex [0b1100]/[C] MSB binary/hex [0b110001]/[0x31], LSB binary/hex[0b10101100]/[0xAC], Word binary [0b11000110101100] 10 bit voltage binary/decimal [0b110101100]/[428]
Cell Group [7] Checksum byte binary/hex [0b100]/[4] MSB binary/hex [0b111001]/[0x39], LSB binary/hex[0b10101100]/[0xAC], Word binary [0b11100110101100] 10 bit voltage binary/decimal [0b110101100]/[428]
Cell Group [8] Checksum byte binary/hex [0b1111101]/[7D] MSB binary/hex [0b1000001]/[0x41], LSB binary/hex[0b10101011]/[0xAB], Word binary [0b100000110101011] 10 bit voltage binary/decimal [0b110101011]/[427]
Cell Group [9] Checksum byte binary/hex [0b1110100]/[74] MSB binary/hex [0b1001001]/[0x49], LSB binary/hex[0b10101100]/[0xAC], Word binary [0b100100110101100] 10 bit voltage binary/decimal [0b110101100]/[428]
Cell Group [10] Checksum byte binary/hex [0b1101100]/[6C] MSB binary/hex [0b1010001]/[0x51], LSB binary/hex[0b10101100]/[0xAC], Word binary [0b101000110101100] 10 bit voltage binary/decimal [0b110101100]/[428]
Cell Group [11] Checksum byte binary/hex [0b1100101]/[65] MSB binary/hex [0b1011001]/[0x59], LSB binary/hex[0b10101011]/[0xAB], Word binary [0b101100110101011] 10 bit voltage binary/decimal [0b110101011]/[427]
Cell Group [12] Checksum byte binary/hex [0b1011101]/[5D] MSB binary/hex [0b1100001]/[0x61], LSB binary/hex[0b10101011]/[0xAB], Word binary [0b110000110101011] 10 bit voltage binary/decimal [0b110101011]/[427]
Cell Group [13] Checksum byte binary/hex [0b1010100]/[54] MSB binary/hex [0b1101001]/[0x69], LSB binary/hex[0b10101100]/[0xAC], Word binary [0b110100110101100] 10 bit voltage binary/decimal [0b110101100]/[428]
Cell Group [14] Checksum byte binary/hex [0b1001100]/[4C] MSB binary/hex [0b1110001]/[0x71], LSB binary/hex[0b10101100]/[0xAC], Word binary [0b111000110101100] 10 bit voltage binary/decimal [0b110101100]/[428]
Cell Group [15] Checksum byte binary/hex [0b1000100]/[44] MSB binary/hex [0b1111001]/[0x79], LSB binary/hex[0b10101100]/[0xAC], Word binary [0b111100110101100] 10 bit voltage binary/decimal [0b110101100]/[428]
Cell Group [16] Checksum byte binary/hex [0b10111101]/[BD] MSB binary/hex [0b10000001]/[0x81], LSB binary/hex[0b10101011]/[0xAB], Word binary [0b1000000110101011] 10 bit voltage binary/decimal [0b110101011]/[427]
martinbogo commented 5 years ago

@gmulberry if you're still setup -- can you download the latest version of the code and check that my temperature checking code works on your battery?

gmulberry commented 5 years ago

Sure:

Segway Battery Diagnostics (C) 2019 Martin Bogomolni martinbogo@gmail.com MIT License

RECCOMENDED : Use a 12V power supply to your Arduino then provide 12V from VIN to BAT ENABLE (J5) to activate the Segway Battery BMS and read voltages.

If battery does not respond, briefly disconnect the BAT ENABLE pin and try again.

Connect SCL (j6) and SDA (J7) to Arduino I2C pins.

V) Read raw cell group voltages D) Read raw cell group voltages with lots of debug Info T) Read temperature sensors Q) Query some interesting registers

Press key to select menu item: Temp Sensor [0] Temperature in deg C: 24.81 Temp Sensor [1] Temperature in deg C: 25.19 Temp Sensor [2] Temperature in deg C: 25.19 Temp Sensor [3] Temperature in deg C: 23.87

My actual room temp is 21.7 degrees C so that seems pretty close, if not a tad high.

martinbogo commented 5 years ago

thanks!

On Fri, Feb 1, 2019 at 7:01 PM gmulberry notifications@github.com wrote:

Sure:

Segway Battery Diagnostics (C) 2019 Martin Bogomolni martinbogo@gmail.com MIT License

RECCOMENDED : Use a 12V power supply to your Arduino then provide 12V from VIN to BAT ENABLE (J5) to activate the Segway Battery BMS and read voltages.

If battery does not respond, briefly disconnect the BAT ENABLE pin and try again.

Connect SCL (j6) and SDA (J7) to Arduino I2C pins.

V) Read raw cell group voltages D) Read raw cell group voltages with lots of debug Info T) Read temperature sensors Q) Query some interesting registers

Press key to select menu item: Temp Sensor [0] Temperature in deg C: 24.81 Temp Sensor [1] Temperature in deg C: 25.19 Temp Sensor [2] Temperature in deg C: 25.19 Temp Sensor [3] Temperature in deg C: 23.87

My actual room temp is 21.7 degrees C so that seems pretty close, if not a tad high.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/martinbogo/i2-battery-diagnostics/issues/2#issuecomment-459918248, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPVKQIBfJCgyiVWmMamDzRbEya6mmY0ks5vJONXgaJpZM4aUzjz .

martinbogo commented 4 years ago

Closing this .. looks solved to everyone's satisfaction.