Tesla Charger Support Thread

Topics concerning the Tesla front and rear drive unit drop-in board
Locked
et0
Posts: 132
Joined: Sun Oct 13, 2019 8:06 pm
Location: Scotland
Has thanked: 15 times
Been thanked: 6 times

Re: Tesla Charger Support Thread

Post by et0 »

Agreed, and I have, more than once!

So I'm just asking for a bit of guidance, as a newcomer. Should it now be working, based on what I wrote above, and what should I be seeing?

Started to check signals - the module connector gets 12V and 5V_OUTs OK, but ENABLEs are low. So presumably the micro is not setting these. Not sure why not. Is there any special trick to getting it to run without EVSE?

Edit - update: IN1 wasn't properly connected to a +12V feed, that is necessary. "D1 L" in the debug was the clue.
et0
Posts: 132
Joined: Sun Oct 13, 2019 8:06 pm
Location: Scotland
Has thanked: 15 times
Been thanked: 6 times

Re: Tesla Charger Support Thread

Post by et0 »

With that corrected, I get more info from the debug...

Two lights are on (module 1 and 3) although I have all 3 enabled in the menu.

Code: Select all

 Proximity Status : Unconnected AC limit : 0 /Cable Limit: 0 /Module Cur Request: 333 /DC total Cur:0.01 /DC Setpoint:340 /DC tVolt:355 /DC driven AC Cur Lim: 16248
184366 State: 1 Phases : 0 Modules Avtive : 3 ON   D1 H
  Phase 1 Feebback //  AC present: 0  AC volt: 2  AC cur: 0.00  DC volt: 321  DC cur: 0.01  Inlet Targ: 216  Temp Lim Cur: 15  17  25 EN:0 Flt:1 Stat:100001
  Phase 2 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 3 Feebback //  AC present: 0  AC volt: 2  AC cur: 0.00  DC volt: 323  DC cur: 0.00  Inlet Targ: 216  Temp Lim Cur: 15  17  25 EN:0 Flt:1 Stat:100001
After connecting the AC power the module LEDs go out and the debug shows this instead:

Code: Select all

  Proximity Status : Unconnected AC limit : 0 /Cable Limit: 0 /Module Cur Request: 333 /DC total Cur:0.01 /DC Setpoint:340 /DC tVolt:355 /DC driven AC Cur Lim: 16248
277552 State: 2 Phases : 0 Modules Avtive : 3 OFF  D1 H
Modules Turned OFF
Again, any advice on what I should see here would be great. Thanks!
User avatar
tom91
Posts: 2302
Joined: Fri Mar 01, 2019 9:15 pm
Location: Bristol
Has thanked: 200 times
Been thanked: 527 times

Re: Tesla Charger Support Thread

Post by tom91 »

you need to turn on the AC as soon as you command 's' for start.

Module 2 is not reporting anything, so it might be broken/not powered up.
Creator of SimpBMS
Founder Volt Influx https://www.voltinflux.com/
Webstore: https://citini.com/
et0
Posts: 132
Joined: Sun Oct 13, 2019 8:06 pm
Location: Scotland
Has thanked: 15 times
Been thanked: 6 times

Re: Tesla Charger Support Thread

Post by et0 »

Thanks Tom. I was doing that, but the module LEDs would immediately go out, and I'd have to reset the controller and press 's' again to get them back.

However after trying it multiple times, with different modules enabled etc, suddenly it started working (clicks, and then charge current).
Now it charges whenever the IN1 input and AC power is connected, it doesn't seem to need the 's' command.

Something seems a bit random.

Module 2 has never lit up though, I will try to check that it's got the right signals. It could be that I was sold a defective unit.
User avatar
Kevin Sharpe
Posts: 1345
Joined: Fri Dec 14, 2018 9:24 pm
Location: Ireland and US
Been thanked: 8 times

Re: Tesla Charger Support Thread

Post by Kevin Sharpe »

et0 wrote: Wed Apr 01, 2020 8:24 pm Something seems a bit random.
Do you have a solid 12V ground connection to your charger metalwork?
This is a personal post and I disclaim all responsibility for any loss or damage which any person may suffer from reliance on the information and material in this post or any opinion, conclusion or recommendation in the information and material.
et0
Posts: 132
Joined: Sun Oct 13, 2019 8:06 pm
Location: Scotland
Has thanked: 15 times
Been thanked: 6 times

