BMW i3 CCS/charge port controller

Development and discussion of fast charging systems eg Chademo , CCS etc
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 »

So today's exciting episode of can we charge at Ionity. Decided I wanted to rule out the possibility of a connection problem at the charge socket so threw my Hyundai port in the back of the car and wired PE,CP and PP to the LIM. No difference at all. While I was there decided to screw with it a bit and while it was sitting there telling me about charging will commence when power is available I pulled the cp wire and started flicking the ends together. Next thing the station bursts into life, my pilot goes to Ready and we go into cable test. I got such a fright that I dropped the cp wires and of course we shut down instantly. Try as I might I could not get it to do this again but did get a very informative message on the screen at one point telling me about lack of power despite there being no other stations in use.

What I cannot fathom here is the logic behind this message. What logic tree in the station is making it think there is not enough power available when we don't even have plc comms up.

Did a cold start of the LIM just in case. No different.

Authentication before inserting the cable results in our now famous message the second the plug hits the socket.

Not sure if I mentioned this before but a month or two ago I tried to use one of these ABB stations and got the same message:
https://chargingshop.eu/product/abb-ter ... g-station/

Finally an ID3 pulled in and the owner let me test my rfid using his car and of course it worked perfectly.
Attachments
2021-11-05 13.21.49.jpg
2021-11-05 13.01.44.jpg
I'm going to need a hacksaw
User avatar
CCSknowitall
Posts: 105
Joined: Fri Jun 04, 2021 1:47 pm
Has thanked: 1 time
Been thanked: 28 times

Re: BMW i3 CCS/charge port controller

Post by CCSknowitall »

The "famous message" is a bug in ABB stations. I think the logic is, since the station hasn't hit charge parameter discovery (which occurs long after SLAC - they are not equivalent, bitterandreal), the station doesn't know how much power to allocate the vehicle. It's silly. ABB is... not great communicating issues to drivers via the screen.

At ABB stations (and many others) you actually don't need to authenticate *at all* in order to set up CCS communications. The station will present 5% PWM right away and get the process started. This is required for Plug and Charge with ISO 15118 so any station that supports that is going to do the same. So technically you don't have to authenticate at all to test this issue you are having. You'll just sit in the contract authentication phase until you authenticate. This phase is just a ping pong to keep the connection going while the user fumbles for their RFID card or credit card. I'm not sure if the LIM alerts you to this state, hopefully it does. If I ever get access to an i3 again I have a way to test how long the LIM will allow waiting in contract authentication before timing out. Most others are around 2-3 minutes. After authenticating, the process continues with charge parameter discovery, cable check, power delivery, then the current loop (actually charging).

Other stations tend to just show 9V with no PWM until you authenticate, then send the 5% duty cycle once you've authenticated. I suspect the LIM is operating just fine with those.

So, lets recap:
ABB sends 5% PWM right after plugging in (might be a good idea to try a logging scope, if you have one, to see the bit of time before 5% starts, you should see steady 9V for a short bit of time).
LIM is not sending PLC packets to start the SLAC process.
ABB times out after what is probably 30 seconds of sending 5% duty cycle. Please ignore the text of the status about no power available and just trust me that it's just unhappy about not setting up PLC.
You made some progress in discovering that disconnecting the pilot and reapplying it figuratively kicked the LIMs butt into starting the SLAC process.

Gotta be something in the startup routine of the LIM that is somehow unhappy, I think. :) Keep looking...
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 »

Ok that is starting to make sense. I threw up those clips on youtube and got a few potentially useful comments that I'll copy here just to keep all in one place :

i found out that the original i3 is sending different
can messages to the LIM at different charging stations.
maybe this tip helps you finding the problem…
i am very sure that ABB and ionity was different on the CAN Bus.

I am New Zealand,s LDV / Maxius manager- a few years ago we had the same issue with delta brand of ccs chargers- spent weeks getting it sorted - ended up being software level on delta chargers not matching out vehicles. Delta Korean changed there software and then on all there chargers in nz - now it’s all good ( hope this info helps)
I'm going to need a hacksaw
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 »

