Drawing power out of CCS port (V2x, inverse charging, bidirectional CCS)

Development and discussion of fast charging systems eg Chademo , CCS etc
Skibbie
Posts: 7
Joined: Wed Oct 16, 2024 10:05 pm

Re: Drawing power out of CCS port (V2x, inverse charging, bidirectional CCS)

Post by Skibbie »

Hello,
just trying to build up a DC Wallbox and I'm very happy how cool this forum is.

Currently trying with a Kia EV6 to activate DC port.
At first I was struggling with starting the communication at all. For now it looks like, after applying +12V to CP, I'll have to wait 6sec before switching to the 5% PWM. After that pyPlc will start communication in EVSE Mode. :)
But will stop after some seconds, because no voltage present.
mhpev wrote: Sat Sep 07, 2024 8:44 pm Based on the changes in my prior message comparison
Could you explain how to change the EVSEMaximumLimits? I was not able to find these params in the code.
Or did you applied external voltage to the DC pins, to get it working?

Thanks so far!
Christian
User avatar
johu
Site Admin
Posts: 6259
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 236 times
Been thanked: 1286 times
Contact:

Re: Drawing power out of CCS port (V2x, inverse charging, bidirectional CCS)

Post by johu »

Welcome! You can also chime in here: viewtopic.php?t=5090
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
uhi22
Posts: 934
Joined: Mon Mar 14, 2022 3:20 pm
Location: Ingolstadt/Germany
Has thanked: 135 times
Been thanked: 529 times

Re: Drawing power out of CCS port (V2x, inverse charging, bidirectional CCS)

Post by uhi22 »

Skibbie wrote: Wed Oct 16, 2024 10:12 pm Could you explain how to change the EVSEMaximumLimits? I was not able to find these params in the code.
The limits of the EVSE are hard-coded in the OpenV2Gx, in this area: https://github.com/uhi22/OpenV2Gx/blob/ ... ce.c#L1485
To change this, just change this part of the code and compile the OpenV2Gx again.

The Kia is a quite interesting story. Because there are two totally different scenarios possible:
- If the charger (or pyPLC) announces to support 800V (say: 1000V), the Kia should directly switch the 800V battery to the CCS port.
- If the charger (or pyPLC) announces only 500V, the Kia would place its step-up converter between the battery and the CCS port. Quite interesting question, whether this step-up (500V CCS to 800V battery) would work reverse to step-down the 800V battery to 500V CCS.

[Edit] Hi and welcome :-)
Skibbie
Posts: 7
Joined: Wed Oct 16, 2024 10:05 pm

Re: Drawing power out of CCS port (V2x, inverse charging, bidirectional CCS)

Post by Skibbie »

Ok, thanks for quick Response. Will try this evening.
Step down seems to work, If EVSE voltage readings are correct. They were slowly ramping Up, so looked Like real meaurements. I can Check with Multimeter later. Only question would be, If Power or how much Power could be transferred "downwards". I've even never used "Low" (400) Volt chargers, yet. But remembering, that 400V Tesla Superchargers get the EV6 only to charge at 60-80kW...
User avatar
uhi22
Posts: 934
Joined: Mon Mar 14, 2022 3:20 pm
Location: Ingolstadt/Germany
Has thanked: 135 times
Been thanked: 529 times

Re: Drawing power out of CCS port (V2x, inverse charging, bidirectional CCS)

Post by uhi22 »

Sounds very good, just feel free to share any further measurenents/Logs/thoughts/questions.
Skibbie
Posts: 7
Joined: Wed Oct 16, 2024 10:05 pm

Re: Drawing power out of CCS port (V2x, inverse charging, bidirectional CCS)

Post by Skibbie »

Retested with original settings: EVSEMaximumVoltage 450V -> gives 405V to the DC port for 10sec
recompilation with 1000V -> gives 390V to the DC port for 10sec

Seems the car needs some external voltage to activate port permanently. EVSE output looks a bit different. With 1000V the car has UTarget of 825V and some texts "PowerDelivery" appears shortly.

