Page 50 of 60

Re: LEAF CANbus decoding. (Open discussion)

Posted: Wed Mar 27, 2019 10:11 pm
by NiallDarwin
mux wrote:Is it maybe possible for me to get editing privileges on the canmsgs document?
I sure hope so! You are doing some great work, thank you.

Re: LEAF CANbus decoding. (Open discussion)

Posted: Thu Mar 28, 2019 6:38 am
by mux
I'm doing a where's waldo/wally on the battery cell voltage information. I know FOR SURE they have to be in the EV-CAN messages somewhere, but for the life of me I can't figure it out just from looking at logs and decoding. I have the possibility to modify CAN data and see what happens, so that's the next step, but I'd rather figure it out before that. So, my thought process so far:

The BMS sends out, we know this for sure:

- 0x1DB which is fully decoded (voltage, current in the first 3 bytes, then 2 bytes that are always 0, a counter and a CRC)
- 0x1DC which has max. battery power, regen, commanded charge current in the first 4 bytes, then 3 unknown bytes* and a CRC
- 0x55B which has SoC, then a byte that is always 0xAA/0x55, an always-zero byte, HV isolation resistance, a counter and CRC
- 0x5BC has GIDs, state of charge in bars/SoH on a mux, two unknown stable bytes with a mux and then 3 very variable bytes**
- 0x5C0 has a mux, three temperature bytes, a linear ramping byte and a byte that alternates between 3 values according to the mux

All of the bytes in these messages have either been decoded or are too stable/uncorrelated to be voltages. The unknown bytes in 0x1DC are periodic and do not change with SoC. The 3 variable bytes in 0x5BC are a mystery to me, but they seem not to change according to SoC.

All I can figure is that the BMS somehow encodes the battery cell voltage data into message 0x5BC bytes 5-7, but how? There is no other place it can be, but the data doesn't seem to make much sense. It looks much more like battery balancing data. Or maybe it's muxed together with balancing status. Has anyone figured this out already?

Re: LEAF CANbus decoding. (Open discussion)

Posted: Thu Mar 28, 2019 6:46 am
by baradhili
individual cell state might be a query thing instead of being constantly dumped on the bus...

Re: LEAF CANbus decoding. (Open discussion)

Posted: Thu Mar 28, 2019 8:16 am
by mux
There is no different traffic AFAICT during a leafspy query. The information should really be on the bus.

Re: LEAF CANbus decoding. (Open discussion)

Posted: Thu Mar 28, 2019 8:32 am
by goldbrick
mux wrote:All I can figure is that the BMS somehow encodes the battery cell voltage data into message 0x5BC bytes 5-7, but how? There is no other place it can be, but the data doesn't seem to make much sense. It looks much more like battery balancing data. Or maybe it's muxed together with balancing status. Has anyone figured this out already?
I'm just in the peanut gallery watching but doesn't LeafSpy have to know how to decode this information since it displays it?

And maybe the cell voltage data is given as a percentage of full or a delta from full or some oddball format like that.

Re: LEAF CANbus decoding. (Open discussion)

Posted: Thu Mar 28, 2019 9:04 am
by mux
Doh, of course, Turbo3 has already cracked this nut. I even remember a video of him directly connecting to a BMS and reading it with leafspy. Now if only I can find the thread where he's showing that...

Edit: oooooooooooooooooooooooohhhhhh... Oh. I see. Well, I'm off to trying out some stuff!

Re: LEAF CANbus decoding. (Open discussion)

Posted: Wed Apr 17, 2019 1:45 am
by MAR156
My research CAR-CAN tires
IMMO system
VCM LEAF 2011 (ZEO) Hitachi
VCM > id512 (03 AD FF FF ) > BCM (BODI CON.)
BCM > id342 (03 AD 00 00) > VCM
VCM > id512 (03 20 00 00) > BCM
BCM > id342 (03 23 00 00) > VCM
VCM > id512 (03 2C FF FF) >BCM
Time 2 sec.
IPDM >id625(00 00 FF 0E 20 00) > VCM
VCM IN READY ON

Re: LEAF CANbus decoding. (Open discussion)

Posted: Mon May 06, 2019 8:24 pm
by NiallDarwin
mux wrote:There is no different traffic AFAICT during a leafspy query. The information should really be on the bus.
I'm certain that the BMS only sends out the data LeafSpy uses after it gets requested. I'm pretty certain that in normal operation (ie without leafspy) those requests aren't sent. The BMS does send a bunch of data without being requested but I haven't seen any decoding of it.

Re: LEAF CANbus decoding. (Open discussion)

Posted: Tue May 07, 2019 2:46 am
by mux
You're totally right, that previous comment is bogus. Requests are sent on CAN ID 79B and responses on 7BB. I'm well past this now, implementing this currently on my CAN logger device.

Re: LEAF CANbus decoding. (Open discussion)

Posted: Wed May 08, 2019 9:37 pm
by lorenfb
NiallDarwin wrote:
mux wrote:There is no different traffic AFAICT during a leafspy query. The information should really be on the bus.
I'm certain that the BMS only sends out the data LeafSpy uses after it gets requested. I'm pretty certain that in normal operation (ie without leafspy) those requests aren't sent. The BMS does send a bunch of data without being requested but I haven't seen any decoding of it.
That's the most logical approach to any bus system design, i.e. why overload a bus with extraneous data and slow the access time
to a particular ECU and its data.