User avatar
Dala
Posts: 353
Joined: Sun Oct 28, 2018 11:24 am
Delivery Date: 01 Jan 2015
Leaf Number: 316851
Location: Finland
Contact: Website

Re: LEAF CANbus decoding. (Open discussion)

Thu Dec 03, 2020 8:36 am

gorgo wrote:
Thu Dec 03, 2020 7:27 am
Hi Dala! I loved your 'very boring' video :D
At the beginning I wondered "Wth? How did he get passive CAN messages from the Leaf 2018?", then you reveal that the sender had probably got access to the internal wires. Seems fair.
I'm curious now how you usually proceed from raw bytes to ECU meaningful values without Nissan's instructions.

I also read on OVMS Leaf 2018 issue (https://github.com/openvehicles/Open-Ve ... issues/323) what caederus-ovms reported about HVBATT data even if I'm not fully understanding every variables there. Anyone knows, for example, what's the insulation value or flash or mode?
Thanks,
To get further, one would need access to the vehicle. Start charging it, modify some stuff by changing input voltage, activating loads while charging, observe the data that moves on the bus etc. Basically try to change what the vehicle senses, and see if the communication responds. An easy example of this on CAR-CAN would be to open the passenger door, and see which bit on the bus gets triggered. Tools from VECTOR are much more suited to this than freeware tools sadly.

No clue about the 2018 Leaf, since I've never actually had one in my shop yet.

ginetto
Posts: 16
Joined: Mon Sep 16, 2019 11:32 pm
Delivery Date: 17 Sep 2019
Location: Galicia (Spain)

Re: LEAF CANbus decoding. (Open discussion)

Thu Dec 03, 2020 1:58 pm

here you have and introduction of how to reverse can communication
http://opengarages.org/handbook/

btw the web is full of examples and videos

cheers
gorgo wrote:
Thu Dec 03, 2020 7:27 am

Hi Dala! I loved your 'very boring' video :D
At the beginning I wondered "Wth? How did he get passive CAN messages from the Leaf 2018?", then you reveal that the sender had probably got access to the internal wires. Seems fair.
I'm curious now how you usually proceed from raw bytes to ECU meaningful values without Nissan's instructions.

I also read on OVMS Leaf 2018 issue (https://github.com/openvehicles/Open-Ve ... issues/323) what caederus-ovms reported about HVBATT data even if I'm not fully understanding every variables there. Anyone knows, for example, what's the insulation value or flash or mode?

Drc38
Posts: 3
Joined: Sun Jul 05, 2020 12:28 pm
Delivery Date: 05 Jul 2020
Leaf Number: 202746

Re: LEAF CANbus decoding. (Open discussion)

Mon Dec 07, 2020 2:24 am

I'm interested in monitoring the power flow on the Leaf's low voltage (12V) system. Does anyone know where to look for the DCDC converter's can bus voltage and current messages? Cheers

User avatar
Dala
Posts: 353
Joined: Sun Oct 28, 2018 11:24 am
Delivery Date: 01 Jan 2015
Leaf Number: 316851
Location: Finland
Contact: Website

Re: LEAF CANbus decoding. (Open discussion)

Mon Dec 07, 2020 6:15 am

Drc38 wrote:
Mon Dec 07, 2020 2:24 am
I'm interested in monitoring the power flow on the Leaf's low voltage (12V) system. Does anyone know where to look for the DCDC converter's can bus voltage and current messages? Cheers
CAR-CAN message ID 0x292 has LeadAcidBatteryVoltage in it, maybe the current one is in the same message?

Drc38
Posts: 3
Joined: Sun Jul 05, 2020 12:28 pm
Delivery Date: 05 Jul 2020
Leaf Number: 202746

Re: LEAF CANbus decoding. (Open discussion)

Wed Dec 09, 2020 10:28 pm

Dala wrote:
Mon Dec 07, 2020 6:15 am
CAR-CAN message ID 0x292 has LeadAcidBatteryVoltage in it, maybe the current one is in the same message?
On my 2016 Leaf this seems to be static at 7F so it doesn't appear to be an actual voltage reading, I think I would need something on the EV-CAN bus ideally.

User avatar
Dala
Posts: 353
Joined: Sun Oct 28, 2018 11:24 am
Delivery Date: 01 Jan 2015
Leaf Number: 316851
Location: Finland
Contact: Website

Re: LEAF CANbus decoding. (Open discussion)

Thu Dec 10, 2020 12:11 am

Drc38 wrote:
Wed Dec 09, 2020 10:28 pm
Dala wrote:
Mon Dec 07, 2020 6:15 am
CAR-CAN message ID 0x292 has LeadAcidBatteryVoltage in it, maybe the current one is in the same message?
On my 2016 Leaf this seems to be static at 7F so it doesn't appear to be an actual voltage reading, I think I would need something on the EV-CAN bus ideally.
Afaik there is nothing on the EV-CAN for 12V battery stats. I will add the comment to the database that it seems static on your vehicle!

User avatar
49thdiver
Forum Supporter
Posts: 66
Joined: Fri Feb 07, 2020 10:14 pm
Delivery Date: 15 Jan 2020
Leaf Number: 305065
Location: CANADA's westcoast
Contact: Website

Real time stand alone battery data

Fri Jan 01, 2021 4:57 pm

Is there a 79B command or other command that can be used to refresh the data from the BMS.
I have done quite a bit of work already reading data from the pack using 1DB,1DC,5BC & 55B broadcast commands based on the kvaser database (THANKS) and 79B query command.
I am using the battery pack stand alone in another vehicle and am finding that SOC, KW, GIDS and BAR data do not update in real time.
I have to cycle the ignition and power to get a fresh update.

The only data that is live is HV Battery, Auxiliary Battery & HV current. Temperature & cell voltages are accessible thru the 79B command and are also live.
Perhaps I am doing something wrong but that does not seem obvious to me.
Help appreciated.
All the best to everyone for the New year.
Peter
Dangerous if left unattended.
1985 Grumman Olsen Kubvan, 2002 Rav4 EV, 2000 Ford Ranger EV, 2015 Nissan leaf, Biktrix LJ

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

Re: LEAF CANbus decoding. (Open discussion)

Sat Jan 02, 2021 12:03 pm

You *should* get actual power. Maybe you're not engaging the main relays? Not using IGN and BAT?

I've made a direct battery-to-chademo interface (with a CAN bridge) to discharge a battery into a SETEC V2H module, and it works flawlessly. My connections are:

- BAT and IGN on +12V
- All grounds commoned
- RLY1 and RLY2 on a MOSFET
- CAN connected (obviously)

I then use both the regular CAN data (0x1DB for current voltage/current, 0x1DC for allowable discharge current, 0x5BC/0x55B for remaining GIDs/SOC) and the engineering data (0x79B group 2 for cell voltages) to manage cutoff criteria.

This is on a gen1 battery.

I haven't tested this on a gen2+, it is possible that newer batteries need one of the wake-up messages (0x603, 0x605, 0x607, 0x679, 0x68C) to start actualizing their data. All of those wake-up messages are just that CAN ID, DLC=1, data=0.

User avatar
49thdiver
Forum Supporter
Posts: 66
Joined: Fri Feb 07, 2020 10:14 pm
Delivery Date: 15 Jan 2020
Leaf Number: 305065
Location: CANADA's westcoast
Contact: Website

Re: LEAF CANbus decoding. (Open discussion)

Sat Jan 02, 2021 12:41 pm

Excellent information, I am especially excited about using the Chademo discharge you mention. This is on my list to do as well. I am presently using a bank of lights, it gets bright and warm.

I am working on a GEN2 pack and running it standalone. It works and runs the car just fine. I use 1DB to manage cut off of charging at this point.

I am manually turning on the relays thru the relay block connector and I have the 12volt and ignition connections as noted.
I then use both the regular CAN data (0x1DB for current voltage/current, 0x1DC for allowable discharge current, 0x5BC/0x55B for remaining GIDs/SOC) and the engineering data (0x79B group 2 for cell voltages) to manage cutoff criteria.
I am using the 1DB and it provides live data during charge and discharge all the time. I have not looked at "allowable discharge". I am however reading 0x5BC/0x55B for remaining GIDs/SOC but it remains static at the value read when started up via ignition on. I have to cycle the ignition to get a fresh value.
The 79B commands capture data for cell voltage, shunts and temperature. I am also using the Group 3 commands for min/max/avg but these also do not refresh when running. I want to use these group 3 commands to determine battery discharge cut off and assist with charging as noted above currently using the 1DB command.

I note that the Leafspy pro app appears to exhibit the same behavior when connected to the pack only.

I need to make a fresh recording of the data exchange between the full car, the leafspy and the pack.

I added 11A (heartbeat) into my code last night using all 4 variations thinking that it might trigger a refresh.
0x11A 8 0 80 0 AA C0 0 0 67
0x11A 8 0 80 0 55 00 0 1 71 // commands from recording Al's Car
0x11A 8 0 80 0 55 40 0 2 BC
0x11A 8 0 80 0 AA 80 0 3 AA
I will test this today ... if it stops raining ... or at least slows down. The rainfall here is at least double the seasonal averages and the car is outside, I have a a small river running down my drive way.

Thanks for the tip on the wake up, that of course makes sense, I will try that next and let you know.

P.S. I am planning to return to work on the Standalone OBC/PD charger this week if I can solve this issue.
Thanks for your continued support.
Last edited by 49thdiver on Mon Jan 04, 2021 7:39 pm, edited 1 time in total.
Peter
Dangerous if left unattended.
1985 Grumman Olsen Kubvan, 2002 Rav4 EV, 2000 Ford Ranger EV, 2015 Nissan leaf, Biktrix LJ

User avatar
49thdiver
Forum Supporter
Posts: 66
Joined: Fri Feb 07, 2020 10:14 pm
Delivery Date: 15 Jan 2020
Leaf Number: 305065
Location: CANADA's westcoast
Contact: Website

Re: LEAF CANbus decoding. (Open discussion)

Mon Jan 04, 2021 12:10 am

Made a fresh recording and found the following:
Gen 2 are slightly different 11A commands originating from the VCM:
0x11A: 8;01;40;14;AA;C0;00;00;87
0x11A: 8;01;40;14;55;00;00;01;91
0x11A: 8;01;40;14;55;40;00;02;5C
0x11A: 8;01;40;14;AA;80;00;03;4A

Also noted are 0x390 and 0x393 commands when the car is running and pack connected to car.
0x390 and 0x393 originate from the charger and use PRUN as described below by Dala.

0X390: 8;04;00;00;03;00;80;00;C7
0X390: 8;04;00;00;03;00;80;00;D8
0X390: 8;04;00;00;03;00;80;00;E9
0X390: 8;04;00;00;03;00;80;00;FA

0x393: 8;00;20;00;00;20;00;00;03
0x393: 8;00;20;00;00;20;00;00;14
0x393: 8;00;20;00;00;20;00;00;25
0x393: 8;00;20;00;00;20;00;00;36


The following sequence runs like clock work followed by 0x1DB, 0x1DC and 0x1D4 reporting from the BMC.
0x11A: 8;01;40;14;AA;80;00;03;4A
0X390: 8;04;00;00;03;00;80;00;D8
0x393: 8;00;20;00;00;20;00;00;14
0x11A: 8;01;40;14;55;00;00;01;91
0X390: 8;04;00;00;03;00;80;00;E9
0x393: 8;00;20;00;00;20;00;00;03
There are no 0x603,0x605,0x607,0x679 OR 0x68C commands observed during the recording.
I rewrote my code adding 0x11A commands to match the above added 0x390 and 0x393 commands and prioritized processing of 7BB responses and the 79B next data byte commands.
There naturally are couple of bugs in my edits which need to be corrected before determining if the changes have enabled frequent BMS data updates other than at ignition cycling.
More to follow.
Last edited by 49thdiver on Sun Jan 10, 2021 12:22 am, edited 1 time in total.
Peter
Dangerous if left unattended.
1985 Grumman Olsen Kubvan, 2002 Rav4 EV, 2000 Ford Ranger EV, 2015 Nissan leaf, Biktrix LJ

Return to “LEAF CANBus”