Page 6 of 10

Re: Nissan Leaf Gen3 inverter

Posted: Wed May 05, 2021 5:50 pm
by Jack Bauer

Re: Nissan Leaf Gen3 inverter

Posted: Thu May 06, 2021 7:09 am
by Jack Bauer
Which bus were these captured from? Doesnt look like the pt can from a quick glance.

Re: Nissan Leaf Gen3 inverter

Posted: Thu May 06, 2021 8:06 pm
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?

Re: Nissan Leaf Gen3 inverter

Posted: Fri May 07, 2021 11:26 am
by Jack Bauer
Ok thanks will recheck. Was just a quick look.

Re: Nissan Leaf Gen3 inverter

Posted: Sun May 09, 2021 1:10 pm
by Jack Bauer
My apologies on this it is indeed correct. Savvycan had a problem reading the file format. Now fixed.

Re: Nissan Leaf Gen3 inverter

Posted: Sun May 09, 2021 7:27 pm
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.

Re: Nissan Leaf Gen3 inverter

Posted: Tue Jun 22, 2021 8:14 am
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.

Re: Nissan Leaf Gen3 inverter

Posted: Tue Jun 22, 2021 12:35 pm
by celeron55
Wait, are you saying the gen3 inverter directly accepts the gen1 and gen2 CANbus messages?

Re: Nissan Leaf Gen3 inverter

Posted: Tue Jun 22, 2021 1:53 pm
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.

Re: Nissan Leaf Gen3 inverter

Posted: Tue Jun 22, 2021 2:19 pm
by celeron55
That's very nice of Nissan, they just saved a bunch of work from some of us.

Re: Nissan Leaf Gen3 inverter

Posted: Tue Jun 29, 2021 5:33 pm
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?

Re: Nissan Leaf Gen3 inverter

Posted: Wed Jun 30, 2021 6:18 pm
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.

Re: Nissan Leaf Gen3 inverter

Posted: Thu Jul 01, 2021 9:47 pm
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 ?

Re: Nissan Leaf Gen3 inverter

Posted: Fri Jul 02, 2021 10:12 am
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.

Re: Nissan Leaf Gen3 inverter

Posted: Fri Jul 02, 2021 4:45 pm
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

Re: Nissan Leaf Gen3 inverter

Posted: Sat Jul 03, 2021 10:32 pm
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.

Re: Nissan Leaf Gen3 inverter

Posted: Sat Jul 03, 2021 10:38 pm
by paaa
As far as I know from PDM teardown I saw somewhere, showed only change was casting of top cover.

Re: Nissan Leaf Gen3 inverter

Posted: Tue Jul 06, 2021 9:13 pm
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!

Re: Nissan Leaf Gen3 inverter

Posted: Wed Jul 07, 2021 8:07 am
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!

Re: Nissan Leaf Gen3 inverter

Posted: Sun Aug 22, 2021 9:04 am
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

Re: Nissan Leaf Gen3 inverter

Posted: Sun Aug 22, 2021 9:54 am
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!

Re: Nissan Leaf Gen3 inverter

Posted: Sun Aug 22, 2021 10:03 am
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.

Re: Nissan Leaf Gen3 inverter

Posted: Sun Aug 22, 2021 3:47 pm
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!

Re: Nissan Leaf Gen3 inverter

Posted: Sun Aug 22, 2021 4:44 pm
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.

Re: Nissan Leaf Gen3 inverter

Posted: Mon Aug 23, 2021 2:30 pm
by Jack Bauer
Seems my gen3 inverter has a dead middle current sensor. Don't suppose anyone has a spare?