Instruments/central locking/radio/ engine

Hi All. When I first bought my focus 1.6lx manual 2 years ago I had all
the usual problems - dials go to zero then full scale, warning ligths flash on and off - central locking clicks, relays click, sometimes the
cd turns off and the engine power drops and all lights turn off. Sometimes it cuts out completely and the trip counter and clock reset to zero and the cd player needs its security code again.
I bought a new battery for the car and all was well for about 22 months. Now I have the problem, intermittently again. Sometimes I can do 1000 miles without it happening, sometimes it is every other day or every journey. I have had teh battey checked and that is ok and I think I can rule the alternator out as even with the engine off it sometimes does starnge things.
A few weeks back I changed the speed sensor - 25.00 and lots of grief changing it (heres a tip - if anyone has trouble getting the sensor out after removing the retaining pin, take out the oiul filler cap on the transmission and the sensor comes out easier (eventually)).
Anyway - speed sensor changed and I still have the same problem. I went
to a motor factors and they tested the Varta battery which is fine and their machine seemed to say the alternator was finer too (my dads friend had the same problem cured with a new alternator. )
I have checked the body earth and also the connection underneath the fusebox under the bonnet.
Any ideas anyone - I am increasingly frustrated with what is, ina ll other respects, a fantastic car.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
Add image file
Upload is a website by car enthusiasts for car enthusiasts. It is not affiliated with any of the car or spare part manufacturers or car dealers discussed here. All logos and trade names are the property of their respective owners.