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

Re: Stand alone OBC/PDModule EV system Can 2015

Sat Feb 22, 2020 11:50 am

Thanks for the ELCON charger links I had not seen that before, I will keep it in mind going forward.

Here is a block diagram from the Nissan Manual :

Image

I think this is the micro controller used in the OBC/PDM as noted by Celleron55 in an earlier post from 2017/18.

https://www.divemaster.ca/RAV4EV/LEAF/r ... m16c5m.pdf

I am going to keep plugging along trying to get what I have up and running before I dive into R.E. it.

Having a system that is working even partly would enable me to get a scope and logic analyzer in there and that would help with a R.E. process.
My friend with the working Leaf is not going to let me get any deeper into his car than I already have so getting the parts out of the wrecked one is my best path at the moment to determine how deep I want to go.

I am hoping this thread will bring other players to the table that seem to be spread all over the place on different forums. I have reached out to those that I have direct 2013+ obc/pdm experience that I found so far and and am waiting for responses.

Thanks again for the interest you got to hunt down the data sheet for the micro-controller, that is a start.
Last edited by 49thdiver on Tue Aug 18, 2020 12:32 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

coulomb
Posts: 97
Joined: Thu Oct 09, 2014 5:08 pm
Delivery Date: 07 Mar 2015
Leaf Number: 200445
Location: Brisbane, Australia

Re: Stand alone OBC/PDModule EV system Can 2015

Sat Feb 22, 2020 6:13 pm

49thdiver wrote:
Sat Feb 22, 2020 11:50 am
Thanks for the ELCON charger links I had not seen that before...
I'm the author of the reverse engineered Elcon/TC charger firmware.
I think this is the micro controller used in the OBC.PDM as noted by Celleron55 in an earlier post from 2017/18.
All those Japanese microcontrollers are such a pain; they've been taken over and renamed so many times it's hard to know what you're dealing with. Nevertheless, I think the instruction set may be what IDA Pro calls an NEC 78K0.

I'd be happy to have a go at reverse engineering this, IF someone can find an encrypted binary firmware image to work with. The mention of the suspected processor gives me a faint hope of this, though it's much more likely that the suspicion arises from a part number on the chip rather than someone examining a binary image of the firmware. So that's a big IF.
2012 Leaf with new battery May 2019. New to me June 2019.

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

Re: Stand alone OBC/PDModule EV system Can 2015

Sun Feb 23, 2020 12:33 pm

I'm not sure what the goal is of understanding what any of the chips do - all you need to enable this thing to properly charge is to emulate the signals from the VCM. This is 90% CAN bus and a few direct signals.

The CAN messages you're getting are strange. Very strange indeed. I've never seen a RTR (remote transfer request) happen on EV-CAN before, so I think this is either some kind of failsafe for when communication is completely dead, or possibly an issue where you didn't properly set up your CAN parameters. The ID 30C is also something I have never seen on any Leaf. Not even when scanning for DTCs or requesting data from processors. It might be something I have overlooked for sure, I haven't played with the PDM yet, but at this point I'd investigate that bit first.

I do not have engineering data for the PDM itself, but I expect you're going to need at least:
- 0x1F2 messages, which contain among other things the commanded charge power, charging state and VCM state
- 0x1DB messages (battery voltage/current and error flags)
- 0x1DC messages (battery allowable charge/discharge power and pairing code).
- 0x50C messages (VCM wake/sleep request signal)

Logical extensions of this set would be:
- 0x55B (SOC, LBC answer, etc.) - I've tinkered with blocking this message before, and have gotten PDM DTCs

Sending all of these with a replay attack (I can provide a CAN trace of a charging session if you like) should yield a functional charger. However, there are a few more connections you need to make:
- The VCM pin 72 and 73 seem to be necessary to initiate a charge (interlock pins)
- You need to synthesize the F/S CHG relay