Ok so went back at the can logs and something rather obvious jumped out : Message 0x112 from the bms is always live and showing the hv system punched up and ready in the i3 before even opening the cp door. In the E46 I use the plug detect feature in the LIM to wake the car and thus populate 0x112 with real battery data. So in my car the LIM is looking at a disconnected HV pack until plug is inserted and pwm is detected whereas in the i3 its all ready to go. Off I went to Ionity land. With HV on BEFORE plugging in things get a little interesting. No more timeouts! I went for a nice 5 minute walk and sure enough when I get back we are still receiving pwm from the station. Now of course when I authenticate the famous message of course pops up.

So I get some tea in the service station and start making some mods to the state machine so that it waits for actual events before moving on and will now move back to state 0 if pilot goes static. Over to Efacec. With HV off before plug insert Mr.Efacec not happy. With HV on before plug insert Mr.Efacec very happy.

More coding and we now wake the car on opening the cp door. On Efacec I can now do the plug / card swipe / app dance anyway I like and it just works. Plug in swipe or swipe and plug in its all good. Even if I let the Pilot time out to static and re authenticate it picks up and away we go.

Over to Mr.Ionity. Plug in, swipe, "charging will commence blah blah", pilot to static. Reswipe, pilot wakes up, "Initialising" pops up on screen pilot goes ready, I'm about to jump out of my skin and then pilot to static and ... yeah you guessed it! "charging will commence blah blah"

Now thing is this is totally repeatable and we are getting a burst of pilot ready so I think it might be time to break out the logic analyser and get some pcaps.

So closer but still no cigar.
I'm going to need a hacksaw
bitterandreal
Posts: 55
Joined: Fri Jan 15, 2021 2:30 pm
Location: Netherlands
Has thanked: 2 times

Re: BMW i3 CCS/charge port controller

Post by bitterandreal »

Nice work! I'm happy there is some progress on this.
Which version of the LIM are you using at the moment?
Sure the station supports DIN 70121 as well and it should work with all LIM's.
But it might be an idea to test a newer version to see if there is a different behaviour.
The Ionity logs came from a 2019 i3 which probably work slightly different...
User avatar
CCSknowitall
Posts: 105
Joined: Fri Jun 04, 2021 1:47 pm
Has thanked: 1 time
Been thanked: 28 times

Re: BMW i3 CCS/charge port controller

Post by CCSknowitall »

Sweet! More progress. Yes, PCAPs would be tremendously helpful.

As far as different behavior with a 2019 LIM, it is possible that the newer LIM is offering ISO 15118 but it’s up to the station to decide which protocol it wants to speak. I don’t know if Ionity has configured their ABB stations to use ISO 15118 if the vehicle has not requested TLS (required for plug-and-charge). I suspect their ABB stations are set up to pick DIN 70121 if the vehicle doesn’t request TLS, but that is “educated speculation” on my part. ;)
bitterandreal
Posts: 55
Joined: Fri Jan 15, 2021 2:30 pm
Location: Netherlands
Has thanked: 2 times

Re: BMW i3 CCS/charge port controller

Post by bitterandreal »

CCSknowitall wrote: Sat Nov 06, 2021 9:16 pm As far as different behavior with a 2019 LIM, it is possible that the newer LIM is offering ISO 15118 but it’s up to the station to decide which protocol it wants to speak…
Sure the PLC communication could be different between a 2014 and a 2019 LIM, that part we don’t have direct control over.
But the CAN communication to the car could be slightly different too and we compare the messages with a 2019 i3 which probably runs a newer VCU and LIM firmware.
Maybe the 2014 LIM had problems with ABB stations and they could fix it with a VCU update but later they addressed it directly in the LIM so the CAN communication could stay the same with all chargers. (Just a wild guess!)
If we would use the same LIM version as the CAN logs come from we could exclude this causing the error…
User avatar
CCSknowitall
Posts: 105
Joined: Fri Jun 04, 2021 1:47 pm
Has thanked: 1 time
Been thanked: 28 times

Re: BMW i3 CCS/charge port controller

Post by CCSknowitall »

