DIY Electric Car Forums banner

Tesla 10Kw Open Source Charger Controller

1 reading
130K views 645 replies 35 participants last post by  Kevin Sharpe  
#1 ·
So I've had a first look at the Tesla Gen 2 10Kw charger. Now , making one of these work as is with CAN messages is near on impossible due to the level of integration of the charger and the car. So I decided to have a look inside. Seems it uses 3 x 3.5kw modules linked back to a central logic board. Each modules connects to the logic pcb with 8 wires.

So far i have identified GND , +12v , +5v and a 500k canbus. Two lines seems to carry analog signals and one seems to be open circuit. Attached see some CAN captures from this internal network. I may be wrong but I bet it will be easier to work out these messages and get the individual charger modules to wake up.

So plan is to design a little breakout board so I can monitor the signals on a live car during the charge process and log the CAN messages.

Stay tuned:)
 

Attachments

#611 · (Edited)
Thanks Tom.

Partial success in getting it working today. Apparently Module 2 is dead.

Proximity Status : Connected AC limit : 15600 /Cable Limit: 0 /Module Cur Request: 1667 /DC total Cur:4.30 /DC Setpoint:168 /DC driven AC Cur Lim: 35706
766597 State: 1 Phases : 0 Modules Avtive : 3 ON D1 H
Phase 1 Feebback // AC present: 1 AC volt: 245 AC cur: 2.13 DC volt: 162 DC cur: 2.09 Inlet Targ: 216 Temp Lim Cur: 15 32 25 EN:1 Flt:1 Stat:1001101
Phase 2 Feebback // AC present: 1 AC volt: 245 AC cur: 0.00 DC volt: 156 DC cur: 0.00 Inlet Targ: 216 Temp Lim Cur: 15 25 25 EN:1 Flt:1 Stat:100000
Phase 3 Feebback // AC present: 1 AC volt: 244 AC cur: 2.07 DC volt: 161 DC cur: 2.19 Inlet Targ: 216 Temp Lim Cur: 15 25 25 EN:0 Flt:1 Stat:1001101

1 - Auto Enable : ON
2 - Modules Enabled : 123
3 - Can Mode : Master
4 - Port Type : 1
5 - Phase Wiring : 1
6 - DC Charge Voltage : 168V
7 - AC Current Limit : 5A

This is running off of a 240V one phase EVSE.
As someone else noted, 12V power consumption scales with the number of modules active. This sucks power like 3 are active but #2 is not producing anything. This was confirmed by experimenting with having various modules active and by measuring EVSE current draw and DC output with a clamp meter.

Is there any troubleshooting possible for a bad module?

Also, I looked through the source but couldn't figure these out. Hopefully they aren't dumb questions:

What is Inlet Targ? Source says it's a target temp?

What are the "Temp Lim Cur" numbers? The second one is obviously the actual module temp, but what are the 15 and 25 values?

What is EN: ("module enable feedback on the module"?) and why does it flicker on and off?

Thanks!
 
#615 · (Edited)
Only Module 2 active looks like so:

Proximity Status : Connected AC limit : 15600 /Cable Limit: 0 /Module Cur Request: 5000 /DC total Cur:0.00 /DC Setpoint:168 /DC driven AC Cur Lim: 5000
109216 State: 1 Phases : 0 Modules Avtive : 1 ON D1 H
Phase 1 Feebback // AC present: 0 AC volt: 0 AC cur: 0.00 DC volt: 0 DC cur: 0.00 Inlet Targ: 0 Temp Lim Cur: 0 0 0 EN:0 Flt:0 Stat:0
Phase 2 Feebback // AC present: 1 AC volt: 246 AC cur: 0.00 DC volt: 156 DC cur: 0.00 Inlet Targ: 216 Temp Lim Cur: 15 29 25 EN:0 Flt:1 Stat:100000
Phase 3 Feebback // AC present: 0 AC volt: 0 AC cur: 0.00 DC volt: 0 DC cur: 0.00 Inlet Targ: 0 Temp Lim Cur: 0 0 0 EN:0 Flt:0 Stat:0

