Tuesday, 8 December 2020

Peugeot Expert - Listing available PIDs

 Identifying PID groups

Data are logs created each time standard diagnostics are run in Diagbox.

So as a start, run a short diag for each of the main groups, Fuel circuit, Air intake, Electrical, Exhaust line, Cooling and Misc with the engine running if possible..

Running the Python script get parameter names.py, will create a text file with a list of the PIDs that were called in the TRC file, followed by a list of the parameters that were retrieved in the XML file.

Looking back through my old logs I found all sorts of stuff, like seatbelt info, button presses, key in starter position etc, It's possible that these were generated during actuator testing.

This is the list of my standard groups, which will give a starting point to find a specific PID 

Air Circuit

PID 21C98001

PID 21CA8001

PID 21CD8001

MP_REGIME_MOTEUR,Engine speed,*1 rpm@\*

MP_DEBIT_AIR_MESURE,measured air flow,*1 mg/impulse@\*

MP_CONSIGNE_DEBIT_AIR_a,air flow setting,*1 mg/impulse@\*

MP_PRESSION_ATMOSPHERIQUE,atmospheric pressure,*1 mbars@\*

MP_CONSIGNE_PRESSION_TURBO,turbo pressure reference value,*1 mbars@\*

MP_PRESSION_TURBO_MESUREE,turbo pressure measured,*1 mbars@\*

MP_CONSIGNE_POSITION_TURBO,turbo position reference value,%@\*

MP_RECOPIE_POSITION_TURBO,turbo position repeat,%

MP_RCOVANNETURBO,Turbo pressure electrovalve open cycle ratio,%

MP_CONSIGNE_POSITION_DOSEUR,Mixer position reference value,%

RECOPIE_POSITION_DOSEUR,Mixer position repeat,%

RCOCDEDOSEUR,Open Cycle Ratio for the air mixer electrovalve,%

MP_CONSIGNE_POS_VANNE_EGR,EGR valve position reference value,%

MP_RECOPIE_POSITION_VANNE_EGR,EGR valve position repeat,%

MP_COMMANDE_EGR,EGR valve control Opening Cyclic Ratio,%

MP_CONSIGNE_POSITION_BYPASS_REFROIDISSEUR_EGR,EGR exchanger Bypass position reference value,%

RECOPIE_POSITION_BY_PASS_REFROIDISSEUR_EGR,EGR exchanger Bypass position repeat,%

MP_TEMP_CARB_C9,fuel temperature *1@\*,°C

MP_TEMP_ADMI_DEBITMETRE,air flow sensor air temperature,°C

MP_TEMP_DEB,Air temperature in the inlet manifold,°C


Aircon

PID 21CD8001

MP_REGIME_MOTEUR,Engine speed,*1 rpm@\*

MP_TEMPERATURE_EAU_b,coolant temperature,°C

MP_PRESSION_CIRCUIT_CLIMATISATION_a,air conditioning circuit pressure@\*,bars

MP_CONSIGNE_VITESSE_GVM_01,Fan speed *1 setting@\*1,%

MP_MESURE_VITESSE_GMV,Measurement of the cooling fan speed,%

MP_CONSIGNE_VITESSE_GVM_02,Fan speed *1 setting@\*2,int

TENSION_CAPTEUR_NIVEAU_HUILE,Oil level sensor voltage,mV


Electrical

PID 0181

PID 21FE

PID 21C98001

PID 21CC8001

MP_REGIME_MOTEUR,Engine speed,*1 rpm@\*

MP_TENSION_BATTERIE1,battery voltage,V

MP_CONSIGNE_DE_CHARGE_PROGRESSIVE_ALTERNATEUR_a,alternator progressive charge reference value,%

TENSION_ALIMENTATION_5V_NUMERO_01,Supply voltage *1V n°*2@\*5@\*1,mV

MP_COMMANDE_RELAIS_PUISSANCE,power relay control,int

MP_ETATCDEDEM,Starter control status,int

MP_ETAT_DEMANDE_DEMARREUR,Status of the starting request,int

MP_COMMANDE_CHAUFFAGE_ADDITIONNEL_a,Status of the additional heating control,int


Exhaust line

PID 21C98001

PID 21CA8001

PID 21CB8001

MP_REGIME_MOTEUR,Engine speed,*1 rpm@\*

