Page 2 of 4

Re: Zombiverter not switching to charge mode with Leaf PDM

Posted: Wed Dec 18, 2024 5:47 pm
by tom91
The fact you say your inverter run without 12V ignition being applied is suspicious, along with the power draws.

Please post pictures of your setup as asked before. As we can see things you might not even think of.

Re: Zombiverter not switching to charge mode with Leaf PDM

Posted: Thu Dec 19, 2024 5:18 pm
by Rustybkts
tom91 wrote: Wed Dec 18, 2024 5:47 pm The fact you say your inverter run without 12V ignition being applied is suspicious, along with the power draws.
Please post pictures of your setup as asked before. As we can see things you might not even think of.
@tom91, I can't thank you enough for your patience this past week or so as I have been pulling my hair out regarding the PDM charger operation with the drive and DC-DC working faultlessly.
Pictures would be of no help with this issue as all the wiring is loomed.

I have checked the wiring extensively right to the pins on the PDM and inverter plugs. When I test with the 12v disconnected from the ignition relay, the inverter definitely still runs fwd and rev after keying the ignition.
I even checked for back feeds on the wires when disconnected from the relay.

Will take some time out for a ground up re-think and even try connecting the CAN and battery 12v directly with plugs out to the PDM and inverter to see if it still runs without PDM pin 16 and Inverter 42 powered.
Will also try disconnecting the Zombie board in case the CAN messages are keeping the PDM and inverter awake. Sounds daft but possible I guess.

My guess is that the PDM won't allow charge unless pin 16 is false. The high currents noted on the inverter and PDM would indicate that neither are asleep.

The wiring is exactly as below.
1282px-Zombi-leaf-wiring1.png

Re: Zombiverter not switching to charge mode with Leaf PDM

Posted: Thu Dec 19, 2024 9:50 pm
by LRBen
What version zombie firmware are you running?

Re: Zombiverter not switching to charge mode with Leaf PDM

Posted: Fri Dec 20, 2024 6:49 pm
by Rustybkts
LRBen wrote: Thu Dec 19, 2024 9:50 pm What version zombie firmware are you running?
The latest v 2.20A

Re: Zombiverter not switching to charge mode with Leaf PDM

Posted: Fri Dec 20, 2024 7:18 pm
by m.art.y
Rustybkts wrote: Thu Dec 19, 2024 5:18 pm Will take some time out for a ground up re-think
Which PDM have you got? What year? Was it natively with a type2 socket or did you put type2 on it yourself?

Re: Zombiverter not switching to charge mode with Leaf PDM

Posted: Wed Jan 01, 2025 11:40 pm
by Bratitude
Have you referred to official 2015 model year pinouts ?

There doses seem to be some slight difference throughout the years. It’s been hard to verify what is what. Worth cross referencing

Re: Zombiverter not switching to charge mode with Leaf PDM

Posted: Fri Jan 03, 2025 3:48 pm
by Kelju
Not exactly the same symptoms, but I have been fighting the whole day now with the problem of no charging with the 2.20A FW with Leaf PDM.
1. I have checked the wiring and it is correct.
2. I took a datalog and confirmed that 0x390 from PDM has the correct info on byte 5 upon inserting the charging plug.
3. I repeated the test with PDM switched 12V connected and disconnected and in both cases the behavior is the same. The plug is detected and Zombie goes into opmode charge, but the EVSE relay does not switch and there is no charging power. After a while, the EVSE goes into fault mode.
4. I repeated the test with my previously hacked V1.00A FW and the charging works just fine. I also took a datalog of this.
5. I also measured the type-2 vehicle inlet and the resistance is around 40k and not 2k7. I assume that the PDM needs some magic info via CAN from the Zombie and then it makes the EVSE happy, the EVSE relay switches on and the charging power starts flowing.
6. At this point I would not like to add a 2k7 resistor between the PP and ground, because I do not want to risk damaging the PDM.
Leaf_PDM_charging_debugging.zip
V1.00A charging works, V2.20A no charging power
(809.54 KiB) Downloaded 458 times

