Ford Mustang Mach-E Extended PIDs for Torque Project

Eric_C_Boston

Well-Known Member
First Name
Eric
Joined
Apr 16, 2021
Threads
51
Messages
529
Reaction score
712
Location
North Shore, MA, USA
Vehicles
2021 Ford Mustang Mach-E RWD ER
Occupation
Retired Software Engineer
Country flag
I have been on this project for several months and far from done. But I have enough done to enable monitoring of charging. This project grew out of this thread. https://www.macheforum.com/site/threads/any-obd-ii-app-that-works-yet.2952/

I am interested in monitoring my new car and looked around for PID values. I found most of the Electric Drivetrain PID values for the Fusion Hybrid work. I noticed the Workshop Manual mentions PIDs for the Generator/Motor used in the Hybrid are used for the front motor.

I got a couple of surprises as I read up on EV charging. DC Fast Charging uses Powerline Communication between the EVSE and the car. The EVSE sends the maximum values for DC voltage, DC current, and DC power to the car and they show up in the PIDs. It appears there are similar values for the car that are sent back.

Some of the values maybe wrong or incomplete. I tried my best to name things properly.

Name,ShortName,ModeAndPID,Equation,Min Value,Max Value,Units,Header,startDiagnostic,stopDiagnostic,Scale
Grill Shutter Duty Cycle Requested,GrillSDC,0x220707,A/2.55,0,100,%,,,,1
Gear Commanded,GCM,0x221e12,LOOKUP(A:A:70='P':60='R':50='N':40='D':20='L'),0,100,state,7e6,,,1
HVB Temperature,HvbT,0x224800,(A-50)*1.8+32,-50,400,F,,,,1
HVB State of Charge,HvbSoc,0x224801,INT16(A:B)*0.002,0,100,%,,,,1
HV Positive Leakage Voltage,HvPLV,0x224803,INT16(A:B)*0.001,0,100,Volts,,,,1
HV Negative Leakage Voltage,HvNLV,0x224804,INT16(A:B)*0.001,0,100,Volts,,,,1
HV Contactor Voltage Positive,HvCVP,0x224805,INT16(A:B)*0.01,0,300,Volts,,,,1
HV Contactor Voltage Negative,HvCVN,0x224806,INT16(A:B)*0.01,0,300,Volts,,,,1
HVB Temperature Range Maximum,HvbMaxT,0x224808,(A-50)*1.8+32,-60,300,Deg F,,,,1
HVB Temperature Range Minimum,HvbMinT,0x224808,(B-50)*1.8+32,-60,300,Deg F,,,,1
HVB Temperature Range,HvbTR,0x224808,(C-50)*1.8,-60,300,Deg F,,,,1
HVB Temperature Range Average ,HvbAve,0x224808,(D-50)*1.8+32,-60,300,Deg F,,,,1
HVB Current Low Range,HvbALr,0x22480a,((signed(A)*256)+B)*0.02,-500,500,Amps,,,,1
HV Current,HvbA,0x22480b,((signed(A)*256)+B)*0.02,-500,500,amps,7e2,,,1
HVB Voltage,HvbV,0x22480d,INT16(A:B)*0.01,0,500,volts,7e2,,,1
HVB Age,HvbAge,0x224810,INT16(A:B)*0.005,0,320,months,,,,1
HV Leakage Resistance Bus Positive,HvLeakRBP,0x224811,INT16(A:B)*0.025,0,100,K-Ohms,,,,1
HV Leakage Resistance Bus Negative,HvLeakRBN,0x224812,INT16(A:B)*0.025,0,100,K-Ohms,,,,1
HV Leakage Resistance Bus Overall,HvLeakRBO,0x224813,INT16(A:B)*0.025,0,100,K-Ohms,7e4,,,1
HVB Minimum Module Voltage,HvbMinModV,0x224840,INT16(A:B)*0.001,0,10,Volts,7e4,,,1
HVB Average Module Voltage,HvbAvgModV,0x224841,INT16(A:B)*0.001,0,10,volts,7e4,,,1
HV Charger Current Requested,ChgOAR,0x224842,INT16(A:B)*0.01,0,500,amps,7e2,,,1
HV Charger Voltage Requested,ChgOVR,0x224844,A*2,0,500,volts,7e2,,,1
HVB State of Charge Displayed,HvbSocD,0x224845,A*0.5,0,100,%,7e4,,,1
HVB Coolant Inlet Temperature,HvbCIT,0x224846,(A-50)*1.8+32,-50,400,F,,,,1
HVB Energy to Empty,Energy,0x224848,INT16(A:B)*0.002,0,100,kWh,,,,1
HV Charger Output Voltage,ChgOV,0x22484a,INT16(A:B)*0.01,0,500,volts,7e2,,,1
HV Charger Status,ChgSt,0x22484d,LOOKUP(A:A:0='Idle':1='Wait':2='Rdy':3='Chg':4='Done':5='FAULT'),0,5,,7e2,,,1
HV Charger Input Power Available,ChgInPwr,0x22484e,INT16(A:B)*0.005,0,500,kW,7e2,,,1
HV Charger Output Current Measured,ChgOA,0x224850,INT16(A:B)*0.01,0,600,amps,7e4,,,1
EVSE Type,EVSE,0x224851,LOOKUP(A:A:0='None':4='Nrdy':5='Init':6='AC':8='DC':11='FAULT':12='NRLck'),0,12,,7e2,,,1
HV AC Charger Input Voltage,ACInV,0x22485E,INT16(A:B)*0.01,0,300,volts,,,,1
HV AC Charger Input Current,ACInA,0x22485F,A,0,100,amps,,,,1
HV AC Charger Input Frequency,ACInF,0x224860,A*0.5,40,80,Hz,,,,1
HV Charger Pilot Duty Cycle,PilotDC,0x224861,A*0.5,0,100,%,,,,1
HV Charger Proximity Status,ProxSt,0x224862,LOOKUP(A:A:0='NoCon':1='ConS3':2='Con':16='ConLck'),0,12,,,,,1
HV DC Charger Maximum Current,DCChgMaxA,0x224899,INT16(A:B)*0.01,0,600,amps,6f5,,,1
HV DC Charger Maximum Voltage,DCChgMaxV,0x22489D,INT16(A:B)*0.1,0,1000,volts,6f5,,,1
HV DC Charger Status,DCChgSt,0x22489e,LOOKUP(A:A:0='Idle':1='Init':2='Rdy':3='Weld':4='Pchg':5='Chg':6='Done':10='FAULT':11='Nrdy'),0,15,,7e2,,,1
HV Charger Pilot Voltage,PilotV,0x2248BC,INT16(A:B)*0.0012,0,15,volts,7e2,,,1
HV Charger Maximum Power,ChgMaxP,0x2248C4,INT16(A:B)*0.05,0,500,kW,7e2,,,1
Interior Temperature,IntT,0x22dd04,(A-40)*1.8+32,-40,400,F,7e2,,,1
Exterior Temperature,ExtT,0x22dd05,(A-40)*1.8+32,-40,400,F,7e2,,,1
HV AC Charger Coupler Temperature,ChgACT,0x22d117,(A-40)*1.8+32,-40,400,F,7e2,,,1
HV DC Charger Coupler Temperature,ChgDCT,0x22d00c,(A-40)*1.8+32,-40,400,F,7e2,,,1
Engine Run Time,Run,0x22f41f,(((A*256)+B)/60,0,1000,minutes,7e0,,,1
HV Battery Power Flow Calculated,PwrFlow,,val{HVB Current Low Range}*val{HVB Voltage}*0.001,-200,200,kW,,,,
HV Charger Power Flow Calculated,ChgPwrFlow,,val{HV Charger Output Current Measured}*val{HV Charger Output Voltage}*0.001,-200,200,kW,,,,
Sponsored

 
OP
OP
Eric_C_Boston

Eric_C_Boston

Well-Known Member
First Name
Eric
Joined
Apr 16, 2021
Threads
51
Messages
529
Reaction score
712
Location
North Shore, MA, USA
Vehicles
2021 Ford Mustang Mach-E RWD ER
Occupation
Retired Software Engineer
Country flag
This zip file contains a .csv file that can be imported into toque. Still a work in progress, but I am getting good results for charging PIDs.
 

Attachments

benk016

Well-Known Member
First Name
Ben
Joined
Nov 12, 2020
Threads
37
Messages
3,013
Reaction score
4,671
Location
Tulsa, Oklahoma
Vehicles
2021 Mustang Mach-E GT
Country flag
So I noticed that the Value for Total Power Flow calculated was incorrect. It was only showing between -40kw and 40kw. The calculation for it seems to be using a wrong input.

HV Battery Power Flow Calculated,PwrFlow,,val{HVB Current Low Range}*val{HVB Voltage}*0.001,-200,200,kW,,,,

Changing this to just "HV Current" seems to produce the expected result.
 
OP
OP
Eric_C_Boston

Eric_C_Boston

Well-Known Member
First Name
Eric
Joined
Apr 16, 2021
Threads
51
Messages
529
Reaction score
712
Location
North Shore, MA, USA
Vehicles
2021 Ford Mustang Mach-E RWD ER
Occupation
Retired Software Engineer
Country flag
It needs some more investigation. I have noticed the HVB Current Low Range PID value seems to read low.

There is a current sensor in the High Voltage Battery Junction Box that connects to the BECM module. The only HV battery current PID provided by the BECM is the HVB Current Low Range PID. Other information suggests the shunt is on the negative lead of the HV battery. This seems reasonable as some other Ford Hybrid Vehicles also have HVB Current High Range PID measuring current on the positive lead of the HV battery. I notice Ford uses range in the labels when they have multiple values of similar measurement. That is why the HVB Temperature values use Range in the labels for the minimum, maximum, and average values.

The HV Current PID is provided by the OBCC, SOBDM, SOBDMC, and SOBDMB. I have noticed at least two cases when the same PID is used by multiple modules, either it represents the value measured by the module, or the value received by the module from another module. So I do not know yet what the HV Current PID represents. I only have a RWD so I can not easily see if the values are the same to each motor.

One interesting case is with the HV Charger Output Current Measured PID. A valid value is output on the OBCC PID when DC Fast charging, and on the SOBDM PID when LeveL 1/2 Charging. If you read the BECM PID, then you get the value for whatever charger path is being used.

This is very much WIP and I just scratched the surface.
 


emotodude

New Member
Joined
Oct 20, 2021
Threads
0
Messages
3
Reaction score
1
Location
United States
Vehicles
MME SR RWD
Country flag
So I noticed that the Value for Total Power Flow calculated was incorrect. It was only showing between -40kw and 40kw. The calculation for it seems to be using a wrong input.

HV Battery Power Flow Calculated,PwrFlow,,val{HVB Current Low Range}*val{HVB Voltage}*0.001,-200,200,kW,,,,

Changing this to just "HV Current" seems to produce the expected result.
Yup, did the same thing, now produces believable results :)

