BMW LIM based CCS2 Controller

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

Post by muehlpower »

I like the German "Achtung! 400VDC", suitable for the BMW!
jon volk
Posts: 572
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut
Been thanked: 2 times

Re: BMW LIM based CCS2 Controller

Post by jon volk »

Ill post the files this weekend. Initial results seemed pretty good. Ill need to adjust some resistor values slightly, but we look pretty good. The output voltage reads a little higher resulting in about a HV measurement around 10vdc higher than actual. Insulation resistance test between HV loop and LV ground was 50 gigaohm at 500vdc which doesnt seem unreasonable. Havent tested any of the CAN stuff but theres no reason it shouldnt work.
Formerly 92 E30 BMW Cabrio with Tesla power
jon volk
Posts: 572
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut
Been thanked: 2 times

Re: BMW LIM based CCS2 Controller

Post by jon volk »

Kicad stuff https://github.com/jonvolk/DUAL_BMS_CCS

After some opamp vref tweaking Im content with the voltage sensing results. There appears to be a differential showing with no input connected and equal gain on the opamp which was the cause of my seeing 10v high or so. In the end this is where I ended up for voltage readings.

V Actual LIM Measured LIM Ideal V Ideal
393.3 4.08 4.08 393.17
270.5 3.263 3.25 271.95

No code uploaded yet, will add once I get to spend some more time working on things.

RGB led's are off PC13 so the GPIO needs to be banged on/off with DMA. No PWM niceties only to force myself to do things the harder way. :)
Attachments
STM_BMS.pdf
(175.76 KiB) Downloaded 251 times
Formerly 92 E30 BMW Cabrio with Tesla power
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 LIM based CCS2 Controller

Post by EV_Builder »

jon volk wrote: Sat Oct 16, 2021 9:34 pm Kicad stuff https://github.com/jonvolk/DUAL_BMS_CCS
Thank u for sharing :)
jon volk wrote: Sat Oct 16, 2021 9:34 pm After some opamp vref tweaking Im content with the voltage sensing results. There appears to be a differential showing with no input connected and equal gain on the opamp which was the cause of my seeing 10v high or so. In the end this is where I ended up for voltage readings.

V Actual LIM Measured LIM Ideal V Ideal
393.3 4.08 4.08 393.17
270.5 3.263 3.25 271.95
That's near perfect! :D
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 LIM based CCS2 Controller

Post by muehlpower »

bitterandreal wrote: Mon Oct 04, 2021 10:01 am
muehlpower wrote: Sat Oct 02, 2021 2:29 pm
EV_Builder wrote: Sat Oct 02, 2021 1:07 pm

Yeah; i agree the current VCU controller would be usable because it has 2 CAN interfaces. One for the LIM and one for the vehicle integration.
So that's covered.
In my setup there is a DUE that communicates with the LIM and my Tesla GEN3 charger via CAN 1. It also has the necessary 6 hardware lines for the charger and a simulation for the fuel filler flap for the LIM. It also queries the temperature at the CP and a button to cancel charging. The connection to the car, especially with the BMS, current sensor and cooling system is via CAN 0. This DUE is only in operation during charging, AC or DC, and also controls precharge and main contactors, which are switched by Damien's LDU board while driving.
I'm also planning to use a separate charge controller as a gateway between the vehicle CAN bus and the charging CAN bus.
CCS setup LIM_3-01.png
How is your DUE code comparable with Damien's LIM code for the zombieVerter? And is it open source?
Jon volk's hardware would also be a perfect fit to have the voltage measure board and contactor driver included.
muehlpower uses Arduino the zombieVerter VCU uses libopencm3 and Jon volk wants to use STM HAL/FreeRTOS.
What are your considerations to chose one HAL/ framework above the other?
My circuit diagram corresponds exactly to your graphic, with the exception that the drive inhibit comes from the charge controller and not from the LIM. The LIM has no output for this and it must also work with AC charging. I use my own code on the DUE for the LIM and the AC charger. I have no idea about Damien's zombiverter and the code that runs on it.
bitterandreal
Posts: 55
Joined: Fri Jan 15, 2021 2:30 pm
Location: Netherlands
Has thanked: 2 times