Module temp is a little elevated only because I was running Module 1 by itself for awhile with no active cooling.

At first I thought the stat value for 2 is always 10000, but it isn't. I've attached a full run from plugging in the J1772 plug until pulling it out.

Does CAN debug spit out all of the can traffic? I'll try that when I get a chance to play with it again.

Thanks
 

Attachments

#616 ·
Tom (or Damien or anyone else?),

Re the control board serial output, I looked through the source but couldn't figure these out. Is there another source of more info?

What is Inlet Targ? Source says it's a target temp? It's reading 216 though.

What are the "Temp Lim Cur" numbers? The second one is obviously the actual module temp, but what are the 15 and 25 values?

What is EN: ("module enable feedback on the module"?) and why does it flicker on and off for an active module?

What do the status bits indicate?

Thanks
 
#618 ·
I have not done much diving into this. the Temp Lim Cur are numbers relating to derating requirements. However I believe this are just informative and the module derate as required.

EN, no idea what it 'really' is yes all modules show it changing.

Status bits are states the module can be in, used for diagnosing.
 
#619 ·
Hi Guys,

Thanks for the hard work Tom and Damien, I have the board up and running and am charging!

Do you have a switch going to DIG_IN_1 as a manual on-off for the charger?
(I bypassed the logic for this in the code for now just to get it working).

Also, When the charger modules start up, I lose USB connection and it won't come back until I power them down down. Have you ever seen this?

Thanks,
Matt
 
#620 ·
Hello Matt,

The USB can be fussy. It has known to cause chargers to misbehave. These issues usually go away if you remove the usb and then power cycle it.

I have not really had USB drop out will connected.

DIG_IN1 is used as an interlock, so a back up to the internal voltage control. This usually should be controlled by a BMS.
 
#629 ·
Of course it's possible. But as I always tell my student developers:

"Make it functional, then make it pretty."

The folks here, including Damien and Tom, have done outstanding work and have made great progress so far. I'm sure they would tell you themselves that it's at most an early beta. Given that buttoning down the core functionality is the critical priority, it may be awhile before it happens.

ga2500ev
 
#631 ·
How hot do these chargers get in real world use? I am wondering how large of a cooling system I need for it. I assume it doesn't need a heater correct? I feel stupid for asking that but thought I should make sure.


Also, the Tesla gen 2 charger does not have the Tesla "T" stamped in it. I see some do have the T. What is the difference?



I dont trust myself to make the board and upload working firmware so a friend who built one for someone else on this forum is doing it for me.



Thanks!
 
#640 ·
I have stated multiple times in multiple locations. Despite the claims of the label on the charger working between 50v and 450v this is NOT the case. Below around 200v DC the charger power modules become very unstable. The more under 200v you go the more unstable. I blew one up in my face trying to charge a 120v battery at 5 amps.



When you issue a current command you are not issuing a DC current command rather an AC input current command. So with 230vac in lets say i command 10amps and I have a 300v battery. This is fine as the charger takes in 2.3kw (ignoring losses) and makes 300v dc at whatever current is allowed by a 2.3kw power limit. Everyone is happy. Now if we use the example above but substitute a 100v dc battery. The Tesla charger can not current limit its dc output. Just power limit. So it takes 2.3kw (again ignoring losses) and tries to pump 23 amps into a 100v battery. Boom.


As you go under 200v the control loop really struggles to hold the setpoint current due to the above situation. I recently fitted a Gen 2 charger to my E39 with a 192v nominal battery voltage. I had to amend the software in quite a few ways to work around the problems this introduces. During the initial parts of the charge cycle when the battery is under 200v the modules frequently shut down due to the inability of the control loop to hold current set points. The software gets around this by detecting the fault bits in the charger CAN status messages and simply resets the whole show. As the battery increases in voltage these resets become less and less frequent and the current holds much more steady. This software is available on github :
https://github.com/damienmaguire/Tesla-Charger/tree/master/BetaSW


I hope that clarifies the situation. I would be very careful indeed charging a 160v nominal pack.