Still struggling with starting the communication properly. Often it stays in SDP 2 and I have to reconnect several times. Didn't find a pattern, yet. Does anyone knows, how so come over this? My cable is rather long (~10m) Could this be a problem for the greenphy?
Skibbie
Posts: 7
Joined: Wed Oct 16, 2024 10:05 pm

Re: Drawing power out of CCS port (V2x, inverse charging, bidirectional CCS)

Post by Skibbie »

Since hybrid inverters have battery voltage maximum of 600V, I've put this into the settings. UTarget is now 540V - so maybe the buck/boost converter can handle different voltage levels in some steps. Looks quite good.

I think it's time to get a hybrid inverter...
User avatar
uhi22
Posts: 934
Joined: Mon Mar 14, 2022 3:20 pm
Location: Ingolstadt/Germany
Has thanked: 135 times
Been thanked: 529 times

Re: Drawing power out of CCS port (V2x, inverse charging, bidirectional CCS)

Post by uhi22 »

The connection issue could be a configuration problem Like discussed here:viewtopic.php?p=56434#p56434
It would be helpful to record and share a pcap for further analysis. I guess 10m cable should be okay, since plc is designed for much worse situations.
Skibbie
Posts: 7
Joined: Wed Oct 16, 2024 10:05 pm

Re: Drawing power out of CCS port (V2x, inverse charging, bidirectional CCS)

Post by Skibbie »

I was able to re-establish connection only after disconnecting CP, then quit pyPlc, close eth0 (down) and open again (up), then start pyPlc.py -E and connect CP again. With this it's nearly always starting communication completely and not only to SDP2.

I've connected vehicle to Sungrow SH8.0RT and tried to make it running. But as far as I understand the car is not fully convinced, that everythings fine. I guess voltage and or current is not correct.
I tried to manipulate battery voltage via CAN bus (emulating BYD HVS) manually during process. If I set PreCharge voltage correct, I'll get one step ahead and EV asks for 540V (EVSEMaximumVoltage). Then I change it accordingly, but at the end it always stops. My biggest fear is, that the inverter might be too slow!?

Everythings running on an Raspberry Pi 4. Talking to sungrow with this: https://gitlab.com/pelle8/batteryemulator/-/tree/main but without bms_handler - this is what I played manually.

Otherwise it looks like I need an automatic interface from pyPlc to CAN bus, to adjust voltage AND current accordingly just in time.
Any ideas how to get the values easily out of pyPlc?

Attached is my log from this session. Maybe someone can find a hint, what could be a reason for not successfully opening the battery port...

Good night! :D
Attachments
log281024.txt
(35.39 KiB) Downloaded 35 times
User avatar
uhi22
Posts: 934
Joined: Mon Mar 14, 2022 3:20 pm
Location: Ingolstadt/Germany
Has thanked: 135 times
Been thanked: 529 times

Re: Drawing power out of CCS port (V2x, inverse charging, bidirectional CCS)

Post by uhi22 »

Skibbie wrote: Mon Oct 28, 2024 10:27 pm Otherwise it looks like I need an automatic interface from pyPlc to CAN bus, to adjust voltage AND current accordingly just in time.
Any ideas how to get the values easily out of pyPlc?
Just added the description for communication from pyPLC to a power supply here: https://github.com/uhi22/pyPLC#q8-how-c ... wer-supply

The log shows, that after a successful precharge to 486V we enter the currentDemand loop with target voltage 540V and a target current ramping from 0.3A to 30A within ~2 seconds. This is good so far. Then, the EV sends a power delivery stop request and terminates the session.
There are multiple reasons, why the car could be unhappy with the procedure:
- It requests a rising current, but physically sees no reaction (because the power supply does not follow the request).
- pyPLC sends EVSEPresentVoltage and EVSEPresentCurrent with just "faked" values, which do not match the physical values.
What I guess we need:
- Control the power supply with the values we get from the EV.
- Fill the CurrentDemandResponse with more plausible values for EVSEPresentCurrent and PresentVoltage. In best case, we would get those from the power supply and just forward what we receive down to the EV.
Skibbie
Posts: 7
Joined: Wed Oct 16, 2024 10:05 pm