Re: Tesla Charger Support Thread

Post by et0 »

Kevin Sharpe wrote: Wed Apr 01, 2020 9:50 pm
et0 wrote: Wed Apr 01, 2020 8:24 pm Something seems a bit random.
Do you have a solid 12V ground connection to your charger metalwork?
Yes, have been very careful about that due to reading all the issues people had. AC Earth, car chassis and charger metalwork is bonded together with something like 6mm cable, and the 12V battery is right next to the charger.
et0
Posts: 132
Joined: Sun Oct 13, 2019 8:06 pm
Location: Scotland
Has thanked: 15 times
Been thanked: 6 times

Re: Tesla Charger Support Thread

Post by et0 »

OK, some progress! There is nothing wrong with module 2, it was just a lifted pin on the connector, which happened to be enable #2.

So they all fire up now and I've turned it up to 20A (briefly, without cooling) - no problem.


However, still one issue - as above when turning on the power for the first time, the module lights will go out. I found the only way to get past that is press the reset button!! It then starts right up and charges. And weirdly it then happily accepts the power being cycled as much as you want.

I wondered if the processor is resetting for some reason (a transient, or related to earthing), and turning off the outputs..
Doesn't seem to be related to whether the USB cable is plugged in.

Any ideas? I appreciate the help so far, it's always a lot easier to debug something if you have the first idea of how it's supposed to behave when it's working...
User avatar
Kevin Sharpe
Posts: 1345
Joined: Fri Dec 14, 2018 9:24 pm
Location: Ireland and US
Been thanked: 8 times

Re: Tesla Charger Support Thread

Post by Kevin Sharpe »

et0 wrote: Wed Apr 01, 2020 11:57 pm Any ideas?
Try gently tapping the controller board, wiring harness, connectors, etc., while it's working. Also review the controller board for any missing components. Maybe a high res photo of the controller board would allow us to do a comparison with a known working board.

What's the history of this board? Purchased from Damien, a third party, or a home build?
This is a personal post and I disclaim all responsibility for any loss or damage which any person may suffer from reliance on the information and material in this post or any opinion, conclusion or recommendation in the information and material.
et0
Posts: 132
Joined: Sun Oct 13, 2019 8:06 pm
Location: Scotland
Has thanked: 15 times
Been thanked: 6 times

Re: Tesla Charger Support Thread

Post by et0 »

Kevin Sharpe wrote: Thu Apr 02, 2020 1:01 pm
et0 wrote: Wed Apr 01, 2020 11:57 pm Any ideas?
Try gently tapping the controller board, wiring harness, connectors, etc., while it's working. Also review the controller board for any missing components. Maybe a high res photo of the controller board would allow us to do a comparison with a known working board.

What's the history of this board? Purchased from Damien, a third party, or a home build?
Thoroughly wiggle tested it! Yes, this is a home built board - I made this last year when none were available and no reply about whether more would be made. Of course by the time I got around to putting it in the car, there's another batch...

However I've ruled out a reset / crash. It's fully repeatable, now I understand the sequence, but definitely seems wrong. So I'm wondering if it's a software issue with this Gen2TeslaChargerV4.ino file - has anyone else actually used it in the "no evse" manual mode? I will try to trace what happens.

edit: found one bug, line 360:

Code: Select all

     else
      {
        bChargerEnabled == false;
        state = 0;
      }
et0
Posts: 132
Joined: Sun Oct 13, 2019 8:06 pm
Location: Scotland
Has thanked: 15 times
Been thanked: 6 times

Re: Tesla Charger Support Thread

Post by et0 »

OK, I couldn't find the exact cause but removing the call to "manualMode()" on line 417 solves the problem. The charger now starts on the 's' command, as it says in all the instructions and as Tom said.

So, take note, I guess! I will be making some code changes anyway so will submit a working version when the time comes..
User avatar
Kevin Sharpe
Posts: 1345
Joined: Fri Dec 14, 2018 9:24 pm
Location: Ireland and US
Been thanked: 8 times

Re: Tesla Charger Support Thread

Post by Kevin Sharpe »

