Tesla Charger alternative firmware

Topics concerning the Tesla front and rear drive unit drop-in board
Post Reply
User avatar
janosch
Posts: 306
Joined: Tue Jun 30, 2020 9:23 am
Location: London, UK
Has thanked: 67 times
Been thanked: 54 times
Contact:

Re: Tesla Charger alternative firmware

Post by janosch »

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.
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: Tesla Charger alternative firmware

Post by johu »

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
User avatar
janosch
Posts: 306
Joined: Tue Jun 30, 2020 9:23 am
Location: London, UK
Has thanked: 67 times
Been thanked: 54 times
Contact:

Re: Tesla Charger alternative firmware

Post by janosch »

JSON with params attached, only stripped serial and pin before upload.
I will test the limit again next week.

janosch.chg1.json
(4.51 KiB) Downloaded 175 times
User avatar
janosch
Posts: 306
Joined: Tue Jun 30, 2020 9:23 am
Location: London, UK
Has thanked: 67 times
Been thanked: 54 times
Contact:

Re: Tesla Charger alternative firmware

Post by janosch »

janosch wrote: Thu Nov 25, 2021 1:27 pm ... if udcspnt > udclim then udclim is ignored?
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?
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: Tesla Charger alternative firmware

Post by johu »

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
User avatar
janosch
Posts: 306
Joined: Tue Jun 30, 2020 9:23 am
Location: London, UK
Has thanked: 67 times
Been thanked: 54 times
Contact:

Re: Tesla Charger alternative firmware

Post by janosch »

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.png
Screenshot from 2021-12-10 11-42-07.png
User avatar
Boxster EV
Posts: 434
Joined: Fri Jul 26, 2019 9:32 pm
Location: UK
Has thanked: 35 times
Been thanked: 26 times

Re: Tesla Charger alternative firmware

Post by Boxster EV »

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
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.
Porsche 986 powered by a Tesla large drive unit. Backwards. Build documented here and Instagram @tesla_porsche here.
User avatar
janosch
Posts: 306
Joined: Tue Jun 30, 2020 9:23 am
Location: London, UK
Has thanked: 67 times
Been thanked: 54 times
Contact:

Re: Tesla Charger alternative firmware

Post by janosch »

Boxster EV wrote: Fri Dec 10, 2021 1:03 pm
janosch wrote: Fri Dec 10, 2021 11:34 am ... my charger drops out before drawing AC amps ...
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.
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.

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.
User avatar
catphish
Posts: 954
Joined: Fri Oct 08, 2021 11:02 pm
Location: Dorset, UK
Has thanked: 93 times
Been thanked: 179 times

Re: Tesla Charger alternative firmware

Post by catphish »

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 97 times
json.txt
JSON settings and state
(4.6 KiB) Downloaded 133 times
User avatar
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

Post by Roadstercycle »

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.
Attachments
Screen Shot 2021-12-15 at 1.24.58 PM.png
Screen Shot 2021-12-15 at 1.25.36 PM.png
Screen Shot 2021-12-15 at 1.26.08 PM.png
Screen Shot 2021-12-15 at 1.26.32 PM.png
Screen Shot 2021-12-15 at 1.27.01 PM.png
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: Tesla Charger alternative firmware

Post by johu »

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
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: Tesla Charger alternative firmware

Post by johu »

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?
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?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
catphish
Posts: 954
Joined: Fri Oct 08, 2021 11:02 pm
Location: Dorset, UK
Has thanked: 93 times
Been thanked: 179 times

Re: Tesla Charger alternative firmware

Post by catphish »

johu wrote: Wed Dec 15, 2021 10:52 pm 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?
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 :D
User avatar
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

Post by Roadstercycle »

johu wrote: Wed Dec 15, 2021 10:48 pm There is no CAN communication. Close the solder jumper underneath the wifi module to close the 120 Ohm CAN termination.
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.
User avatar
catphish
Posts: 954
Joined: Fri Oct 08, 2021 11:02 pm
Location: Dorset, UK
Has thanked: 93 times
Been thanked: 179 times

Re: Tesla Charger alternative firmware

Post by catphish »

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?
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.
User avatar
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

Post by Roadstercycle »

catphish wrote: Thu Dec 16, 2021 12:54 am
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?
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.
Thank you catphish, That's where I was confused. Didn't know it used canbus internally. Again thank you.
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: Tesla Charger alternative firmware

Post by johu »

Try this one, pulls hwaclim from all 3 modules
Attachments
stm32_charger.bin
(21.06 KiB) Downloaded 91 times
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
catphish
Posts: 954
Joined: Fri Oct 08, 2021 11:02 pm
Location: Dorset, UK
Has thanked: 93 times
Been thanked: 179 times

Re: Tesla Charger alternative firmware

Post by catphish »

johu wrote: Thu Dec 16, 2021 8:51 am Try this one, pulls hwaclim from all 3 modules
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.
User avatar
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

Post by Roadstercycle »

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?
Attachments
Screen Shot 2021-12-16 at 12.45.47 PM.png
Screen Shot 2021-12-16 at 12.46.16 PM.png
Screen Shot 2021-12-16 at 12.46.54 PM.png
Screen Shot 2021-12-16 at 12.47.20 PM.png
Screen Shot 2021-12-16 at 12.47.54 PM.png
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: Tesla Charger alternative firmware

Post by johu »

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
User avatar
catphish
Posts: 954
Joined: Fri Oct 08, 2021 11:02 pm
Location: Dorset, UK
Has thanked: 93 times
Been thanked: 179 times

Re: Tesla Charger alternative firmware

Post by catphish »

Roadstercycle wrote: Thu Dec 16, 2021 9:01 pm Still no charging.
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!
User avatar
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

Post by Roadstercycle »

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
User avatar
janosch
Posts: 306
Joined: Tue Jun 30, 2020 9:23 am
Location: London, UK
Has thanked: 67 times
Been thanked: 54 times
Contact:

Re: Tesla Charger alternative firmware

Post by janosch »

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:
  • 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)
Attachments
1_2_3_4_idcspnt_dropping.png
User avatar
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: Tesla Charger alternative firmware

Post by EV_Builder »

Cable limit =20Amps
/3 = approx. 7
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
User avatar
janosch
Posts: 306
Joined: Tue Jun 30, 2020 9:23 am
Location: London, UK
Has thanked: 67 times
Been thanked: 54 times
Contact:

Re: Tesla Charger alternative firmware

Post by janosch »

EV_Builder wrote: Fri Dec 24, 2021 5:56 pm Cable limit =20Amps
/3 = approx. 7
That makes sense, I will try different cables and report back!
Post Reply