Page 5 of 8

Re: Model 3 High Voltage Controller

Posted: Fri Apr 29, 2022 12:25 pm
by bielec
I tried 2 ohms on the pyrotechnic cell but no different.
I found some suitable can logs and sent them but got some pulsing of input current like before. When this was happening, I noticed a faint pinging from the contactors. So it is trying to energise them and I was suspicious that my psu wasn't up to the job. I measured the contactor coils at 2 ohms which would be 6A at 12v. Then added a jump start battery and heavier wires to suppliment my psu but no better. Scoped the 12v rail and noticed small blips when the energise attempts happened. These were less than 0.5v and were repeated 8 times at 2mS apart and diminished in amplitude towards the last. This suggests to me that there is low voltage on the contactor supply and that it is decaying under load. I suppose this comes from the dcdc, so maybe it is not being energised?
Edit... I checked the voltage on the contactor coil pins and there is none! Or, there is perhaps 0.1v on one of them which is possibly enough to cause the "pinging" I hear when closure is comanded. The Model 3 schematic shows the contactors have "always on" supply at the contactor coils so where has it gone? The 3 fuses are intact and I do have +12v on pins 18 and 8 of X098

Re: Model 3 High Voltage Controller

Posted: Sat Apr 30, 2022 12:53 pm
by bielec
I notice on the official Tesla Model 3 schematics that the battery pack has two water detectors. It would be reasonable to suspect that contact closure would be prevented if water is detected. The signal names show "Hall sensor" which made me wonder if they were floats with magnets on. Now, I am using my battery in the vertical position and that might upset such sensors. I notice that evtv used their model 3 batteries flat whereas they used model S batteries vertical. Off I went and lowered my battery to the horizontal position and .... still no closure! I am sure the closure is being attempted because of the pulses of supply current I see - there are two pulses half a second or so apart and the current reaches 1.5A or so. This may be the driver firing up but there is only a tiny voltage on the coils.

Re: Model 3 High Voltage Controller

Posted: Sat Apr 30, 2022 2:25 pm
by EV_Builder
I think you full-fill the requirements of closing the coils but not the ones preventing it from opening.
It could happen that the software cycle is 2mS en thus you measure this as outputs going high and directly low again.
(would be not so nice design but who knows....)

Another option is that the coils are safety controlled (like SIL relais do) then those pulses are only "is there a valid coil connection" pulses.

Re: Model 3 High Voltage Controller

Posted: Sat Apr 30, 2022 5:46 pm
by bielec
M3221init.csv
(828 Bytes) Downloaded 130 times
Interesting observations today. The "pinging" in the coils stops when I remove the links on the Front and rear drive connector sense pins so that confirms the loop is ok. The pinging is not stopped when I remove the supercharger and ac charger connectors. I am currently sending a group of 0x221 messages found online (attached) and the timing of sending these is important. There must be between 5mS and 50mS delay set in Savvycan for them to work.

Re: Model 3 High Voltage Controller

Posted: Sun May 01, 2022 1:09 pm
by bielec
I now have contact closure! I needed a capacitor across the HV output presumably to satisfy the charge up time of the precharge process.
The contactors take a lot of current at the start and the dcdc converter puts out a lot of voltage too, I saw almost 20v across the battery terminals for a moment. I hope that has not done damage. A large battery is required to absorb that rush

Re: Model 3 High Voltage Controller

Posted: Sun May 01, 2022 4:57 pm
by nkiernan
bielec wrote: Sun May 01, 2022 1:09 pm I now have contact closure!
Great work bielec :)

Re: Model 3 High Voltage Controller

Posted: Sun May 01, 2022 7:17 pm
by muehlpower
Since I only want to use the HV controller for voltage and temperature monitoring and for balancing, I would be interested in how to initiate balancing.
Greatest respect for your work. Please continue to post any findings.

Re: Model 3 High Voltage Controller

Posted: Wed May 11, 2022 11:47 am
by bielec
Here is my initial Arduino sketch to display data from the Model 3 battery and operate the contactors. It is based on the EVTV program for the Model S. The cell voltage display is commented out but does work. Send "c" to toggle the contactors on/off. There are a lot of remnants from the original code which are not used.