Re: Drawing power out of CCS port (V2x, inverse charging, bidirectional CCS)

Post by Skibbie »

...just re-read the previous posts. There is a description, that during PreCharge a voltage is required. This seems to be fulfilled by the inverter. But with voltages which requires the dc/dc converter (<800V) there seem to be a timeout of 10s. This might be an indication that here maybe only charging is possible. So it is just a step-up converter!? But it's just a guess.
Poorly most inverters only support battery voltages up to 600V, so I won't give it a try with full battery voltage. :twisted:
For charging only the inverter might be too slow. With original battery it takes up to 5 minutes until current is flowing.
Direct readings of battery voltage and current is not possible. Modbus registers only reporting, what I was writing via CAN before...

Got stuck! :cry:

Will try communication with second car (Renault Zoe R135 ZE50). But as this is known as charging bitch anyways, I'm not that confident.
Skibbie
Posts: 7
Joined: Wed Oct 16, 2024 10:05 pm

Re: Drawing power out of CCS port (V2x, inverse charging, bidirectional CCS)

Post by Skibbie »

Short Update:
I always get over PreCharging, even without Inverter. The Inverter doesn't even provide voltage. That might be the issue. I guess the Inverter is too slow. Would be interesting, if we could extend the PreCharging time, by very slowly increasing simulated voltage. At least 1min might be necessary...
I tried EVSEMaxVolt of 170V because I have such a DC supply available, but here the EV6 wont start charging. 400V was ok. Didn't tried anything between.
Now thinking of buying Meanwell CSP-3000-400 to supply 400V until the Inverter will take over and put current into the car, but it's quite expensive with high risk, thats not working and as I mainly want to draw current out of the car and I'm pretty sure, that this might only possible at full Battery voltage and not via EV6 internal DC DC converter.

BTW: I played so long with the car, that 12V Battery died. So Always remember to charge Battery externally while playing around. ;)
jrbe
Posts: 447
Joined: Mon Jul 03, 2023 3:17 pm
Location: CT, central shoreline, USA
Has thanked: 134 times
Been thanked: 122 times

Re: Drawing power out of CCS port (V2x, inverse charging, bidirectional CCS)

Post by jrbe »

Could you actually simulate pie charge with a small high voltage capacitor and a pre charge resistor? You could add a small bleed down resistor too.
lewurm
Posts: 10
Joined: Mon Jul 17, 2023 1:41 am
Has thanked: 18 times
Been thanked: 2 times

Re: Drawing power out of CCS port (V2x, inverse charging, bidirectional CCS)

Post by lewurm »

I managed to talk to a Tesla Model 3 2019 (EU). Alas it did not close the contactors, that is, I did not measure any voltage on the DC pins. pyPLC logs attached.

The car also has a "hidden" service menu, with information about the HV state. Apparently it opened the positive contact for precharging, but closed after a few seconds (~20?).
Screenshot 2024-11-08 at 22.49.41.png
Screenshot 2024-11-08 at 22.49.48.png
Although it says the "CCS Station" provides some voltage, I think it just shows what pyPLC answers it.

By the way, is this expected? Car sends this voltage via a PreChargeReq:

Code: Select all

"EVTargetVoltage.Value": "3550",
And pyPLC answers via a PreChargeRes

Code: Select all

"EVSEPresentVoltage.Value": "358",
why 3V more?


Up next I'm gonna try to provide a voltage somehow. I'm thinking about a step-up converter that charges a HV capacitor up... happy to hear some ideas on this front :)
Attachments
2024-11-08_204120_evse_tesla_model3_tcpdump.pcap.txt
(699.79 KiB) Downloaded 27 times
2024-11-08_204120_evse_tesla_model3_tcpdump.log
(548.2 KiB) Downloaded 20 times
User avatar
uhi22
Posts: 934
Joined: Mon Mar 14, 2022 3:20 pm
Location: Ingolstadt/Germany
Has thanked: 135 times
Been thanked: 529 times