Thanks so much Eric!
 

klaberte

Member
Joined
Nov 6, 2021
Threads
0
Messages
5
Reaction score
0
Location
USA
Vehicles
Ford MME
Country flag
Sorry for the newbie question, but what is HV vs HVB? It seems that HV is associated primarily with charging, while HVB seems to be about the High Voltage Battery. Can anyone help me understand?
 

macchiaz-o

Well-Known Member
First Name
Jonathan
Joined
Nov 25, 2019
Threads
168
Messages
8,157
Reaction score
15,299
Location
🔑 ]not/A/gr8'Place.2.store-mEyePassword[ 👀
Vehicles
MY21 J1 Premium RWD SR
Country flag
Sorry for the newbie question, but what is HV vs HVB? It seems that HV is associated primarily with charging, while HVB seems to be about the High Voltage Battery. Can anyone help me understand?
In a vehicle with an electric powertrain, high voltage is referring to the components that run at significantly higher voltage than the traditional 12 or 48 volt systems from vehicles with gas engines.

In a Mach-E, the high voltage system runs somewhere between 300 and 400 volts, while the low voltage systems are between around 9 to 15 volts.

HVB refers to the large battery pack that sits below the occupants.

LVB is the very small battery that is between the frunk and the dashboard.
 

klaberte

