# Hacking the Tesla Model S Front Junction Box



## Kevin Sharpe (Jul 4, 2011)

Removing the cover is easy and reveals the HV connection (power feed from the Rear HVJB), lots orange insulating plastic, and a single PCB


----------



## Kevin Sharpe (Jul 4, 2011)

A quick look at the PCB reveals four HV fuses and a busy power circuit.

Fuse F1 (20A) connects the HV to the "Grey" connector via three IPB60R099CPA MOSFETs (here) and a .005R WSL2726 resistor (here). I suspect the busy power circuit is controlling the MOSFETs and has no connection with the other fused supplies.

Fuse F2 (40A) connects the HV to the "Orange" connector.

Fuse F3 (40A) connects the HV to the "Brown" connector.

Fuse F4 (20A) connects the HV to the "Blue" connector.

All HV connectors have HVIL pins that are connected to the PCB. The case lid and HV input cables also have detection switches.


----------



## Tomdb (Jan 28, 2013)

There is current measurement after the fets, see the curled up busbar.

Wait a minute, why would the fets control the HV to the 'grey' HV connector and measure current?

So would this mean that the PTC heater (water???) be a dumb module? Ah 2013 module looking at some info the battery heater just needs a pwm into the junction box.

Plus nice isolation devices (Big SMD packages) just like on the bms slaves.


----------



## Kevin Sharpe (Jul 4, 2011)

Tomdb said:


> So would this mean that the PTC heater (water???) be a dumb module? Ah 2013 module looking at some info the battery heater just needs a pwm into the junction box.


Yep... here's the key info


----------



## DrJeff (Apr 24, 2015)

Tomdb said:


> There is current measurement after the fets, see the curled up busbar.
> 
> Wait a minute, why would the fets control the HV to the 'grey' HV connector and measure current?
> 
> ...


I have parts from a 2015 70D... 

1) the PTC Cabin Heater operates from CAN. Like some of the other Tesla modules, it has a Tesla designed control board that drives a main board. I did see some recent hacking by others on controlling the mainboard IGBTs directly. The heater is fairly large and I'm 50/50 I can get it to fit into my airbox. I'm hoping Damien gets a look at it.

2) the Air Conditioning Compressor was also CAN controlled. I also bought a 2014 Tesla compressor which is reportedly PWM controlled, but I haven't done any experimenting with it yet (not an easy thing to test without already being in a system) - probably something better learned from a working 2014 Model S.

3) The coolant heater (battery heater) looks like the not intelligent device. Previous suggestions were that a PWM signal to the Front HVJB controlled the power to the heater. My battery (A123 from a 2014 Chevy Spark) already has an integrated heater (controlled locally within the BMS) so I may just be using the heater for cabin heat (assuming I can't get the PTC heater jammed in).

4) The DCDC also has a direct CAN connection. Interestingly in my DCDC there is no Tesla branded board. I'm hoping that the device will simply report CAN out rather than need CAN to operate (at least beyond a 'fail safe' mode). It's only the list of things to test next. I'm also hoping Damien will tackle the DCDC.

Jeff


----------



## oudevolvo (Mar 10, 2015)

To avoid going too much off topic in the Tesla Battery Heater topic (which of course is related), I have a question about the FHVJB.

What are the dimensions of the box?
(length/width/height) and size of the holes for the incoming power cable.
That allows me to create a dummy and explore possible locations in my car while looking for a FHVJB myself.

And is the corresponding plug for the control connector known?
Edit: sorry, see it mentioned above: Molex 33472-1201


----------



## DrJeff (Apr 24, 2015)

oudevolvo said:


> What are the dimensions of the box?
> (length/width/height) and size of the holes for the incoming power cable...


I've got it up on the bench at the moment.

Front HVJB
L : 9 1/4in case (10 3/4 to allow for LV connector and ground connection)
W: 8 1/4in case (9 1/4 to allow for HV plugs to AC,DCDC,etc. and HV in)
H: 2 3/4in case (3 1/4 if the mounting bracket still fitted)

