ECU Upgrade : Perfecting the Dashboard integration and Fuel pump control


TL;DR Getting back to 100% 

Disclaimer : this is nerd-supreme level of nerditude and most of that nonsense was part of my training in electronics and information technologies. Do not try this at home. 

All of that happened one step at a time between September 5th and October 4th. 

When the ECU was replaced by a SCS Delta 700S, a standard SCS configuration for a Caterham 160 of unknown vintage was used as a base. All was fine and nice as far as the actual engine management was concerned, this is really why you choose that kind of product in the first place.

Integration to the chassis harness was less straightforward, and we were lacking the car electric diagram to tackle everything with confidence.

I have since obtained the schematics for both the Caterham 170 and 160, that are actually quite similar.

Areas for improvement were the calibration of the minor dashboard gauges (all of them), as well as the control of the fuel pump, temporarily fed a "10 times the RPM" pulse from the tacho output of the ECU. 

😢‍🌫️ The fog lights didn't work either, but would have required a new harness to be built. That might come later on, who knows. In the meantime I hooked a miniature latching relay behind the fog light momentary switch, connected to strategic points behind dashboard switches in order to bypass the original relay and effectively result in an equivalent connection when powered on. Basically routing the output of the main headlight switch to the pilot light of the fog light button. Believe me that's exactly what the schematics show the relay does. Having measured that I only have 1 Amp flowing to the pair of fog lights, the pilot lamp wiring looked adequate enough.

πŸ’»For the rest, I got a dedicated SCS CAN bus to USB interface from MH7 Engineering, and we worked that out together but remotely.

I got a look at SXTune and tackled the first low hanging fruit that was the oil pressure gauge. I knew what to expect cold or hot, idling or driving, with prior videos for reference of what the readings did look like with the stock ECU. The only adjustment required consisted in a "sensor reading at 5V" value, which I tweaked to match what I wanted to see.

πŸ’¦ Aftet that, I went on with the coolant temperature gauge. The gauge itself was alright, with the needle matching the reported OBDII temperature. The required adjustment was in the sensor mapping, as the measured value was off by 6 or 7°C as previously established. The ECU has a map with dozens of values, 95% of which are out of useful operating conditions temperatures. I did only adjust a single parameter on the top of the map. I think I did replace the "97°C" to "91°C" instead. Now the OBDII data and the gauge read 85°C when the thermostat opens, this is consistent with what it read initially, and is also confirmed with an IR thermometer on the thermostat housing and radiator. 

Before that adjustment the cooling fan did kick in too early and too often, most of the time before the thermostat could even have a chance to have any coolant flow through the radiator at all. The original ECU had the fan start at 98°C and stop when the engine was cooled down to 91 or 92°C. The current settings in my calibration are 95°C to turn it on, and 92°C to shut it down.

⛽ The fuel level gauge was a harder nut to crack. A first approach was to hook the computer to the car while filling at the local fuel station, starting with the gauge that did read empty. From that, I got detailed sensor voltages from 10 liters to a full tank (32 useable liters). I came to doubt what the gauge was reporting compared to what the CAN data told the dashboard to display. 

I got the gauge out of the car, and with the Caerbont datasheet on hand, I checked that the gauge was actually not capable of reaching higher than it did, even with its input connected straight to ground. That confirmed that CAN 100% really reached as far as it could go. I got the gauge back in the car (I will have to replace its disintegrated rubber/plastic o-ring), and hooked the computer. I changed the values on the screen to pinpoint what CAN value (%) corresponds to each reading of the needle. Long story short "Empty" requires a 33% signal, and it's not very linear to the 100% of the maximum.

With the strange dial layout of "E", "R", two segments, "1/2", two segments, "1", I decided that the 6 main readings would be "E", "R", "1/3", "1/2", "3/4" and "1".  My logic being that the first half would be split in 3 equal parts, thus 0, 1/6, 2/6, 3/6 , and the second half would just be 2/4, 3/4, 4/4. CAN signal for those are 33%, 53%, 62%; 73%, 80%, and 100% respectively.