Re: BMW LIM based CCS2 Controller

Post by bitterandreal »

muehlpower wrote: Wed Oct 20, 2021 10:15 am
bitterandreal wrote: Mon Oct 04, 2021 10:01 am
muehlpower wrote: Sat Oct 02, 2021 2:29 pm

In my setup there is a DUE that communicates with the LIM and my Tesla GEN3 charger via CAN 1. It also has the necessary 6 hardware lines for the charger and a simulation for the fuel filler flap for the LIM. It also queries the temperature at the CP and a button to cancel charging. The connection to the car, especially with the BMS, current sensor and cooling system is via CAN 0. This DUE is only in operation during charging, AC or DC, and also controls precharge and main contactors, which are switched by Damien's LDU board while driving.
I'm also planning to use a separate charge controller as a gateway between the vehicle CAN bus and the charging CAN bus.
CCS setup LIM_3-01.png
How is your DUE code comparable with Damien's LIM code for the zombieVerter? And is it open source?
Jon volk's hardware would also be a perfect fit to have the voltage measure board and contactor driver included.
muehlpower uses Arduino the zombieVerter VCU uses libopencm3 and Jon volk wants to use STM HAL/FreeRTOS.
What are your considerations to chose one HAL/ framework above the other?
My circuit diagram corresponds exactly to your graphic, with the exception that the drive inhibit comes from the charge controller and not from the LIM. The LIM has no output for this and it must also work with AC charging. I use my own code on the DUE for the LIM and the AC charger. I have no idea about Damien's zombiverter and the code that runs on it.
Absolutely agree on this. Very important function.
I thought the LIM pin 1B-15 (CHARGE_E) was a drive interlock signal but will change it in the schematics and in the wiki if it is not.
brianbri6
Posts: 8
Joined: Fri Oct 29, 2021 2:28 pm

Re: BMW LIM based CCS2 Controller

Post by brianbri6 »

Is this board available to buy?
muehlpower wrote: Thu Jun 03, 2021 9:32 am The Contactors are controlled by PWM, as jou can see at the OSZi, so it would be fine to use contactors without economizer, like the original Tesla model 3.

The first prototypes for voltage measurement are ready. In the screenshoot "DC spannung am Stecker" compared to "Bat Spannung Akt." measured by the ISA shunt. It seems the LIM only works on voltages above 200V.


20210603_105600.jpgVolt det.png
alexbeatle
Posts: 141
Joined: Sun Jan 03, 2021 6:12 am
Has thanked: 40 times
Been thanked: 13 times

Re: BMW LIM based CCS2 Controller

Post by alexbeatle »

Have you had a chance to play more with this controller and the code?
jon volk
Posts: 572
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut
Been thanked: 2 times

Re: BMW LIM based CCS2 Controller

Post by jon volk »

Mine? Been working on the Volt BMS portion. Got that mostly working this weekend. Turning my attention to the CCS side soon.

EDIT: while not CCS, we do have flashy lighty stuff. Im sure that's equally useful :lol:

Formerly 92 E30 BMW Cabrio with Tesla power
jon volk
Posts: 572
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut
Been thanked: 2 times

Re: BMW LIM based CCS2 Controller

Post by jon volk »

Update for anyone following along. Been spending some time getting the dual Volt BMS portion implemented and I think I've got that all squared away. Need to do some more charge/discharge cycles to verify the balancing is working correctly.

I also need to do Rev2 of the board. I undersized the 5v LDO and the output current is OK at 12v, but nose dives when input voltage goes up to 14.5 with the dcdc on. That sends it into this spiraling doom of thermal protection.

Another thing Im going to try doing is getting rid of the HV board connection and getting that input off an ISA shunt over CAN. Ill then take that signal and PWM off the 5v voltage bus to output the correct voltage scaling to the LIM. This limits the amount of HV wiring and should give the LIM everything it needs.

I also upgraded to two to-247 package 15ohm resistors for the LIM contactor circuit. The smaller smt were warm but OK with the heat sink, the larger package and direct application of a heat sink should be a more robust solution.

Will upload the revised design and what I have for dual Volt BMS code. I started porting Damiens VCU LIM code over to ST HAL compatible C. Its not yet functional as I need to deal with the fixed point stuff and port the CAN RX handling..but it does compile which is a first step.