MP_ETAT_REGENERATION,Status of the regeneration,int

MP_MASSE_TOTALE_SUIE_DANS_FAP,total weight of soot in the PEF,g/l

MP_TEMPERATURE_FAP,Particle emission filter temperature,°C

MP_PRESSION_DIFFERENTIELLE_FILTRE_A_PARTICULES,difference in pressure between particulate emission filter input/output,*1 mbars@\*

MP_TEMP_ADMI_DEBITMETRE,air flow sensor air temperature,°C

MP_TEMP_DEB,Air temperature in the inlet manifold,°C

MP_DEMANDE_ACTIVATION_CONSOMMATEURS,Power consuming equipment activation request,int

VOLADDRESERVOIR,Amount of additive in the additive tank,ml

NIVEAU_MINIMUM_ADDITIF_ATTEINT,minimum level of additive reached,int

MP_VOLUME_TOTAL_ADDITIF_INJECTE,Cumulative total additive weight in the particulate filter,*1 g@\*

MP_VOLUME_RESERVOIR_ADDITIF,additive reservoir *1 volume@\*,ml

MP_DISTANCE_PARCOURUE_DEPUIS_ECHANGE_FAP,distance travelled since particulate filter replacement,Km

MP_DISTANCE_PARCOURUE_DEPUIS_DERNIERE_REGENERATION,distance travelled since the last regeneration,Km

DISTANCE_MOYENNE_ENTRE_LES_10_DERNIERES_REGENERATIONS,average distance between the last *1 regenerations@\*10,Km

MP_DEGRE_ENCRASSEMENT_FAP_EN_SUIES,degree of clogging of the PEF with soot,%

MP_DIST_AVANT_REMPL_FAP,Distance remaining before replacement of the FAP,Km

MP_AUTORISATION_REGENERATION,Authorisation of regeneration,int

MP_CAPC_EFFEC_COURT_TERME,Short term regeneration capacity,%

MP_CAPC_EFFEC_LONG_TERME,Long term regeneration capacity,%

CA_RICHESSE_CALCULEE_SONDE_A_OXYGENE,mixture calculated by the O2 sensor,int

CHAUFFSONDEO2,Activation of the heating of the oxygen sensor,%


Fuel circuit

PID 21C88001

PID 21C98001

PID 21CD8001

MP_REGIME_MOTEUR,Engine speed,*1 rpm@\*

MP_DEBIT_INJECTE_MESURE,measured injected flow,*1 mg/impulse@\*

MP_SYNCHRONISATION_AAC_VILEBREQUIN,camshaft/crankshaft synchronisation,int

MP_CONSIGNE_PRESSION_RAIL1,Setting for the fuel rail pressure,bar

MP_PRESSION_CARBURANT_MESURE,measured fuel pressure,bar

MP_COURANT_REGULATEUR_DE_DEBIT_IMV,Flow regulator current,mA

MP_ETAT_ACTIVATION_STRATEGIES_CORRECTION_OUVERTURE_INJECTEUR,injector opening correction strategies activation status,int

RCO_COMMANDE_REGULATION_DEBIT_CARBURANT,Open cycle ratio controlling the regulation of the fuel flow,%@\*

MP_TEMPS_INJECTION_CYLINDRE_01,cylinder *1 injection time@\* 1,ms

MP_TEMPS_INJECTION_CYLINDRE_03,cylinder *1 injection time@\* 3,ms

MP_TEMPS_INJECTION_CYLINDRE_04,cylinder *1 injection time@\* 4,ms

MP_TEMPS_INJECTION_CYLINDRE_02,cylinder *1 injection time@\* 2,ms

MP_TEMP_CARB_C9,fuel temperature *1@\*,°C

MP_KILOMETRAGE_FIN_DERNIERE_BOUCLE_RECALAGE_PICL,End mileage of the last PICL resetting loop,Km

MP_CORRECTION_ACYCLISME_INJECTEUR_1,Correction of acyclism on injector *1@\*1,µS

MP_CORRECTION_ACYCLISME_INJECTEUR_3,Correction of acyclism on injector *1@\*3,µS

MP_CORRECTION_ACYCLISME_INJECTEUR_4,Correction of acyclism on injector *1@\*4,µS

