Tesla Charger alternative firmware
- janosch
- Posts: 328
- Joined: Tue Jun 30, 2020 9:23 am
- Location: London, UK
- Has thanked: 98 times
- Been thanked: 102 times
- Contact:
Re: Tesla Charger alternative firmware
It seems that if udcspnt > udclim then udclim is ignored?
I had the following settings:
udcspnt: 403000 mV
udclim: 385V
And found my pack charged to 390V where I unplugged it.
Bug or feature? Let me know and I can update the wiki either way.
I had the following settings:
udcspnt: 403000 mV
udclim: 385V
And found my pack charged to 390V where I unplugged it.
Bug or feature? Let me know and I can update the wiki either way.
- johu
- Site Admin
- Posts: 6619
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 344 times
- Been thanked: 1485 times
- Contact:
Re: Tesla Charger alternative firmware
Certainly shouldn't be that way. Strange, as I had tested that. What are your other settings?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- janosch
- Posts: 328
- Joined: Tue Jun 30, 2020 9:23 am
- Location: London, UK
- Has thanked: 98 times
- Been thanked: 102 times
- Contact:
Re: Tesla Charger alternative firmware
JSON with params attached, only stripped serial and pin before upload.
I will test the limit again next week.
I will test the limit again next week.
- janosch
- Posts: 328
- Joined: Tue Jun 30, 2020 9:23 am
- Location: London, UK
- Has thanked: 98 times
- Been thanked: 102 times
- Contact:
Re: Tesla Charger alternative firmware
I noticed today that the inverter reads 8V higher than the charger, so I must have checked udc only on the inverter and got spooked when it read too high, but 390V < 385V + 8 so hopefully it would have terminated.
I assume the charger is a lot more accurate than the inverter to read udc?
- johu
- Site Admin
- Posts: 6619
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 344 times
- Been thanked: 1485 times
- Contact:
Re: Tesla Charger alternative firmware
Yes, the Leaf inverter gives a non-linear voltage reading. So accurate around the point you calibrated and then it deviates
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- janosch
- Posts: 328
- Joined: Tue Jun 30, 2020 9:23 am
- Location: London, UK
- Has thanked: 98 times
- Been thanked: 102 times
- Contact:
Re: Tesla Charger alternative firmware
I have a charger here that is dropping out. It worked previously. (Fun fact, it is the X-rayed patient).
Some plots below, it looked like charger1 was dropping out, so I set chargena to 6 to run on 2+3 only, same behaviour. I can hear the EVSE clicking in and immediately dying, no current drawn on AC side.
modaclim is ramping up, then drops. all chargers enabled, c1flag going to 0 only 2+3,c1flag still goes to 0? I took a CAN log at the same time, did a quick grep and 0x109, 0x71B are in the log, so I am cautiously optimistic that CAN is not the issue.
Some plots below, it looked like charger1 was dropping out, so I set chargena to 6 to run on 2+3 only, same behaviour. I can hear the EVSE clicking in and immediately dying, no current drawn on AC side.
modaclim is ramping up, then drops. all chargers enabled, c1flag going to 0 only 2+3,c1flag still goes to 0? I took a CAN log at the same time, did a quick grep and 0x109, 0x71B are in the log, so I am cautiously optimistic that CAN is not the issue.
- Boxster EV
- Posts: 481
- Joined: Fri Jul 26, 2019 9:32 pm
- Location: UK
- Has thanked: 56 times
- Been thanked: 48 times
Re: Tesla Charger alternative firmware
You’ve probably already checked this, but whenever I’ve suffered with an EVSE spasm, it was due to the charger ground not being clean enough.janosch wrote: ↑Fri Dec 10, 2021 11:34 am I have a charger here that is dropping out. It worked previously. (Fun fact, it is the X-rayed patient).
Some plots below, it looked like charger1 was dropping out, so I set chargena to 6 to run on 2+3 only, same behaviour. I can hear the EVSE clicking in and immediately dying, no current drawn on AC side.
modaclim is ramping up, then drops.
modaclim_oscillating.png
all chargers enabled, c1flag going to 0
all_chargers_enabled.png
only 2+3,c1flag still goes to 0?
two_chargers_enabled.png
I took a CAN log at the same time, did a quick grep and 0x109, 0x71B are in the log, so I am cautiously optimistic that CAN is not the issue.
Screenshot from 2021-12-10 11-41-44.pngScreenshot from 2021-12-10 11-42-07.png
- janosch
- Posts: 328
- Joined: Tue Jun 30, 2020 9:23 am
- Location: London, UK
- Has thanked: 98 times
- Been thanked: 102 times
- Contact:
Re: Tesla Charger alternative firmware
Very good shout, I hadn't tightened the charge cable earth to the case properly. However, something else seems to be amiss. I took it off the CAN and just gave it its own 120 Ohm resistor too, but that didn't change the behaviour yet.Boxster EV wrote: ↑Fri Dec 10, 2021 1:03 pmYou’ve probably already checked this, but whenever I’ve suffered with an EVSE spasm, it was due to the charger ground not being clean enough.
It will be one of those little ones I hope, but I can't find which one it is. Noticed udc is reading 0V! Investigating, although I measured 360V earlier with the multimeter at my measuring point. Maybe I will add a "common errors" section to the GEN2 charger wiki.
Edit: Found it! 20A PV fuse has died quietly in the loom. Regular automotive 20A fuse is still intact (makes sense that PV pops first), no bang though, and surprising that the charger went up and down on the EVSE like that.
- catphish
- Posts: 959
- Joined: Fri Oct 08, 2021 11:02 pm
- Location: Dorset, UK
- Has thanked: 96 times
- Been thanked: 188 times
Re: Tesla Charger alternative firmware
I'm testing my Gen2 charger using this firmware. Previously it was working well, but now it appears that the controller is always commanding 0A of charging current. It appears that AC and DC voltages are correctly detected, and the chargers fully enable with no errors, however the measured current is about 40mA and the commanded current is (as far as I can tell from the logs) 0A. Would someone be able to look at the attached logs and advise?
- Attachments
-
- charger-1.crdt.txt
- CAN log of 0A charging
- (199.05 KiB) Downloaded 308 times
-
- json.txt
- JSON settings and state
- (4.6 KiB) Downloaded 416 times
- Roadstercycle
- Posts: 118
- Joined: Mon Sep 23, 2019 10:28 pm
- Location: California
- Has thanked: 3 times
- Been thanked: 2 times
- Contact:
Re: Tesla Charger alternative firmware
I set up the new Gen 2 charger today and it seems everything is working but no charging, no out put. All 3 leds come on when plugged in, My wall charging indicator even blinks saying it's charging but the voltage stays at 365 volts. with no increase. I do not hear relays turning on although the 3 leds are on. I've checked connections and grounds so I'm a bit at a loss. I've attached settings. Running 240 volt single phase setup. USA.
- johu
- Site Admin
- Posts: 6619
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 344 times
- Been thanked: 1485 times
- Contact:
Re: Tesla Charger alternative firmware
There is no CAN communication. Close the solder jumper underneath the wifi module to close the 120 Ohm CAN termination.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- johu
- Site Admin
- Posts: 6619
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 344 times
- Been thanked: 1485 times
- Contact:
Re: Tesla Charger alternative firmware
hwaclim is 0 because it tries to pull the value from the 1st module which is disabled. That's a bug of course. Can you enable the 1st module?catphish wrote: ↑Wed Dec 15, 2021 3:42 pm I'm testing my Gen2 charger using this firmware. Previously it was working well, but now it appears that the controller is always commanding 0A of charging current. It appears that AC and DC voltages are correctly detected, and the chargers fully enable with no errors, however the measured current is about 40mA and the commanded current is (as far as I can tell from the logs) 0A. Would someone be able to look at the attached logs and advise?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- catphish
- Posts: 959
- Joined: Fri Oct 08, 2021 11:02 pm
- Location: Dorset, UK
- Has thanked: 96 times
- Been thanked: 188 times
Re: Tesla Charger alternative firmware
Thanks, that makes a lot of sense now. My first charge module is broken - if I enable it, it fails with error "boost precharge fail".
I guess my charger worked during my early tests because I enabled all 3 modules, it didn't work, and then I disabled module 1, but hwaclim was already set, so everything worked correctly. I then stored chargerena=6 in my EEPROM.
Unfortunately in my case I'll need to wait for a bugfix, since I can't enable module 1.
Thanks for looking, and no rush for the fix, I'm not a paying customer yet