bitterandreal wrote: Sun Nov 07, 2021 3:58 pm But the CAN communication to the car could be slightly different too and we compare the messages with a 2019 i3 which probably runs a newer VCU and LIM firmware.
One way to see if this is true is to follow the part numbers and see if you needed to order a LIM for a vehicle for say a 2014, what part is current? Then see what years are compatible with that part. Do the same for 2015, 2016... all the way up through 2020.

Taking my own advice here, looking at bmwpartsdeal.com for the LIM, it appears for the part number 61-35-9-454-319 is good for BMW i3 model years 2014-2020, meaning there is likely minimal CAN side differences, hopefully? I suppose a 2014 could get a software update for the VCU when the new LIM is coded... Someone could spend the $30 for a 24h access to https://www.bmwtis.com/#/login to see if a VCU update is required. No guarantees of course, but if say a 2014 doesn't require one when installing this new part, the CAN commands are likely the same.

Also stumbled upon a slightly useful resource: https://cdn.jack.sh/2014/08/06_I01-High ... onents.pdf
Looks to be a training manual for the i3. Others can be found here.. The above goes into some detail on the LIM, but probably nothing earth shattering. Some stuff would have helped a few months ago though (like which CAN bus the LIM is suppose to be on). :lol:

Also in the Wiki -
The limits for pre 2017/26 (Week 26 of 2017) are 0V-500V 0A-250A, post 2017/27 (Week 27 of 2017) 0V-1000V -500A-+500A. This probably indicates when they moved from DIN 70121 only to ISO 15118.
While it could mean that time is the changeover to supporting ISO 15118, DIN does support 0-1,000V (at least communication wise, CCS is suppose to be 200V minimum), +500A. The reality is that V2G DC via CCS is still in draft form. If we get some PCAPs of some running sessions with the newer LIM, even if the station doesn't speak CCS, I can see if the LIM is offering to speak ISO 15118.
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 »

Got some Saleae logic traces from today's adventure :
https://github.com/damienmaguire/BMW-i3 ... Caps/Part4

Sadly I'm struggling with trying to convert them to pcap so hopefully Dave can help.

So we have 3 Efacec captures. 2 fails at starting and one short complete cycle.

ionity_fail1 = no attempt at auth just plug in and let it log. No data exchange between cpu and QCA7000.

ionity_preauth = I do the app dance on the phone and wait for the screen to say "Setting up vehicle communication" before plugging in.

ionity_rfid = plug in, stab at the totally unresponsive screen until my fingers bleed in order to get it to request the rfid tag.

In all Ionity cases we end up with the usual message. I gotta say the touchscreen on these stations is about as responsive as a Commodore 64 used for bitcoin mining.
I'm going to need a hacksaw
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 »

annnd thanks to Dave Pcaps are now on the repo:)
I'm going to need a hacksaw
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 »

One last thing of note from today is a timing analysis on some of the LIM command messages such as 0x2fa that sets the phases of the ccs sequence. Seems my favorite automaker like to pump this and other messages out real fast during CCS startup (as low as 80ms in some cases) and then drop back to a sedate 1s interval during power transfer. Good few other LIM control messages behave that way. Of course idiot here has been sending them out nice and slow at all times ...
I'm going to need a hacksaw
User avatar
CCSknowitall
Posts: 105
Joined: Fri Jun 04, 2021 1:47 pm
Has thanked: 1 time
Been thanked: 28 times

Re: BMW i3 CCS/charge port controller

Post by CCSknowitall »

My analysis

ef_fail1 - station closes the connection during contractAuthentication. You don't appear to be doing anything wrong.
ef_fail2 - same thing as above
ef_success1 - The log starts at cable check, so I miss the setup messages. In precharge, the last precharge message you jump to 402V as your target voltage. I know that there's some shared input values so this is probably just a slight timing issue. You start out at 0A in current demand request, I would try to start at 1, some stations don't like seeing 0 amps unless you want to shut down. This is pretty quick though (0.3s) so you shouldn't have too big of an issue. You also keep requesting current for about a second (10 request-response ping pongs) after the station says EVSE Shutdown. You should probably react faster than that. There's probably a flag or something coming from the LIM that isn't mapped yet.