Re: Zombiverter not switching to charge mode with Leaf PDM

Posted: Fri Jan 03, 2025 3:55 pm
by tom91
Kelju wrote: Fri Jan 03, 2025 3:48 pm 4. I repeated the test with my previously hacked V1.00A FW and the charging works just fine. I also took a datalog of this
What is the status of your 12V supplies to the PDM? Also I need parameter dumps for both versions.

Re: Zombiverter not switching to charge mode with Leaf PDM

Posted: Fri Jan 03, 2025 4:05 pm
by tom91
Kelju wrote: Fri Jan 03, 2025 3:48 pm 2. I took a datalog and confirmed that 0x390 from PDM has the correct info on byte 5 upon inserting the charging plug.
Okay, so the 0x11A gear position message is not sent when not in run mode. This has been like this for a while I believe so no idea if it has an impact, it works on Damiens truck setup just fine.

What hardware are you using?

Check please if moving the line in stm32_vcu.cpp

Code: Select all

546 selectedInverter->Task10Ms();
To position line 554 (so outside the runmode if statement) fixes your inability to charge.

Re: Zombiverter not switching to charge mode with Leaf PDM

Posted: Fri Jan 03, 2025 5:00 pm
by Kelju
tom91 wrote: Fri Jan 03, 2025 4:05 pm What hardware are you using?
I have a Gen3 Leaf stack (110kW inv and 6.6k Type2 PDM).
Not sure if it makes any difference, but the Zombie board version is V1.

Moving "selectedInverter->Task10Ms()" out side of that if statement fixed the issue. Now the charging works again.
Excellent finding thank you!

Re: Zombiverter not switching to charge mode with Leaf PDM

Posted: Fri Jan 03, 2025 6:08 pm
by tom91
Kelju wrote: Fri Jan 03, 2025 5:00 pm Moving "selectedInverter->Task10Ms()" out side of that if statement fixed the issue. Now the charging works again.
Excellent finding thank you!
Thank you will create an update for Zombie, this is only Gen3 PDM then I think.

Re: Zombiverter not switching to charge mode with Leaf PDM

Posted: Fri Jan 03, 2025 6:15 pm
by Kelju
Sorry to say, but I was too quick to selebrate. With that change, the drive mode does not work anymore...

Re: Zombiverter not switching to charge mode with Leaf PDM

Posted: Fri Jan 03, 2025 6:18 pm
by tom91
Kelju wrote: Fri Jan 03, 2025 6:15 pm Sorry to say, but I was too quick to selebrate. With that change, the drive mode does not work anymore...
Okay thats fine, please change back your change and run the new nissanpdm.cpp I made here:
https://github.com/damienmaguire/Stm32- ... sanPDM.cpp

Re: Zombiverter not switching to charge mode with Leaf PDM

Posted: Fri Jan 03, 2025 6:39 pm
by Kelju
Did you do any other changes outside of the nissanPDM.cpp?
I just updated that single file from that link and now the drive works, but charging still not...

Re: Zombiverter not switching to charge mode with Leaf PDM

Posted: Sat Jan 04, 2025 12:13 pm
by tom91
Kelju wrote: Fri Jan 03, 2025 6:39 pm but charging still not...
Okay please provide logs of the situations you tested, we have one where there is no drive but charging and driving but no charging (even after the latest change). I do not have a test setup for the Nissan Leaf.

NOTE: to everyone, this is ONLY an issue for the Gen3 Leaf PDM. Zombie goes into charge, the EVSE gets enabled but no charging power draw.

Re: Zombiverter not switching to charge mode with Leaf PDM

Posted: Sat Jan 04, 2025 1:14 pm
by Kelju
Okay, so here is a log file of the failed charging attempt, with the latest nissanPDM.cpp.
Here is what can be found from the log:
1. I started the log while charger detached
2. I inserted the type2 plug to the vehicle inlet (system wakes up)
3. I wait and the EVSE relay never clicks (no charging power)
4. The EVSE goes into fault mode, I disconnect the plug and stop the log.