- Roadstercycle
- Posts: 118
- Joined: Mon Sep 23, 2019 10:28 pm
- Location: California
- Has thanked: 3 times
- Been thanked: 2 times
- Contact:
Re: Tesla Charger alternative firmware
First of all thank you. Is that necessary when I'm not using can to control it? Thought it works both ways? Just a power on/off switch for now, brand new board from Damien. Just curious as I don't want to make any mistakes.
- catphish
- Posts: 959
- Joined: Fri Oct 08, 2021 11:02 pm
- Location: Dorset, UK
- Has thanked: 96 times
- Been thanked: 188 times
Re: Tesla Charger alternative firmware
The charger uses CAN internally. It's necessary to close this jumper when you are not using CAN to control it. A CAN bus must be terminated with a 120 ohm resistor. If you are not extending the CAN bus beyond the charger, it must be terminated inside.Roadstercycle wrote: ↑Thu Dec 16, 2021 12:22 am First of all thank you. Is that necessary when I'm not using can to control it?
- Roadstercycle
- Posts: 118
- Joined: Mon Sep 23, 2019 10:28 pm
- Location: California
- Has thanked: 3 times
- Been thanked: 2 times
- Contact:
Re: Tesla Charger alternative firmware
Thank you catphish, That's where I was confused. Didn't know it used canbus internally. Again thank you.catphish wrote: ↑Thu Dec 16, 2021 12:54 amThe charger uses CAN internally. It's necessary to close this jumper when you are not using CAN to control it. A CAN bus must be terminated with a 120 ohm resistor. If you are not extending the CAN bus beyond the charger, it must be terminated inside.Roadstercycle wrote: ↑Thu Dec 16, 2021 12:22 am First of all thank you. Is that necessary when I'm not using can to control it?
- johu
- Site Admin
- Posts: 6619
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 344 times
- Been thanked: 1485 times
- Contact:
Re: Tesla Charger alternative firmware
Try this one, pulls hwaclim from all 3 modules
- Attachments
-
- stm32_charger.bin
- (21.06 KiB) Downloaded 411 times
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- catphish
- Posts: 959
- Joined: Fri Oct 08, 2021 11:02 pm
- Location: Dorset, UK
- Has thanked: 96 times
- Been thanked: 188 times
Re: Tesla Charger alternative firmware
This version fixes the problem, thanks!. I took the opportunity to do some more tests and everything seemingly works perfectly. Tested AC and DC current limiting up to 5A.
One thing worth mentioning - while your DC current limiting works absolutely precisely, AC current limiting seems conservative. For example if I set the AC limit to 5A with 2 modules, each one reports 2.12A. This isn't really a problem, and I don't know if this reduction is relative or absolute, but I thought it was interesting.
This is with a "-C" type GEN2 charger.
- Roadstercycle
- Posts: 118
- Joined: Mon Sep 23, 2019 10:28 pm
- Location: California
- Has thanked: 3 times
- Been thanked: 2 times
- Contact:
Re: Tesla Charger alternative firmware
Hi again, Sorry for being a pain. I wish I was a double EE but I'm not. So I closed the 120 ohm jumper pad. Now I do get a click then a few seconds later another click. Still no charging. All 3 modules leds light up. I've tried switch on first then plug in the charger plug. I'v tried charger plug first then turn on 12 volts. Same results. I've sent the new settings and log. If someone sees anything that it might set incorrect please let me know. Again I've checked power, grounds etc. It has to be something simple I'm missing. I'm at 365 volts, is there a low voltage turn on? Meaning it won't start charging until it gets to say 350 volts?
- johu
- Site Admin
- Posts: 6619
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 344 times
- Been thanked: 1485 times
- Contact:
Re: Tesla Charger alternative firmware
But it is charging
9A total, 3A each. You can bump the iaclim to 45A to get more power.

Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- catphish
- Posts: 959
- Joined: Fri Oct 08, 2021 11:02 pm
- Location: Dorset, UK
- Has thanked: 96 times
- Been thanked: 188 times
Re: Tesla Charger alternative firmware
Definitely looks to me like it's working. It seems your EVSE limit is 15A, and the 3 modules are pulling 5A each. 9A is going into the batteries. Success!
- Roadstercycle
- Posts: 118
- Joined: Mon Sep 23, 2019 10:28 pm
- Location: California
- Has thanked: 3 times
- Been thanked: 2 times
- Contact:
Re: Tesla Charger alternative firmware
I guess I was basing it on no raise in voltage. I thought the voltage would go up as it starting charging. Thank you guys.
Jack
Jack
- janosch
- Posts: 328
- Joined: Tue Jun 30, 2020 9:23 am
- Location: London, UK
- Has thanked: 98 times
- Been thanked: 102 times
- Contact:
Re: Tesla Charger alternative firmware
I have an odd one:
idcspnt drops to 7A when entering opmode "run", even though it was set to 12A before. I can set it to 12A but it jumps back to 7A! It changes itself.
Below are screenshots:
idcspnt drops to 7A when entering opmode "run", even though it was set to 12A before. I can set it to 12A but it jumps back to 7A! It changes itself.
Below are screenshots:
- I) Just started: opmode off, idcspnt 12A, uptime 76s, (started up like that, so loaded the 12A from flash)
- II) Charging : opmode run, idcspnt 7A, uptime 140s, idc 7A (changed itself)
- III) Unplug EVSE : opmode run, idcspnt 7A, uptime 1036s (stays at 7A)
- IV) After restart : opmode off, idcspnt 12A, uptime 23s (idcstpnt is reset after reboot)
- EV_Builder
- Posts: 1205
- Joined: Tue Apr 28, 2020 3:50 pm
- Location: The Netherlands
- Has thanked: 18 times
- Been thanked: 37 times
- Contact:
Re: Tesla Charger alternative firmware
Cable limit =20Amps
/3 = approx. 7
/3 = approx. 7
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
see http://www.wdrautomatisering.nl for bespoke BMS modules.
- janosch
- Posts: 328
- Joined: Tue Jun 30, 2020 9:23 am
- Location: London, UK
- Has thanked: 98 times
- Been thanked: 102 times
- Contact:
Re: Tesla Charger alternative firmware
That makes sense, I will try different cables and report back!