More testing and analysis of the slow down light flicker problem - and a solution.

I have now done around 400 miles in the car, with the only problem exhibited being the flicker of the slow down light. In a 100 mile drive it visibly flickered around 5 times, each time about 0.1 of a second. I had the laptop running whilst logging the serial output from the ECU. This is the sort of thing it generates:

LEFT reading taken 671.25 volts required=2.36
LEFT reading taken 671.25 volts required=2.36
LEFT reading taken 671.25 volts required=2.36
LEFT reading taken 671.25 volts required=2.36
LEFT reading taken 671.50 volts required=2.36

What I've found is that occasionally the thermocouple converter chip will fail to get a valid reading from the thermocouple. This is evident in my log from statements of the following kind:

LEFT reading taken nan volts required=0.50

'nan' means "Not a number" - and my code says in this situation I will generate a value of 300 degrees C (0.5v).

I have already coded up a sensitivity setting (in seconds) so that any minor dropout of the thermocouple can be managed without setting off the warning light. However it seems that the reason the light flickers is that when I get a bad reading from the MAX31855 chip I default the output voltage to 0.5v as part of this sensitivity handling. I'm guessing that the ECU detects this using some simple plausibility checks i.e. the thermocouple is incapable of swinging from over 600 degrees to around 300 degrees in 0.3 seconds (the sample rate), and even if it was then the cats themselves can definitely never do that.

The solution? Instead of generating 0.5v I will remember the last good reading and use that instead. I will update the firmware on the car tomorrow and do another test run.

Counting the 'nan' instances in the log shows 9 occurrences in over 30,000 samples. That's not exactly a massive problem so should be safe to code around.

And here's the temperature chart for the drive. This was just over 3 hours of runtime. The dip at the beginning is where I stopped for fuel and left the logging running. When you do this, the Cat ECU is powered from either the car battery when the engine is on, or via the USB port when the engine is off. This means that sampling will continue with the engine off when the laptop is connected, and you can see the cats cool down.