Nissan Leaf Gen3 inverter
- Jack Bauer
- Posts: 3639
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 9 times
- Been thanked: 276 times
- Contact:
- Jack Bauer
- Posts: 3639
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 9 times
- Been thanked: 276 times
- Contact:
Re: Nissan Leaf Gen3 inverter
Which bus were these captured from? Doesnt look like the pt can from a quick glance.
I'm going to need a hacksaw
Re: Nissan Leaf Gen3 inverter
I thought it was the EV-CAN, it has the BMS, VCM, and inverter messages on it. Is there another bus I am missing?
- Jack Bauer
- Posts: 3639
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 9 times
- Been thanked: 276 times
- Contact:
Re: Nissan Leaf Gen3 inverter
Ok thanks will recheck. Was just a quick look.
I'm going to need a hacksaw
- Jack Bauer
- Posts: 3639
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 9 times
- Been thanked: 276 times
- Contact:
Re: Nissan Leaf Gen3 inverter
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
Re: Nissan Leaf Gen3 inverter
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.
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.
-
- Posts: 171
- Joined: Sat Aug 22, 2020 6:54 pm
- Location: Finland
- Has thanked: 13 times
- Been thanked: 18 times
Re: Nissan Leaf Gen3 inverter
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.
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.
- celeron55
- Posts: 803
- Joined: Thu Jul 04, 2019 3:04 pm
- Location: Finland
- Has thanked: 38 times
- Been thanked: 135 times
- Contact:
Re: Nissan Leaf Gen3 inverter
Wait, are you saying the gen3 inverter directly accepts the gen1 and gen2 CANbus messages?
-
- Posts: 171
- Joined: Sat Aug 22, 2020 6:54 pm
- Location: Finland
- Has thanked: 13 times
- Been thanked: 18 times
Re: Nissan Leaf Gen3 inverter
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.
- celeron55
- Posts: 803
- Joined: Thu Jul 04, 2019 3:04 pm
- Location: Finland
- Has thanked: 38 times
- Been thanked: 135 times
- Contact:
Re: Nissan Leaf Gen3 inverter
That's very nice of Nissan, they just saved a bunch of work from some of us.
-
- Posts: 210
- Joined: Fri Dec 06, 2019 8:59 pm
- Location: Dublin & Kilkenny Ireland
- Has thanked: 2 times
- Been thanked: 13 times
- Contact:
Re: Nissan Leaf Gen3 inverter
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?
-
- Posts: 171
- Joined: Sat Aug 22, 2020 6:54 pm
- Location: Finland
- Has thanked: 13 times
- Been thanked: 18 times
Re: Nissan Leaf Gen3 inverter
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.
-
- Posts: 210
- Joined: Fri Dec 06, 2019 8:59 pm
- Location: Dublin & Kilkenny Ireland
- Has thanked: 2 times
- Been thanked: 13 times
- Contact:
Re: Nissan Leaf Gen3 inverter
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 ?
-
- Posts: 171
- Joined: Sat Aug 22, 2020 6:54 pm
- Location: Finland
- Has thanked: 13 times
- Been thanked: 18 times
Re: Nissan Leaf Gen3 inverter
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.
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.
-
- Posts: 210
- Joined: Fri Dec 06, 2019 8:59 pm
- Location: Dublin & Kilkenny Ireland
- Has thanked: 2 times
- Been thanked: 13 times
- Contact:
Re: Nissan Leaf Gen3 inverter
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
- celeron55
- Posts: 803
- Joined: Thu Jul 04, 2019 3:04 pm
- Location: Finland
- Has thanked: 38 times
- Been thanked: 135 times
- Contact:
Re: Nissan Leaf Gen3 inverter
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.
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.
-
- Posts: 210
- Joined: Fri Dec 06, 2019 8:59 pm
- Location: Dublin & Kilkenny Ireland
- Has thanked: 2 times
- Been thanked: 13 times
- Contact:
Re: Nissan Leaf Gen3 inverter
As far as I know from PDM teardown I saw somewhere, showed only change was casting of top cover.
Re: Nissan Leaf Gen3 inverter
Here are the official names for the F22 inverter pins from Nissan

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!

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!
Re: Nissan Leaf Gen3 inverter
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!
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!
Re: Nissan Leaf Gen3 inverter
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:
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
Re: Nissan Leaf Gen3 inverter
Amazing findings drprox!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
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!
Re: Nissan Leaf Gen3 inverter
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.
Re: Nissan Leaf Gen3 inverter
Ah, gotcha!
Can you say which fault codes are active? Can be viewed with leafspy!
Re: Nissan Leaf Gen3 inverter
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.
- Jack Bauer
- Posts: 3639
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 9 times
- Been thanked: 276 times
- Contact:
Re: Nissan Leaf Gen3 inverter
Seems my gen3 inverter has a dead middle current sensor. Don't suppose anyone has a spare?
I'm going to need a hacksaw