Re: Drawing power out of CCS port (V2x, inverse charging, bidirectional CCS)

Post by uhi22 »

lewurm wrote: Fri Nov 08, 2024 10:00 pmwhy 3V more?
This is just playing around, basically the idea is to simulate a non-ideal world. A real world charger usually hits the target voltage nearly, but not completely. The simulated precharge changes the voltage in "big" steps of 5V:
https://github.com/uhi22/pyPLC/blob/829 ... se.py#L265
Also during currentDemand the pyPLC adds a random "error" of up to 3 volts: https://github.com/uhi22/pyPLC/blob/829 ... se.py#L345

Regarding the step-up converter to provide a real precharge voltage, a demo is available here: https://github.com/uhi22/stepup-test There are also some small and cheap adjustable step-up converters available from china, but I'm not sure whether the are well-controllable and how fast they can provide the voltage, e.g. on Amazon
lewurm
Posts: 10
Joined: Mon Jul 17, 2023 1:41 am
Has thanked: 18 times
Been thanked: 2 times

Re: Drawing power out of CCS port (V2x, inverse charging, bidirectional CCS)

Post by lewurm »

Thank you uhi22!

I indeed having some success here with this step-up converter: https://www.amazon.de/dp/ B07KG4RR74

I attached it to the 5V pin of the Raspberry Pi and adjusted it to output roughly 400V. When attaching the CCS plug it drops down to ~350V and the car was not happy with it. You could hear the contacters switching, but some welding warnings popped up.
Screenshot 2024-11-12 at 22.14.34.png
Then I adjusted it to 430V... and the car was happy with it :)
Screenshot 2024-11-12 at 22.18.03.png
There is light! Already for ~30min :-) Next tasks are to run some cables to the inverter in the basement (a Kostal Plenticore Plus G1), and put a precharge circuit between. The communication already works... hopefully I can do the first test run next weekend.
User avatar
uhi22
Posts: 934
Joined: Mon Mar 14, 2022 3:20 pm
Location: Ingolstadt/Germany
Has thanked: 135 times
Been thanked: 529 times

Re: Drawing power out of CCS port (V2x, inverse charging, bidirectional CCS)

Post by uhi22 »

Wow, great, congratulations :-) The information in the service screen are quite impressive. Hopefully the "welded contactor" is just a false alarm. How difficult is it to come to this screen? I guess the one or the the other guy would find this helpful.
User avatar
asavage
Posts: 368
Joined: Sat May 14, 2022 10:57 pm
Location: Oak Harbor, Washington, USA
Has thanked: 338 times
Been thanked: 115 times
Contact:

Re: Drawing power out of CCS port (V2x, inverse charging, bidirectional CCS)

Post by asavage »

Image

In case the FC contactor weld issue is not transitory . . .

IDK about the M3, but the FC contactors are very easy to access for replacement on the older Model S; inside the rear HVJB, under the back seat. 10 minute job. Lots of pictures in our Wiki.
Al Savage
2014 RAV4 EV
NissanDiesel
lewurm
Posts: 10
Joined: Mon Jul 17, 2023 1:41 am
Has thanked: 18 times
Been thanked: 2 times

Re: Drawing power out of CCS port (V2x, inverse charging, bidirectional CCS)

Post by lewurm »

uhi22 wrote: Tue Nov 12, 2024 11:03 pmHopefully the "welded contactor" is just a false alarm.
Yeah, I'm a bit worried about the nature of this. I didn't mention it in my previous post, but initially I just had the step-up converter on the DC +/- lines, and once the contacters closed I switched the flip on the light bulbs (with HV rated protection of course). So at the point of closing the contactors there wasn't any load connected.

