Page 4 of 5

Re: BMW LIM based CCS2 Controller

Posted: Mon Oct 11, 2021 7:08 pm
by muehlpower
I like the German "Achtung! 400VDC", suitable for the BMW!

Re: BMW LIM based CCS2 Controller

Posted: Thu Oct 14, 2021 7:38 pm
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.

Re: BMW LIM based CCS2 Controller

Posted: Sat Oct 16, 2021 9:34 pm
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. :)

Re: BMW LIM based CCS2 Controller

Posted: Sun Oct 17, 2021 1:26 pm
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

Re: BMW LIM based CCS2 Controller

Posted: Wed Oct 20, 2021 10:15 am
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.

Re: BMW LIM based CCS2 Controller

Posted: Thu Oct 21, 2021 9:35 am
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.

Re: BMW LIM based CCS2 Controller

Posted: Fri Nov 05, 2021 10:11 pm
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

Re: BMW LIM based CCS2 Controller

Posted: Sun Nov 14, 2021 7:39 pm
by alexbeatle
Have you had a chance to play more with this controller and the code?

Re: BMW LIM based CCS2 Controller

Posted: Mon Nov 15, 2021 2:52 am
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:


Re: BMW LIM based CCS2 Controller

Posted: Fri Dec 03, 2021 5:33 pm
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

Re: BMW LIM based CCS2 Controller

Posted: Fri Dec 03, 2021 6:47 pm
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

Re: BMW LIM based CCS2 Controller

Posted: Fri Dec 03, 2021 7:08 pm
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) ?

Re: BMW LIM based CCS2 Controller

Posted: Fri Dec 03, 2021 7:18 pm
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.

Re: BMW LIM based CCS2 Controller

Posted: Fri Dec 03, 2021 9:20 pm
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

Re: BMW LIM based CCS2 Controller

Posted: Mon Jan 03, 2022 1:29 am
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?

Re: BMW LIM based CCS2 Controller

Posted: Mon Jan 03, 2022 1:32 am
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.

Re: BMW LIM based CCS2 Controller

Posted: Wed May 11, 2022 9:28 am
by EV_Builder
Hi Jon,
Curious to know if you got CCS working with the LIM?

Re: BMW LIM based CCS2 Controller

Posted: Fri May 13, 2022 7:25 pm
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.

Re: BMW LIM based CCS2 Controller

Posted: Fri May 13, 2022 7:30 pm
by EV_Builder
Ok txs for the update

Re: BMW LIM based CCS2 Controller

Posted: Sun Jun 19, 2022 12:14 am
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.

Re: BMW LIM based CCS2 Controller

Posted: Wed Jun 22, 2022 2:25 am
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.

Re: BMW LIM based CCS2 Controller

Posted: Wed Jun 22, 2022 7:58 am
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.

Re: BMW LIM based CCS2 Controller

Posted: Wed Jun 22, 2022 9:36 am
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-)

Re: BMW LIM based CCS2 Controller

Posted: Wed Jun 22, 2022 5:51 pm
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.

Re: BMW LIM based CCS2 Controller

Posted: Wed Jun 22, 2022 6:12 pm
by EV_Builder
Yes; LIM economises the coils. It also wants to see 15ohm coil resistance.