New layout. Open to feedback if my PWM voltage to the LIM is a stupid idea as well.
V2.JPG
Formerly 92 E30 BMW Cabrio with Tesla power
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 LIM based CCS2 Controller

Post by muehlpower »

You then need an extra ISA shunt, which must also be connected to the HV line. So it needs as much HV cabling as my solution. I put everything in the charger, so I don't need any external HV lines.

The two thick cables on the right go to the charge port, the two on the lower edge to the battery. The two little orange ones supply DC/DC, A/C compressor, battery and cabin heater.
20210719_190755.jpg
20210718_185909.jpg
Attachments
20210719_190809.jpg
User avatar
FJ3422
Posts: 113
Joined: Fri Jul 10, 2020 9:55 am
Location: Netherlands
Been thanked: 1 time

Re: BMW LIM based CCS2 Controller

Post by FJ3422 »

jon volk wrote: Fri Dec 03, 2021 5:33 pm ...Open to feedback if my PWM voltage to the LIM is a stupid idea as well....
Will that work ? If I understand correctly, the LIM uses the voltage measurement to verify the pre-charge voltage on the chargerside of the contactors to prevent contactor damage. So that is with the contactors opened. Are the voltage inputs of the ISAshunt not always referenced to the shunt-ground (that is at the battery-side of the charge-contactors) ?
jon volk
Posts: 572
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut
Been thanked: 2 times

Re: BMW LIM based CCS2 Controller

Post by jon volk »

So I should elaborate on my ISA shunt plan. I don't see a practical necessity for the ISA voltage when I have CAN reporting of the BMS. So it would just run the HV measurement off the CCS contactors to the ISA as Im 99.9% sure the current and voltage can be mutually exclusive. Everything is already planned to be in the same contactor box, so there's no external running of HV wires. But again, thats why Im asking for feedback.

If that wont work, Ill need to move to the next larger sized enclosure, which isnt deal breaker, but I like the compact size of this one.
Formerly 92 E30 BMW Cabrio with Tesla power
jon volk
Posts: 572
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut
Been thanked: 2 times

Re: BMW LIM based CCS2 Controller

Post by jon volk »

Disregard my ISA tangent. I made it all fit. Still need to do some routing and put the isolation cutouts back.
V2.JPG
Formerly 92 E30 BMW Cabrio with Tesla power
alexbeatle
Posts: 141
Joined: Sun Jan 03, 2021 6:12 am
Has thanked: 40 times
Been thanked: 13 times

Re: BMW LIM based CCS2 Controller

Post by alexbeatle »

jon volk wrote: Fri Dec 03, 2021 9:20 pm Disregard my ISA tangent. I made it all fit. Still need to do some routing and put the isolation cutouts back.

V2.JPG
Beauty! Any luck with the CCS charging?
jon volk
Posts: 572
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut
Been thanked: 2 times

Re: BMW LIM based CCS2 Controller

Post by jon volk »

alexbeatle wrote: Mon Jan 03, 2022 1:29 am
jon volk wrote: Fri Dec 03, 2021 9:20 pm Disregard my ISA tangent. I made it all fit. Still need to do some routing and put the isolation cutouts back.

V2.JPG
Beauty! Any luck with the CCS charging?
Still working on my updated contactor box. Christmas put the brakes on that temporarily.
Formerly 92 E30 BMW Cabrio with Tesla power
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 LIM based CCS2 Controller

Post by EV_Builder »

Hi Jon,
Curious to know if you got CCS working with the LIM?
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
jon volk
Posts: 572
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut
Been thanked: 2 times

Re: BMW LIM based CCS2 Controller

Post by jon volk »

No, zero time to work on it lately. Still havent finished designing the new contactor box even though its at like 90% done.
Formerly 92 E30 BMW Cabrio with Tesla power
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 LIM based CCS2 Controller

Post by EV_Builder »

Ok txs for the update
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
User avatar
asavage
Posts: 328
Joined: Sat May 14, 2022 10:57 pm
Location: Oak Harbor, Washington, USA
Has thanked: 269 times
Been thanked: 103 times
Contact:

Re: BMW LIM based CCS2 Controller

Post by asavage »

As it was determined around a week after the last post in this thread that the LIM's 4B-5 U_HV_DC requires a current proportional to the charge port's HVDC lines, and not a proportional voltage, did that trigger scrapping both jon volk's and muehlpower's voltage sense board projects?

Or, is anybody working on a current-output voltage sense board?

A project I'm contemplating -- adding CCS1 to an existing older Tesla-based EV that uses early Tesla Model S components -- only needs to interface the LIM with an existing Tesla Gen1 OBC and BMS. jon volk's STM32F413-based voltage sense LIM interface, combined with the existing STM32F107 codebase that Damien's opensourced for us, leads me to the idea that I could port the LIM parts of the ZombieVerter code from the F107 to the F413, and also from libopencm3 to STM32F4 HAL (or, possibly, the other direction).

This project visualization only works if there's an actual board that does the HV->LIM interface. That interface is available from Lars & Joost (EVCreate), and I can hitch that to a ZombieVerter and an ISA and call it a day, but if jon volk's work has progressed (or will progress), that board looks like a better fit for this one project.
Al Savage
2014 RAV4 EV
NissanDiesel
jon volk
Posts: 572
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut
Been thanked: 2 times

Re: BMW LIM based CCS2 Controller

Post by jon volk »

I finally have some HV connectors en route to start in the new contactor box. Hopefully once that’s together I can get back to some progress. The board has been running my Volt BMS slaves for the past couple months without issue so that’s at least a win.
Formerly 92 E30 BMW Cabrio with Tesla power
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 LIM based CCS2 Controller

Post by muehlpower »

asavage wrote: Sun Jun 19, 2022 12:14 am As it was determined around a week after the last post in this thread that the LIM's 4B-5 U_HV_DC requires a current proportional to the charge port's HVDC lines, and not a proportional voltage, did that trigger scrapping both jon volk's and muehlpower's voltage sense board projects?

Or, is anybody working on a current-output voltage sense board?

A project I'm contemplating -- adding CCS1 to an existing older Tesla-based EV that uses early Tesla Model S components -- only needs to interface the LIM with an existing Tesla Gen1 OBC and BMS. jon volk's STM32F413-based voltage sense LIM interface, combined with the existing STM32F107 codebase that Damien's opensourced for us, leads me to the idea that I could port the LIM parts of the ZombieVerter code from the F107 to the F413, and also from libopencm3 to STM32F4 HAL (or, possibly, the other direction).

This project visualization only works if there's an actual board that does the HV->LIM interface. That interface is available from Lars & Joost (EVCreate), and I can hitch that to a ZombieVerter and an ISA and call it a day, but if jon volk's work has progressed (or will progress), that board looks like a better fit for this one project.
It doesn't matter if the signal is voltage or current based. In the LIM, it becomes a voltage signal anyway thanks to a pull-down resistor. My boards transmit the correct value to the LIM, which can be easily checked using the CAN output.
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 LIM based CCS2 Controller

Post by EV_Builder »

muehlpower wrote: Wed Jun 22, 2022 7:58 am It doesn't matter if the signal is voltage or current based. In the LIM, it becomes a voltage signal anyway thanks to a pull-down resistor. My boards transmit the correct value to the LIM, which can be easily checked using the CAN output.
Image

8-)
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
alexbeatle
Posts: 141
Joined: Sun Jan 03, 2021 6:12 am
Has thanked: 40 times
Been thanked: 13 times

Re: BMW LIM based CCS2 Controller

Post by alexbeatle »

jon volk wrote: Wed Jun 22, 2022 2:25 am I finally have some HV connectors en route to start in the new contactor box. Hopefully once that’s together I can get back to some progress. The board has been running my Volt BMS slaves for the past couple months without issue so that’s at least a win.
On the subject of the contactors. I'm trying to understand. Does the LIM economise the HV contactors?
The wiki says that TE 2138011-1 are used by the BWM i3, and 2138011-1 require an external economiser.
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 LIM based CCS2 Controller

Post by EV_Builder »

Yes; LIM economises the coils. It also wants to see 15ohm coil resistance.
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
Post Reply