et0 wrote: Thu Apr 02, 2020 8:31 pm I will be making some code changes anyway so will submit a working version when the time comes..
Many thanks :)
This is a personal post and I disclaim all responsibility for any loss or damage which any person may suffer from reliance on the information and material in this post or any opinion, conclusion or recommendation in the information and material.
User avatar
Jack Bauer
Posts: 3643
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 9 times
Been thanked: 285 times
Contact:

Re: Tesla Charger Support Thread

Post by Jack Bauer »

Please read the comments at the top of the code :

-Added manual control mode for use of charger without EVSE. Digital one in when brought to +12v commands the charger to start
and when brought low commands charger off. This mode also control HVDC via digital out 1 and AC mains via a contactor via Digital out 2.-Working.
I'm going to need a hacksaw
User avatar
Jack Bauer
Posts: 3643
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 9 times
Been thanked: 285 times
Contact:

Re: Tesla Charger Support Thread

Post by Jack Bauer »

Due to the Covid-19 restrictions some areas are not accepting postal shipments. This is causing delays in my shipping timetable for Tesla and other boards to customers. Where possible alternative arrangements will be made with private couriers (DHL etc) to effect delivery. If no delivery service is available then the item will be retained until normal service resumes. If you are waiting for an item and feel this may have affected you then please contact ino@evbmw.com to check with me.
I'm going to need a hacksaw
et0
Posts: 132
Joined: Sun Oct 13, 2019 8:06 pm
Location: Scotland
Has thanked: 15 times
Been thanked: 6 times

Re: Tesla Charger Support Thread

Post by et0 »

Jack Bauer wrote: Fri Apr 03, 2020 6:31 am Please read the comments at the top of the code :

-Added manual control mode for use of charger without EVSE. Digital one in when brought to +12v commands the charger to start
and when brought low commands charger off. This mode also control HVDC via digital out 1 and AC mains via a contactor via Digital out 2.-Working.
Hey Damien, I did see that, thanks. It would be quite a useful function for me. However, I don't find it to work properly. It looks like the code sets it into state 2 continuously when IN2 is high. So it never gets back to state 1 to actually charge. Or something like that. Try it and see!

Anyway, thought it was worth a heads up for anyone else coming to it fresh, as that is different to what the instructions say.
et0
Posts: 132
Joined: Sun Oct 13, 2019 8:06 pm
Location: Scotland
Has thanked: 15 times
Been thanked: 6 times

Re: Tesla Charger Support Thread

Post by et0 »

[duplicate]
User avatar
Jack Bauer
Posts: 3643
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 9 times
Been thanked: 285 times
Contact:

Re: Tesla Charger Support Thread

Post by Jack Bauer »

Well that is weird for sure. That mod was done specifically for a guy in the US who wanted to run his charger without evse. He reported it working fine but who knows.... Anyway, thanks for the heads up:)
I'm going to need a hacksaw
Johaljaswant
Posts: 56
Joined: Wed Jul 03, 2019 1:35 pm
Location: USA

Re: Tesla Charger Support Thread

Post by Johaljaswant »

Hello Kevin
As my question was about Pilot signal voltage is 3V. Actually on further testing I found out as I turn on the
12 V supply to charger it supply drop to 3.8 V. What could be the reason.

Thanks
User avatar
Kevin Sharpe
Posts: 1345
Joined: Fri Dec 14, 2018 9:24 pm
Location: Ireland and US
Been thanked: 8 times

Re: Tesla Charger Support Thread

Post by Kevin Sharpe »

Johaljaswant wrote: Sat Apr 04, 2020 1:10 am Actually on further testing I found out as I turn on the
12 V supply to charger it supply drop to 3.8 V. What could be the reason.
Please try and find a local electronics engineer who can help you. You risk damaging the controller card and charger if you don't know how to diagnose a 12V power supply fault.
This is a personal post and I disclaim all responsibility for any loss or damage which any person may suffer from reliance on the information and material in this post or any opinion, conclusion or recommendation in the information and material.
User avatar
cancer038
Posts: 9
Joined: Fri Feb 21, 2020 3:54 pm
Location: Turkey

Re: Tesla Charger Support Thread

Post by cancer038 »

Jack Bauer wrote: Fri Apr 03, 2020 6:31 am Please read the comments at the top of the code :

