Tesla Charger alternative firmware

Topics concerning the Tesla front and rear drive unit drop-in board
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Tesla Charger alternative firmware

Post by johu »

I split off the ESP discussion: viewtopic.php?f=5&t=2299
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
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: Thu Mar 10, 2022 5:31 pmyes
Johu, That was it. Just bad connection on the D1 at the header. All's good in the hood.
et0
Posts: 127
Joined: Sun Oct 13, 2019 8:06 pm
Location: Scotland
Has thanked: 14 times
Been thanked: 5 times

Re: Tesla Charger alternative firmware

Post by et0 »

HI all, I'm facing a Gen 2 charger which has a V5aB3 board fitted, and after reading this thread and the wiki I have a couple of questions if someone can help:

1) I want to have single phase 32A charging at home, and 3 phase 16A charging at public chargers - this is the norm in the UK. On previous builds I have used the V3 board and added an external relay and couple of lines of code to manage this (discussed in other threads). How can I do this with the V5 setup?

2) I will be using a commercial BMS to manage the charging, including the J1772 charging signals. So I need the charger to function as a "dumb charger" and not look for EVSE pilot signal feedback to operate - but only respond to CAN messages. Is that feasible?

Thank you
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Tesla Charger alternative firmware

Post by johu »

1) You could just wire your single phase to 2 phases of your Type-2 outlet
2) Pilot signal can be ignored and instead a current setpoint can be received via CAN
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
et0
Posts: 127
Joined: Sun Oct 13, 2019 8:06 pm
Location: Scotland
Has thanked: 14 times
Been thanked: 5 times

Re: Tesla Charger alternative firmware

Post by et0 »

johu wrote: Tue Mar 15, 2022 2:03 pm 1) You could just wire your single phase to 2 phases of your Type-2 outlet
2) Pilot signal can be ignored and instead a current setpoint can be received via CAN
Hey Johu,

1) But it needs to operate with any random chargepoint, some 3-phase, some single-phase. We can't control how they are wired.
Here's an example of what I mean: viewtopic.php?f=10&t=761#p10912

2) Great!

Thanks
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 »

How is the difference communicated to the vehicle?
Cable limit?
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Tesla Charger alternative firmware

Post by johu »

That's what I meant by connecting L1 and L2 in the OUTLET, i.e. the cable in your garage. Not in the car! Not sure about your BMS but the Tesla charger software always interprets CP/PP current limit as per phase. So you'd still communicate a 16A limit.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
et0
Posts: 127
Joined: Sun Oct 13, 2019 8:06 pm
Location: Scotland
Has thanked: 14 times
Been thanked: 5 times

Re: Tesla Charger alternative firmware

Post by et0 »

johu wrote: Wed Mar 16, 2022 8:10 am That's what I meant by connecting L1 and L2 in the OUTLET, i.e. the cable in your garage. Not in the car! Not sure about your BMS but the Tesla charger software always interprets CP/PP current limit as per phase. So you'd still communicate a 16A limit.
Johannes, I understand what you mean and I agree, technically. But I want this car to charge at any 1-ph chargepoint found in the wild as well, not just one dedicated one with non-standard wiring. My Tesla can do it, my own conversion with a Gen 2 charger can do it..

Anyway, aren’t there risks with that workaround - if you charge with a 16A rated cable and the car is putting 32A through the neutral conductor, bad things could happen - no?

I’m just suggesting it as a feature, because it would be nice to use your well developed and supported software, and this is the only barrier.
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Tesla Charger alternative firmware

Post by johu »

oh, now I get it!
Alright, that of course requires a relay. So it breaks the connection to L2 and makes the connection to L1 on the second module. One way to find out would be a 32A CP current limit but only AC voltage visible on the first charger module. I think there's an open collector output left.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
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 »

EV_Builder wrote: Wed Mar 16, 2022 6:40 am How is the difference communicated to the vehicle?
Cable limit?
@et0;
What about starting here? And educating all of us how the car can know with the current FW, or with change, how many phases there are connected to the socket it pulls from? as far as i know only amp ratings are communicated?

Also if the CanBus option on the charger communicates line voltages and the cable limit.
External hardware could decide to disconnect from L2 and L3 and connect those to L1 (in the car).
Then you have what you like correct? Maybe a reset to the charger should be needed for certain modules...

But that would be always after probing if L2 and L3 don't have tension....

The NEUTRAL wire in the car and house should always be upto the 11Kw amps that doesn't change on phases (at least if you want to use the maximum).
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
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 »

johu wrote: Wed Mar 16, 2022 6:19 pm Alright, that of course requires a relay. So it breaks the connection to L2 and makes the connection to L1 on the second module. One way to find out would be a 32A CP current limit but only AC voltage visible on the first charger module. I think there's an open collector output left.
Yes; that's what i thought.
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
et0
Posts: 127
Joined: Sun Oct 13, 2019 8:06 pm
Location: Scotland
Has thanked: 14 times
Been thanked: 5 times

Re: Tesla Charger alternative firmware

Post by et0 »

johu wrote: Wed Mar 16, 2022 6:19 pm oh, now I get it!
Alright, that of course requires a relay. So it breaks the connection to L2 and makes the connection to L1 on the second module. One way to find out would be a 32A CP current limit but only AC voltage visible on the first charger module. I think there's an open collector output left.
There's a few different ways to do it! The simplest, I think, is to route L1 to all 3 modules by default (for single phase operation) - that can be done with a single DPDT relay. Then the charger works in single phase mode as normal, so CP current limit divided by 3 to each module.

This relay can be energised by the voltage between phase 1 and 2, now it sends L1, L2 L3 to module 1, 2, 3. This detection can also feed an *input* on the charger, and all that does is change the flag to 3 phase mode.