After the first discharging session of around ~40min, I aborted and then tried to restart it, and failed with a BMS_a168_SW_FC_Full_Weld (alas I didn't capture the additional info box :-( ), and the car shut the HV system down. Additional errors popped up, like car is not drivable, HVAC not available, etc.
Screenshot 2024-11-13 at 21.04.37.png
Screenshot 2024-11-13 at 21.04.50.png
Screenshot 2024-11-13 at 21.05.08.png
Anyway, the surprisingly easy fix was to press the brake pedal and then the HV battery was back. And I also stopped at a supercharger today, and everything is fine with the fast charging contactors. Phew :)

So I would like to understand the nature of those welding warnings/errors. My hope is that the step-up converter outputs a rather ugly signal and that might interfere with the welding detection of the BMS? Does anyone know how welding detection is usually implemented?



--------------------------------------------------------
uhi22 wrote: Tue Nov 12, 2024 11:03 pmHow difficult is it to come to this screen? I guess the one or the the other guy would find this helpful.
Not difficult at all (in Europe at least?)
Screenshot 2024-11-13 at 20.56.00.png
From https://service.tesla.com/docs/Model3/S ... 78AB2.html
User avatar
uhi22
Posts: 934
Joined: Mon Mar 14, 2022 3:20 pm
Location: Ingolstadt/Germany
Has thanked: 135 times
Been thanked: 529 times

Re: Drawing power out of CCS port (V2x, inverse charging, bidirectional CCS)

Post by uhi22 »

Top, thanks.
If I would have the task to implement a welding detection, I would look in which states there should be no voltage on the CCS port at all. This is in the time *before* the car sends the CableCheck request and "after* it finished the CableCheck request, and *before* the PreCharging and *after* the WeldingDetection request. If the voltage on the CCS port is higher than let's say 10V in those states, I would treat this is error, because the contactors normally are perfectly isolating.
Now, if you connect your DCDC before the vehicle expects any voltage, it is a "natural" consequence that the car complains about "welded contactors". It just is not aware that somebody comes to the idea to connect an external voltage, and so it misinterprets the situation as "my contactors are bad".
I guess no real problem, and luckily it heals quite easy.

To do it the "clean way", we need a software controllable supply, which turns the voltage at the right moment to the right value, as pyPLC demands it.
lewurm
Posts: 10
Joined: Mon Jul 17, 2023 1:41 am
Has thanked: 18 times
Been thanked: 2 times

Re: Drawing power out of CCS port (V2x, inverse charging, bidirectional CCS)

Post by lewurm »

That makes perfect sense, thank you!

I'll try to hook up a relay that enables the step-up converter at the right time. It provides the voltage pretty quickly, so maybe that's good enough timing wise.
lewurm
Posts: 10
Joined: Mon Jul 17, 2023 1:41 am
Has thanked: 18 times
Been thanked: 2 times

Re: Drawing power out of CCS port (V2x, inverse charging, bidirectional CCS)

Post by lewurm »

Quick update: I attached the 5V power supply to a relay of the Raspberry Pi I'm using, and came up with this quick hack: https://gist.github.com/lewurm/e994ae4d ... 55e465ca61

So basically the step-up converter gets enabled on the first PreChargeReq. And indeed, that makes the situation much better, not a single welding warning today! Phew :-)

But: For PreChargeReq the requested voltage by the car is, I guess, the current voltage of the battery pack. SoC was 38%, and the requested voltage 352V. Once precharging is successful, the car sends a CurrentDemandReq with EVTargetVoltage of 423V (which also matches the EVMaximumVoltageLimit). I was able to tweak the step-up converter with its poti so that I reached a voltage that both requests have been happy with. Otherwise it could happen that either (1) precharging never succeeded, and the car aborted the communication after a few seconds, or (2) precharging was successful, the car starts to send CurrentDemandReq messages but aborts the charging quickly after a few seconds.

Later into the evening, the SoC was at 35% and 332V requested for precharging and I didn't manage to find a good sweetspot anymore. But anyway... it sounds like I really need something that I can control the voltage with precisely. Before I get into that, I'll try to do a "two staged" setup with the step-up converter: the first relay having a resistor inbetween so that its input voltage is a bit lower, and the second relay the regular 5V voltage directly from the power supply. So hopefully I can get good values once for PreChargeReq and then for CurrentDemandReq this way. FWIW the response time on the output of the step-up converter is pretty quick once voltage is applied on its input.