Member
Joined
Nov 6, 2021
Threads
0
Messages
5
Reaction score
0
Location
USA
Vehicles
Ford MME
Country flag
Great! I have AWD. Are there different PIDs for the front and rear motors, etc? How can I tell them apart?
 
OP
OP
Eric_C_Boston

Eric_C_Boston

Well-Known Member
First Name
Eric
Joined
Apr 16, 2021
Threads
51
Messages
529
Reaction score
712
Location
North Shore, MA, USA
Vehicles
2021 Ford Mustang Mach-E RWD ER
Occupation
Retired Software Engineer
Country flag
I tried to be brief in the descriptions and be consistent. Some of the Ford descriptions work. It is obvious some of the descriptions were developed over generations of ICE, Hybrid, and BEVs. There seems to be multiple PIDs for the same thing. It takes some work to choose the right one from the right module.

I have a RWD, so it is not clear in all cases if the Secondary (Front) Motor has it's own PIDs, or shares them with the Primary (Rear) Motor. The workshop manual mentions the generator PIDs defined for Hybrids are for the Secondary Motor. I see some of the Primary Motor PIDs can be read from the Front Motor, but it may be the Front Motor receives the value from the Rear Motor.

Torque uses the Ford Extended Diagnostics PIDs for readings. The car consists of many modules. Each module handles a portion of the car's operation. For example, the SOBDM handles Level 1/2 charging, the OBCC handles DC charging, and the BECM handles the HV Battery. The modules send information to each other while the car is charging. There is a Measured HV Battery Charger Output Current PID that can be read from SOBM, OBCC, or BECM. The OBCC one is only valid when DC Charging. It appears this PID represents a value sent from either the SOBM or OBCC to the BECM, so reading the BECM value by Torque will capture both Level 1/2 and DC charging.