On that link is a nice schematic - I have done it slightly different because of the choice of relays available, but it's same idea.

If you implement it I will test it ;)
et0
Posts: 127
Joined: Sun Oct 13, 2019 8:06 pm
Location: Scotland
Has thanked: 14 times
Been thanked: 5 times

Re: Tesla Charger alternative firmware

Post by et0 »

EV_Builder wrote: Wed Mar 16, 2022 6:19 pm
EV_Builder wrote: Wed Mar 16, 2022 6:40 am How is the difference communicated to the vehicle?
Cable limit?
@et0;
What about starting here? And educating all of us how the car can know with the current FW, or with change, how many phases there are connected to the socket it pulls from? as far as i know only amp ratings are communicated?
A contact of the external relay informs the charger that 3 phase is present. See the explanation above.
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 »

Does increasing iaclim while charging break a GEN2 charger?

I was charging at ~16A DC @ 360V at a public charge point, ~29A AC.
Then I saw that iaclim was slightly lower than what the charge point could do and increased iaclim while charging from 29A to 32A.

The charge dropped off. Reconnected and I was able to charge for an hour after, but udc fluctuated*, then dropped out altogether, with only 1.5kW in 50mins delivered.

I think the DC wiring was fine, uaux is still showing at 12.62V, so DCDC was still on, and car drove home fine. Measured the cable from DC bus to charger today and had 0 Ohm resistance (under no load).

* = see video: https://youtu.be/6NOqiOUGcFc
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 »

Mybe the conversion from 32A to the charger is slightly off so that it translates in a rolledover value bitwise..??

Maybe a check: can anyone else charge with 32A setting ...
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: Wed Mar 23, 2022 4:43 pm Mybe the conversion from 32A to the charger is slightly off so that it translates in a rolledover value bitwise..??

Maybe a check: can anyone else charge with 32A setting ...
Good idea, but the limit is 45A, so I would be surprised if that is the case.

I just captured a CAN dump back to back with the now presumed broken charger and a working one on the bench.

hwaclim remains 0 for the presumed broken one.

according to this post:
Jack Bauer wrote: Tue Feb 02, 2021 6:25 pm 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.
0x207 32 to 40 (I hope I counted right):
working: C8 9C
broken: C8 00

Firmware:
working: 1.09R
broken: 1.10R

I suppose I have learnt my lesson to not change that param during charging, unless something else is afoot. I did change idcspnt before and that wasn't a problem, but maybe that was already wrong.

Any other thoughts?
Attachments
Screenshot from 2022-03-24 10-40-42.png
candump_broken.log
(3.11 MiB) Downloaded 80 times
candump_working.log
(2.95 MiB) Downloaded 80 times
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Tesla Charger alternative firmware

Post by johu »

Haven't found the time to look at CAN dumps yet.
What I can say is there is just one value set affects charger power: modaclim. Whichever limit you set elsewhere it will show up on modaclim. So I doubt CHANGING iaclim really caused this. Were you charging single phase?
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 »

Thanks for checking.
Yes, single phase wired to all modules.

Wiring looked OK, connectors rated for 30A.

Interrupts from updating the value while charging making the firmware run out of time for another important operation?
Let me know if you need anything else.

I am now wondering if the "wet" charger died from the same cause (same vehicle). Cautious to put a new charger in before knowing what might have been the reason for this.
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 »

Or asked another way: What could I try to narrow this down further?

Some ideas:
- take the connectors out, put them between a battery and a load and measure voltage drop to rule cabling out
- I can take a look at the CAN dumps, but what am I looking for? It's a shame I haven't got a log from the moment it broke/dropped out
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Tesla Charger alternative firmware

Post by johu »

From the other side I wonder how the firmware could contribute to failure. We're not controlling power electronics directly, so that's ruled out. I could only guess that I need to put a ramp on modaclim so that current is ramped up slowly instead of one step.

When you activate just the presumably broken charger I guess it does not charge at all
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 »

Correct, seems bricked, I tried all individual modules in it, but hwaclim, aclim, udc remain 0 for chargerena {1,2,4}.

For the ramp: It was quite a small change though, it sat at 29.2A / ~ 6960W and I increased it to 32A / 7680W. Also, the EVSELimit was 29.9A or similar, so surely that limit would have kicked in. Not sure if a 720W change would need much ramping?
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 »

.
Also, the EVSELimit was 29.9A or similar, so surely that limit would have kicked in.
The EVSE can be a simple relay. It means that it has no clue about actual power drawn. The comms. Just tell the EV for what amperage the system is layed out. So I don't expect any limit from there.
Elaborate on it please, then I learn :)

If it's possible to brick the charger with wrong amperage commands we need to known what the first tell tale is. The charger communicates allot over canbus, about Vboost and many other stuff.

Which maybe the red-flag which we ignore while asking it to give more juice...
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
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 »

@johu;
Is the requested power by the user or the amount send to the charger capped by anything? What if the user makes a typo like 32.0 or 32,0 and 320 gets requested internally? For example are there HW device limits in place?
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 »

For the limits my understanding is that the firmware takes MIN of all limits to determine what to do in the end?

Code: Select all

aclim = MIN(cablelim, iaclim, evselim, hwaclim)
dclim = MIN(idcspnt, idclim)
Pure speculation :)
EV_Builder wrote: Mon Mar 28, 2022 11:08 am ...What if the user makes a typo like 32.0 or 32,0 and 320 gets requested internally? ...
Yep, can't rule that out!
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 »

Ok, one more idea: I have the wet charger here that still charges on one module and that can be sacrificed.

I can set CAN up to be dumped continuously and then we can stress it and see if we can get it to break while capturing?
Post Reply