Nissan Leaf Gen3 inverter

Nissan Leaf/e-NV200 drive stack topics
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 »

Hi,

While waiting for my V3 mainboard to arrive, I've made the layout of the adapter board.
I am hesitant to order the boards before double checking the correctness of my fixing hole and connector locations.
I do not have Eagle so I used a Gerber viewer on the V3 mainboard to check the coordinates of the holes and pin#1 of the various connectors.

I assume this info is also very helpful for others, but as mentioned, (@johu) these measurements need double checking.
Attachments
V3 mainboard holes and connectors.JPG
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by johu »

Your origin doesn't seem right, the bottom left hole center is at position 3.81/3.81. Other than that it looks correct.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
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 just placed my origin at the center of the bottom left screw hole for clarity. But are my holes and connectors (pin #1) in the correct locations relative to each other?
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 »

Adapter board is all assembled along with the V3 mainboard.
The nice thing is that no harvesting of connectors from the original Nissan board is needed. Also, the main communication connector of the inverter is actually the same as the Leaf ZE0 22-pin battery connector which I had a friend of mine 3D print for me.

I'll report back about my testing results as I get to it.
Attachments
20201023_215403159.jpeg
User avatar
Bratitude
Posts: 783
Joined: Thu Jan 02, 2020 7:35 pm
Location: Canada
Has thanked: 57 times
Been thanked: 168 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by Bratitude »

-fits em57
Sweet!

-Infieon FS800R07A2E3_B31 igbt

650v 800amp.... holy crap!

Who’s going to push to 300kw!?!?

nice work with flipping the johu brain to fit into this little monster inverter!

Now on the hunt for a gen 3 inverter. Looks like 2018 onward. might have a lead.

Keep us updated 😎
https://bratindustries.net/ leaf motor couplers, adapter plates, custom drive train components
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by johu »

Wow, that is excellent. Had I made this one of the headers would probably be mirrored or twisted ;) Looking forward to your results!
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
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 »

Small update.
I've now calibrated the current sensors. I made ten loops through the sensor with a 2.5mm2 wire, supplied the current with an old telecom psu with a 6.5VDC output capable upto 10 Amps. I also have a programmable electronic load, which I used in constant current mode at 10A. Verified the reading also with an AC/DC current clamp meter. The correct gain for these sensors turned out to be 1.85.
After this I moved on to the Udc calibration. For this I used a battery pack made out of four Th!nk City modules in series with a total voltage of 357Vdc. At this point I do not have any pre-charge circuit hooked up so I made the DC-link connection through a 230VAC passenger vehicle cabin heater that everybody has lying around here at Scandinavia for the cold winter. Turned out to work great for this purpose!
The correct gain for the Udc is 10.
Next order of business will be testing the PWM signals. I actually already checked the correct polarity to drive the IGBTs without the V3 board, manually supplying a "high" to the gate drive and with only the 12VDC supply connected to the DC-link. As expected, the 12V was connected to the phase 1 output accordingly. I did find a signal which I had missed in the first place and for this reason the IGBT drive was not firing from the first get go. It is all sorted out now.
After this I will connect the resolver wiring and try to get spinning.
Exciting times indeed!
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by johu »

Pure awesomeness :)
So the IGBT drive is active high now?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
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 »

Yes. There is a HC240 octal buffer (inverting logic) on the OEM brain board, which pulls current through the IGBT driver input diode cathode. While the anode is supplied with 5V also from the OEM brain board.
I basically copied this concept by using a 74LVC06A (hex inverter with open-drain outputs) on the adapter board. This chip also happily deals with the "level shift" between 3V3 logic and 5V logic.
What I notice now is that the HC240 has the possibility for tri-state outputs, which would be very handy for startup situations.
The 74LVC06A does not have tri-state output control. Does this create a possible problem?
I guess I'll find this out by polling the PWM outputs on powerup.
If I find any problems, I'll create a delayed hardware switch-on of the 5V supply for the IGBT driver input diode anode.
User avatar
SciroccoEV
Posts: 369
Joined: Thu Oct 10, 2019 1:50 pm
Location: Luton UK
Been thanked: 15 times

Re: Nissan Leaf Gen3 inverter

Post by SciroccoEV »

I've just had one of these inverters delivered. It occurred to me that the 2020 63Kwh Leaf has a 218bhp option. Is the limit imposed by the inverter logic board, or by the VCU? If it's the VCU, then there is potentially option of just sending CAN commands.
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by johu »

Ok, I see, so it's basically still the same design on Nissans side. I didn't use any buffers for the gen2 board as I deemed the STMs 16mA sink capability sufficient. The 6 PWM outputs are also 5V tolerant. Also the opto couplers pretty much eliminate the chances of false turn-ons because they need some minimum current to turn on.

The problem some STMs develop shows when its pins are configured as inputs (which they all are at powerup). Sometimes they develop leakage to Vcc which will make a very low impedance load, like a mosfet, turn on.

The problem can also be solved with the new boot loader that has the possibility to pull pins high or low directly at startup.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
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 tested the PWM outputs this evening. The PWM signals look clean enough and I verified a 1us dead time between high and low drive.
The pulse width is not steady 50% though. There is a fair bit of modulation going on... any idea why this might be?
I have set fslipspnt 1Hz and ampnom 1%.
There is an error "stop - precharge", but as it does not prevent the PWM completely, I doubt it has nothing to do with the modulation.
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by johu »

Yes there is a bit of modulation, you can set boost to 0 and fweak to 1000 to minimize it.

stop - precharge only stops you in a complete system ;) Because the inverter wouldn't turn on in the first place. But it's not an error that stops PWM, why would it..
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
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 »