Some more corrections to earlier comments: the PDM DC/DC converter AND the OBC are both fairly general purpose chargers. Yeah, you heard me right. The OBC is basically a firmware power-limited lab power supply that will happily supply 200-450V to anything you connect to it - it is current-controlled. The PDM DC/DC is likewise a 1.25kW 400V to 6-16V dc/dc converter that will just try to keep its output voltage at the level you tell it to be, delivering up to its maximum current rating. They're both not QUITE versatile enough to actually be used in any EV, but they're certainly versatile enough to use with different chemistries and series count batteries. If these can be reverse engineered and operated reliably, that makes the Leaf drivetrain incredibly valuable to car conversions. One of the most expensive and cumbersome parts of getting a conversion to work is figuring out the dc/dc and charger, and the Leaf 'engine' has everything you need in a nice, neat package, ready to go.

ybpvin
Posts: 27
Joined: Fri Aug 24, 2018 4:55 am
Delivery Date: 24 Aug 2018
Leaf Number: 022135
Location: Ukraine
Contact: Facebook

Re: Stand alone OBC/PDModule EV system Can 2015

Sun Feb 23, 2020 12:59 pm

I submitted different data streams to the channel:
1. a clean stream taken from a working car.
2. A stream with emulation of a current and voltage sensor.
3. Stream with data from the motor, etc. The charging device starts, there are no errors, but the battery does not charge ((
Perhaps the charger is connected to the engine and uses it as a transformer.

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

Re: Stand alone OBC/PDModule EV system Can 2015

Sun Feb 23, 2020 8:29 pm

mux wrote:
Sun Feb 23, 2020 12:33 pm
- all you need to enable this thing to properly charge is to emulate the signals from the VCM. This is 90% CAN bus and a few direct signals.

I can provide a CAN trace of a charging session if you like
Thanks Mux for your message, this has confirmed what I have been thinking, some of your tips I have implemented already and the others I will include in the build presently underway.
Update August 2020 : This was resolved by not using the digiview it was misinterpreting the can data.
I am also glad to hear your comments on the strange messages, there is certainly no record of these in the info out there. These messages do not reoccur on the working leaf. I am using a dataview logic analyzer with CAN protocol decode on their Digivew D9 software. It may be as you said a result of no other module connections to provide answers. I would appreciate it if you could send me or create a link to your traces of a charge session. This would help a lot.

I would like to get one of your man in the middle devices, as I am sure you can appreciate this would also help enormously. I have messaged you elsewhere. Send me a message with details I and I can send your an etransfer by return. I checked your tindie store a couple of times.

I spent all of today hooking up the modules to re-establish the communication links and system requirements.
I hope to finish the by the end of the week and I hope to get some good data as a result. The man in the middle will be one of the next steps to get a working system.

Thanks again for your message, after a day in the shop connecting wires, it really made my day.

Cheers.
Last edited by 49thdiver on Tue Aug 18, 2020 12:36 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: 32
Joined: Fri Feb 07, 2020 10:14 pm
Delivery Date: 15 Jan 2020
Leaf Number: 305065
Location: CANADA's westcoast
Contact: Website

Re: Stand alone OBC/PDModule EV system Can 2015

Mon Feb 24, 2020 12:16 am

A sneak preview of things to come.
Lots still need to be connected but It was a good day.
Image
Peter
Dangerous if left unattended.
1985 Grumman Olsen Kubvan, 2002 Rav4 EV, 2000 Ford Ranger EV, 2015 Nissan leaf, Biktrix LJ

nlspace
Posts: 204
Joined: Mon Jun 05, 2017 10:21 pm
Delivery Date: 06 Jun 2017

Re: Stand alone OBC/PDModule EV system Can 2015

Mon Feb 24, 2020 3:33 am

@Diver49, How much of the VCM must be connected? This is for 2012,

Image

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

Re: Stand alone OBC/PDModule EV system Can 2015

Mon Feb 24, 2020 9:58 am

That is a beautiful drawing I wish there was one like that for the 2015. The same detail for the 2015 is spread over 8 drawings with another 4 that you need to know some detail from. I will post my working diagrams when I get home next.
The simple answer to your question is I don't know, the 2012 is very different from the 2015 which is what my focus is. The answer is of course dependent on what your objective is, i.e. if you only want to run the charger or if you want other functionality. At the core or what ever your objective is, you have to consider two things minimum function to power up in some fashion and can bus error handling associated with what ever systems your remove and what information or commands the remaining systems need to function. I am not at the stage where I can definitively say what the minimum configuration is for the 2015. I can share the following from a standalone charger/battery pack perspective.
You can pull abs, braking(other than brake pedal switch),airbags A/C, and the inverter and another bits associated with vehicle movement. There are some fail safe functions that need to be considered. At a minimum you need the BCM, IPDM, and the BMS, if one can spoof some of the physical functions of the BCM and IPDM it might be possible to get rid of them but they are on the can bus and the added complexity of can error handling may not warrant it.
Consider none of this was designed to work independently and may not, there is no simple plug and play solution, tackling this requires systems knowledge, canbus & software experience as well as an electronics background. I think it's fair to say this ground where fools fear to tread.

My project has been underway for a month since we got the wrecked leaf, it was being planned 6 months ago and will be weeks to months maybe more before I get to a place where I know its working and or is reproducible.
Keep an eye on this thread I am committed to posting what I learn so I can learn from others and we may all benefit.

All the best and good sailing.
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: 32
Joined: Fri Feb 07, 2020 10:14 pm
Delivery Date: 15 Jan 2020
Leaf Number: 305065
Location: CANADA's westcoast
Contact: Website

Re: Stand alone OBC/PDModule EV system Can 2015

Wed Mar 25, 2020 12:09 am

MUXAN was right :
mux wrote:
Sun Feb 23, 2020 12:33 pm
The CAN messages you're getting are strange. Very strange indeed. I've never seen a RTR (remote transfer request) happen on EV-CAN before, so I think this is either some kind of fail safe for when communication is completely dead, or possibly an issue where you didn't properly set up your CAN parameters.
The logic analyzer was decoding the can messages incorrectly, I will go back and figure that out later maybe.
I finally got a man in the middle going with the CanDue ver 2.2 Shield from EVTV on an Arduino due and using Collin Kidders code. The messaging now makes much more sense, see the linked spreadsheet.
https://www.divemaster.ca/RAV4EV/LEAF/W ... %2023.xlsx
I received Mux's CAN Bridge but am waiting for the programmer to implement it. I will use this in the car when I figure out the messaging I hope. On Friday I am going to re-record the command stream using the Arduino MIM device on a working Leaf and use that data to compare to what the stand alone charger and the VCM are producing to determine what missing and to try once again to get the charger to do something.
Peter
Dangerous if left unattended.
1985 Grumman Olsen Kubvan, 2002 Rav4 EV, 2000 Ford Ranger EV, 2015 Nissan leaf, Biktrix LJ

TrueSoln
Posts: 24
Joined: Mon Sep 30, 2019 2:44 am
Delivery Date: 01 Dec 2018

Re: Stand alone OBC/PDModule EV system Can 2015

Mon Apr 06, 2020 9:57 pm

Did any one get the OnBoard charger working for a Gen1, working and info very different ?

This is image I made up for a 2011 Gen1
Image

But still not sure what to do for CAN messages to get it to work
viewtopic.php?f=37&t=31035&p=582016#p582016

And what do we do with these two ?
On board charger Plug 26 (Pin 18) - Ev activation request signal, connects to Plug E63 (pin96) on VCM
On board charger Plug 26 (Pin 21) - Plug in signal, connects to Plug M34 (pin 9) on Combination meter

Return to “LEAF CANBus”