Re: Model 3 High Voltage Controller

Posted: Thu May 12, 2022 10:39 am
by nkiernan
bielec wrote: Wed May 11, 2022 11:47 am Here is my initial Arduino sketch to display data from the Model 3 battery and operate the contactors. It is based on the EVTV program for the Model S. The cell voltage display is commented out but does work. Send "c" to toggle the contactors on/off. There are a lot of remnants from the original code which are not used.
Nice work Bielec :) looking forward to trying this on my disassembled pack

Re: Model 3 High Voltage Controller

Posted: Thu May 12, 2022 10:54 pm
by collin80
bielec wrote: Sun May 01, 2022 1:09 pm I now have contact closure! I needed a capacitor across the HV output presumably to satisfy the charge up time of the precharge process.
The contactors take a lot of current at the start and the dcdc converter puts out a lot of voltage too, I saw almost 20v across the battery terminals for a moment. I hope that has not done damage. A large battery is required to absorb that rush
The Model 3 works by taking your 12V input and using a DC/DC converter to "precharge" by literally generating the full pack voltage from 12V. I don't entirely know why they did that, probably so they don't need a precharge resistor. They just pump energy into the HV system until it charges up and then close the contactors. So, you probably really won't be able to close the contactors until it sees a voltage on the output that matches the voltage of the battery. Once they're close the contactors can close without any arcing. It's ingenious in a way and really quite odd in other ways. I haven't heard of DC/DC charge pumping as a precharge system before. But, it's a pretty neat idea.

Re: Model 3 High Voltage Controller

Posted: Fri May 13, 2022 2:39 pm
by bielec
collin80 wrote: Thu May 12, 2022 10:54 pm The Model 3 works by taking your 12V input and using a DC/DC converter to "precharge" by literally generating the full pack voltage from 12V. I don't entirely know why they did that, probably so they don't need a precharge resistor.
Probably because they didn't like using a precharge R. which charges exponentially and only gets there at time=infinity. A flyback type step up converter is more or less constant current while ramping up so would give a linear ramp up to the target voltage and thus make timing easy to predict.

Re: Model 3 High Voltage Controller

Posted: Fri May 13, 2022 2:58 pm
by EV_Builder
bielec wrote: Fri May 13, 2022 2:39 pm
collin80 wrote: Thu May 12, 2022 10:54 pm The Model 3 works by taking your 12V input and using a DC/DC converter to "precharge" by literally generating the full pack voltage from 12V. I don't entirely know why they did that, probably so they don't need a precharge resistor.
Probably because they didn't like using a precharge R. which charges exponentially and only gets there at time=infinity. A flyback type step up converter is more or less constant current while ramping up so would give a linear ramp up to the target voltage and thus make timing easy to predict.
The biggest question is how much complexity you need to add to the DC/DC converter. If that's not to much then its an easy gain of energy losses, space , costs etc.

Re: Model 3 High Voltage Controller

Posted: Sat May 14, 2022 2:22 am
by collin80
EV_Builder wrote: Fri May 13, 2022 2:58 pm The biggest question is how much complexity you need to add to the DC/DC converter. If that's not to much then its an easy gain of energy losses, space , costs etc.
Probably not a lot I'd guess. If their DC/DC is already a buck/boost type (or similar) system then it probably can work both directions. So, if you are already doing 400V -> 12V it may be more or less possible to go backward and do 12V -> 400V instead. But, that only works on certain types of DC/DC converter. Still, I haven't heard of other manufacturers doing this. I'd love to hear if any of them are. I have a Bolt and it uses a resistor. All the older Teslas use a resistor. The Model 3/Y seem like the first I've heard of any company doing this. But, I still do think it's a pretty neat idea.

Re: Model 3 High Voltage Controller