Some of the PIDs are "reused". In the schematics the front HV battery cooling temperature sensor is wired to the Engine Coolant Temperatuer (ECT_2) input on the PCM. I see valid values on the ECT 2 PID. ECT 1 seems to be a dummy value. I suspect on a hybrid ECT 1 is the ICE Coolant Temperature. It makes sense since the battery is an engine as well.

Unfortunately, I am now working an unrelated consulting job, so progress in the project has been slow. I am working on correcting the Hybrid Battery Current. I initially got suspicious that the obvious Hybrid Battery Current PID may not measure total battery current since the PID cannot be read from the BECM, the module responsible for the HV battery. The only BECM PID I initial found was the Hybrid Battery Current Low Range, so I used it. I recently found the BECM's Hybrid Battery Current and Hybrid Battery Current High Range PIDs at addresses with a good gap from the low range one. Ford seems to use range to indicate multiple related values, so the Low Range is the lowest value of the range and High Range is the highest value of the range. The obvious Hybrid Battery Current PID may be the value sent by the BECM to other modules.

Another piece I am working on is figuring out the PIDs needed by A Better Route Planner, so Toque can be used to improve ABRP's functionality.
 

klaberte

Member
Joined
Nov 6, 2021
Threads
0
Messages
5
Reaction score
0
Location
USA
Vehicles
Ford MME
Country flag
Sorry for being dense here, but when Eric C says the 'Hybrid Battery Current', which of these PIDs (from above and as reported by Car Scanner) is that the equivalent of?

HV Current (A)
Hybrid/EV Battery System Current (A)

Both? Neither?
 

klaberte

Member
Joined
Nov 6, 2021
Threads
0
Messages
5
Reaction score
0
Location
USA
Vehicles
Ford MME
Country flag
Also, has anyone searched for (or better, found) PIDs relating to the aux load, e.g. seat warmers, HVAC, lighting? This could be nice to see if available, since it could help explain some of the efficiency gains or losses in very high or low temperatures.
 