HV hole size
less than 15mm, hard to get actual without disassembly, probably 13-14mm diameter.

Jeff


----------



## oudevolvo (Mar 10, 2015)

Thanks!
Perhaps it just fits in between my battery box and motor.








Otherwise somewhere near the contactor box.

The LAPP glands I use are either M16 or M12, but perhaps it’s best to also source the cable and connector.


----------



## oudevolvo (Mar 10, 2015)

Another question on dimensions (did not get my hands on a box myself).

What is the outer diameter of the cable going into the HVJB?

So the orange cable that has been cut shown on this photo by Kevin.








Then I know what gland to use on the other side and design/draw the appropriate hole in my battery box.
Thanks in advance!


----------



## oudevolvo (Mar 10, 2015)

Finally I've found my FHVJB! I also have a Tesla service manual.
Now the question is, how to use the FHVJB to PWM control the heater?
Unfortunately 1 and ! isn't 2 for me at this stage.
Building on the connector X040 info Kevin shared earlier I'd been expecting 4 wires in the connector. In the box I see 6.
Connector numbering/layout
6/5/4/3/2/1
12/11/10/9/8/7
Then I see:
6 = White
5 = Yellow
4 = Red
12 = Blue
11 = Green
10 = Black







Unfortunately besides the HVIL and Thermal controller I cannot find any reference in the wiring diagram that could help me in understanding what is what.
Has anyone already figured this out? Or a suggestion how I could approach this?


----------



## DrJeff (Apr 24, 2015)

Front HVJB

inputs that I've tagged (but not verified with operation)

1 - blank
2 - blank
3 - blank
4 - OR 12v (orange)
5 - RD PWM in
6 - BL STAT out (PWM)
7 - blank
8 - blank
9 - blank
10 - BK Gnd
11 - YL-BL HVIL
12 - YL-RD HVIL

Note: also a large ground strap connected to the protrusion/nut just to the left of the low voltage connector

Connector : Molex 33472-1201 (I'm pretty sure)

Jeff


----------



## oudevolvo (Mar 10, 2015)

Thanks!
On scribd I found an newer version of the Tesla service manuals and those made more sense. I could trace your list back and came to the same conclusion. I think I'm staring to understand things  Should have gotten that manual much earlier.

I have measured and can conform the pins 11 and 12 as the HVIL lines.

And answers do trigger new questions:
- Can we do anything with pin 6 (STAT out (PWM))? Curious what kind of signal it will give.
- What are the characteristics of PWM in (pin 5)? Is that just a matter of assuming it's 12V (should be logic in a car) and try different frequencies?


----------



## DrJeff (Apr 24, 2015)

oudevolvo said:


> And answers do trigger new questions:
> - Can we do anything with pin 6 (STAT out (PWM))? Curious what kind of signal it will give.
> - What are the characteristics of PWM in (pin 5)? Is that just a matter of assuming it's 12V (should be logic in a car) and try different frequencies?


My plan was to start with a 5v PWM signal, probably starting at 1Hz and working up (faster). Since the PWM is coming from a controller, I suspect they'll use 5v signals rather than a 12v. The Tesla pumps used a 1Hz signal - which caught me by surprise as I was expecting something in the 1kh range. I would guess that there is really only a need to send a PWM with a hertz that's twice as fast as the device can respond anyways. There's got to be some design balance between what is easy for the controller to parse (how easy it is to read the PWM signal) and how often it needs to see changes in the PWM.

I'm guessing the STAT will be something like 0-5v as a signal to the controller (outside the Front HVJB) that the heater is actually responding. Since the heater response is likely to significantly lag the controller instructions.

The control scheme would be something like 1) update the PWM, 2) wait for the STAT to get into the expected range. I feel some interesting tests coming on... pumping some coolant through the heater, sending PWM instructions, and then watching STAT and coolant temps to understand the response.

Jeff


----------



