Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

Reading Battery Voltages and Temperatures via CAN on Model S

This site may earn commission on affiliate links.
I find the module temperature readings very interesting. In looking at a few readouts or captures which others here have displayed, each of the 16 modules have differing temperatures. The variances are not drastic however in a few cases 12 of the 16 modules appear to be cooling down as the input fluid temp is cooler than the output temperature. What is puzzling is that on almost each display instance, there are some modules where the output temperatures are lower than the input.

So, this makes me wonder...

Are all of the modules in use EQUALLY at the same time or is power drawn from modules in a round robin manner?

Also, does each module have access to either a cooling flow or heating flow of fluid? By this I mean, can module one be treated to warm fluid to warm it up while module 10 has cooling fluid to reduce its temperature?
 
The equalization circuit on one module should have 6 resistors, one for each cell.
If you can see these, perhaps you can see their value (ohms), and possibly
see the 6 "switches" that turn them On and Off. These resistors would be located
where they can be cooled, since they would get hot in use.

Has anybody been able to observe anything (perhaps a pair of CAN messages)
that indicates that equalization is in progress?

All the modules are in series, so power is drawn from all essentially equally.
Logging a cold-soaked pack warming, or a hot-soaked pack cooling should
tell which value is the inlet and which is the outlet on each module.

I believe that there is only one in/out for fluid through the battery, so only
one source of heated or cooled fluid. However, if some modules have been
equalizing some of their cells (bleeding off current/power), they could be
warmer than others. Likewise, sun exposure when parked could warm one
side's modules more than others.

Cheers, Gary
 
The equalization circuit on one module should have 6 resistors, one for each cell. If you can see these, perhaps you can see their value (ohms), and possibly see the 6 "switches" that turn them On and Off. These resistors would be located where they can be cooled, since they would get hot in use.

Has anybody been able to observe anything (perhaps a pair of CAN messages) that indicates that equalization is in progress?

All the modules are in series, so power is drawn from all essentially equally. Logging a cold-soaked pack warming, or a hot-soaked pack cooling should tell which value is the inlet and which is the outlet on each module.

I believe that there is only one in/out for fluid through the battery, so only one source of heated or cooled fluid. However, if some modules have been equalizing some of their cells (bleeding off current/power), they could be warmer than others. Likewise, sun exposure when parked could warm one side's modules more than others.

Cheers, Gary

From my thread on the battery tear down:

Tesla%20BMS%20Module%20-%20Front-1280.jpg
Front of BMS Module board (one of these on each of the 16 modules)




Tesla%20BMS%20Module%20-%20Back-1280.jpg
Back of the BMS Module board.



Images I post in this thread and my related commentary are posted and published by me, the original photographer. All copyrights and all other rights reserved. These images may not be copied or otherwise distributed outside of this forum without my express permission.

Was a bunch of discussion there. You can see the resistors, four 158 ohm resistors in parallel for 39.5 ohms. These are controlled by the pack BMS internally and there are no messages on the CAN network to indicate or control the state of the balancers (none that I can find anyway). They only bleed ~100 mA from a brick, which isn't really noticeable in a ~220Ah brick...
 
:smile: For those of us playing along with the home version, would someone be so kind to explain all the alphabet soup of abbreviations, please? Searching the internet does not give any definition at all.

Actual words like resistors and ohms I have an understanding of (sorta), but CAN and BMS and the rest of them are not evident from context nor are they easily found online.

Sorry to be an interloper on this topic, but I like to understand things and learn new stuff, regardless of discipline.

Much thanks!
 
:smile: For those of us playing along with the home version, would someone be so kind to explain all the alphabet soup of abbreviations, please? Searching the internet does not give any definition at all.

Actual words like resistors and ohms I have an understanding of (sorta), but CAN and BMS and the rest of them are not evident from context nor are they easily found online.

Sorry to be an interloper on this topic, but I like to understand things and learn new stuff, regardless of discipline.

Much thanks!

CAN = Controller Area Network -> CAN bus - Wikipedia, the free encyclopedia
BMS = Battery Management System -> Battery management system - Wikipedia, the free encyclopedia
 
wk057, thanks for the equalizer info.

At 0.1 amp, 10 hours would be 1 Ah, or about 3.8 Wh, and thus
38 Wh in 100 hours (4 days), and 380 Wh, or 0.38 kWh in 40 days.

So, about 1/3 kWh adjustment per month would be possible, it appears,
if the equalization is On 24/7.

Seems reasonable to me.
Cheers, Gary

Remember that there is one of these resistor sets per brick set of paralleled cells (~ 220AH and ~4V). Each brick consists of many paralleled cells and there are 96 bricks in series. That means that a 1% adjustment of a single brick of paralleled cells is about 2.2 AH (220AH/100) that would take about 22 hours, or about a day per percent. So a few percent adjustment needs a few days of adjustment time.

