BMW LIM based CCS2 Controller
- muehlpower
- Posts: 577
- Joined: Fri Oct 11, 2019 10:51 am
- Location: Germany Fürstenfeldbruck
- Has thanked: 12 times
- Been thanked: 103 times
Re: BMW LIM based CCS2 Controller
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
Re: BMW LIM based CCS2 Controller
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.
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 282 times
Formerly 92 E30 BMW Cabrio with Tesla power
- 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
Thank u for sharing
That's near perfect!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
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
see http://www.wdrautomatisering.nl for bespoke BMS modules.
- muehlpower
- Posts: 577
- Joined: Fri Oct 11, 2019 10:51 am
- Location: Germany Fürstenfeldbruck
- Has thanked: 12 times
- Been thanked: 103 times
Re: BMW LIM based CCS2 Controller
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 wrote: ↑Mon Oct 04, 2021 10:01 amI'm also planning to use a separate charge controller as a gateway between the vehicle CAN bus and the charging CAN bus.muehlpower wrote: ↑Sat Oct 02, 2021 2:29 pmIn 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.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.
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?
-
- Posts: 55
- Joined: Fri Jan 15, 2021 2:30 pm
- Location: Netherlands
- Has thanked: 2 times
Re: BMW LIM based CCS2 Controller
Absolutely agree on this. Very important function.muehlpower wrote: ↑Wed Oct 20, 2021 10:15 amMy 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 wrote: ↑Mon Oct 04, 2021 10:01 amI'm also planning to use a separate charge controller as a gateway between the vehicle CAN bus and the charging CAN bus.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.
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?
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
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
-
- Posts: 162
- Joined: Sun Jan 03, 2021 6:12 am
- Has thanked: 48 times
- Been thanked: 17 times
Re: BMW LIM based CCS2 Controller
Have you had a chance to play more with this controller and the code?
Re: BMW LIM based CCS2 Controller
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
EDIT: while not CCS, we do have flashy lighty stuff. Im sure that's equally useful
Formerly 92 E30 BMW Cabrio with Tesla power
Re: BMW LIM based CCS2 Controller
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.
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.
Formerly 92 E30 BMW Cabrio with Tesla power
- muehlpower
- Posts: 577
- Joined: Fri Oct 11, 2019 10:51 am
- Location: Germany Fürstenfeldbruck
- Has thanked: 12 times
- Been thanked: 103 times
Re: BMW LIM based CCS2 Controller
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.
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.
Re: BMW LIM based CCS2 Controller
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
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.
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
Re: BMW LIM based CCS2 Controller
Disregard my ISA tangent. I made it all fit. Still need to do some routing and put the isolation cutouts back.
Formerly 92 E30 BMW Cabrio with Tesla power
-
- Posts: 162
- Joined: Sun Jan 03, 2021 6:12 am
- Has thanked: 48 times
- Been thanked: 17 times
Re: BMW LIM based CCS2 Controller
Still working on my updated contactor box. Christmas put the brakes on that temporarily.
Formerly 92 E30 BMW Cabrio with Tesla power
- 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
Hi Jon,
Curious to know if you got CCS working with the LIM?
Curious to know if you got CCS working with the LIM?
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
see http://www.wdrautomatisering.nl for bespoke BMS modules.
Re: BMW LIM based CCS2 Controller
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
- 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
Ok txs for the update
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
see http://www.wdrautomatisering.nl for bespoke BMS modules.
- asavage
- Posts: 339
- Joined: Sat May 14, 2022 10:57 pm
- Location: Oak Harbor, Washington, USA
- Has thanked: 286 times
- Been thanked: 106 times
- Contact:
Re: BMW LIM based CCS2 Controller
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.
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
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
- muehlpower
- Posts: 577
- Joined: Fri Oct 11, 2019 10:51 am
- Location: Germany Fürstenfeldbruck
- Has thanked: 12 times
- Been thanked: 103 times
Re: BMW LIM based CCS2 Controller
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.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.
- 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
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.
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
see http://www.wdrautomatisering.nl for bespoke BMS modules.
-
- Posts: 162
- Joined: Sun Jan 03, 2021 6:12 am
- Has thanked: 48 times
- Been thanked: 17 times
Re: BMW LIM based CCS2 Controller
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.
- 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
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.
see http://www.wdrautomatisering.nl for bespoke BMS modules.