That is your call to make if you are not confident in your understanding and ability, do not do any of this. You really need an proper isolation measurement device capable of applying up to 1000V across points.
BMW i3 CCS/charge port controller
- tom91
- Posts: 2296
- Joined: Fri Mar 01, 2019 9:15 pm
- Location: Bristol
- Has thanked: 199 times
- Been thanked: 524 times
Re: BMW i3 CCS/charge port controller
Re: BMW i3 CCS/charge port controller
Yeah, unfortunately I don't have that

I did now at least measure the resistance. On the inlet side of the contactors there's OL on the multimeter - tested from each contactor to GND. On the car side, i.e. battery, it's in the range of 8 MOhm to ground. For both. Should that be OL or can that still be normal?
Note that the battery connector is below the car and it was driven in wet conditions today. It's only protected by a skid plate with even som. holes... We actually had problems with a certain Chademo Quick Charger on such conditions.
I haven't tested the voltage between the battery terminals to GND when switched on. Only between the both contactors when the battery is on. And the polarity is correct.
- tom91
- Posts: 2296
- Joined: Fri Mar 01, 2019 9:15 pm
- Location: Bristol
- Has thanked: 199 times
- Been thanked: 524 times
Re: BMW i3 CCS/charge port controller
If you know you have issues with Chademo stations then this is most likely your issue.
Please obtain an isolation tester for better information.
Please obtain an isolation tester for better information.
Re: BMW i3 CCS/charge port controller
It's just one certain one on wet weather. Nothing else. We did not had these kind of problems the last days. But yeah, I get the idea. Dala from Dala's EV Repair, specialized on Nissan Leaf, told me the Check EV light should be turned on in the car if there's a ground error. That is not happening.
- tom91
- Posts: 2296
- Joined: Fri Mar 01, 2019 9:15 pm
- Location: Bristol
- Has thanked: 199 times
- Been thanked: 524 times
Re: BMW i3 CCS/charge port controller
So, who has say the Nissan Leaf uses the same threshold as the offboard charger?christoph wrote: ↑Thu Oct 27, 2022 3:49 pm It's just one certain one on wet weather. Nothing else. We did not had these kind of problems the last days. But yeah, I get the idea. Dala from Dala's EV Repair, specialized on Nissan Leaf, told me the Check EV light should be turned on in the car if there's a ground error. That is not happening.
Re: BMW i3 CCS/charge port controller
Well... I have charged with Chademo on the same charger.
But there's another thingy: I contacted the company operating the ABB charger. And they sent me the log of the charger. See attachment.
You can ignore the SR_VEHICLE_LOCK_ERROR, that day I had to put in the lock manually (hardware error, that's fixed in the meantime). And I wasn't always quick enough. You can even ignore the cases where I fought with the stupid payment system.
That means there's SR_CAUSE_UNDEFINED_ERROR / SR_VEHICLE_PROTOCOL_ERROR and SR_VEHICLE_NORMAL_STOP / SR_VEHICLE_STOP
This documents explains these strings (of course it doesn't help me a lot...). But there's a separate error for isolation error: SR_ISOLATION_TEST_FAILED
https://www.psta.net/media/5716/gillig- ... -price.pdf - p. 323
Re: BMW i3 CCS/charge port controller
That part is fixed: https://github.com/damienmaguire/Stm32-vcu/pull/32tom91 wrote: ↑Thu Oct 27, 2022 9:08 am You have 2 issues one is timing based and the other is isolation based. I have resolved both in my version of coding.
Timing:
I changed this to wait for the voltage to drop below 50V before proceeding, the decay of the voltage on the charge port depends on how the charger stages work and if they hard disconnect or not. The Can Log shows a very slow delay for the Efacec.Code: Select all
if(Cont_Volts==0)lim_stateCnt++; //we wait for the contactor voltage to return to 0 to indicate end of cable test if(lim_stateCnt>20) { if(CCS_Iso==0x1) lim_state++; //next state after 2 secs if we have valid iso test lim_stateCnt=0; }
For the other part I'll look into logs of a charger to figure out what exactly is happening together with one having access

- Jack Bauer
- Posts: 3639
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 9 times
- Been thanked: 280 times
- Contact:
Re: BMW i3 CCS/charge port controller
While I appreciate the contribution (more than you might imagine!) I'll hold off making any changes to the vcu firmware as I have not personally encountered this problem in almost a year of some very intensive CCS charging during a house move.
I'm going to need a hacksaw
Re: BMW i3 CCS/charge port controller
No problem. Thanks for looking at itJack Bauer wrote: ↑Fri Oct 28, 2022 6:18 pm While I appreciate the contribution (more than you might imagine!) I'll hold off making any changes to the vcu firmware as I have not personally encountered this problem in almost a year of some very intensive CCS charging during a house move.

In the meantime I'll try to solve my other problem. When playing with SavvyCAN I found out that FC_Current_Command skyrockets directly. I wonder why? It turns to 255 directly. Despite Param::CCS_ILim being set to 125 or even less.
Btw Param::CCS_ILim and Param::udc are the only parameters being set from the outside of the ones in i3LIMClass::CCS_Pwr_Con(). I don't see how it should becomen > CCS_ILim.
Edit: I cannot debug with live hardware atm. but Send100msMessages is called before Control_Charge and with that before the first call of CCS_Pwr_Con(). So apparently FC_Cur is 255. It should be set to 0 in state 5... well... ok... there's something odd going on. And I guess that might be related to the error I get.
Edit 2: Looks like I forgot to set Param::Voltspnt -> target voltage lower than current voltage
->
Code: Select all
if(Tmp_Vbatt>Tmp_Vbatt_Spnt)CCSI_Spnt--;//decrement if voltage equal to or greater than setpoint.
I guess I have some tests to do tomorrow.
Re: BMW i3 CCS/charge port controller
It works! On ABB chargers at least. Tested on two different ones.
On Efacec it stops after some seconds of actual charging. But investigating... I made a log...
Thanks everyone involved!
On Efacec it stops after some seconds of actual charging. But investigating... I made a log...
Thanks everyone involved!
Re: BMW i3 CCS/charge port controller
Looks like the algorithm in CCS_Pwr_Con thought it would be cool to ask for 126A despite I_Avail just 125.
That should fix it. Will test soon.
Code: Select all
@@ -808,6 +808,11 @@ void i3LIMClass::CCS_Pwr_Con() //here we control ccs charging during state 6.
if(Tmp_Vbatt>Tmp_Vbatt_Spnt)CCSI_Spnt--;//decrement if voltage equal to or greater than setpoint.
if(CCS_Ilim==0x1)CCSI_Spnt--;//decrement if current limit flag is set
if(CCS_Plim==0x1)CCSI_Spnt--;//decrement if Power limit flag is set
+
+ // force once more that we stay within our maximum bounds
+ if(CCSI_Spnt>=Tmp_ICCS_Avail)CCSI_Spnt=Tmp_ICCS_Avail; //never exceed available current
+ if(CCSI_Spnt>Tmp_ICCS_Lim)CCSI_Spnt=Tmp_ICCS_Lim; //clamp setpoint to current lim paramater.
+
Param::SetInt(Param::CCS_Ireq,CCSI_Spnt);
}
- Jack Bauer
- Posts: 3639
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 9 times
- Been thanked: 280 times
- Contact:
Re: BMW i3 CCS/charge port controller
Nice work. I think that might be the first Leaf with opensource CCS 

I'm going to need a hacksaw
- tom91
- Posts: 2296
- Joined: Fri Mar 01, 2019 9:15 pm
- Location: Bristol
- Has thanked: 199 times
- Been thanked: 524 times
Re: BMW i3 CCS/charge port controller
Good to hear you finally got this figured out. Porting code can always result in strange behaviour occurring.
Re: BMW i3 CCS/charge port controller
That's my next step after upgraded my 2016 leaf to 62kWh battery with Dala's firmware and can bridge.
I've already LIM module and contactors, I still need:
1) CCS plug
2) voltage sensor to trigger LIM
@christoph could you share schematic and sw you used to trigger carging? is it a legacy Nissan Leaf or with openinverter electronics? Please give here more details. Here in Spain started to install chargers without chademos at all.
cheers
Ginetto
Re: BMW i3 CCS/charge port controller
I't's a Legacy Nissan Leaf 2016 with battery upgraded to 40kWh. I'm currently working on simulating a Chademo charge. There will soon be a blog post on EVCreate (Lars') blog describing the project.ginetto wrote: ↑Tue Nov 01, 2022 3:18 pm That's my next step after upgraded my 2016 leaf to 62kWh battery with Dala's firmware and can bridge.
I've already LIM module and contactors, I still need:
1) CCS plug
2) voltage sensor to trigger LIM
@christoph could you share schematic and sw you used to trigger carging? is it a legacy Nissan Leaf or with openinverter electronics? Please give here more details. Here in Spain started to install chargers without chademos at all.
Re: BMW i3 CCS/charge port controller
Hello, I have the value 0x70 (71) in byte 2 of id272. What could be wrong? I want to use more powerful contactors, so I installed 15 ohm resistors instead of contactors.
- muehlpower
- Posts: 680
- Joined: Fri Oct 11, 2019 10:51 am
- Location: Germany Fürstenfeldbruck
- Has thanked: 14 times
- Been thanked: 133 times
Re: BMW i3 CCS/charge port controller
If you didn't connect the voltage sensing line, it shows an error because it doesn't measure 0V on the charging port.
Re: BMW i3 CCS/charge port controller
I have this board connected. the seventh byte I'd 3b4 has the value 00.
- tom91
- Posts: 2296
- Joined: Fri Mar 01, 2019 9:15 pm
- Location: Bristol
- Has thanked: 199 times
- Been thanked: 524 times
Re: BMW i3 CCS/charge port controller
Provide a capture if you need help. There are many things that can be an issue. you need to depending on the serial number you might need to run a contactor test as described in this thread and on the wiki page.
Re: BMW i3 CCS/charge port controller
Yesasavage wrote: ↑Fri Nov 04, 2022 10:20 pm ...646?
https://openinverter.org/wiki/BMW_I3_Fa ... M_versions
-
- Posts: 642
- Joined: Sat Jun 06, 2020 6:54 pm
- Location: UK/EU
- Has thanked: 35 times
- Been thanked: 32 times
Re: BMW i3 CCS/charge port controller
Hi guys, just wanted to ask if anybody used a Duosida CCS socket with a LIM and got it working? I read through the thread and a lock seems to be a must. By lock is it meant the Type2 socket lock on the top as in the photo? If so it is rather high profile has anybody seen any smaller versions of the lock? 