Thursday, 20 April 2023

More details coming soon

 watch this space 

Ken

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@\*" 




Monday, 28 August 2017

Pebble Steel improvised charging cable.

Every trip stuff breaks or gets lost or gets left at home.  The first thing on this trip was the realisation that I'd brought the wrong cable for my Pebble steel.  Getting a replacement on the road will be pretty much impossible so I needed to get an interim fix.  A quick internet search revealed a bunch of lashups that didn't really inspire,  but did confirm the polarity -  0v in the middle &  5v at the bottom.  I'd originally thought of making little spring connectors glued onto a plastic back,  with 2 part epoxy putty holding it together and soldered to and old usb cable.  To be honest it sounded a bit fiddly and time consuming, but it was a starting point, which quite often reveals the best solution.  When I went to look for a cable to cut up,  the obvious choice was the 10 way multi charger that I carry in case something unusual needs charging. 







While trying to decide which connector to sacrifice (probably apple), I noticed that the sony/ericcon K750 connector had spring terminals, which coincidentally are the same pitch as the pebble pads

As it happens the polarity of the pins matched up well with the pebble, so all I had to do was snip off the locating lugs, and use a bit of tape to hold the connector against the pebble.


A second piece of tape over the top makes the connection a bit tighter.

Wednesday, 15 April 2015

On the road again

Time for our next trip, and the van is fully loaded up. It takes about 2 days, and we have far too much stuff, mainly food - due to lack of planning.



Wednesday, 25 March 2015

Mr Beams MB390 Modded

The MB390 wireless battery-powered LED ultra-bright weatherproof spotlight puts out 300 lumens of bright white light. This battery powered spotlight instantly turns on when motion is detected after dark and switches off again after about 20s. Essentially it's designed as an easy install security light.


I bought on impulse from Amazon on a lightening deal for £20, with an eye to using it as an external light on the van. Since it used 4 1.5v batteries, I thought that a 5V USB supply might be enough to power it - and it did, consuming about 400mA.
However I wanted it power up any time, not just at night, and the on time would be far to short for normal camping use. Once you remove the waterproof cover, there are 4 screws holding the top cover with the Fresnel lens. This is the main PCB


Removing the light dependent resistor - with the red top, disables the dusk sensor - allowing the unit to operate day or night.
Bending the two clips at the bottom will release the PCB to get access to the underside.


The IC at the bottom is identified as LP0001, which is commonly identified as a BISS0001
Micro Power PIR Motion Detector IC.
This is the application datasheet, showing the typical design
According to the data sheet the on time  Tx ≈24576 xR10 x C6;
On the Mr Beams PCB tracing the tracks from the IC, this equates to R9 & C10. Since R9 is 100k, this means that C10 is 10nF. So Tx = 24576 x 100k x 10n = 24.5s
To increase the time, piggy back another cap onto C10 (to the right of the IC) to to increase the capacitance.
I chose a 100nF cap - so Tx = 24576 x 100k x 110n = 270s, about 4.5mins.
The default action of the detector circuit is to retrigger when the PIR detects movement. So in normal use when sitting in front of the lamp, it should regularly reset the 4.5 minute on cycle, avoiding the need for manic arm swinging to turn the lamp on again.

The black and red power wires ware rerouted to the external USB  cable, via the top battery connector, just in case I ever want to use batteries again



Finally, I removed the mounting base, and reamed out a hole to fit a suction mount scavenged from an old mobile phone kit. This allows us to fit the lamp to the side of the van in the evenings. I usually leave it on all night, to act a security light if anyone passes by.





Monday, 23 March 2015

Dash Cam

Although I'm not overly paranoid about such things, but after watching a YouTube video last year, where a pedestrian throws himself onto the bonnet of a stationary car, it was in my mind to get a dash cam. Also it may be nice to capture some of the more exciting roads we sometimes end up on.
As usual there is a great resource online at https://dashcamtalk.com.
After reading up for a few hours I went for a Mobius Action Cam, because of its small size, since I'll probably keep it mounted all the time.


I did not want to mount it to the windscreen, both to keep it discreet and because it may have interfered with the thermal screen. So I hacked up an old table cloth clip, to fashion a clip to attach the camera to the head lining.

This is the original clip (Clas Ohlson)


After sawing the motif off, and trimming and bending the spring steel clip, this is what I ended up with

With a bit of sticky velcro

Mounted camera


The mini USB at the rear is connected to the van 5V supply, via a relay powered by the ignition 12V.
The camera is configured to start automatically when the power is connected, and stop 10s after the power is cut. The recording function created an new slip every 5 minutes, and will record over the first clip again when the card is full.