The equalization adjustment is done independently for each of the 96 bricks that are in series. Some may need more adjustment and some less, but if the worst offset between most and least charged bricks is a few percent, then the most charged brick will be discharged to match the least charged brick in a few days.
 
@Cottonwood - I believe there are only balancing circuits on each module which makes for 16. Seems each BMB is then responsible for balancing 6 bricks.

There are 6 sets of resistors, one for each brick, managed by each of 16 BMS Modules, for a total of 96 bleed resistor sets. Each brick has its own set of bleed, balance resistors.

From one of WK057's pictures of a BMS Module board, showing 6 sets of 4 parallel resistors, at Reading Battery Voltages and Temperatures via CAN on Model S - Page 3

BMS Resistors.jpg
 
Last edited:
Oops, yess off by a factor of 96 if considering the whole pack.

Each "cell" (6 per module) only holds about 0.9 kWh (900 Wh),
so the bleed would be more like 1% per day for any cell
with its equalization turned on.

So, generally the equalization of the pack would typically take some
hours, not many days, it seems. Thanks for the correction.
 
So where is the mapping from message 0x6F2 data bytes into the 96 battery voltages? There is a previous reference to a bit matrix. The voltage is sent in 24 frames with 7 bytes of voltage data in each frame. How exactly are these 168 bytes (1344 btis) mapped into 96 14 bit voltages?
 
So where is the mapping from message 0x6F2 data bytes into the 96 battery voltages? There is a previous reference to a bit matrix. The voltage is sent in 24 frames with 7 bytes of voltage data in each frame. How exactly are these 168 bytes (1344 btis) mapped into 96 14 bit voltages?

Jack posted code for this above. Combined with my corrections in this post the data can be parsed.
 
Here is all it takes to get the four 14 bit numbers from ID 0x6F2. You will need to sign extend for temp since it can be negative. Multiply by the two scaling values from above to complete the conversion.

BB(1) is the second data byte and BB(7) is the eight data byte.

Code:
Dim D1,D2,D3,D4 As Int            
   D1=Bit.Or(BB(1),Bit.ShiftLeft(Bit.And(BB(2),0x3F),8))
   D2=Bit.Or(Bit.ShiftRight(BB(2),6),Bit.Or( Bit.ShiftLeft(BB(3),2),Bit.ShiftLeft(Bit.And(BB(4),0xF),10)))
   D3=Bit.Or(Bit.ShiftRight(BB(4),4),Bit.Or(Bit.ShiftLeft(BB(5),4),Bit.ShiftLeft(Bit.And(BB(6),3),12))) 
   D4=Bit.Or(Bit.ShiftRight(BB(6),2),Bit.ShiftLeft(BB(7),6))
 
  • Like
Reactions: apacheguy
For those that do not speak "code", the 8 data bytes (8 bits each) can be called D1, D2 ... D8.

The D1 value is an Index value, a counter for the 24 0x6F2 messages.
Each message has bytes D2 through D8 (7 bytes) used for 4 values, of 14 bits each.
So, string out the 8 bits of the 7 bytes as 8 x 7 = 56 bits, and use those bits, in groups
of 14 bits, as the 4 voltage (or temperature) values (14 x 4 = 56).

The 14 bits for the voltages are an unsigned integer. Multiply by 0.000305 to get cell voltage.
The 14 bits for the temperatures are a signed integer. Multiply by 0.0122 to get degrees C.

Thanks to wk057 for the exact scale factors.
 
  • Like
Reactions: apacheguy
Here is all it takes to get the four 14 bit numbers from ID 0x6F2. You will need to sign extend for temp since it can be negative. Multiply by the two scaling values from above to complete the conversion.

BB(1) is the second data byte and BB(7) is the eight data byte.

Code:
Dim D1,D2,D3,D4 As Int           
   D1=Bit.Or(BB(1),Bit.ShiftLeft(Bit.And(BB(2),0x3F),8))
   D2=Bit.Or(Bit.ShiftRight(BB(2),6),Bit.Or( Bit.ShiftLeft(BB(3),2),Bit.ShiftLeft(Bit.And(BB(4),0xF),10)))
   D3=Bit.Or(Bit.ShiftRight(BB(4),4),Bit.Or(Bit.ShiftLeft(BB(5),4),Bit.ShiftLeft(Bit.And(BB(6),3),12)))
   D4=Bit.Or(Bit.ShiftRight(BB(6),2),Bit.ShiftLeft(BB(7),6))


Hello!

Thanks for decoding it! To be honest, I would like to know how and why the 4 values are decoded on that way. Why is useful to use those
bitwise shits etc? I would really appreciate whether I could find out some type of pattern in order to start to understand how to decode that for my own.

Many thanks in advance!
 
  • Funny
Reactions: Benjamin Brooks
There is too much data to fit in an 8 bit array so bit shifts are needed to increase the amount of data that can be stored in a single byte.

***This is the non legit explanation from an arm chair programmer who wrote scripts in Python to interpret CAN data. Others are free to correct***