ionity_preauth and ionity_rfid have no high level packets so I can't analyze. For preauth it looks like you're starting SLAC but it is not complete. I will have to look into this in more detail.
User avatar
EV_Builder
Posts: 1199
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands
Has thanked: 16 times
Been thanked: 33 times
Contact:

Re: BMW i3 CCS/charge port controller

Post by EV_Builder »

Damien can you send me links too 2 canlogs working and non working? I have a nice log comparator and wanna try it for you.

One of the things I fear is that we are asking for 500amps instead of let's say 10amps for a split second just after init.
Then the power message makes sense. I see in your video that CCS_I is quite high, in the web GUI, for a split second on commence.

Maybe as a test fixate that value too 10Amp and check?
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
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 »

In this log we get to contactor close request but fail there as I had the contactors wired wrong but setup worked fine :
https://github.com/damienmaguire/BMW-i3 ... ionity.csv

In this log we don't get any setup :
https://github.com/damienmaguire/BMW-i3 ... _e461.2csv
I'm going to need a hacksaw
User avatar
CCSknowitall
Posts: 105
Joined: Fri Jun 04, 2021 1:47 pm
Has thanked: 1 time
Been thanked: 28 times

Re: BMW i3 CCS/charge port controller

Post by CCSknowitall »

EV_Builder wrote: Tue Nov 09, 2021 9:38 am One of the things I fear is that we are asking for 500amps instead of let's say 10amps for a split second just after init.
I don’t see that in the PLC data.

The 6553 for CCS_I looks suspiciously like 65535 which is FFFF in hex, it could be that on the can bus CCS current is two bytes and scaled 1/10, and this program just truncates it. Also CCS_I appears to be the actual current to the vehicle from the station, but this value is probably invalid at other stages. The requested current shown on screen (CCS_Irequest) matches the PLC logs, and is never going to 500A. Also if you were to ask for 500A from a station that says it can do a max of say 125A, the station will likely fault pretty quickly (at least proper stations should, I suppose they could just go to their max amps).

For ionity (really ABB high power, network doesn’t usually matter) the setup is failing at essentially the communications setup phase, known as SLAC. Unless the pilot is toggled after connecting. Then it all works? :?
User avatar
EV_Builder
Posts: 1199
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands
Has thanked: 16 times
Been thanked: 33 times
Contact:

Re: BMW i3 CCS/charge port controller

Post by EV_Builder »

Ok, my bad.
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
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 »

Yeah Ionity /ABB and the 50kw ABB and I suspect the Delta high power charger I visited once all give the impression of failing at SLAC. I did find some silly mistakes with CAN timings in the VCU software which are corrected now and I'll give it another go on thursday but my hopes are not high. I am working a few channels to try and get access to the evse side data during a charge attempt to see what is going on. That said I'm fairly sure that the root cause is in what I'm doing with the software side. I Just don't know enough about state machines etc to do it right. Its just weird that quite a few work but ABB / Delta do not. There is a new motorway service station opened with 350kw Efacec stations so will try and get there sometime soon.
I'm going to need a hacksaw
User avatar
EV_Builder
Posts: 1199
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands
Has thanked: 16 times
Been thanked: 33 times
Contact:

Re: BMW i3 CCS/charge port controller

Post by EV_Builder »

Jack Bauer wrote: Tue Nov 09, 2021 10:44 am In this log we get to contactor close request but fail there as I had the contactors wired wrong but setup worked fine :
https://github.com/damienmaguire/BMW-i3 ... ionity.csv

In this log we don't get any setup :
https://github.com/damienmaguire/BMW-i3 ... _e461.2csv
Results_3B4.JPG
Results_to_end.JPG
ok now if there are checksums point me to where there are because the tool (if i load a definition) can compensate for that.
some messages are hot because they are completely different.

White means no difference between left and right.
Red means different [ (Amount of messages with that id) How many are unique compared to other side! ]
Green means unique id on one side only found.

The tool only compares raw messages so not the order of appearance //timing. But if there is stuff different we can try to find out why.
So i would start with the LIM messages for example.

