kiev said:
There is a fellow interested to command bypassing/balancing in his pack our of the car, so i want to revisit your post here to understand the process.
Wonderful!
I get easily crossed up with the byte and bit conventions.
So do I. I call the first CAN bus data byte D1, I suspect that the convention is to call it D0. I can't seem to find the answer to that anywhere; it's frustrating.
In 1) above, is only D4[2] necessary to be set with everything else zero, i.e. no target voltage in D1 D2 ?
I believe that the answer is yes, effectively. Every 0x3C3 packet seems to set the threshold voltage, so leaving the first two bytes zero means "set the threshold voltage to 2.1 V" (there is a 2.1 V offset). But leaving later bits zero means "don't bypass", and any subsequent 0x3C3 packet will over-ride the threshold voltage, so as far as I can see, there will be no harm in leaving the first two bytes zero.
So a CAN message such as 0x3C3 [8] 00 00 00 04 00 00 00 00 sends the CMUs an alert that "i want to do bypass balancing and the details will follow", or
sending 0x3C3 [8] with D1-D8 all zeroed says "i don't want to do any balancing"?
I believe it's saying "I want to initiate CMU renumbering, and set the bypass threshold to 2.1 V, and the bypass function to be performed is "no function". It's not quite "do nothing", because if it was bypassing earlier, this will cancel that bypassing. But we probably don't want to be bypassing while we change ID numbers around.
The 0x3C3 PID is only found on the CMU CAN buss, it is not sent over the main CAN buss. This is true for all the BMU PIDs such as 0x6n1 thru 6n4, the voltage and temperature data, these are only on the CMU CAN. These get reformatted in the BMU and sent out as PIDs 0x6E1 thru 6E4 on the main CAN.
I suspected as much. So this means to initiate renumbering, assuming that I'm correct in needing this special 0x3C3 packet, we'd have to set up some small computer to spit out this packet just on the CMU bus. Hopefully, this won't be too hard if the battery box is opened up, as it would obviously have to be in order to replace a CMU board.
I note that the conversation now switches from CAN packet 0x3C3 to the 5-byte serial data packet on UARTD1 of the CMUs. This had me confused for a while.
Regarding 2) above,
"With bits 4 and 5 set to zero, the first BMU sets its ID to 1" means the first CMU?
Yes, sorry. I had a propensity to call the CMUs BMUs back then. I think I'm better now :shock:
and
the bits 4 and 5 are which byte D2[5-4] or D3[5-4] ?
D3, by which I mean the third byte,
Is D4 ever used or always zero?
Yes, it's used if referring to CMUs 3-6 (see below).
For your example if i display the D2-D4 bytes as bit pairs:
D1 00
D2 FF= 11 11 11 11
D3 0F= 00 00 11 11
D4 00= 00 00 00 00
D5 0E
Do these 12 bits represent the 12 CMU (as 6 bit pairs)?
Yes. I can't find that table right now, but it seems to work like
something like this: [ edit: this is wrong, see next post ]
Code:
D2 FF= 11 11 11 11
CMU id 12 11 10 9
D3 0F= 00 00 11 11
CMU id 2 1 8 7
D4 00= 00 00 00 00
CMU id 6 5 4 3
Why they screw up the ordering, I have no idea. Fortunately, as long as I got it right (gulp), the details don't matter, as we just have to send the right data to what will become CMU1, and the CMUs should figure out what data to send to renumber the others sequentially. But that means we need our special renumbering gadget to also send this special 5-byte packet at 300 bps to UartD1 of CMU1.
What 5 bytes would the BMU need to send to the daisy chain (the first CMU) to cause them to auto number?
I believe that the example I sent (00 FF 0F 00 0E at 300 bps) is what the BMU would send, if it received the renumber command from a MUT, and is what we should be sending too.
What would the last CMU send back to the BMU, is there a confirmation of success/completion?
Good question, and one that whoever tries this out will be keen to know. I'll try and answer that soon. It's taking me a while to get my head back into this space.