Posted: Mon May 16, 2022 2:35 am
by vdawger
bielec wrote: Sun May 01, 2022 1:09 pm I now have contact closure! I needed a capacitor across the HV output presumably to satisfy the charge up time of the precharge process.
The contactors take a lot of current at the start and the dcdc converter puts out a lot of voltage too, I saw almost 20v across the battery terminals for a moment. I hope that has not done damage. A large battery is required to absorb that rush
Has anyone been able to get the model 3 battery pack contactors to close without a capacitor of some sort connected across the HV output?

I'm wondering if this has been my problem all along.

Re: Model 3 High Voltage Controller

Posted: Mon May 16, 2022 9:47 pm
by bielec
vdawger wrote: Mon May 16, 2022 2:35 am
Has anyone been able to get the model 3 battery pack contactors to close without a capacitor of some sort connected across the HV output?

I'm wondering if this has been my problem all along.
To be clear, I connected a 1000uF 450v capacitor across one of the motor output connectors. Both the motor connectors (edit) and the ancilliary hv connector (edit) had the small HVIL pins shorted. Many different 0x221 messages would cause closure but I ended up sending the one in the code below. It was sent repeatedly at 30mS intervals. 60mS was too slow and 5mS too fast. I used an Arduino Due with Collin Kidders excellent CAN library.

Now if anyone can tell me how to activate the internal charger on 240v ac I would be much obliged. I see Damien McGuire has activated the charger by bypassing the HV controller. Do you think we could just send the same commands as he does , but to the HV controller?

Code: Select all

void send221frame()                     // causes contact closure
{
        outframe.id = 0x221;            // Set our transmission address ID
        outframe.length = 8;            // Data payload 8 bytes
        outframe.extended = 0;          // Extended addresses - 0=11-bit 1=29bi
        outframe.rtr=1;                 //No request
        outframe.data.bytes[0]=0x41;
        outframe.data.bytes[1]=0x11;  
        outframe.data.bytes[2]=0x01;
        outframe.data.bytes[3]=0x00;
        outframe.data.bytes[4]=0x00;
        outframe.data.bytes[5]=0x00;
        outframe.data.bytes[6]=0x20;
        outframe.data.bytes[7]=0x96;
        
  Can0.sendFrame(outframe);    //Mail it                    
}
[code]

Re: Model 3 High Voltage Controller

Posted: Wed Jul 13, 2022 4:59 am
by vdawger
Thanks to the help of everyone on this forum and especially bielec, I was able to get HV contact closure. I did indeed need a capacitor connected to the output of the HV lines of the battery.

I now have 2 issues I'm wondering if anyone else has encoutered. They may be related.

1) The HV contactors no longer close. They get to the below message. I get no precharge ramp up on the HV lines, and then it switches back to open.

Code: Select all

D1 12 09 42 18 01    <ID20AHVP_contactorState>
HVP_dcLinkAllowedToEnergize: 1
HVP_fcContNegativeAuxOpen: 1
HVP_fcContNegativeState: CONTACTOR_STATE_OPEN
HVP_fcContPositiveAuxOpen: 1
HVP_fcContPositiveState: CONTACTOR_STATE_OPEN
HVP_fcContactorSetState: CONTACTOR_SET_STATE_OPEN
HVP_fcCtrsClosingAllowed: 0
HVP_fcCtrsOpenNowRequested: 0
HVP_fcCtrsOpenRequested: 0
HVP_fcCtrsRequestStatus: REQUEST_COMPLETED
HVP_fcCtrsResetRequestRequired: 0
HVP_fcLinkAllowedToEnergize: FC_LINK_ENERGY_NONE
HVP_hvilStatus: STATUS_OK                    <!----
HVP_packContNegativeState: CONTACTOR_STATE_OPEN
HVP_packContPositiveState: CONTACTOR_STATE_PRECHARGE
HVP_packContactorSetState: CONTACTOR_SET_STATE_CLOSING   <!-----
HVP_packCtrsClosingAllowed: 1
HVP_packCtrsOpenNowRequested: 0
HVP_packCtrsOpenRequested: 0
HVP_packCtrsRequestStatus: REQUEST_ACTIVE
HVP_packCtrsResetRequestRequired: 0
HVP_pyroTestInProgress: 0
I also get this, which is new for me.

