BMW LIM based CCS2 Controller

Development and discussion of fast charging systems eg Chademo , CCS etc
muehlpower
Posts: 259
Joined: Fri Oct 11, 2019 10:51 am
Location: Germany Fürstenfeldbruck

Re: BMW LIM based CCS2 Controller

Post by muehlpower »

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

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.
92 E30 BMW Cabrio with Tesla power
jon volk
Posts: 506
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut

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 49 times
92 E30 BMW Cabrio with Tesla power
User avatar
EV_Builder
Posts: 539
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands

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
muehlpower
Posts: 259
Joined: Fri Oct 11, 2019 10:51 am
Location: Germany Fürstenfeldbruck

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: 41
Joined: Fri Jan 15, 2021 2:30 pm
Location: Netherlands

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: 6
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: 40
Joined: Sun Jan 03, 2021 6:12 am

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: 506
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut

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:

92 E30 BMW Cabrio with Tesla power
jon volk
Posts: 506
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut

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
92 E30 BMW Cabrio with Tesla power
muehlpower
Posts: 259
Joined: Fri Oct 11, 2019 10:51 am
Location: Germany Fürstenfeldbruck

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: 104
Joined: Fri Jul 10, 2020 9:55 am
Location: Netherlands

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: 506
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut

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.
92 E30 BMW Cabrio with Tesla power
jon volk
Posts: 506
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut

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
92 E30 BMW Cabrio with Tesla power
alexbeatle
Posts: 40
Joined: Sun Jan 03, 2021 6:12 am

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: 506
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut

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.
92 E30 BMW Cabrio with Tesla power
Post Reply