MP_CORRECTION_ACYCLISME_INJECTEUR_2,Correction of acyclism on injector *1@\*2,µS

MP_ECART_REGIME_MOTEUR_CYLINDRE_MOTEUR_1,Difference in engine speed on engine cylinder *1@\*1,rpm

MP_ECART_REGIME_MOTEUR_CYLINDRE_MOTEUR_3,Difference in engine speed on engine cylinder *1@\*3,rpm

MP_ECART_REGIME_MOTEUR_CYLINDRE_MOTEUR_4,Difference in engine speed on engine cylinder *1@\*4,rpm

MP_ECART_REGIME_MOTEUR_CYLINDRE_MOTEUR_2,Difference in engine speed on engine cylinder *1@\*2,rpm


Immobiliser

PID 21C88001

MP_ETAT_VERROUILLAGE_DEVERROUILLAGE_CALCULTATEUR,control unit condition,int

MP_ETAT_PROGRAMMATION_ANTI_DEMARRAGE,status of the coded engine immobiliser programming,int

MP_PB_TRANSMISSION_CODE_DEVERROUILLAGE,problems detected when transmitting the unlock code,int


Misc

PID 21C78001

PID 21C88001

PID 21C98001

PID 21CC8001

PID 21CD8001

MP_REGIME_MOTEUR,Engine speed,*1 rpm@\*

MP_SYNCHRONISATION_AAC_VILEBREQUIN,camshaft/crankshaft synchronisation,int

MP_VITESSE_VEHICULE_a,vehicle speed@\*,kph@\*

TENSION_SIGNAL_PEDALE_ACCELERATEUR_01,accelerator pedal signal voltage *1@\*1,mV

TENSION_SIGNAL_PEDALE_ACCELERATEUR_02,accelerator pedal signal voltage *1@\*2,mV

MP_POSITION_DE_PEDALE_ACCELERATEUR,accelerator pedal position,%

MP_INFO_POINT_DUR,Accelerator pedal point of resistance information,int

MP_TYPE_BOITE,Gearbox type,int

MP_RAPPORT_BOITE_DE_VITESSES,gear ratio *1@\*,int

MP_ETAT_CAPTEUR_POINT_MORT,Condition of the neutral sensor,int

MP_ETAT_CONTACTEUR_DE_FREIN_PRINCIPAL,principal brake pedal,int

PEDALE_FREIN_REDONDANT,redundant brake pedal,int

MP_VITESSE_CONSIGNE_REGULATION_DE_VITESSE,Cruise control speed setting,kph@\*

MP_ETAT_REGULATION_VITESSE,cruise control status,int

MP_VITESSE_CONSIGNE_LIMITATION_DE_VITESSE,Speed limiter speed setting,kph@\*

MP_ETATLV,speed limiter status,int

MP_ETAT_CONTACTEURS_FREIN_EMBRAYAGE,Status of the limiting of the vehicle speed,int

MP_PEDALE_EMBRAYAGE,clutch pedal,int

MP_VAL_POSITION_EMBRAYAGE,Value of the clutch pedal position,%

MP_ETAT_MOTEUR,*1 engine status@\*,int

MP_MESURE_MANOCONTACT_PRESSION_HUILE,oil pressure switch measurement,int


Sunday, 6 December 2020

Finding Peugeot Expert extended PIDs for display in the Torque App

Overview

My current van is a 2015 Peugeot Expert 2.0. The engine is and AHZ DW10CD 129bhp with a Delphi DCM3.5BR2 (branch 2). Usually I would use the FAP app to view live DPF regeneration parameters, however the ECU was updated a year ago, and it stopped working. Numerous requests to the developer have been ignored, so I decided I needed anther approach.

After initially using a OBD2 splitter cable with a Bluetooth adapter monitoring OBD2 requests and responses from Diagbox, I realised that Diagbox already logs the data, and that it is possible to figure out the proprietary PIDs.

The two key file types, *.trc and *.xml, are stored at c:\AWroot\dwtr\SpareTrace

The trc files log the raw ODB2 request and response sent to the ECU when you run a paramter test is diagbox.

This is the typical output

<ECUFrames Timestamp="1682">

<ECUFrame Dir="Sent">QFF0621C98001</ECUFrame>

