Open source CCS using AR7420

Development and discussion of fast charging systems eg Chademo , CCS etc
User avatar
CCSknowitall
Posts: 105
Joined: Fri Jun 04, 2021 1:47 pm
Has thanked: 1 time
Been thanked: 28 times

Re: Open source CCS using AR7420

Post by CCSknowitall »

Curious to know if you guys think this python implementation would work on something even lower end than a raspberry pi zero? How much ram does it take up when running?
User avatar
uhi22
Posts: 669
Joined: Mon Mar 14, 2022 3:20 pm
Location: Ingolstadt/Germany
Has thanked: 94 times
Been thanked: 434 times

Re: Open source CCS using AR7420

Post by uhi22 »

The linux "top" shows ~41 MBytes VIRT when running pyPlc including the tk GUI in PEV mode. Without the GUI, using pevNoGui.py, it is 22MBytes. This is a surprising amount, most of it eaten by the Python environment itself, not by the actual code, I guess. When looking to a more compact variant, I went to a pure C / C++, this runs on ESP32, and needs much less. It's here: https://github.com/uhi22/ccs32, but is from functionality point of view still some steps behind the pyPLC.
User avatar
johu
Site Admin
Posts: 5869
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 170 times
Been thanked: 1082 times
Contact:

Re: Open source CCS using AR7420

Post by johu »

Just started working on the CHAdeMO backend.
I have done a little hack: when non-specified protocol version "10" is reported stm32-car will include the battery voltage in 0x100 message in the first two bytes.
Some things are still to be determined: how do I access the charger parameters, like maximum current/voltage and momentary current/voltage from hardwareInterfaces.py?

I've drafted a PR
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
uhi22
Posts: 669
Joined: Mon Mar 14, 2022 3:20 pm
Location: Ingolstadt/Germany
Has thanked: 94 times
Been thanked: 434 times

Re: Open source CCS using AR7420

Post by uhi22 »

I think the fsmPev.py can use get and set functions of the hardwareinterface, similar to self.hardwareInterface.getAccuVoltage(). I'll have a look this evening.
User avatar
johu
Site Admin
Posts: 5869
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 170 times
Been thanked: 1082 times
Contact:

Re: Open source CCS using AR7420

Post by johu »

Yes, probably in stateFunctionWaitForChargeParameterDiscoveryResponse() I should be able to access all the info, right? Just don't know how
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
uhi22
Posts: 669
Joined: Mon Mar 14, 2022 3:20 pm
Location: Ingolstadt/Germany
Has thanked: 94 times
Been thanked: 434 times

Re: Open source CCS using AR7420

Post by uhi22 »

Some functions below, there is the following example, which can be taken as basis for the extensions. It takes the decoder result (json string), loads it into variable y, and tries to extract some data.
y = json.loads(strConverterResult)
strResponseCode = y["ResponseCode"]
strEVSEPresentVoltageValue = y["EVSEPresentVoltage.Value"]
strEVSEPresentVoltageMultiplier = y["EVSEPresentVoltage.Multiplier"]
u = combineValueAndMultiplier(strEVSEPresentVoltageValue, strEVSEPresentVoltageMultiplier)
self.callbackShowStatus(format(u,".1f"), "EVSEPresentVoltage")
User avatar
johu
Site Admin
Posts: 5869
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 170 times
Been thanked: 1082 times
Contact:

Re: Open source CCS using AR7420

Post by johu »

These logs are a charging attempt on a Compleo charger using a CCS to Chademo converter. It is one of many attempts and it seemed to behave the same way every time. The CCS on the charger was tested to work on the EVPrevia prior to these attempts. (yes, celeron55 is here. In fact I'm typing this. -celeron55)

When monitored externally, it appears the precharge completes and then the current peaks at around 20A. Then the current stops, but the session continues.
Attachments
2023-06-20_143755_compleo_chademo_converter.zip
(55.2 KiB) Downloaded 69 times
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
celeron55
Posts: 780
Joined: Thu Jul 04, 2019 3:04 pm
Location: Finland
Has thanked: 29 times
Been thanked: 111 times
Contact:

Re: Open source CCS using AR7420

Post by celeron55 »

Found the problem. The maximum voltage was sent wrong based on the configured value 270V. We fixed the code to send the value gotten from chademo and it charges now as proven by a multi minute test session. There are some remaining questions about how to handle the maximums reported by the charger.
User avatar
uhi22
Posts: 669
Joined: Mon Mar 14, 2022 3:20 pm
Location: Ingolstadt/Germany
Has thanked: 94 times
Been thanked: 434 times

Re: Open source CCS using AR7420

Post by uhi22 »

Great, congratulations :-) Hope you can enjoy the hot german summer :-)
The maximums reported by the charger do not really matter from my understanding. They are just information, to understand why the charge power is like it is, even if the car requests more power. The only interesting thing is to check the minimum and maximum voltage, to find out, whether the car is compatible to the chargers. But most chargers will report something like 200V to 500V, and the most accus will fit to this. Maybe for some special setups, which need below 200V, its more interesting, because some chargers report min voltage of 200V, others 150V.
Basically the car can just request the voltage and current which is suitable from BMS point of view. The charger will either provide this, or have its own limits, which it told us in the chargeParameterDiscoveryResponse. The minimum wins.
User avatar
johu
Site Admin
Posts: 5869
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 170 times
Been thanked: 1082 times
Contact:

Re: Open source CCS using AR7420

Post by johu »

Yes nice hacking session and yes it was really hot and the charger was in the sun :)
We drove also to a Tesla SC where the Previa charged but the CHAdeMO adapter did not. Will attach the logs later, they are down in the car. Then went to a HyperCharger (what brand is it?) and there I could charge flawlessly. Mind you, 70A was a bit much for my aluminium tubes, it was quite hot after 3 minutes ;)

EDIT: attached log from failed SC session
Attachments
2023-06-20_161648_pevNoGui.zip
(15.41 KiB) Downloaded 79 times
1687292417279.jpg
1687292209270.jpg
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
uhi22
Posts: 669
Joined: Mon Mar 14, 2022 3:20 pm
Location: Ingolstadt/Germany
Has thanked: 94 times
Been thanked: 434 times

Re: Open source CCS using AR7420

Post by uhi22 »

The supercharger made an emergency shutdown during cable check:
"DC_EVSEStatus.EVSEStatusCode": "5",
"EVSEStatusCode_text": "EVSE_EmergencyShutdown"
At the moment I have no idea why. There are a lot of options, e.g. stateC signalization lost, or isolation fault detected, or just a format- or timing issue. I think we need further tests for the superchargers.
User avatar
celeron55
Posts: 780
Joined: Thu Jul 04, 2019 3:04 pm
Location: Finland
Has thanked: 29 times
Been thanked: 111 times
Contact:

Re: Open source CCS using AR7420

Post by celeron55 »

It is notable that the Previa is still using ancient pyPLC. I cannot risk attempting any updates while 2500km from home. So an update could have broken Tesla SC support.
User avatar
johu
Site Admin
Posts: 5869
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 170 times
Been thanked: 1082 times
Contact:

Re: Open source CCS using AR7420

Post by johu »

Did another session at the Compleo charger with the latest commit and now and nicely charged at its maximum of 66A (per my clamp meter) and 24.2 kW per charger display. Video coming.
Latest idea is to temporarily rig up the CCS set in Audi for transporting it the 400 km over to its owner. Should be fun :)
Attachments
2023-06-20_171224_compleo.zip
(143.9 KiB) Downloaded 60 times
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
johu
Site Admin
Posts: 5869
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 170 times
Been thanked: 1082 times
Contact:

Re: Open source CCS using AR7420

Post by johu »

Early forum release:
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Bigpie
Posts: 1602
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 75 times
Been thanked: 313 times

Re: Open source CCS using AR7420

Post by Bigpie »

Any plans to just change the socket over instead of the idea of carrying an adaptor? Cool that it works though.
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
User avatar
johu
Site Admin
Posts: 5869
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 170 times
Been thanked: 1082 times
Contact:

Re: Open source CCS using AR7420

Post by johu »

Thought about it, I might - provided it physically fits in the fuel filler place. I think when I finally obtained some ID3 batteries I should tackle this to take advantage of the 100 kW charge power.
I might even take advantage of the modem/logic split, place the modem in the wheel well and the logic in the fuel pump service hole.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
whereswally606
Posts: 43
Joined: Sun Nov 14, 2021 6:16 pm
Has thanked: 1 time
Been thanked: 2 times

Re: Open source CCS using AR7420

Post by whereswally606 »

This feels like a belated 40th birthday present. Amazing progress Johannes and yuhi and celeron. Very eager to see the esp32 variant of this for my env200. Gonna be working on an esp32 bridge to replicate the solar export matching of the ovms and homeassistant. If i could get that and ccs and the 40kwh battery swap correction firmwares running off the same esp32 that would be the trifector.

Exciting times. Make the i3 lim i bought a bit redundant now.
User avatar
dimonlipko
Posts: 21
Joined: Thu Apr 02, 2020 9:28 pm
Location: Ukraine, Kiev
Been thanked: 5 times
Contact:

Re: Open source CCS using AR7420

Post by dimonlipko »

Really cool project, thanks johu, celeron, and other) Now i start to work on CCS too. In future I want make driver for STM32F105 and use CAN BUS for implement in Renault ZOE, Kangoo, Fluence.
User avatar
johu
Site Admin
Posts: 5869
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 170 times
Been thanked: 1082 times
Contact:

Re: Open source CCS using AR7420

Post by johu »

Just learned some lessons.
Got a new set of two adapters. Plugged some both in to confirm they power up and measured the voltages on the power supply pins.

Then snipped off the power supply and supplied the two pins to the left of the RJ45 port with 3.3V as I had measured. Nothing happened. So moved over to the set of 4 pins and supplied 3.3V to the one as marked. Current draw but no LED light up. Also supplied 5V to the pin where I'd measured 10V but that didn't change anything.

It seems the two pins to the right are feedback pins to the power supply. I must have shot something when I supplied voltage there. Indeed on the second board when I power the set of four with 3.3V I see 3.15V on the two pins on the left.
The previous board was structured differently, taking 3.3V on the left two pins and 5V on the set of 4.

Then went to upgrading and patching. I though lets just use pev.pib from last time but then found it also contains the devices MAC address. No problem, just patched the one read earlier and all is good now.
Attachments
1687872158568.jpg
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
uhi22
Posts: 669
Joined: Mon Mar 14, 2022 3:20 pm
Location: Ingolstadt/Germany
Has thanked: 94 times
Been thanked: 434 times

Re: Open source CCS using AR7420

Post by uhi22 »

I could not believe, but yes: Even if the boards look very similar, there are different pinnings of the "connectors". Just confirmed with two of my setups here. Very dangerous. So the conclusions are: Always first measure, before cutting too much. And maybe it is easier to keep the PCBs together, to include the 3.3V regulator. In my setups I supply only 5V, and the 3.3 is generated with the original circuit.
User avatar
muehlpower
Posts: 585
Joined: Fri Oct 11, 2019 10:51 am
Location: Germany Fürstenfeldbruck
Has thanked: 12 times
Been thanked: 106 times

Re: Open source CCS using AR7420

Post by muehlpower »

I don't understand what you're doing there. Does this look like what you want to build?
https://www.codico.com/en/white-beet-po ... d-firmware
It has a QCA 7005 chip and an STM32F745 controller and the matching 1:1:1 transformer

There's also this:
https://www.codico.com/en/red-beet-p-pev-module
and that:
https://www.codico.com/en/yellow-beet-p-1-1-pev-module
User avatar
johu
Site Admin
Posts: 5869
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 170 times
Been thanked: 1082 times
Contact:

Re: Open source CCS using AR7420

Post by johu »

They are quite reasonably priced indeed.
Depends on uhi. If it's feasible to port the software to the STM32F7 the white beet would be best integrated.
But since a base board is needed anyway we could as well go for red/yellow beet and the ESP32. It seems the yellow beet just adds the transformer, right?

The entry barrier with consumer PLC modems and single board computers is just way lower right now.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
asavage
Posts: 345
Joined: Sat May 14, 2022 10:57 pm
Location: Oak Harbor, Washington, USA
Has thanked: 300 times
Been thanked: 110 times
Contact:

Re: Open source CCS using AR7420

Post by asavage »

What device are folks using to perform the physical HV measurement on the vehicle? Or is everybody using the EVSE's reported value?

I have a IVT-S, but it seems overkill for the task (and they're quite expensive).
Al Savage
2014 RAV4 EV
NissanDiesel
User avatar
johu
Site Admin
Posts: 5869
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 170 times
Been thanked: 1082 times
Contact:

Re: Open source CCS using AR7420

Post by johu »

Rigged up a CCS port in Audi, it will be handy when we bring the car over to its owner, 400 km away. Not fun with 100 km range and 4 kW AC charging.

Wasn't too successful, CableCheck fails. Probably because in my infinite wisdom I found one charge port relay on the positive is sufficient. Of course there is some leakage between GND and B- (measures udc/2) and the charger seems unhappy about it.
Attachments
2023-06-29 log1.txt
(28.14 KiB) Downloaded 53 times
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
uhi22
Posts: 669
Joined: Mon Mar 14, 2022 3:20 pm
Location: Ingolstadt/Germany
Has thanked: 94 times
Been thanked: 434 times

Re: Open source CCS using AR7420

Post by uhi22 »

That's at least a good test for the safe shutdown sequence ;-) Happy second-contactor-installation :-)
Post Reply