I knew from my trip back from the Vosges on the first week-end I got the car back that all you can use from the tank is 32 liters. After that the engine starves on the slightest hill climb. I mentally planned a way to the nearest petrol station I could reach while driving exclusively downhill.  I actually stopped the engine for the major part of the drive downhill. That specific good old times led to the conversation where I asked to be sold an adapter so I could tackle that for good without further delay.

All that tangent to convey how I came to know how far I could drive in order to safely land at a gas pump with an empty tank. That gave me the opportunity to have a full tank filled with the ECU and fuel sender under monitoring from the computer. I think that with that second series of measurements I now have a liter by liter reading of the sensor input. I have converted it to equivalent sender resistance so it can be used by anybody else, see below.

πŸ† Behold, a Caterham with a reliable fuel gauge where what you see is what you get.

πŸͺ› And finally, to the fuel pump. With MH7's advice and support, I moved the wire connected to the tachometer output of the ECU to a free PWM-capable output. I had to move the wire from the main connector to the secondary one so it was a bit more involved than it may sound. MH7 did also prepare me a version of my calibration file with a new "User defined table" to map the intake pressure vs RPM to the desired fuel pump control PWM signal, with all the settings for the new output pin already defined as well.

With that at the ready, I could hear the fuel pump modulate. But I missed something at one point and a bogus PWM frequency led me to believe the PWM signal had to be reversed, so I drove for 2 weeks with a pump that was running at full power at idle, and slowing down to about half power when pushing the engine harder. There was no negative effect as the minimum of that map was equivalent to what had been fed by the tachometer output for months (which was defined at 50% fixed PWM, but that's a variable frequency).

Convinced something was off from the noise the pump did emit at idle, especially in the underground parking lot at work, I thought about a way to get the multimeter in the circuit and measure the actual current (thus power) of the pump. I wasn't keen on shunting the relay of fuse in the fuse box, so took my sweet time until I had a vision for the perfect and easy way of doing it : I would connect my ammeter in lieu of the inertia cut off switch. It's very easily accessible, on the firewall just beside the brake fluid reservoir under the hood. The fact that I retained both the fuse and the relay also made it way safer. 

A first measurement was not very conclusive, and truth be told the 15A fuse was a good indication that my 10A multimeter would be out of range. It didn't take too long to remember that I had a "50A 75mV" shunt laying around, destined for my 3D printer since 2007 but never used since. So I did replace the inertial switch with the 50A-capable shunt and got my multimeter in voltmeter mode instead.

πŸ“ˆ With that I was able to determine with precision when the pump was on or off, what was its actual power consumption for each PWM value, and what was the lower limit to prevent the engine from starving at idle. The useful (and safe) PWM range goes from 25% (12 Watts or 6% power) to 80% (180 Watts! for 100% power). At 20% the engine cannot sustain idle although the pump is still running, and at 86% the pump stops. I did edit the map to make use of the full power range. I might tune it down a little as everything ran fine for 9000km with a 50% duty cycle PWM signal (44% power, 80W), there is really no need for the 180W full blast. 

Below : Fuel sender resistance derived from measured input voltages for known VRef and Pull-up values. Plotted on a chart, it appears to be flat from 0 to 2 litres, linear with a 13.09 ohms/liter slope up to 17.5 liters, then linear with a 18.82 ohms/liter slope up to 27.5 liters, and finally flat until full at 32 litres.

Litres Resistance
0 64
1 64
2 64
3 78
4 91
5 104
6 118
7 132
9 152
10 166
11 180
12 195
13 209
14 223
15 238
16 253
17.5 267
18.5 297
20 328
20.5 343
22.5 375
23 391
25 407
26 439
27.5 456
30 456
31 456
32 456


 




Comments