Open source CCS using AR7420
- CCSknowitall
- Posts: 106
- Joined: Fri Jun 04, 2021 1:47 pm
- Has thanked: 1 time
- Been thanked: 29 times
Re: Open source CCS using AR7420
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?
- uhi22
- Posts: 1091
- Joined: Mon Mar 14, 2022 3:20 pm
- Location: Ingolstadt/Germany
- Has thanked: 193 times
- Been thanked: 607 times
Re: Open source CCS using AR7420
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.
Github: http://github.com/uhi22 --- Patreon: https://www.patreon.com/uhi22
- johu
- Site Admin
- Posts: 6640
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 347 times
- Been thanked: 1496 times
- Contact:
Re: Open source CCS using AR7420
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
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
- uhi22
- Posts: 1091
- Joined: Mon Mar 14, 2022 3:20 pm
- Location: Ingolstadt/Germany
- Has thanked: 193 times
- Been thanked: 607 times
Re: Open source CCS using AR7420
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.
Github: http://github.com/uhi22 --- Patreon: https://www.patreon.com/uhi22
- johu
- Site Admin
- Posts: 6640
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 347 times
- Been thanked: 1496 times
- Contact:
Re: Open source CCS using AR7420
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
- uhi22
- Posts: 1091
- Joined: Mon Mar 14, 2022 3:20 pm
- Location: Ingolstadt/Germany
- Has thanked: 193 times
- Been thanked: 607 times
Re: Open source CCS using AR7420
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")
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")
Github: http://github.com/uhi22 --- Patreon: https://www.patreon.com/uhi22
- johu
- Site Admin
- Posts: 6640
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 347 times
- Been thanked: 1496 times
- Contact:
Re: Open source CCS using AR7420
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.
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 435 times
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- celeron55
- Posts: 803
- Joined: Thu Jul 04, 2019 3:04 pm
- Location: Finland
- Has thanked: 38 times
- Been thanked: 135 times
- Contact:
Re: Open source CCS using AR7420
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.
- uhi22
- Posts: 1091
- Joined: Mon Mar 14, 2022 3:20 pm
- Location: Ingolstadt/Germany
- Has thanked: 193 times
- Been thanked: 607 times
Re: Open source CCS using AR7420
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.


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.
Github: http://github.com/uhi22 --- Patreon: https://www.patreon.com/uhi22
- johu
- Site Admin
- Posts: 6640
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 347 times
- Been thanked: 1496 times
- Contact:
Re: Open source CCS using AR7420
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

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 394 times
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- uhi22
- Posts: 1091
- Joined: Mon Mar 14, 2022 3:20 pm
- Location: Ingolstadt/Germany
- Has thanked: 193 times
- Been thanked: 607 times
Re: Open source CCS using AR7420
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.
"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.
Github: http://github.com/uhi22 --- Patreon: https://www.patreon.com/uhi22
- celeron55
- Posts: 803
- Joined: Thu Jul 04, 2019 3:04 pm
- Location: Finland
- Has thanked: 38 times
- Been thanked: 135 times
- Contact:
Re: Open source CCS using AR7420
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.
- johu
- Site Admin
- Posts: 6640
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 347 times
- Been thanked: 1496 times
- Contact:
Re: Open source CCS using AR7420
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
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 370 times
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- johu
- Site Admin
- Posts: 6640
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 347 times
- Been thanked: 1496 times
- Contact:
Re: Open source CCS using AR7420
Early forum release:
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- Bigpie
- Posts: 1759
- Joined: Wed Apr 10, 2019 8:11 pm
- Location: South Yorkshire, UK
- Has thanked: 80 times
- Been thanked: 419 times
Re: Open source CCS using AR7420
Any plans to just change the socket over instead of the idea of carrying an adaptor? Cool that it works though.
BMW E91 2006
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
- johu
- Site Admin
- Posts: 6640
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 347 times
- Been thanked: 1496 times
- Contact:
Re: Open source CCS using AR7420
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.
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
-
- Posts: 43
- Joined: Sun Nov 14, 2021 6:16 pm
- Has thanked: 1 time
- Been thanked: 2 times
Re: Open source CCS using AR7420
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.
Exciting times. Make the i3 lim i bought a bit redundant now.
- dimonlipko
- Posts: 45
- Joined: Thu Apr 02, 2020 9:28 pm
- Location: Ukraine, Kiev
- Has thanked: 6 times
- Been thanked: 9 times
- Contact:
Re: Open source CCS using AR7420
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.
- johu
- Site Admin
- Posts: 6640
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 347 times
- Been thanked: 1496 times
- Contact:
Re: Open source CCS using AR7420
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.
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.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- uhi22
- Posts: 1091
- Joined: Mon Mar 14, 2022 3:20 pm
- Location: Ingolstadt/Germany
- Has thanked: 193 times
- Been thanked: 607 times
Re: Open source CCS using AR7420
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.
Github: http://github.com/uhi22 --- Patreon: https://www.patreon.com/uhi22
- muehlpower
- Posts: 681
- Joined: Fri Oct 11, 2019 10:51 am
- Location: Germany Fürstenfeldbruck
- Has thanked: 14 times
- Been thanked: 134 times
Re: Open source CCS using AR7420
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
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
- johu
- Site Admin
- Posts: 6640
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 347 times
- Been thanked: 1496 times
- Contact:
Re: Open source CCS using AR7420
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.
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
- asavage
- Posts: 371
- Joined: Sat May 14, 2022 10:57 pm
- Location: Oak Harbor, Washington, USA
- Has thanked: 356 times
- Been thanked: 117 times
- Contact:
Re: Open source CCS using AR7420
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).
I have a IVT-S, but it seems overkill for the task (and they're quite expensive).
- johu
- Site Admin
- Posts: 6640
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 347 times
- Been thanked: 1496 times
- Contact:
Re: Open source CCS using AR7420
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.
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 1134 times
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- uhi22
- Posts: 1091
- Joined: Mon Mar 14, 2022 3:20 pm
- Location: Ingolstadt/Germany
- Has thanked: 193 times
- Been thanked: 607 times
Re: Open source CCS using AR7420
That's at least a good test for the safe shutdown sequence
Happy second-contactor-installation 


Github: http://github.com/uhi22 --- Patreon: https://www.patreon.com/uhi22