Nissan Leaf Gen3 inverter

Nissan Leaf/e-NV200 drive stack topics
Post Reply
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by Jack Bauer »

I'm going to need a hacksaw
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by Jack Bauer »

Which bus were these captured from? Doesnt look like the pt can from a quick glance.
I'm going to need a hacksaw
User avatar
drprox
Posts: 28
Joined: Sat Mar 07, 2020 12:50 pm
Location: England

Re: Nissan Leaf Gen3 inverter

Post by drprox »

I thought it was the EV-CAN, it has the BMS, VCM, and inverter messages on it. Is there another bus I am missing?
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by Jack Bauer »

Ok thanks will recheck. Was just a quick look.
I'm going to need a hacksaw
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by Jack Bauer »

My apologies on this it is indeed correct. Savvycan had a problem reading the file format. Now fixed.
I'm going to need a hacksaw
User avatar
drprox
Posts: 28
Joined: Sat Mar 07, 2020 12:50 pm
Location: England

Re: Nissan Leaf Gen3 inverter

Post by drprox »

No worries.

Today I tried to see if I could get more power/torque from this by spoofing the torque request. Turns out it's limited like the old inverter so the 160kW car must have different firmware.
Attachments
can spoof.PNG
Kelju
Posts: 128
Joined: Sat Aug 22, 2020 6:54 pm
Location: Finland
Has thanked: 8 times
Been thanked: 5 times

Re: Nissan Leaf Gen3 inverter

Post by Kelju »

Great news! I got the motor and inverter running with the OEM brain board.
I implemented the control as per instructions from Celeron55 for the earlier inverter versions. Nothing else was needed.
The RPM does not stay exactly steady, but oscillates a bit. I am guessing it is due to the fact that there is practically no resistance for the torque mode control as I am running the motor at the table.

The mystery still remains, that why can't I start smoothly with the V3 brainboard.
User avatar
celeron55
Posts: 774
Joined: Thu Jul 04, 2019 3:04 pm
Location: Finland
Has thanked: 27 times
Been thanked: 110 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by celeron55 »

Wait, are you saying the gen3 inverter directly accepts the gen1 and gen2 CANbus messages?
Kelju
Posts: 128
Joined: Sat Aug 22, 2020 6:54 pm
Location: Finland
Has thanked: 8 times
Been thanked: 5 times

Re: Nissan Leaf Gen3 inverter

Post by Kelju »

celeron55 wrote: Tue Jun 22, 2021 12:35 pm Wait, are you saying the gen3 inverter directly accepts the gen1 and gen2 CANbus messages?
That is exactly what I am saying.
Next order of business is to start interpreting 0x1DA and 0x55A to check if they are also the same as before.
User avatar
celeron55
Posts: 774
Joined: Thu Jul 04, 2019 3:04 pm
Location: Finland
Has thanked: 27 times
Been thanked: 110 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by celeron55 »

That's very nice of Nissan, they just saved a bunch of work from some of us.
paaa
Posts: 209
Joined: Fri Dec 06, 2019 8:59 pm
Location: Dublin & Kilkenny Ireland
Has thanked: 2 times
Been thanked: 11 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by paaa »

I may give this a try too and see how we go? Did you just fire the logs at it or send snippets of specific messages and just connect the required wiring?
Kelju
Posts: 128
Joined: Sat Aug 22, 2020 6:54 pm
Location: Finland
Has thanked: 8 times
Been thanked: 5 times

Re: Nissan Leaf Gen3 inverter

Post by Kelju »

I did some custom code for the Arduino CANBed following the instructions from Celeron55. I used a potentiometer on one of the analog inputs to set the torque request.
paaa
Posts: 209
Joined: Fri Dec 06, 2019 8:59 pm
Location: Dublin & Kilkenny Ireland
Has thanked: 2 times
Been thanked: 11 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by paaa »

Thats a very handy bit of kit , I think I should upgrade from my janky Arduino and mcp2515 setup for doing this. I think I will try some can logs from my current leaf too for testing purposes. Would you be interested in sharing code if I can share logs with required behaviour ?
Kelju
Posts: 128
Joined: Sat Aug 22, 2020 6:54 pm
Location: Finland
Has thanked: 8 times
Been thanked: 5 times

Re: Nissan Leaf Gen3 inverter

Post by Kelju »

I can share the code.
What is the easiest way to do this?
I do not have a Github repository.

I am just waiting for my Leaf PDM to arrive.
The plan is to try and get it working with OEM CAN.
Some logs of the start and stop of charging process would be handy.
paaa
Posts: 209
Joined: Fri Dec 06, 2019 8:59 pm
Location: Dublin & Kilkenny Ireland
Has thanked: 2 times
Been thanked: 11 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by paaa »

No issue I have a 6kw charger unit on mine , and have spare 3.3 if required. You can attach to a pm if that suits. I'm ordering a canbed but hopefully will Will be able to try implement it on a nano and an MVP 2515 or some other hardware
User avatar
celeron55
Posts: 774
Joined: Thu Jul 04, 2019 3:04 pm
Location: Finland
Has thanked: 27 times
Been thanked: 110 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by celeron55 »

I'm very interested in OEM control of the PDM also. I would suggest making a thread for it once you have any useful data.