I once again tested with the switched 12V provided to the PDM and without. Did not make any difference.

Re: Zombiverter not switching to charge mode with Leaf PDM

Posted: Sat Jan 04, 2025 1:28 pm
by tom91
Okay I will need the log of charging working with the move of the 10ms inverter task.

As this got it charging so just need to compare the two to figure out what is different. It may be very simple.

Re: Zombiverter not switching to charge mode with Leaf PDM

Posted: Sat Jan 04, 2025 2:35 pm
by Marat
Did Leaf Gen2 come with Type2 ?

I only saw Gen3
as Type1 or Type2

B,292C0-5SA0A,To:292C0-5SA0B,VA0x1201R0000_5SA0B.kwp,RNDS_SC003.ini,TYPE 1 without QC
B,292C0-ERROR,To:292C0-5SA0B,VA0x1201R0000_5SA0B.kwp,RNDS_SC003.ini,TYPE 1 without QC
B,292C0-5SH1A,To:292C0-5SH1B,VA0x1201R0000_5SH1B.kwp,RNDS_SC003.ini,TYPE 2 with QC
B,292C0-ERROR,To:292C0-5SH1B,VA0x1201R0000_5SH1B.kwp,RNDS_SC003.ini,TYPE 2 with QC

Re: Zombiverter not switching to charge mode with Leaf PDM

Posted: Sat Jan 04, 2025 2:38 pm
by Kelju
tom91 wrote: Sat Jan 04, 2025 1:28 pm Okay I will need the log of charging working with the move of the 10ms inverter task.

As this got it charging so just need to compare the two to figure out what is different. It may be very simple.
This is the charging working with the move of the 10ms inverter task.

Re: Zombiverter not switching to charge mode with Leaf PDM

Posted: Sat Jan 04, 2025 2:54 pm
by tom91
Thank you, this will need some deep digging as it might be that the PDM wants the CAN frames all the time.

Did you check with the working V1.0 of the code it drove and charged? Then I can use that as another review point.

Re: Zombiverter not switching to charge mode with Leaf PDM

Posted: Sat Jan 04, 2025 3:22 pm
by Kelju
Yes, it is charging and driving.

Re: Zombiverter not switching to charge mode with Leaf PDM

Posted: Sat Jan 04, 2025 4:25 pm
by tom91
Kelju wrote: Sat Jan 04, 2025 1:14 pm Okay, so here is a log file of the failed charging attempt, with the latest nissanPDM.cpp.
Been looking at the way the various messages are implemented. The nissan PDM never goes to sleep due to 0x50B being broadcast by the Inverter code in the 100ms task.

Can you please turn off the Inverter parameter (only change besides the nissanPDM.cpp) and grab me a log of trying to charge?

I feel that Gen3 has alot more checks on the right timing of messages where the older generations do not really care.

Re: Zombiverter not switching to charge mode with Leaf PDM

Posted: Sat Jan 04, 2025 6:24 pm
by Kelju
tom91 wrote: Sat Jan 04, 2025 4:25 pm Can you please turn off the Inverter parameter (only change besides the nissanPDM.cpp) and grab me a log of trying to charge?
I went ahead and did this, but as I suspected, with the Leaf INV required for DC-link voltage measurement in my setup, I get a pre-charge fail.

Re: Zombiverter not switching to charge mode with Leaf PDM

Posted: Sat Jan 04, 2025 6:28 pm
by tom91
Kelju wrote: Sat Jan 04, 2025 6:24 pm I went ahead and did this, but as I suspected, with the Leaf INV required for DC-link voltage measurement in my setup, I get a pre-charge fail.
Yes you do but I want the CAN log of start up only :D as I said the issue is the waking up/not sleeping of the PDM. thus not caring about 12V switched

Re: Zombiverter not switching to charge mode with Leaf PDM

Posted: Sat Jan 04, 2025 6:46 pm
by Kelju
Here you go. The PDM wakeup is there in the log.