NiallDarwin
Posts: 41
Joined: Thu Jul 09, 2015 1:58 am
Delivery Date: 12 Dec 2015
Leaf Number: 004321
Location: New Zealand

Re: LEAF CANbus decoding. (Open discussion)

Wed Mar 27, 2019 10:11 pm

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.

mux
Posts: 184
Joined: Sat Jan 13, 2018 3:52 am
Delivery Date: 13 Oct 2011
Leaf Number: 6177

Re: LEAF CANbus decoding. (Open discussion)

Thu Mar 28, 2019 6:38 am

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?

baradhili
Posts: 3
Joined: Sat Nov 03, 2018 6:06 am
Delivery Date: 03 Nov 2018

Re: LEAF CANbus decoding. (Open discussion)

Thu Mar 28, 2019 6:46 am

individual cell state might be a query thing instead of being constantly dumped on the bus...

mux
Posts: 184
Joined: Sat Jan 13, 2018 3:52 am
Delivery Date: 13 Oct 2011
Leaf Number: 6177

Re: LEAF CANbus decoding. (Open discussion)

Thu Mar 28, 2019 8:16 am

There is no different traffic AFAICT during a leafspy query. The information should really be on the bus.

goldbrick
Posts: 424
Joined: Tue Aug 01, 2017 3:33 pm
Delivery Date: 01 Aug 2017
Leaf Number: 311806
Location: Boulder, CO

Re: LEAF CANbus decoding. (Open discussion)

Thu Mar 28, 2019 8:32 am

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.

mux
Posts: 184
Joined: Sat Jan 13, 2018 3:52 am
Delivery Date: 13 Oct 2011
Leaf Number: 6177

Re: LEAF CANbus decoding. (Open discussion)

Thu Mar 28, 2019 9:04 am

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!

MAR156
Posts: 7
Joined: Sun Apr 07, 2019 10:41 am
Delivery Date: 07 Apr 2019

Re: LEAF CANbus decoding. (Open discussion)

Wed Apr 17, 2019 1:45 am

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

NiallDarwin
Posts: 41
Joined: Thu Jul 09, 2015 1:58 am
Delivery Date: 12 Dec 2015
Leaf Number: 004321
Location: New Zealand

Re: LEAF CANbus decoding. (Open discussion)

Mon May 06, 2019 8:24 pm

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.

mux
Posts: 184
Joined: Sat Jan 13, 2018 3:52 am
Delivery Date: 13 Oct 2011
Leaf Number: 6177

Re: LEAF CANbus decoding. (Open discussion)

Tue May 07, 2019 2:46 am

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.

lorenfb
Posts: 2188
Joined: Tue Dec 17, 2013 10:53 pm
Delivery Date: 22 Nov 2013
Leaf Number: 416635
Location: SoCal

Re: LEAF CANbus decoding. (Open discussion)

Wed May 08, 2019 9:37 pm

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.
#1 Leaf SL MY 9/13: 74K miles, 48 Ahrs, 5.2 miles/kWh (average), Hx=70, SOH=78, L2 - 100% > 1000, temp < 95F (35C), min discharge (DOD) > 20 Ahrs
#2 Leaf SL MY 12/18: 115 Ahrs, 5.5 miles/kWh (average), Hx=98, SOH=99, DOD > 25%, temp < 105F

Return to “LEAF CANBus”