OP
OP
Eric_C_Boston

Eric_C_Boston

Well-Known Member
First Name
Eric
Joined
Apr 16, 2021
Threads
51
Messages
529
Reaction score
712
Location
North Shore, MA, USA
Vehicles
2021 Ford Mustang Mach-E RWD ER
Occupation
Retired Software Engineer
Country flag
Sorry for being dense here, but when Eric C says the 'Hybrid Battery Current', which of these PIDs (from above and as reported by Car Scanner) is that the equivalent of?

HV Current (A)
Hybrid/EV Battery System Current (A)

Both? Neither?
There seems to be various description labels attached to some PIDs based on when the PID was created or updated. For example, I had a Ford Fusion Hybrid and HV Battery PIDs were described as Hybrid Battery, or Hv Battery. I have also seen the HV Battery described as the Traction Battery on other Ford Hybrids. As I mentioned previously, the Generator PIDs of a Hybrid are reused for the Front (secondary) Motor on the Mach-E. I am trying to make the descriptions consistent and reflect the actual use.

It also seems that once a PID is defined, the scaling is never changed. The Ford Fusion Hybrid has the HVB High Range, called High Range, at PID 4809. The Mach-E does not have PID 4809 and uses Hybrid/EV Battery Current High Range (HEV_BATT_CUR_HR) at PID 48FA with a different scaling factor. The Hybrid/EV Battery Current (HEV_BATT_CUR) at PID 48F9 uses the same scaling factor as PID 48FA. It is obvious that at some point the +/- 655 Ampere range of the HV Current PID 480B would not work for the BECM HV Battery Current in all cases, so the range was increased to +/-3276. Remember the BECM module is part of Ford's EV Platform and the generous range used on Hybrids may be too small for some current/future EV vehicles.

The PIDs are part of the diagnostics, so there could be a measurement PID and a network message PID in the same module. The Workshop Manual mentions certain PIDs can be used to test communications between modules by checking if the same value is read on the same PID from different modules.

It is also possible that the HV Current PID is the reading of the HV Current used by the module being read. In that case you could read the current draw of the front motor and the rear motor. That is something I am going to test by logging HV current from all supported modules and Hybrid/EV Battery Current from the BECM while driving.
 
OP
OP
Eric_C_Boston

Eric_C_Boston

Well-Known Member
First Name
Eric
Joined
Apr 16, 2021
Threads
51
Messages
529
Reaction score
712
Location
North Shore, MA, USA
Vehicles
2021 Ford Mustang Mach-E RWD ER
Occupation
Retired Software Engineer
Country flag
I made progress on the Low Voltage Battery PIDs. Here is a graph of a brief trip I made today. You can see the LB battery starts out supplying 12 volts (negative current blue values) until the car is put in run, then the DCDC converter takes over (yellow), charging the battery, and providing current for other 12 volt devices, The current to the battery drops as the SOC (not shown) rises. The LV battery takes over at the end when the car is switched off.
Ford Mustang Mach-E Ford Mustang Mach-E Extended PIDs for Torque Project 1636933573185
 

mkhuffman

Well-Known Member
First Name
Mike
Joined
Nov 19, 2020
Threads
24
Messages
6,072
Reaction score
8,021
Location
Virginia
Vehicles
2021 MME GT, Jeep GC-L, VW Jetta
Country flag
I made progress on the Low Voltage Battery PIDs. Here is a graph of a brief trip I made today. You can see the LB battery starts out supplying 12 volts (negative current blue values) until the car is put in run, then the DCDC converter takes over (yellow), charging the battery, and providing current for other 12 volt devices, The current to the battery drops as the SOC (not shown) rises. The LV battery takes over at the end when the car is switched off.
Ford Mustang Mach-E Ford Mustang Mach-E Extended PIDs for Torque Project 1636933573185
So the LV battery is only charged when the car is on? So rather than sit in the parking lot listening to music with the car off in accessory mode, we should leave the car on?
 
 




Top