Update time.
Unfortunately I ran into some strange behavior, which luckily got sorted, but I do not have any idea what fixed my issue...
In the first place I was not able to get any PWM in manual mode although all the desat, ocur, emcystop and mprot where ok.
I even changed the pwmpol several times and tried to set fslipspnt and ampnom to 1 in different orders with no luck.
Then at one point I noticed that I had PWM at the V3 board header. Any idea what might cause this "intermittent" loss of PWM signaling?

Once I finally got the PWM, I was ready to apply a small voltage to the DC-link to observe the PWM from the phase outputs. Once again I supplied the voltage through the trusty cabin heater only to discover that all of that voltage (only 12V at this point) was seen over the cabin heater when PWM was applied. As expected, without PWM the voltage was correctly measurable in full over the DC-link. Next I increased the current capability of my source by replacing the cabin heater with a 3.9 ohm resistor and discovered that the DC-link was now drawing in excess of 1 amp!
Apparently there is some serious shoot through going on.
My pwmfrq is set at 17.6kHz and when I was testing different values for deadtime from 0 to 255, the actual measured dead time of 1us on the scope showed no changes. What is the scaling between actual dead time and the parameter value?

I guess I'll have to decrease the pwmfrq to 8.8kHz tomorrow and check if the dead time can be adjusted then.
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 might have found the reason why getting PWM was so difficult.
Apparently the inverter likes to see some voltage at the DC-link to enable PWM.
Also the current draw from the DC-link eased by changing the switching frequency to 8.8kHz and I also got the dead time adjustment figured out now.
It is still pulling around 30mA from the DC-link with 1.5us dead time, but this did not seem to dercease even if dead time was increased upto 5us.
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 moved on to testing with the motor. I supplied the voltage from a single Enerdell module and the voltage was a little over 40 VDC.
When I set fslipspnt to 10 and ampnom to 100, the motor only spins momentarily and an over current fault is asserted. This happens even with ocurlim set to -300. According to the udc plot, the DC-link does not sag. Current sensors are correctly calibrated and I also double checked the direction of the current once again. I do not feel comfortable increasing the ocurlim any further...

Any ideas how to go forward will be much appreciated.
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by johu »

The Leaf motor that is?
Can you post parameters?
Is your deadtime to tight? It varies a bit between loaded an unloaded, tail current or something.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
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 »

Yes. The motor is a Leaf motor from the same model year as the inverter.

boost
1000
fweak
10
fconst
180
udcnom
360
fslipmin
1
fslipmax
10
fslipconstmax
5
polepairs
4
respolepairs
4
encmode
SinCos
fmax
200
numimp
60
dirchrpm
100
dirmode
Switch
snsm
Leaf

- Inverter
pwmfrq
8.8kHz
pwmpol
ACTHIGH
deadtime
200
ocurlim
-200
il1gain
-1,85
il2gain
-1,85
udcgain
10
udcofs
50
udclim
460
snshs
MBB600

- Derating
bmslimhigh
50
bmslimlow
-1
udcmin
0
udcmax
430
idcmax
5000
idcmin
-5000
tmphsmax
150
tmpmmax
300
throtmax
100
throtmin
-100
iacmax
200
ifltrise
10
ifltfall
3
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 tried with different values for deadtime upto 255 and also tested with 17.6kHz, 8.8Khz and 4.4Khz. I also verified with a scope that my dead time was 14us with 255.
Everytime the same end result. Motor spins momentarily and I get
Warn - hicurofs1
Warn - hicurofs2
Derate - current limit
Stop - overcurrent

Could this be some kind of ann EMC problem?
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 disconnected the motor once more and double checked my adapter board PWM channel connections.
I had 44V on the DC-link and I went through each drive signal (CH1N, CH1, CH2N, CH2, DCH3N, CH3) by pulling down the 74LVC06A outputs one by one and verifying that the corresponding phase output was switched accordingly to the correct direction.

According to the measurements, all connection are correct in that department.
I am getting very confused here...
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by johu »

Ok, with the PWM, current sensors and resolver verified I think you should switch to FOC software now. It is kindof hard to run synchronous motors with sine firmware.
Also check that PWM1/2/3 actually drive phases 1/2/3 and that current sensors sense 1/2. Use pinswap if not.

Also encmode seems to be set to SinCos, set it to Resolver
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
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 »

So, I have some good new and some bad news.
I decided to continue with the sine FW and hooked up a small industrial induction motor to the inverter and sure enough, the motor started spinning.
At this point I only had 44VDC applied.
This is where it all started to go sideways...
I was so thrilled about the result, that I immediately moved onto testing with full pack voltage.
The motor started spinning, but to my disappointment, all of a sudden something snapped in the inverter and DESAT was asserted.
After debugging I noticed that phase2 output was sitting at positive rail! Apparently the IGBT bridge is toast.

After all of this, I understand, that I should have measured/logged the phase currents and other signals while I had the low voltage applied.
I let my enthusiasm got the best of me and was not working systematically. I should definitely know better.

Anyway, I have another Inverter which I need to pop open next and continue. Hopefully I do not blow it up, or this will have come a very expensive experiment.
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Nissan Leaf Gen3 inverter

Post by johu »

Oh that sucks :( I never managed to kill the Gen2 even though at some point I closed all 6 switches into the full pack voltage! Have they downgraded the protection?
What deadtime are you at?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
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 »

Deadtime was 125.
I will try to investigate the problem further with the other two phases before switching over to the other inverter.
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 »

By the way, has somebody reverse engineered the Leaf Gen2 inverter processor card to the extend, that the KL15 (ignition switch signal) and the resolver circuitry can be pinpointed from the PCB?
This would be very helpful for me to better understand the inner workings of the OEM implementation.
Pictures of the OEM board with the mentioned functionality highlighted with a red circle or something would be great.
Post Reply