## jsimonkeller (May 15, 2018)

DrJeff said:


> My plan was to start with a 5v PWM signal, probably starting at 1Hz and working up (faster).


I was wondering if this testing happened and where things landed on the PWM front. I am the point of connecting everything up in my build and wondered. If there is another thread that picked this up, let me know.

Also, I am using a FISKER coolant cabin heater (Eberspacher) over a PTC heater for my build, to allow the heated coolant to run through the RESTOMOD HVAC system (like an ICE vehicle) and planned to use the PTC HV connection for this heater, since the voltage for the Fisker (250-450VDC typ 350V DC) is similar to the voltage for a PTC heater. I chose this coolant heater because it runs on PWM heat demand signal 12V; active low (5k internal pull up resistor), 40-300Hz. 

Any concerns or comments about powering this heater from the PTC slot on the high voltage distribution box?

Thanks!


----------



## alexbeatle (Jul 28, 2020)

Hello, Team.
Has anybody been able to figure out the control of these devices via the Front HVJB?


----------



## dlud (Jul 19, 2021)

jsimonkeller said:


> I was wondering if this testing happened and where things landed on the PWM front. I am the point of connecting everything up in my build and wondered. If there is another thread that picked this up, let me know.
> 
> Also, I am using a FISKER coolant cabin heater (Eberspacher) over a PTC heater for my build, to allow the heated coolant to run through the RESTOMOD HVAC system (like an ICE vehicle) and planned to use the PTC HV connection for this heater, since the voltage for the Fisker (250-450VDC typ 350V DC) is similar to the voltage for a PTC heater. I chose this coolant heater because it runs on PWM heat demand signal 12V; active low (5k internal pull up resistor), 40-300Hz.
> 
> ...


Where did you source this heater? I've looked and no success.


----------



## jsimonkeller (May 15, 2018)

dlud said:


> Where did you source this heater? I've looked and no success.


I got mine off EBAY a couple of years ago. The heater is made by eberspäche (eberspacher ) and specs are attached.


----------



## dlud (Jul 19, 2021)

jsimonkeller said:


> I got mine off EBAY a couple of years ago. The heater is made by eberspäche (eberspacher ) and specs are attached.


Interesting. I don’t see them selling anywhere. I think I can put together a system using a grouping of parts like EVTV used.


----------



## alexbeatle (Jul 28, 2020)

Anybody knows what connectors are used in the power indeed here?


----------



## jason_arnold (Jan 15, 2014)

Like what HV connectors are used on the Tesla HVJB? Those are KET HVSC 280 series, but they're not available to mere mortals :/

For reference:

Orange (A/C): MG655773 (key A)
Gray (fluid heater): MG655774 (key B)
Brown (PTC heater): MG655775 (key C) 
Blue (DC-DC): MG655776 (key D)


----------



## alexbeatle (Jul 28, 2020)

jason_arnold said:


> Like what HV connectors are used on the Tesla HVJB? Those are KET HVSC 280 series, but they're not available to mere mortals :/
> 
> For reference:
> 
> ...


Thanks.

Has anybody made an alternative to the infeed power connectors work? The jbox I bought doesn't have a cable. 
Looking at the picture, the connector is just there to seal the round holes. The actual connections are on the inside of the jbox.


----------



## jason_arnold (Jan 15, 2014)

alexbeatle said:


> Hello, Team.
> Has anybody been able to figure out the control of these devices via the Front HVJB?


Yep. Been spending a bit of time pumping the collective data forum this forum and the OI forum into the OI wiki - there's a reasonably thorough section on Tesla OEM bits there now. Was kinda keeping it under wraps until it was finished, but just built up the last of it tonight 

You'll find the sum of it all here: Tesla - openinverter.org wiki


----------



## streber42 (10 mo ago)

alexbeatle said:


> Thanks.
> 
> Has anybody made an alternative to the infeed power connectors work? The jbox I bought doesn't have a cable.
> Looking at the picture, the connector is just there to seal the round holes. The actual connections are on the inside of the jbox.


