BMW i3 CCS/charge port controller

Development and discussion of fast charging systems eg Chademo , CCS etc
tom91
Posts: 1248
Joined: Fri Mar 01, 2019 9:15 pm
Location: Bristol
Has thanked: 93 times
Been thanked: 190 times

Re: BMW i3 CCS/charge port controller

Post by tom91 »

christoph wrote: Thu Oct 27, 2022 11:04 am So to check this I have to measure if there's voltage between + <-> GND and - <-> GND. And that if the wire is live, obviously. It should be 0V. Is that correct? I don't want to kill myself, nor the multimeter, nor any car part :-o
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.
Founder Volt Influx https://www.voltinflux.com/
christoph
Posts: 39
Joined: Fri Sep 09, 2022 9:40 pm
Been thanked: 5 times

Re: BMW i3 CCS/charge port controller

Post by christoph »

tom91 wrote: Thu Oct 27, 2022 1:05 pm 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.
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: 1248
Joined: Fri Mar 01, 2019 9:15 pm
Location: Bristol
Has thanked: 93 times
Been thanked: 190 times

Re: BMW i3 CCS/charge port controller

Post by tom91 »

If you know you have issues with Chademo stations then this is most likely your issue.
Please obtain an isolation tester for better information.
Founder Volt Influx https://www.voltinflux.com/
christoph
Posts: 39
Joined: Fri Sep 09, 2022 9:40 pm
Been thanked: 5 times

Re: BMW i3 CCS/charge port controller

Post by christoph »

tom91 wrote: Thu Oct 27, 2022 3:43 pm If you know you have issues with Chademo stations then this is most likely your issue.
Please obtain an isolation tester for better information.
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: 1248
Joined: Fri Mar 01, 2019 9:15 pm
Location: Bristol
Has thanked: 93 times
Been thanked: 190 times

Re: BMW i3 CCS/charge port controller

Post by tom91 »

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.
So, who has say the Nissan Leaf uses the same threshold as the offboard charger?
Founder Volt Influx https://www.voltinflux.com/
christoph
Posts: 39
Joined: Fri Sep 09, 2022 9:40 pm
Been thanked: 5 times

Re: BMW i3 CCS/charge port controller

Post by christoph »

tom91 wrote: Thu Oct 27, 2022 4:44 pm So, who has say the Nissan Leaf uses the same threshold as the offboard charger?
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
Attachments
Screenshot_1.png
christoph
Posts: 39
Joined: Fri Sep 09, 2022 9:40 pm
Been thanked: 5 times

Re: BMW i3 CCS/charge port controller

Post by christoph »

tom91 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:

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;
            }
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.
That part is fixed: https://github.com/damienmaguire/Stm32-vcu/pull/32

For the other part I'll look into logs of a charger to figure out what exactly is happening together with one having access :-)
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: BMW i3 CCS/charge port controller

Post by Jack Bauer »

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
christoph
Posts: 39
Joined: Fri Sep 09, 2022 9:40 pm
Been thanked: 5 times

Re: BMW i3 CCS/charge port controller

Post by christoph »

Jack 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.
No problem. Thanks for looking at it :-)

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.
-> CCSI_Spnt is already 0 -> unsigned -> 255!

I guess I have some tests to do tomorrow.
christoph
Posts: 39
Joined: Fri Sep 09, 2022 9:40 pm
Been thanked: 5 times

Re: BMW i3 CCS/charge port controller

Post by christoph »

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!
Attachments
310091337_665545161584737_742968044061981562_n.jpg
christoph
Posts: 39
Joined: Fri Sep 09, 2022 9:40 pm
Been thanked: 5 times

Re: BMW i3 CCS/charge port controller

Post by christoph »

christoph wrote: Sat Oct 29, 2022 6:42 pm On Efacec it stops after some seconds of actual charging. But investigating... I made a log...
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);
 }
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: BMW i3 CCS/charge port controller

Post by Jack Bauer »

Nice work. I think that might be the first Leaf with opensource CCS :)
I'm going to need a hacksaw
tom91
Posts: 1248
Joined: Fri Mar 01, 2019 9:15 pm
Location: Bristol
Has thanked: 93 times
Been thanked: 190 times