-Added manual control mode for use of charger without EVSE. Digital one in when brought to +12v commands the charger to start
and when brought low commands charger off. This mode also control HVDC via digital out 1 and AC mains via a contactor via Digital out 2.-Working.
apparently many modes have been added. therefore, the manual should be updated. and we are still waiting for v5 video on youtube. screen recordings would be nice if they were of good quality. There are many documents. should be combined as a single document :) :) :)
User avatar
Jack Bauer
Posts: 3643
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 9 times
Been thanked: 285 times
Contact:

Re: Tesla Charger Support Thread

Post by Jack Bauer »

An excellent idea. I have created an open task for this. Feel free to make a start.
viewtopic.php?f=18&t=664
I'm going to need a hacksaw
User avatar
rx7r3ev
Posts: 7
Joined: Tue Apr 02, 2019 4:14 pm
Location: San Diego, California

Re: Tesla Charger Support Thread

Post by rx7r3ev »

Kevin Sharpe wrote: Sat Mar 28, 2020 11:49 am
What you want to verify is the proximity pin behaviour at the charger when the J1772 connector is plugged in. What voltage do you measure on the charger control board resistor R12? Does this change when you press the J1772 button?
Here's the measurement I got:
  • Not Connected - 3.09 volts
  • Button Pressed - 2.16 volts
  • Connected - 1.31 volts
These values seems to be low compare to the standard you posted above. However, I was looking at the source code in GitHub for my Gen2V3 board which I assumed is the one loaded in my board - correct me if I'm wrong?

Gen2TeslaChargerV2.ino
https://github.com/damienmaguire/Tesla- ... rgerV2.ino

In header comments it has these:

Code: Select all

//proximity status values for type 1
#define Unconnected 0 // 3.3V
#define Buttonpress 1 // 2.3V
#define Connected 2 // 1.35V
These are not the exact values I measured but are these within range as expected?
These are just a comment so I'm not sure if these are the exact readings in the EVSE.

The EVSE reading seems to be coming from this portion of the code:

Code: Select all

void evseread() {
. . .
  uint16_t val = 0;
  val = analogRead(EVSE_PROX);     // read the input pin
. . .
  if ( parameters.type == 1)
  {
    if ( val > 800)
    {
      Proximity = Unconnected;
    }
    else
    {
      if ( val > 550)
      {
        Proximity = Buttonpress;
      }
      else
      {
        Proximity = Connected;
      }
    }
  }
. . .
}
Anybody knows what's the conversion factor for val?

Any other tip or ideas I may pursue? Or should I compile the code and upload it in my Gen2V3 board for more debugging?

Thanks!
Attachments
IMG_7868.jpg
User avatar
Kevin Sharpe
Posts: 1345
Joined: Fri Dec 14, 2018 9:24 pm
Location: Ireland and US
Been thanked: 8 times

Re: Tesla Charger Support Thread

Post by Kevin Sharpe »

