Tesla Charger alternative firmware
- Jack Bauer
- Posts: 3585
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 2 times
- Been thanked: 145 times
- Contact:
Re: Tesla Charger alternative firmware
Thought about this. if you read the can back from one of the charger modules it tells you the max mains current. gen2 = 16A and gen3 = 32a if I'm remembering.
I'm going to need a hacksaw
- johu
- Site Admin
- Posts: 6323
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 250 times
- Been thanked: 1318 times
- Contact:
Re: Tesla Charger alternative firmware
That would be great. Do you know where in the CAN stream?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- Jack Bauer
- Posts: 3585
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 2 times
- Been thanked: 145 times
- Contact:
Re: Tesla Charger alternative firmware
0x207 is the module 1 line status message. Available line current is in bits 32 to 40 as a 9 bit unsigned int with a scale of 0.06666. On the gen3 this will report as a little under 24A at power up and around 13 A on the gen 2 at power up.
I'm going to need a hacksaw
- johu
- Site Admin
- Posts: 6323
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 250 times
- Been thanked: 1318 times
- Contact:
Re: Tesla Charger alternative firmware
Great!
I continuously sample that message now, can you check for a valid value in "hwaclim"? It will read a little (like 7%) low due to the limitations if the scaling capabilities of stm32_can. I also realized that the scaling of cXiac was off, fixed now.
What is the max DC current of the gen3 charger? I found 18000/400 still yields 45A.
EDIT: just tested on my GEN2 charger, it displays 15A and with the 7% scaling error that is 16A
I continuously sample that message now, can you check for a valid value in "hwaclim"? It will read a little (like 7%) low due to the limitations if the scaling capabilities of stm32_can. I also realized that the scaling of cXiac was off, fixed now.
What is the max DC current of the gen3 charger? I found 18000/400 still yields 45A.
EDIT: just tested on my GEN2 charger, it displays 15A and with the 7% scaling error that is 16A
- Attachments
-
- stm32_charger.zip
- (34.11 KiB) Downloaded 246 times
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 179
- Joined: Sat Jan 25, 2020 6:22 am
- Location: California
- Has thanked: 1 time
- Been thanked: 4 times
Re: Tesla Charger alternative firmware
That explains what I was seeing, thanks! Good catch.
‘70 jag XJ6, GS450h drivetrain, 102s Tesla pack
- johu
- Site Admin
- Posts: 6323
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 250 times
- Been thanked: 1318 times
- Contact:
Re: Tesla Charger alternative firmware
Also thought about the low voltage problem, i.e. using the charger with <200V batteries. The problem is that it will send 3.7 kW to the secondary side which results in 18A i.e. more than 15A of DC current. Now I could enforce a per-module DC current limit to make sure the DC current never exceeds 15A per module.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 179
- Joined: Sat Jan 25, 2020 6:22 am
- Location: California
- Has thanked: 1 time
- Been thanked: 4 times
Re: Tesla Charger alternative firmware
So I uploaded the latest firmware and gave it another shot. The AC current per phase (cXiac) is now scaled correctly, but it looks like hwaclim and/or aclim changes are preventing me from getting full juice. I'm only getting 5A per phase max.
I started a session with the old firmware, updated firmware, and now I'm stuck at a max charge of 15A AC.
I started a session with the old firmware, updated firmware, and now I'm stuck at a max charge of 15A AC.
‘70 jag XJ6, GS450h drivetrain, 102s Tesla pack
-
- Posts: 179
- Joined: Sat Jan 25, 2020 6:22 am
- Location: California
- Has thanked: 1 time
- Been thanked: 4 times
Re: Tesla Charger alternative firmware
One more thing for Johannes - based on what I'm reading in the description of Type 1 and Type 2 settings, the charger will always enforce a maximum AC current of 32A, even if the EVSE is telling it that it can do more. Is that correct? My EVSE regularly puts out a full 40A with other EVs, Tesla and otherwise, so I'm not sure this interpretation of J1772 single phase is 100% correct. Am I reading it wrong? Should cablelim just be set to whatever the evselim is?
You'll notice that with the 'old firmware' in my image above, the EVSE is putting out just under 8kW. At 240V, that's about 32A total, curiously equal to cablelim.
Here is the same charger, cable, EVSE on the 'pre-Johannes' firmware running at 40A (@240V = 9.6kW): edit, last thing: I made a window in the charger case and covered it with a layer of kapton, this definitely improved my WiFi:
You'll notice that with the 'old firmware' in my image above, the EVSE is putting out just under 8kW. At 240V, that's about 32A total, curiously equal to cablelim.
Here is the same charger, cable, EVSE on the 'pre-Johannes' firmware running at 40A (@240V = 9.6kW): edit, last thing: I made a window in the charger case and covered it with a layer of kapton, this definitely improved my WiFi:
‘70 jag XJ6, GS450h drivetrain, 102s Tesla pack
- johu
- Site Admin
- Posts: 6323
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 250 times
- Been thanked: 1318 times
- Contact:
Re: Tesla Charger alternative firmware
Understood, will make some changes and let you test
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Re: Tesla Charger alternative firmware
There are similar range issues with the wifi module buried under the LDU case. I use this in an enclosure with automesh. It functions transparently and I can connect 10' away from the car.
https://github.com/martin-ger/esp_wifi_repeater
Formerly 92 E30 BMW Cabrio with Tesla power
- johu
- Site Admin
- Posts: 6323
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 250 times
- Been thanked: 1318 times
- Contact:
Re: Tesla Charger alternative firmware
Here is a new firmware that should fix the low current limit.
- Attachments
-
- stm32_charger.zip
- (35.22 KiB) Downloaded 278 times
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Re: Tesla Charger alternative firmware
Did you happen to change the SDO message ID to prevent collisions with inverter boards on the same bus?
Formerly 92 E30 BMW Cabrio with Tesla power
-
- Posts: 179
- Joined: Sat Jan 25, 2020 6:22 am
- Location: California
- Has thanked: 1 time
- Been thanked: 4 times
Re: Tesla Charger alternative firmware
Thank you again, I’ll give this a go as soon as I have another window of time, hopefully an evening this week.
‘70 jag XJ6, GS450h drivetrain, 102s Tesla pack
- johu
- Site Admin
- Posts: 6323
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 250 times
- Been thanked: 1318 times
- Contact:
Re: Tesla Charger alternative firmware
Ah forgot, will hard-code it to 5 (i.e. 0x505) next time.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 179
- Joined: Sat Jan 25, 2020 6:22 am
- Location: California
- Has thanked: 1 time
- Been thanked: 4 times
Re: Tesla Charger alternative firmware
Well gents, I learned something this morning!
1. New firmware works great, thank you Johannes! I charged up to 37A, limited by constant voltage charge (EVSE does 39.4)
2. The Tesla charger doesn't like more than 420V set point. It looks like this may have been my issue. I played with different values and was able to quickly reproduce the cycling issue. I'd suggest limiting the max values at 420V instead of 430V based on this learning.
Note that this testing was done purposely in the constant voltage range of charging to attempt to trigger some of the high voltage cycling issues I've been seeing, nothing here is in the lower SOC constant current range.
Off to the office now...
* these should all be VOLTS not AMPS. Oops
1. New firmware works great, thank you Johannes! I charged up to 37A, limited by constant voltage charge (EVSE does 39.4)
2. The Tesla charger doesn't like more than 420V set point. It looks like this may have been my issue. I played with different values and was able to quickly reproduce the cycling issue. I'd suggest limiting the max values at 420V instead of 430V based on this learning.
Note that this testing was done purposely in the constant voltage range of charging to attempt to trigger some of the high voltage cycling issues I've been seeing, nothing here is in the lower SOC constant current range.
Off to the office now...
* these should all be VOLTS not AMPS. Oops
‘70 jag XJ6, GS450h drivetrain, 102s Tesla pack
- johu
- Site Admin
- Posts: 6323
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 250 times
- Been thanked: 1318 times
- Contact:
Re: Tesla Charger alternative firmware
Thanks! I guess I will make this the new version then. While also dropping max voltage to 420V.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- Boxster EV
- Posts: 476
- Joined: Fri Jul 26, 2019 9:32 pm
- Location: UK
- Has thanked: 52 times
- Been thanked: 46 times
Re: Tesla Charger alternative firmware
Thought it was about time I moved over to this gig.
I've had my free five mins of juice and just purchased a pin.
I've had my free five mins of juice and just purchased a pin.
Re: Tesla Charger alternative firmware
Question on the CAN control. Does the charger need to receive a full array of data for a 0x102 rx message or is it fine just receiving a 1 or 0 on byte 4 for enable? Does this message also override or act as a replacement for the hardware enable wire? Working on reducing hardware i/o for anything that can be done over CAN.
Formerly 92 E30 BMW Cabrio with Tesla power
- johu
- Site Admin
- Posts: 6323
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 250 times
- Been thanked: 1318 times
- Contact:
Re: Tesla Charger alternative firmware
You'll need to send all items except SoC as they'd be set to zero otherwise. Could certainly remove the enable wire in that case but currently it is required.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- johu
- Site Admin
- Posts: 6323
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 250 times
- Been thanked: 1318 times
- Contact:
Re: Tesla Charger alternative firmware
I did some testing today to control the charger via CHAdeMO protocol and realized and reports "Connector locked" and "enabled" bits in the wrong byte (Byte 4 instead of 5). Concerns message 0x109. Have updated the wiki
I will change it in the next release, be aware you need to change your custom VCUs should you upgrade your charger from version 1.06.R or earlier
I will change it in the next release, be aware you need to change your custom VCUs should you upgrade your charger from version 1.06.R or earlier
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Re: Tesla Charger alternative firmware
On a side note, I've had no issues in 2.5 months of usage on my own charger as well as various public J1772 charge stations.
Formerly 92 E30 BMW Cabrio with Tesla power
- johu
- Site Admin
- Posts: 6323
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 250 times
- Been thanked: 1318 times
- Contact:
Re: Tesla Charger alternative firmware
Very good to know!
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- johu
- Site Admin
- Posts: 6323
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 250 times
- Been thanked: 1318 times
- Contact:
Re: Tesla Charger alternative firmware
As you might have seen here I'm using a Gen2 Tesla charger as CHAdeMO EVSE. I had to make some small changes to the software to make it work:
- Fix the 0x102 message (enable bits now start at bit 40, not 32)
- Added an "enablepol" parameter to start charging when the enable pin is LOW
Internally I added a pull-up resistor to the enable pin. You can also use this parameter to skip the enable pin all together. Try it, pin stays valid over all future upgrades.
EDIT: when I say "make it work" I only made changes that I anticipated. Actual test is tomorrow.
- Fix the 0x102 message (enable bits now start at bit 40, not 32)
- Added an "enablepol" parameter to start charging when the enable pin is LOW
Internally I added a pull-up resistor to the enable pin. You can also use this parameter to skip the enable pin all together. Try it, pin stays valid over all future upgrades.
EDIT: when I say "make it work" I only made changes that I anticipated. Actual test is tomorrow.
- Attachments
-
- stm32_charger.zip
- (35.25 KiB) Downloaded 271 times
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- EV_Builder
- Posts: 1200
- Joined: Tue Apr 28, 2020 3:50 pm
- Location: The Netherlands
- Has thanked: 17 times
- Been thanked: 35 times
- Contact:
Re: Tesla Charger alternative firmware
Which board version does it support and if you don't have the wifi module, will it spit out over COM native or COM USB?
I have a fast flashing LED but nothing more/less..
I have a fast flashing LED but nothing more/less..
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
see http://www.wdrautomatisering.nl for bespoke BMS modules.
- johu
- Site Admin
- Posts: 6323
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 250 times
- Been thanked: 1318 times
- Contact:
Re: Tesla Charger alternative firmware
Both interfaces work, just no update over USB possible. Works on all STM32 based hardware, gen2 and gen3
https://openinverter.org/wiki/GEN2
Oh, my CHAdeMO test didn't go well, it turns out I have a super charger charger
https://openinverter.org/wiki/GEN2
Oh, my CHAdeMO test didn't go well, it turns out I have a super charger charger
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9