Re: BMW i3 CCS/charge port controller

Post by tom91 »

Good to hear you finally got this figured out. Porting code can always result in strange behaviour occurring.
Founder Volt Influx https://www.voltinflux.com/
ginetto
Posts: 13
Joined: Tue Apr 07, 2020 7:29 am
Has thanked: 8 times
Been thanked: 3 times

Re: BMW i3 CCS/charge port controller

Post by ginetto »

christoph wrote: Sat Oct 29, 2022 6:42 pm 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!
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
christoph
Posts: 39
Joined: Fri Sep 09, 2022 9:40 pm
Been thanked: 5 times

Re: BMW i3 CCS/charge port controller

Post by christoph »

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.
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
Posts: 13
Joined: Tue Apr 07, 2020 7:29 am
Has thanked: 8 times
Been thanked: 3 times

Re: BMW i3 CCS/charge port controller

Post by ginetto »

christoph wrote: Wed Nov 02, 2022 9:28 am 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.
tnx christoph
Eltis
Posts: 38
Joined: Sat Oct 08, 2022 2:00 pm
Has thanked: 4 times

Re: BMW i3 CCS/charge port controller

Post by Eltis »

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.
User avatar
muehlpower
Posts: 570
Joined: Fri Oct 11, 2019 10:51 am
Location: Germany Fürstenfeldbruck
Has thanked: 12 times
Been thanked: 96 times

Re: BMW i3 CCS/charge port controller

Post by muehlpower »

If you didn't connect the voltage sensing line, it shows an error because it doesn't measure 0V on the charging port.
Eltis
Posts: 38
Joined: Sat Oct 08, 2022 2:00 pm
Has thanked: 4 times

Re: BMW i3 CCS/charge port controller

Post by Eltis »

I have this board connected. the seventh byte I'd 3b4 has the value 00.
tom91
Posts: 1248
Joined: Fri Mar 01, 2019 9:15 pm
Location: Bristol
Has thanked: 93 times
Been thanked: 190 times

Re: BMW i3 CCS/charge port controller

Post by tom91 »

Eltis wrote: Fri Nov 04, 2022 12:01 pm I have this board connected. the seventh byte I'd 3b4 has the value 00.
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.
Founder Volt Influx https://www.voltinflux.com/
Eltis
Posts: 38
Joined: Sat Oct 08, 2022 2:00 pm
Has thanked: 4 times

Re: BMW i3 CCS/charge port controller

Post by Eltis »

Thank you. I have lim 2014 USA.
User avatar
asavage
Posts: 327
Joined: Sat May 14, 2022 10:57 pm
Location: Oak Harbor, Washington, USA
Has thanked: 267 times
Been thanked: 103 times
Contact:

Re: BMW i3 CCS/charge port controller

Post by asavage »

Eltis wrote: Fri Nov 04, 2022 3:31 pm Thank you. I have lim 2014 USA.
...646?
https://openinverter.org/wiki/BMW_I3_Fa ... M_versions
Al Savage
2014 RAV4 EV
NissanDiesel
Eltis
Posts: 38
Joined: Sat Oct 08, 2022 2:00 pm
Has thanked: 4 times

Re: BMW i3 CCS/charge port controller

Post by Eltis »

asavage wrote: Fri Nov 04, 2022 10:20 pm ...646?
https://openinverter.org/wiki/BMW_I3_Fa ... M_versions
Yes
Eltis
Posts: 38
Joined: Sat Oct 08, 2022 2:00 pm
Has thanked: 4 times

Re: BMW i3 CCS/charge port controller

Post by Eltis »

tom91 wrote: Fri Nov 04, 2022 12:16 pm 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.
Thank you. Contactor error has disappeared)
m.art.y
Posts: 544
Joined: Sat Jun 06, 2020 6:54 pm
Location: UK
Has thanked: 24 times
Been thanked: 14 times

Re: BMW i3 CCS/charge port controller

Post by m.art.y »

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? 😊
Attachments
20221105_125842.jpg
Post Reply