Hi all,
I'm a computer science student who's struggling to understand how to retrieve battery info from my Nissan Leaf 2018 ZE1.
My goal is to embed GSM computer board with OBD2 interface to some Leaf we have at the university, collecting battery info as capacity/SOH/SOC/Voltage. Unfortunately, asking all drivers to always connect to LeafSpy is not possible
Actually, from wikipedia and other articles, I thought every new car model would have been ISO 15765-4 compliant, replying on OBD2 pins DTCs code and errors etc, but my Nissan doesn't. I tried to send 7DF queries without any replies.
The Linux board we're using has an active can0 500kbps interface on pins 6 and 14 but
candump doesn't show any 'passive' messages.
From the threads I read here, I guess pins 6/14 communicates with the CARcan since I can get 7BB or 79A messages asking for 797 or 797.
Below some results (car ON, Parked)
> Often I read that odometer was easy to get asking:
Query: 743#022119FFFFFFFFFF Reply: 763#056119005D6AFFFF
but I get error in my case:
can0 743 [8] 02 21 19 FF FF FF FF FF
can0 763 [8] 03 7F 21 11 FF FF FF FF
I noted that neither LeafSpy is getting it at the moment, so they probably removed it :|
> I got the VIN correctly!
VIN
can0 797 [8] 02 21 81 FF FF FF FF FF
can0 79A [8] 10 15 61 81
53 4A 4E 46
can0 797 [8] 30 01 00 FF FF FF FF FF
can0 79A [8] 21
41 41 5A 45 31 55 30
can0 797 [8] 30 01 00 FF FF FF FF FF
can0 79A [8] 22
30 35 33 39 32 37 00
echo "53 4A 4E 46 41 41 5A 45 31 55 30 30 35 33 39 32 37" | xxd -r -p
SJNFAAZE1U0053927
> Tire pressure is always 0 asking to 0x745: 0x02 0x21 0x10 0xff 0xff 0xff 0xff 0xff
> Cabin and ambient temperature is different from the famous spreadsheet
https://docs.google.com/spreadsheets/d/1EHa4R85BttuY4JZ-EnssH4YZddpsDVu6rUFm0P7ouwg:
can0 797 [8] 03 22 11 5D FF FF FF FF
can0 79A [8] 04 62 11 5D 82 00 00 00
I guess 82 (before was 81) is HEX81 = DEC130 - 41 = 89F = 31,66°C (right?)
Cabin temperature is zero though.
> QC counter and L1/L2 counter seem to work:
can0 797 [8] 03 22 12 03 FF FF FF FF
can0 79A [8] 05 62 12 03 00 01 00 00
can0 797 [8] 03 22 12 05 FF FF FF FF
can0 79A [8] 05 62 12 05 00 73 00 00
> I tried to get some battery info querying 79b:
can0 79B [8] 02 21 01 FF FF FF FF FF
can0 7BB [8] 10 35 61 01 FF FF FC 18
can0 79B [8] 30 01 00 FF FF FF FF FF
can0 7BB [8] 21 02 AF FF FF FB 62 FF
can0 79B [8] 30 01 00 FF FF FF FF FF
can0 7BB [8] 22 FF F0 DD 0B 1C 30 D4
can0 79B [8] 30 01 00 FF FF FF FF FF
can0 7BB [8] 23 95 1D 33 06 03 95 00
can0 79B [8] 30 01 00 FF FF FF FF FF
can0 7BB [8] 24 01
70 00 26
9A 00 0C
can0 79B [8] 30 01 00 FF FF FF FF FF
can0 7BB [8] 25 44
B5 00 11 0B B8 80
can0 79B [8] 30 01 00 FF FF FF FF FF
can0 7BB [8] 26 00 01 FF FF FB 62 FF
can0 79B [8] 30 01 00 FF FF FF FF FF
can0 7BB [8] 27 FF FC AA 01 AD FF FF
can0 79B [8] 30 01 00 FF FF FF FF FF
So, according to the excel:
PackHealth (% * 100) is 0x7000 = DEC28672 = 286.72%
SOC high precision SOC (% * 10000) is 0x9a000c = DEC10092556 = 1009.2556 %
Pack Capacity (Ah * 10000) is 0xb50011 = DEC11862033 = 1186.2033 Ah
The numbers are nosense to me
> Cell pair voltages:
79B group 3:
can0 79B [8] 02 21 03 FF FF FF FF FF
can0 7BB [8] 10 1C 61 03 FF FF 02 AE
can0 79B [8] 30 01 00 FF FF FF FF FF
can0 7BB [8] 21 01 AB 00 0C A1 FF 0F
can0 79B [8] 30 01 00 FF FF FF FF FF
can0 7BB [8] 22 84 0F 75 00 00 F3 00
can0 79B [8] 30 01 00 FF FF FF FF FF
can0 7BB [8] 23 00 00 00 00 00 00 00
can0 79B [8] 30 01 00 FF FF FF FF FF
can0 7BB [8] 24 0B FF FF FF FF FF FF
cell pair min/max voltage (mV)
Vmax: 0x0f84 = 3972 mV = 3,972 V
Vmin: 0x0f75 = 3957 mV = 3,957 V
Even if numbers seem ok, I guess they're too low than real values...
I read here (https://github.com/baradhili/leaf_can_bus_messages/issues/2) that EVcan should be accesible from pid 12,13 even if @Dala told me they probably removed EVcan from my model.
Does somebody know how to get aforementioned values on my Leaf model?
Is it normal I don't see any passive message on CARcan (some are described on 'carCAN' tab in the spreadsheet)?
I found a DBC file here for Leaf 2018 (
https://github.com/commaai/opendbc/blob/master/nissan_leaf_2018.dbc) but I guess it works with passive mode only.
Some expert could clear my doubts?