Another good news: I managed to see the correct voltage on the Web UI of my inverter (a Kostal Plenticore Plus) coming from the car! Alas I messed up pre-charging (I realized it too late that it actually precharged, aborted too early... tried again, but at that point the inverter already considered the battery as "deeply discharged"). I wanted to redo the experiment of course after restarting the inverter, but couldn't get pass CurrentDemandReq anymore. For another time :)
User avatar
johu
Site Admin
Posts: 6259
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 236 times
Been thanked: 1286 times
Contact:

Re: Drawing power out of CCS port (V2x, inverse charging, bidirectional CCS)

Post by johu »

Nice progress, have one of these converters coming as well :)

I started a table with happy cars here, please expand: https://openinverter.org/wiki/Bidirecti ... tible_cars
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
uhi22
Posts: 934
Joined: Mon Mar 14, 2022 3:20 pm
Location: Ingolstadt/Germany
Has thanked: 135 times
Been thanked: 529 times

Re: Drawing power out of CCS port (V2x, inverse charging, bidirectional CCS)

Post by uhi22 »

lewurm wrote: Sat Nov 16, 2024 11:11 pm But: For PreChargeReq the requested voltage by the car is, I guess, the current voltage of the battery pack. SoC was 38%, and the requested voltage 352V. Once precharging is successful, the car sends a CurrentDemandReq with EVTargetVoltage of 423V (which also matches the EVMaximumVoltageLimit). I was able to tweak the step-up converter with its poti so that I reached a voltage that both requests have been happy with. Otherwise it could happen that either (1) precharging never succeeded, and the car aborted the communication after a few seconds, or (2) precharging was successful, the car starts to send CurrentDemandReq messages but aborts the charging quickly after a few seconds.
Yes, the precharge target voltage is the actual voltage of the battery pack. The goal of the precharge is, that the contactors in the car close at the moment when they do not see much voltage (below 10V), and to reach this state, the battery voltage and the charger voltage need to be (nearly) equal.
The voltage request in the CurrentDemand has a different purpose. It avoids overcharging. So it is the max battery voltage, e.g. 4.2V * number of cells.

I would expect, that the voltage of your step-up converter does not matter as soon as the precharge is finished. Because at the end of the precharge, when the car sees that the voltage is close enough to the battery voltage, the car closes the contactors. At this moment, the voltage on the CCS inlet is equal to the battery voltage. No matter what the step-up converter want to provide, it has no chance to change the voltage. It could provide a certain current (I guess below 1mA), and I do not think that the car is able to measure the difference between 0mA and 1mA. So my conclusion is: The converters set-point does not matter at all after the precharge.
If the session stops during the currentDemand loop, we should have a look to the messages, so a pcap would be very helpful.
lewurm
Posts: 10
Joined: Mon Jul 17, 2023 1:41 am
Has thanked: 18 times
Been thanked: 2 times

Re: Drawing power out of CCS port (V2x, inverse charging, bidirectional CCS)

Post by lewurm »

uhi22 wrote: Sun Nov 17, 2024 9:20 pm I would expect, that the voltage of your step-up converter does not matter as soon as the precharge is finished.
That's what I initially tried, but it didn't work. I'm not sure anymore which is the right log for it... I'll redo the experiment and come back to you later this week.

My current workaround is to keep the SoC of the car high enough, then it works pretty reliable.

The next obstacle is my inverter (Kostal Plenticore Plus). The guys over the battery emulator discord have been very helpful, but I'm still not able to convince the inverter to start (dis)charge. Well, except for one accident: I disabled the battery setup in the Web UI of the inverter... and you must know that the battery inputs are the same as for a potential 3rd solar string. So the inverter happily considered the car battery as a solar string and started pulling with maximum current (13A).
Screenshot 2024-11-19 at 08.34.54.png
I let it sit like this for ~15min, the car didn't complain. So I'm calling that a partial success :)
Post Reply