Thanks to David for a very enjoyable day.

My back is stiff and every muscle was aching this morning but that's to be expected from a few hours of bending over the engine bay of a lowered 205 for someone lazy like me whose body isn't used to doing proper physical work!
The beef burgers were unusually good - so much so that after the first burger instead of taking a chance on the sausages I just had a second burger.
I was quite chuffed that I managed to solve not one but two engine management faults on the car, especially given it's a 205 that has a 306 GTi ECU and wiring loom connected to a Xsara VTS engine!
Turns out that as well as the MAP sensor the oxygen sensor wasn't working either - no wonder it wasn't running very well!
The issue with the MAP sensor turned out to be exactly what I anticipated based on the description of the problem - two wires reversed, in this case signal and signal ground. The connectors for the MAP sensor and oxygen sensor that come with the loom for the 306 ECU don't match the sensor connectors on the Xsara VTS engine so a different connector had been spliced into the loom for each one.
None of the colours of the wires match up either so we had to manually verify the correct connections. Because there was also the worry of a blown input on the ECU or a missing 5 volt reference I made up the following little test rig that morning before I went over: (Jim will get a chuckle over its simplicity)
It provided me with an independent adjustable 0-5v source to simulate a sensor signal to the ECU. That way I can clip onto battery negative and probe each pin on the connector to find out which one responds on the Lexia when presented with a variable voltage. (Both MAP and TPS use a 0-5v range) The 100 ohm resistor on the wiper provides protection in case you touch the wrong thing like the 5v reference.
Using this we very quickly identified the correct signal wire confirming that the plug was wired wrong but that the input on the ECU was functioning ok. Phew! After swapping them around and terminating the wires neatly the car started and ran beautifully instead of stalling and sputtering. Success! Well, not quite!
There had also been an oxygen sensor fault code so we started looking at that. When we first checked it it did seem to be working - the O2 voltage on the Lexia (in PP2000) would start switching between low and high after about 90 seconds, so everything looked normal at first glance. However when we started the car about 15 minutes later and checked it again the O2 reading on the Lexia stayed stubbornly at 0mV for over 3 minutes. Hmm....
If it had been working before the signal wires must be ok and its probably a heater fault causing it to warm up slowly, right ? That's the logical conclusion. Wrong!
We checked the heater resistance - 10 ohms. Seemed a bit high to me but they do vary a lot from one type to another (one reason generic sensors are seldom ideal) so it was still a plausible value. I then used my backprobe test lead to make sure there was 13.8v at the heater connections with the O2 sensor actually plugged in - check.
Next I put my backprobe lead on the signal wires from the O2 sensor and hooked it up to my small scope, started it up and compared it to the Lexia reading and got a massive surprise! The Lexia was completely lying about the O2 switching! Both Lexia and scope started at 0v but after about 45 seconds the scope reading climbed to 750mv but the Lexia stayed on 0mv... then after about 90 seconds the Lexia started showing the O2 voltage switching between about 40mV and 900mV back and forth like you would expect it to but the scope was showing the truth that it was just sitting on a steady 750mV (rich) the whole time!
So the ECU was inventing O2 switching that clearly didn't exist, and it had fooled me at first...

This is known as "substituted data". When an ECU detects a faulty sensor it will switch into a "fall back" mode where it synthesises an approximate sensor reading from other sensor data and uses that in place of the faulty sensor. For example in the case of a faulty MAP sensor the TPS and engine RPM data can be used to synthesise a MAP reading that is good enough to make the car run.
The problem is not only does it use this synthesised data for itself - it will sometimes send that data to the scantool (Lexia) as if it is real data and not indicate that the data is made up, so beware! If there is any doubt the actual sensor voltage/waveform should be measured directly with a multimeter/scope to ascertain the truth of the situation. It was only my scope that revealed the lie that the Lexia presented us...
A bit of tracing of the wiring back to the ECU connector and we found that the signal wire and signal ground on the O2 sensor were also reversed - effectively feeding the ECU a negative signal voltage instead of positive...opps...
The reason for that was actually a good one - both the wiring loom belonging to the ECU and the sensor connector that belonged to the engine which had to be spliced together had green and red wires for the two signal wires and they were connected the "right" way around - it turns out that the colour coding on the two is different so we had to connect red to green and green to red to get the polarity correct back to the ECU!

So apparently a 306 Gti uses opposite wire colouring to a Xsara VTS for the O2 signal even though the engine is the same...
After reversing the wires and tidying them up the scope confirmed that the O2 sensor was now warming up in about a minute and switching healthily. The Lexia also showed normal switching, but that wasn't terribly useful when it had shown normal switching when the sensor was connected back to front and not operating!
After that success we then moved onto the exhaust on my car, but I'll post about that over in my blog.
All in all a very satisfying and enjoyable day.