rx7r3ev wrote: Sun Apr 05, 2020 3:06 am Any other tip or ideas I may pursue?
What connector type are you selecting (sorry I don't know whether this is a runtime or compile option)? If you read this comment from Tom you'll see that you must select Type 1 and ignore the cable current resistors because they don't exist in the J1772 connector;

viewtopic.php?f=10&t=489&p=8802#p8799

*** we really need someone who is running the Gen 2 charger with the J1772 connector to step up and help this user ***
This is a personal post and I disclaim all responsibility for any loss or damage which any person may suffer from reliance on the information and material in this post or any opinion, conclusion or recommendation in the information and material.
User avatar
Kevin Sharpe
Posts: 1345
Joined: Fri Dec 14, 2018 9:24 pm
Location: Ireland and US
Been thanked: 8 times

Re: Tesla Charger Support Thread

Post by Kevin Sharpe »

Posted in the Tesla LDU support thread but highly relevant to this thread;
Jack Bauer wrote: Mon Apr 06, 2020 6:20 am Just to address the comment " So I should pull the "built and tested" logic board i purchased from EVBMW and check it for errors is ultimately what wigman is saying?"

For 3 years now I have designed , innovated and tested as much as possible for one person on a very limited budget all the while looking for ways to make the boards more accessible (ie cheaper) for end users. Any mistakes I make along the way are aired out in public for all to see and hopefully learn from. Wigman has a broken solder joint (leaving out the possibly software related temp sensor problem for now) and he found this by his own actions. My fault? quite possibly. I do test the current sensors as part of the procedure and would have noticed this problem. And yes I do hand solder on the connectors and yes most likely the pin in question didn't get enough solder. The reason I have stood off here and will continue to do so where possible is twofold. YOU as the user need to be able to find and repair basic problems when I'm not around. What happens in 5 years if Wigman or someone else has another broken solder joint and I'm chilling on a beach having retired on the massive profits I make on these boards? The answer is community knowledge that gets passed along. Just like knowledge of ice cars.

So, is "built and tested" perfect? of course not. It's "built and tested" to the best of my ability. Not good enough ? then you are free to download the source , or indeed send the files to jlcpcb yourself, and do better. In fact I encourage YOU to do better than me. At least 50% of my sales are to the USA. Why not setup a US source for these boards? with support. I won't stop you. I'm too busy with the Model 3 and toyota stuff.
This is a personal post and I disclaim all responsibility for any loss or damage which any person may suffer from reliance on the information and material in this post or any opinion, conclusion or recommendation in the information and material.
User avatar
rx7r3ev
Posts: 7
Joined: Tue Apr 02, 2019 4:14 pm
Location: San Diego, California

Re: Tesla Charger Support Thread

Post by rx7r3ev »

I build the opensource code and uploaded it to the board. I've put debug statements on the "evseread()" values. The values being returned by the evseread() is not consistent during different states {unconnected, button-pressed, connected}. The values floats from 928, 976, 944, 800... and so on. I can force the charger to start if I hard code the evse value to the state that it will turn on.

The voltage reading I have on R12 on the board was consistent from last time :
unconnected : 3:09V
button-pressed: 2.16V
connected : 1.31V
(I will need to verify next the voltage reading at the ATSAM3X8EA-AU chip pin 78 {PA16} just to be sure).

I've tested with both versions of the code - "Gen2TeslaChargerV2" and "Gen2TeslaChargerV4" with the same result.

Now, it might be the case that the analog channel (A0) is defective on the chip? Any other thoughts? Maybe Damien can pitch in on this one? Thanks!

Code: Select all

    val = analogRead(EVSE_PROX); 


For reference here's library and code I've used for the build:

Source code location for the charger : https://github.com/damienmaguire/Tesla-Charger

Library versions from: https://github.com/collin80/
  • duecan : 19ab159
  • can_common : c25980a
  • due_wire : af6e10f
  • rtc-lib : 4367ed0
Debug Code:

New variable for printing the evseread() value placed in the top of the file.

Code: Select all

// JGM debug
uint16_t _val=0;
Added the print at the debug statement.

Code: Select all

// JGM - debug
Serial.print("* * * evseread() - ");
Serial.print(_val);
        
        Serial.println();
        Serial.print("  Proximity Status : ");
 
Capture the value at the evseread().

Code: Select all

uint16_t val=0;
val = analogRead(EVSE_PROX);     // read the input pin
_val = val;
Attachments
I can force the charger to go on if I force the values according to state being expected.
I can force the charger to go on if I force the values according to state being expected.
evseread() reading not consistent with the voltage read from R12.  The values here fluctuates from the different state of 'unconnected', 'button-pressed' and 'connected'.  Seems to be random {928, 976, 944, 800,...}
evseread() reading not consistent with the voltage read from R12. The values here fluctuates from the different state of 'unconnected', 'button-pressed' and 'connected'. Seems to be random {928, 976, 944, 800,...}
User avatar
tom91
Posts: 2302
Joined: Fri Mar 01, 2019 9:15 pm
Location: Bristol
Has thanked: 200 times
Been thanked: 527 times

Re: Tesla Charger Support Thread

Post by tom91 »

Please ensure you wiring has good connections everywhere, especially the ground.

If you have a scope use that to measure the voltage at the resistor, with your debugging you can then see if a value stabilises at the each state.
If it does there is no wiring issue and ADC issue. If it keeps jumping there is, easiest state to check is unconnected.

If this is not the case software cannot fix this.

The place this is handeled is here, so if you get stable values just move the values around to match.:

Code: Select all

  if ( parameters.type == 1)
  {
    if ( val > 800)
    {
      Proximity = Unconnected;
    }
    else
    {
      if ( val > 550)
      {
        Proximity = Buttonpress;
      }
      else
      {
        Proximity = Connected;
      }
    }
  }
Creator of SimpBMS
Founder Volt Influx https://www.voltinflux.com/
Webstore: https://citini.com/
Locked