Tesla charger (GEN3) AC current control over CAN?

Topics concerning the Tesla front and rear drive unit drop-in board
Post Reply
nathaniel
Posts: 92
Joined: Thu Jun 09, 2022 10:17 am
Been thanked: 42 times

Tesla charger (GEN3) AC current control over CAN?

Post by nathaniel »

hi,
i'm running the Tesla charger STM32 firmware on the v5 board in the GEN3 charger, using the PP and CP pins of the v5 board and i control the charger via CAN 0x102 message. all is working perfect, but now i want to control the AC current via CAN. i'm planning to use the BMW LIM and i get the AC limit via that. but via the 0x102 message i can only control the total DC current. i know i can calculate the theoretical AC current through calculating and control the DC current, but i don't know if there is 1 or 3 phase supplied via the EVSE so that is not a solution.
as far is i know the custom CAN messages are not working in the Tesla charger STM32 firmware so a can not map a custom message to a CAN message, or am I wrong and does this work?
I could possibly generate a PWM signal and put it on the cp pin, but I don't think that's such an elegant solution. would prefer to be able to control it via CAN.
As a last option I could read the tesla modules messages themselves to see which and how many phases come from the EVSE and then calculate the DC current based on that, but that also sounds also a bit awkward.

Do you have an idea how best to approach this?

Thanks for contributing ideas!
User avatar
johu
Site Admin
Posts: 5769
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1010 times
Contact:

Re: Tesla charger (GEN3) AC current control over CAN?

Post by johu »

In the latest firmware I brought back the custom CAN mapping.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
nathaniel
Posts: 92
Joined: Thu Jun 09, 2022 10:17 am
Been thanked: 42 times

Re: Tesla charger (GEN3) AC current control over CAN?

Post by nathaniel »

Ooh nice! I will give that I try later today. Thx I also wanted the temperature, I guess custom tx is also working then?
nathaniel
Posts: 92
Joined: Thu Jun 09, 2022 10:17 am
Been thanked: 42 times

Re: Tesla charger (GEN3) AC current control over CAN?

Post by nathaniel »

I'm having a bit of trouble finding the .bin of the latest version. currently i'm running the version 1.17.R that was from before you open source it. i don't know if that is the last version. but on your git there is the source code but a can not find the .bin, do i need to build my own? because I don't have a compiler set up for this at the moment and to be honest i'm having a little trouble doing that.
on the current version i can set the aclim with a custom can and it is responding a little bit but also not quite. values are only jumping between 0 and what i have set in iaclim. also when i refresh the page the custom mapping is not showed. any idea?
i can control the charger via can with the standard 0x102 message. since there is still space in that message, is it possible to add in aclin by default?
nathaniel
Posts: 92
Joined: Thu Jun 09, 2022 10:17 am
Been thanked: 42 times

Re: Tesla charger (GEN3) AC current control over CAN?

Post by nathaniel »

DONE! it works, uploaded new bootloader and program with the stlink and now i can control the iaclim on the first byte on 0x103 scale 1.
strange thing was that i needed to do a full chip erase before the new program works, and i mean the firmware runs but with the old CAN settings. maybe the can settings are stored in the part of the flash ware the settings are stored? i added a line of code in the chargencan.cpp. i tried to put the value on place 56 in the 0x102 message but that was not working, maybe to much things in one message?
anyway it works now and i'm happy! can control the AC current now via CAN.
for those how also want this i put the .hex and .bin in the attachment. these firmware is based on the 1.17R
stm32_charger.bin
(23.39 KiB) Downloaded 35 times
stm32_charger.hex
(65.83 KiB) Downloaded 39 times
Post Reply