Posts: 4
Joined: Tue Apr 03, 2018 2:26 pm
Delivery Date: 03 Apr 2018

Re: LEAF CANbus decoding. (Open discussion)

Sat Sep 08, 2018 1:22 pm

Been lurking here for a while, I'm trying to hack a leaf OBD charger. I've come quite a way closer to charging. I've written a program which makes the charger think it's in the leaf. And it seems to work the charger is no longer sending "fault" signals by CAN. And I'm trying to make it charge by sending the same messages that the VCM sends to the leaf when charging, according to CAN captures by carrot. I still haven't been able to make it charge. Is it possible that the charger like the inverter saves DTC and refuses to start charging? If so what's my best option to remove stored DTCs?

If anyone wants my codes for the program or help with making the charger "think" its in a leaf just contact me!

Gold Member
Posts: 18
Joined: Tue Apr 12, 2011 7:40 am
Delivery Date: 07 Jul 2011
Leaf Number: 6154

Re: LEAF CANbus decoding. (Open discussion)

Mon Sep 10, 2018 9:37 am

celeron55 wrote:Project update: I was unable to reverse the charger CAN protocol to an extent that would have made it do any... well, charging. I did get the DC-DC converter to operate, but that was it.

Basically I found out bit 0x04 in the 0x1f2 frame disables the converter (set low to enable, just spam 0x1f2 00 64 00 a0 00 00 00 00 or so every 10ms). You might also need 50b, 1d4 and maybe 55b (probably not). Anyway, that's worthless without the charging working.

I'm now in the process of developing the necessary hardware mods to get it to charge without any co-operation of Nissan's original software. This is actually going fairly well (I already have full control in a lab setup), but making this reproducible or to be something that I can use daily is more difficult.

EDIT: I've basically reverse-engineered enough of the connections to the Renesas R5F35MEEJFE chip that controls the PDM in order to write a new program from scratch for it to do regular charging and dc-dc conversion. Not sure if I'll do that, I'd need a E8a emulator ($150) and basically IAR Embedded Workbench for M16C ($2000? $4000?) to program it. Also, nobody sells these chips for a hobbyist if the one on board is somehow locked. I can find different ones with the same pinout though, eg. R5F35L2EJFE.

Hi celeron55,

Thank you for reporting the results of your work!! I recently started searching the forums again and found your work on reverse-engineering the Leaf.

I have been very happy with my 2011 Leaf until last month when I had to replace the 3.3kW onboard charger (OBC). Now I want to find a way to replace the OBC with an aftermarket charger.

You have gotten the charger working, have you recorded or looked at what is required to make the Leaf work with another charger?

I subscribed to this link to follow your work!

Posts: 4
Joined: Tue Apr 03, 2018 2:26 pm
Delivery Date: 03 Apr 2018

Re: LEAF CANbus decoding. (Open discussion)

Sat Sep 15, 2018 4:44 am

Could someone please help me understand this:

So if I want to calculate the SOC of my leaf battery pack how would I do it?
I understand that ID 55B byte 0 and 1 is the data I should use right?
so the message is this and the SOC according to leafspy pro should be 65,3%.
ID: 55B
Data: A9 C0 AA 00 FF C0 10 D6

How should I calculate the SOC from this CAN message?

Posts: 20
Joined: Fri Dec 08, 2017 2:52 pm
Location: Finland

Re: LEAF CANbus decoding. (Open discussion)

Sat Sep 15, 2018 9:10 am

Never tried to decode that particular messsge, but 0xa9c0 divided by 0xffff (maximum 16 bit value) equals 66.3%, which is at least close.

Return to “LEAF CANBus”