<ECUFrame Dir="Received">R61FF03290000FF01FFFFFF28013301340038FFFFFFFFFFFFFFFFFFFFFFFF43FFFF000089008B008A0086FFFFFFFF551F4C1F5B1F171F3B3D103D103F9040003E803E803E403E403E503E003CC03CC040F040F040F03FF03EC03EC03E403E403FD03F703EF03EF000013AA001F4020801DB01F8</ECUFrame>

<ECUFrames Timestamp="2413">

<ECUFrame Dir="Sent">QFF0621C98001</ECUFrame>

<ECUFrame Dir="Received">R61FF032A0000FF01FFFFFF270133012F0037FFFFFFFFFFFFFFFFFFFFFFFF43FFFF000089008A00890088FFFFFFFF551F5C1F221F4C1F483D103D103F9040003E803E803E403E403E503E003CC03CC040F040F040F03FF03EC03EC03E403E403FD03F703EF03EF000013AA001F6020801DA01F7</ECUFrame>


The timestamp is in ms since the logging started, the request sent "QFF0621C98001" consists a header and the actual PID 21C98001.

The response is a header 61FF and a long string of hex results. In this case 21C98001 is used to retreive fuel system parameters eg fuel pressure & injection timings. So even if only one paramater is required, the whole lot are retrieved. There can be multiple request/response frames per timestamp.


Diagbox will produce an eqivalent XML file from this trc file, as an intermediate step to produce graphs of the data.

This is the typical output

<ChannelHeader Id="0" Mnemo="MP_REGIME_MOTEUR" Label="@P7917-POLUXDATA" _Type="FLOAT" Unit="@P8673-POLUXDATA@\*" MinVal="-340282346638528860000000000000000000000.000000" MaxVal="340282346638528860000000000000000000000.000000">
<DiscreteLegend>
<DiscreteValue Label="@V" MinVal="0.000000"   
MaxVal="8001.000000"/> <DiscreteValue Label="@P8038-POLUXDATA" MinVal="-340282346638528860000000000000000000000.000000" MaxVal="340282346638528860000000000000000000000.000000"/> </DiscreteLegend>
</ChannelHeader>

<Points>  

<Point Value="809.000000" Timestamp="0"/>

<Point Value="810.000000" Timestamp="1682"/>

<Point Value="806.000000" Timestamp="2413"/>

<Point Value="805.000000" Timestamp="3204"/>

In this case the PID has been identified as MP_REGIME_MOTEUR, which is actually revs. Note that the time stamp starts at zero, whereas the actual timestamp should start at 1682, as per the trc file. So we can see that the revs changed from 809 to 810 between the 1st and 2nd timestamp. We can assume that the revs are stored in 2 bytes, so that would equate 0329 and 032A in hex. As it happens start of the 1st response above is R61FF0329... and the 2nd is R61FF032A.. So we can see that ignoring the header, bytes 0 and 1 contain the data for revs. 

In Torque extendedPIDs this response location can be referenced as A,B or raw R0,R1. So the basic config would be PID 21C98001 with formula INT16(A:B)

Obviously this was an easy PID to find, and not really that useful because it's part of the standard PID anyway, but it demonstrates that this data can be easily mined.

Identifying parameter names

As can be seen in the xml files, the names of the parameters are in French e.g.

<ChannelHeader Id="0" Mnemo="MP_REGIME_MOTEUR" Label="@P7917-POLUXDATA" _Type="FLOAT" Unit="@P8673-POLUXDATA@\*" 

However the text label referred as @P7917-POLUXDATA is a reference to a translation file located at c:\AWRoot\dtrd\trans

In this case the english file is POLUXDATAen_GB.DU8. This is a proprietary format as follows.

4 byte Header ox14231423, 4 byte integer of the total number of records. Then at position 0x64 a series of 4 byte integers pointing to the start location of each string record. I wrote a rough python script decode_du8.py to extract this to a csv file and then imported into a Sqlite database polluxdata.db

To help reading the xml file the Python script update pollux.py cycles through the xml files, replacing the @nnnn-POLUXDATA references with the english labels (remember to back the files up first)

After processing you should now see more user friendly labels e.g.

<ChannelHeader Id="0" Mnemo="MP_REGIME_MOTEUR" Label="Engine speed" _Type="FLOAT" Unit="*1 rpm@\*"