Code: Select all

53 00 02 00 FF FF 00 00    <ID232BMS_contactorRequest>
BMS_ensShouldBeActiveForDrive: 0
BMS_fcContactorRequest: SET_REQUEST_OPEN_IMMEDIATELY  <!------
BMS_fcLinkOkToEnergizeRequest: 3
BMS_gpoHasCompleted: 1
BMS_internalHvilSenseV: 0V
BMS_packContactorRequest: SET_REQUEST_OPEN
BMS_pcsPwmDisable: 0

2) I am now trying to get the model 3 complete battery pack to charge via the standard model 3 charge port. I've been replicating can logs taken from a model 3 during charging. However, I now get the following two messages:

Code: Select all

82 C5 00 00 00 06 10 5B    <ID224PCSDCDCstatus>
DCDC12VSupportRtyCnt224: 0
DCDC12VSupportStatus224: 0
DCDCDischargeRtyCnt224: 0
DCDCFaulted224: 1
DCDCHvBusDischargeStatus224: 0
DCDCInitialPrechargeSubState224: 11
DCDCoutputCurrent224: 0A
DCDCstate224: Error                           <!------
DCDCoutputCurrentMax224: 0A
DCDCOutputIsLimited224: 0
DCDCPrechargeRestartCnt224: 3
DCDCPrechargeRtyCnt224: 3
DCDCPrechargeStatus224: 2
DCDCPwmEnableLine224: 1
DCDCSubState224: NUM
DCDCSupportingFixedLvTarget224: 0
PCS_ecuLogUploadRequest224: 0

Code: Select all

38 00 00 00 00 00 00 00    <ID204PCS_chgStatus>
PCS_chargeShutdownRequest: NO_SHUTDOWN_REQUESTED
PCS_chgInstantAcPowerAvailable: 0kW
PCS_chgMainState: PCS_CHG_STATE_FAULTED   <!--------
PCS_chgMaxAcPowerAvailable: 0kW
PCS_chgPHAEnable: 0
PCS_chgPHALineCurrentRequest: 0A
PCS_chgPHBEnable: 0
PCS_chgPHBLineCurrentRequest: 0A
PCS_chgPHCEnable: 0
PCS_chgPHCLineCurrentRequest: 0A
PCS_chgPwmEnableLine: 0
PCS_gridConfig: GRID_CONFIG_SNA
PCS_hvChargeStatus: PCS_CHARGE_FAULTED
PCS_hwVariantType: PCS_48A_SINGLE_PHASE_VARIANT

Has anyone else gotten the PCS_CHARGE_FAULTED codes from their PCS?
If so, were you able to reset the PCS? Would love to find a software solution before opening it up to look for a hardware fault.

I believe the contactors refusing to open and the PCS fault are related, but it could also be the SOC. Anyone else seen unusual behavior when the SOC gets very low? My full battery pack stopped closing the contactors when I got to around 1.2% SOC. Pack voltage still at ~280V.

Re: Model 3 High Voltage Controller

Posted: Fri Aug 05, 2022 10:37 am
by nkiernan
bielec wrote: Wed May 11, 2022 11:47 am Here is my initial Arduino sketch to display data from the Model 3 battery and operate the contactors. It is based on the EVTV program for the Model S. The cell voltage display is commented out but does work. Send "c" to toggle the contactors on/off. There are a lot of remnants from the original code which are not used.
Is "msgID6F2.h" available anywhere, doesn't seem to show up in various searches and arduino sketch needs it to compile?

Re: Model 3 High Voltage Controller

Posted: Fri Aug 05, 2022 3:24 pm
by vdawger
I don't believe you need 0x6F2 for the model 3. I was able to get it to work on the model 3 battery without it. You do need to modify the code in the sketch though.

I think it's a model S specific code.

Re: Model 3 High Voltage Controller

Posted: Fri Aug 05, 2022 5:46 pm
by vdawger
You'll need to modify the pins based on the board you're using.
Model3ContactorClose.ino
Modified slightly more to focus on model 3
(18.94 KiB) Downloaded 200 times