The metal glands there are terminating the shielding on the cable (and sealing the holes). So if you can live without the shielding termination and can seal them some other way you can use anything.


----------



## alexbeatle (Jul 28, 2020)

streber42 said:


> The metal glands there are terminating the shielding on the cable (and sealing the holes). So if you can live without the shielding termination and can seal them some other way you can use anything.


I see. I'll examine how I can get creative with shielding. Else need to order a cable, which is not ideal.

Thank you.


----------



## alexbeatle (Jul 28, 2020)

jason_arnold said:


> Yep. Been spending a bit of time pumping the collective data forum this forum and the OI forum into the OI wiki - there's a reasonably thorough section on Tesla OEM bits there now. Was kinda keeping it under wraps until it was finished, but just built up the last of it tonight
> 
> You'll find the sum of it all here: Tesla - openinverter.org wiki


This is incredible! Thank you for your efforts. This will help many of us.


----------



## oudevolvo (Mar 10, 2015)

Instead of using the original box, I embedded the logic / fuse holder board from the Tesla FHVJB in my (aluminum) contactor box and used universal glands for shielding.


__
http://instagr.am/p/CN_4ISbn8nh/


----------



## alexbeatle (Jul 28, 2020)

oudevolvo said:


> Instead of using the original box, I embedded the logic / fuse holder board from the Tesla FHVJB in my (aluminum) contactor box and used universal glands for shielding.
> 
> 
> __
> http://instagr.am/p/CN_4ISbn8nh/


I think this is what I will do too. Thanks for advise.


----------



## alexbeatle (Jul 28, 2020)

jason_arnold said:


> Like what HV connectors are used on the Tesla HVJB? Those are KET HVSC 280 series, but they're not available to mere mortals :/
> 
> For reference:
> 
> ...


Interesting that connectors are rated for 20A, while the ptc heater has a 40A fuse...🤔
High Voltage Fuse | xEV Parts | 제품 | KET
Same goes for the A/C compressor connector..

Do we know the wire sizes used?


----------



## remy_martian (Feb 4, 2019)

It says the wire size on the link you provided....3mm^2


----------



## alexbeatle (Jul 28, 2020)

oudevolvo said:


> Instead of using the original box, I embedded the logic / fuse holder board from the Tesla FHVJB in my (aluminum) contactor box and used universal glands for shielding.
> 
> 
> __
> http://instagr.am/p/CN_4ISbn8nh/


Looks like this is how the FETs use the jbox as the heat sink.
Does your design do the same? If not, have you seen any overheating?


----------



## dlud (Jul 19, 2021)

Does the use of the FHVJB to control the heater eliminate the need for a contactor?


----------



## alexbeatle (Jul 28, 2020)

dlud said:


> Does the use of the FHVJB to control the heater eliminate the need for a contactor?


The heater temp setting is defined by the HV PWM generated by the FHVJB. Without the pwm control, the heater can only be on or off.


----------



## dlud (Jul 19, 2021)

Understand that and am assuming that the FHVJB serves as the hv contactor for the heater


----------



## alexbeatle (Jul 28, 2020)

dlud said:


> Understand that and am assuming that the FHVJB serves as the hv contactor for the heater


If I understand correctly by looking at the PCB and the previous posts in the thread... All devices (except the fluid heater) are merely connected via fuses to the HV input, i.e. no control via the FHVJB.

The heater is controlled via PWM inside the box. If you think of PWM at 0% as heater off and at 100% heater fully on, then, yes, it can be viewed as an equivalent to a contactor, where contacts open = heater off, contacts closed = heater fully on.

Hope this explains.


----------



## oudevolvo (Mar 10, 2015)

alexbeatle said:


> Looks like this is how the FETs use the jbox as the heat sink.
> Does your design do the same?


Yes, I re-used that from the original enclosure and installed it in my own contactor box with some thermal transfer paste.


----------