If you give me in a small list the LIM numbers i can make a definition. The names then appear in the tool.
If we have counter bytes and or CRC bytes it eliminates those differences too.

Let me know if this makes sense.
Then i can show you the results of some numbers.
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
User avatar
EV_Builder
Posts: 1199
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands
Has thanked: 16 times
Been thanked: 33 times
Contact:

Re: BMW i3 CCS/charge port controller

Post by EV_Builder »

CCS_3B4.JPG
3B4 is it possible that its status from the LIM?
In my car / project i think it was a status / warning from the MCU too.

If you see the right side: a good/working session on the right only has 6 Messages and one is different to the left.
But the left side kinda has 139 of them and 134 are not present on the right.

(Ignore the dark green line, it's the light one what is unique on the right side).
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
User avatar
EV_Builder
Posts: 1199
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands
Has thanked: 16 times
Been thanked: 33 times
Contact:

Re: BMW i3 CCS/charge port controller

Post by EV_Builder »

Coudn't resist and looked it up:

WIKI: 0x3B4 EVSE info CP, PP & inlet voltage LIM

I bet we don't wanna see F4 and don't wanna see BD and 9 and a counter?

I need to check if the order of MSG's in the list is the order in the logfile , first appearance, but i think it is.
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
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 »

EV_Builder wrote: Tue Nov 09, 2021 8:05 pm Coudn't resist and looked it up:

WIKI: 0x3B4 EVSE info CP, PP & inlet voltage LIM

I bet we don't wanna see F4 and don't wanna see BD and 9 and a counter?

I need to check if the order of MSG's in the list is the order in the logfile , first appearance, but i think it is.


"F4" means charging flap unlocked, plug locked, no Cademo data.
"9" means charging with CCS2 via the DC pins.
"BC" means 5% pilot, no chademo plugged in, charging cable plugged in during the last parking process!
bitterandreal
Posts: 55
Joined: Fri Jan 15, 2021 2:30 pm
Location: Netherlands
Has thanked: 2 times

Re: BMW i3 CCS/charge port controller

Post by bitterandreal »

EV_Builder wrote: Tue Nov 09, 2021 8:05 pm Coudn't resist and looked it up:

WIKI: 0x3B4 EVSE info CP, PP & inlet voltage LIM

I bet we don't wanna see F4 and don't wanna see BD and 9 and a counter?

I need to check if the order of MSG's in the list is the order in the logfile , first appearance, but i think it is.
These messages are in the DBC file. You can use SavvyCAN to decode the LOG with the LIM DBC.
https://github.com/damienmaguire/BMW-i3 ... M_dbc1.dbc
brianbri6
Posts: 8
Joined: Fri Oct 29, 2021 2:28 pm

Re: BMW i3 CCS/charge port controller

Post by brianbri6 »

Hi everyone I've been watching development for a bit. I would like to know if this module is DC fast charging capable.
Attachments
Screenshot_20211110-154631_eBay.jpg
bitterandreal
Posts: 55
Joined: Fri Jan 15, 2021 2:30 pm
Location: Netherlands
Has thanked: 2 times

Re: BMW i3 CCS/charge port controller

Post by bitterandreal »

brianbri6 wrote: Wed Nov 10, 2021 8:48 pm Hi everyone I've been watching development for a bit. I would like to know if this module is DC fast charging capable.
Read the wiki first…
https://openinverter.org/wiki/BMW_I3_Fa ... LIM_Module
brianbri6
Posts: 8
Joined: Fri Oct 29, 2021 2:28 pm

Re: BMW i3 CCS/charge port controller

Post by brianbri6 »

Yes I've seen the wiki before but I'm wondering because it has AC_DCC instead of AC_DCO is that for chademo?
bitterandreal wrote: Wed Nov 10, 2021 9:57 pm
brianbri6 wrote: Wed Nov 10, 2021 8:48 pm Hi everyone I've been watching development for a bit. I would like to know if this module is DC fast charging capable.
Read the wiki first…
https://openinverter.org/wiki/BMW_I3_Fa ... LIM_Module
Post Reply