Re: Model 3 High Voltage Controller

Posted: Fri Aug 05, 2022 7:50 pm
by nkiernan
vdawger wrote: Fri Aug 05, 2022 5:46 pm You'll need to modify the pins based on the board you're using. Model3ContactorClose.ino
That's great, thank you for sharing, I'll get to try this tomorrow. Is it possible to read out the individual temperatures, not just the min and max? I believe there are 16, so four per module.

Re: Model 3 High Voltage Controller

Posted: Fri Oct 28, 2022 12:40 am
by parallaxengineering
Hey guys, thanks to everyone in this thread with the useful information. I was able to get my model3 battery to close contactors with all the information in this thread. My question now is, what are the current limits of "HV_UP"? Presumably this state is only used to recharge the 12V battery via the DCDC and maybe also for heating the cabin, so it must be current limited. Has anyone had success in getting the battery into "HV_UP_FOR_DRIVE"? There we will have the full power potential.

Re: Model 3 High Voltage Controller

Posted: Sat Nov 12, 2022 6:34 am
by vdawger
EDIT: Adjusted number of amps I pulled to 30. Attached file instead of broken google drive link.

ORIGINAL:
I have pulled around 30 amps at HV_UP.
Any update on this? I'm not aware of any amp draw limitations. I'm also using mine for off grid solar battery, not EV.

Also, if it's helpful to anyone, I combined various DBCs i found on the internet and sorted them. It includes Josh Wardell's and some other helpful PCS debug and error Codes. I've been using this DBC with python-can on a raspberry pi and an esp32 running Micropython. If there's interest, i can post this as an alternative to the C++ implementations.

I also wrote a script to run logs through the DBC into excel format to be able to comb through logs in greater granularity. Below is an example. Hopefully it provides functionality that savvyCan does not. I might just be a poor savvyCan user. If anyone is interested, i can post the script as well.

Re: Model 3 High Voltage Controller

Posted: Sat Nov 12, 2022 7:33 pm
by bielec
Open.csv
(45.53 KiB) Downloaded 85 times
An update on my Model3 battery setup. I have been running for several months charging from a 5.5Kw solar array at a maximum of 12Amps and discharging into an inverter at a maximum of 3Kw. That all works fine. This last week I have connected a 400v 12Kw dc diesel driven generator to charge the battery during times of poor sunshine. I found that the contactors opened after ten minutes at any charge rate above about 6Kw or so ie.16Amps. I was able to pump in 20Kw or so for a short time but eventually the contactors opened. One bad thing about this is that the generator voltage goes up to over 600v when open circuit. I notice the post above by vdawger suggests 50 Amps but in discharge.

I attach a Savvycan data log of the contact opening event. Note that around time 215826653 the charging current in msg.0x132 is 24 Amps and right after that a msg.0x22A shows the PCS requesting SHUTDOWN . Where does that come from? And why is it happening. Perhaps some of the smart people on here can look at the data stream and find some clues?
Open.csv
(45.53 KiB) Downloaded 85 times

Re: Model 3 High Voltage Controller

Posted: Sat Nov 12, 2022 9:50 pm
by bielec
parallaxengineering wrote: Fri Oct 28, 2022 12:40 am Has anyone had success in getting the battery into "HV_UP_FOR_DRIVE"? There we will have the full power potential.
I have just had a look at some CAN dumps which show the presence of HV_UP_FOR_DRIVE. It appears that this status is achieved after sending the message 0x2D1 with two data bytes FF 02. Essentially the OK for hi power message.
I have not tried this but it looks likely to be the answer. Perhaps it allows higher charging too since it also seems to cause msg. 0x252 to report increased Regen power. If anyone tries this, then please report results back here.

Re: Model 3 High Voltage Controller

Posted: Sun Nov 13, 2022 5:27 pm
by bielec
Curiosity got the better of me and I tried sending 0x2D1 with FF 02 alongside the message 0x221 to close the contactors. It made no difference. The contactors closed but I still got HV_UP and the regen power stayed at zero. So there is a little more to this.