I should have enough PDM parts on my shelves to cobble up a functional gen2 when I have the time. I'm hoping the protocol hasn't changed for that either.
paaa
Posts: 209
Joined: Fri Dec 06, 2019 8:59 pm
Location: Dublin & Kilkenny Ireland
Has thanked: 2 times
Been thanked: 11 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by paaa »

As far as I know from PDM teardown I saw somewhere, showed only change was casting of top cover.
User avatar
Dala
Posts: 27
Joined: Tue Jul 06, 2021 9:12 pm

Re: Nissan Leaf Gen3 inverter

Post by Dala »

Here are the official names for the F22 inverter pins from Nissan

Image

Currently working on a Gen3->2 upgrade harness, that will work in tandem with a CAN-bridge to supply 110kW instead of 80kW max demand messages!
User avatar
Dala
Posts: 27
Joined: Tue Jul 06, 2021 9:12 pm

Re: Nissan Leaf Gen3 inverter

Post by Dala »

When I have the harness ready, here is my approach for the software side for the 80->110kW project

1. Install CAN bridge between Inverter and rest of vehicle [EV-CAN]
2. Block 0x120 towards the vehicle (unecessary still alive? message)
3. Modify 0x1D4 MotorAmpTorqueRequest[Nm] demand message going into the inverter (to go above 250NM -> 300+!)
4. Modify 0x1DA MG_EffectiveTorque response message towards the ECU (to make it look like stock 250NM)

Some smart mapping of the pedal needs to also happen, might take a log from a 2018+ vehicle during full throttle to see what it should look like. I'll make a github repository with the code soon!
User avatar
drprox
Posts: 28
Joined: Sat Mar 07, 2020 12:50 pm
Location: England

Re: Nissan Leaf Gen3 inverter

Post by drprox »

Hi Dala,

I have done this mod and can confirm that it works. I haven't totally finished but here are some of the things I have found:
  • New coolant hoses needed
  • The Gen3 has a coolant sensor underneath which needs wiring into the comms connector - this is the only difference in the wiring
  • For some reason the motor phase connections didn't quite line up, so I had to shim the inverter up about 2mm
  • I only modified 0x1D4 and 0x1DA and this worked
  • The inverter has a fault code present due to CAN messages missing on the ZE0, I suspect these are battery messages and have yet to get round to finding out which ones so that I can recreate them. The car works fine, just has a warning light.
  • I also modded the inverter internals to get a bit more torque, I did this by modifying the current sensors. It works well.
  • I have not changed the resolver settings yet but saw your video on this which I found interesting.
  • This mod can of course only be done in conjunction with a battery upgrade due to the 225A original fuse
User avatar
Dala
Posts: 27
Joined: Tue Jul 06, 2021 9:12 pm

Re: Nissan Leaf Gen3 inverter

Post by Dala »

drprox wrote: Sun Aug 22, 2021 9:04 am Hi Dala,

I have done this mod and can confirm that it works. I haven't totally finished but here are some of the things I have found:
  • New coolant hoses needed
  • The Gen3 has a coolant sensor underneath which needs wiring into the comms connector - this is the only difference in the wiring
  • For some reason the motor phase connections didn't quite line up, so I had to shim the inverter up about 2mm
  • I only modified 0x1D4 and 0x1DA and this worked
  • The inverter has a fault code present due to CAN messages missing on the ZE0, I suspect these are battery messages and have yet to get round to finding out which ones so that I can recreate them. The car works fine, just has a warning light.
  • I also modded the inverter internals to get a bit more torque, I did this by modifying the current sensors. It works well.
  • I have not changed the resolver settings yet but saw your video on this which I found interesting.
  • This mod can of course only be done in conjunction with a battery upgrade due to the 225A original fuse
Amazing findings drprox!

Can you take a resistance measurement from the temperature sensor? So that people that lack this sensor can install a resistor while sourcing the correct sensor.

Also do the resolver offset writing as soon as possible, maybe wait for the leafspy pro version!
User avatar
drprox
Posts: 28
Joined: Sat Mar 07, 2020 12:50 pm
Location: England

Re: Nissan Leaf Gen3 inverter

Post by drprox »

The sensor is screwed into the inverter base and comes with it as it is part of a coolant path. The main issue was trying to find a connector to fit, it's some kind of Denso plug I think, I just used bare pins and glue.
Attachments
sensor.png
User avatar
Dala
Posts: 27
Joined: Tue Jul 06, 2021 9:12 pm

Re: Nissan Leaf Gen3 inverter

Post by Dala »

drprox wrote: Sun Aug 22, 2021 10:03 am The sensor is screwed into the inverter base and comes with it as it is part of a coolant path. The main issue was trying to find a connector to fit, it's some kind of Denso plug I think, I just used bare pins and glue.
Ah, gotcha!

Can you say which fault codes are active? Can be viewed with leafspy!
User avatar
drprox
Posts: 28
Joined: Sat Mar 07, 2020 12:50 pm
Location: England

Re: Nissan Leaf Gen3 inverter

Post by drprox »

Sure, see attached. I have access to a 110kW car so planned to send it messages and keep trying to clear, just haven't had the chance yet.
Attachments
leafspy faults.jpg
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by Jack Bauer »

Seems my gen3 inverter has a dead middle current sensor. Don't suppose anyone has a spare?
Attachments
2021-08-23 15.26.42.jpg
2021-08-23 15.21.10.jpg
I'm going to need a hacksaw
Post Reply