An Oil Temperature Gauge for the 420R, (Part 1)
Over the last few weeks I've been building an oil temperature gauge for the 420R, I hope you find this of interest.
Background
The dry-sump tank on the Caterham Seven 420 variants has an oil temperature sender fitted at the bottom, but nothing is connected to it on the road version of the 420, this might be different for the race cars based on the 420R. You can remove the sender to drain the oil from the tank, personally I don't do this for fear of thread damage. I opt to remove oil via a suction pump approach.
Generally speaking oil temperature is useful to know, particularly on track days, so the aim of the build was to read that sender and display the temperature on a small round OLED screen. From the start I set one key principle for the build;
A wrong but believable reading is worse than no reading at all.
For instance, a gauge that shows 105 °C when the oil is actually at 130 °C is more dangerous than one that shows nothing. That principle drives most of the design decisions described below.
This blog covers the build to date, the sender and its temperature-resistance curve, how the measurement works, the hardware, the bench testing, the screens, and a problem I hit along the way.
The Plan
The gauge is built from two main parts.
The Display
The display hardware is a Waveshare ESP32-S3-Touch-AMOLED-1.75.
It's a 1.75 inch round AMOLED touch screen, 466 × 466 pixels, with an ESP32-S3 processor, 16 MB of flash and 8 MB of PSRAM, in a round case. The product is available with or without a case, I opted for the variant with a case.
On an AMOLED screen a black pixel is switched off, so the layouts use pure black backgrounds and only the reading and its markings are lit. This sort of screen produces a high quality visual which is extremely clear and ideal for the application.

The Sensing & Front End Interface
A Texas Instruments ADS122C04 24-bit analogue-to-digital converter, on Adafruit's breakout board, with three resistors and two capacitors. It talks to the display over I²C and takes its power from the display's 3.3 V supply.

The display is powered over USB-C, from an ignition-switched USB-C charger in the car. This means that nothing on the car is modified, the ECU isn't involved, and removing the gauge returns the car to standard, well you could consider it not actually fitted.
In a first prototype I used a 16-bit ADS1115 converter and a 470 Ω pull-up resistor. It worked well, and it's what I used for the first hot-water test described below. I moved to the ADS122C04 because it has a built-in current source, along side a 24-bit converter, and test currents that let the firmware check its own wiring. A very handy feature.
The Sender
The sender is a resistive, negative temperature coefficient (NTC) device, so its resistance falls as it gets hotter. It has a single spade terminal on top, and its brass body screws into the tank, so the tank forms the other half of the circuit. Identifying exactly which sender Caterham fit isn't straightforward. An owner's forum post lists the Caterham part as a "TT6811-03", a Caerbont (formerly Smiths) sender with a 1/8 NPTF thread. Its published resistance curve, known as curve 205, runs from 1158 Ω at 40 °C down to 44 Ω at 140 °C. For the bench based development work I have a spare sender with a brass body and a single spade, stamped "6811" on its hex. The rest of the stamp is unreadable. I expect the one in the car to be the same part. Fingers crossed.

The following block diagrams details how the various elements constitute the overall design.

Temperature Resistance Curve (TR)
At a basic level the gauge measures resistance. To turn that resistence into a temperature it needs a curve, a table giving the sender's resistance at each temperature point. If the specified curve is incorrect, then the result temperature reading is incorrect regardless of how capable the electronics are.
As part of the development process I've plotted two published curves.

Bosch 0 280 130 026
A Bosch Motorsport NTC sensor. The datasheet gives a full table from −40 °C to 130 °C, from 2.5 kΩ at 20 °C down to 89 Ω at 130 °C.
Caerbont TT6811-03 (curve 205)
The part named in the forum post. It's published from 40 °C to 150 °C only.
The following table shows both side by side.
Temperature | Bosch 0 280 130 026 | Caerbont TT6811-03 |
20 °C | 2500 Ω | not published |
40 °C | 1175 Ω | 1158 Ω |
60 °C | 596 Ω | 510 Ω |
80 °C | 323 Ω | 247.5 Ω |
100 °C | 187 Ω | 130.15 Ω |
115 °C | about 128 Ω | about 85 Ω |
120 °C | 113 Ω | 73.5 Ω |
130 °C | 89 Ω | 56.5 Ω |
140 °C | not published | 44 Ω |
At 40 °C the two curves are within 2 % of each other. By 130 °C the Bosch figure is 58 % higher.
The hot-water test
As part of the dev work I put the bench sender in hot water next to a Sonoff temperature probe as a reference. The gauge was running a bench-only build with the Bosch curve loaded. From room temperature, where it read 19 °C, up to 89 °C, the gauge agreed with the probe.
If the sender had followed the Caerbont curve, the gauge would have shown about 64 °C when the probe read 59 °C, and about 100 °C when the probe read 89 °C. It agreed throughout, so the bench sender, although stamped 6811, follows the Bosch-type curve, at least up to 89 °C. That range is the green band on the graph above. This isn't a calibration. The Sonoff probe isn't a calibrated reference, I didn't record individual points, and nothing above 89 °C was verified. It does show that the published curve for the part number I expected doesn't describe the sender I have. Hmmmm.
Why the hot end matters

The curves flatten as the temperature rises. Near 40 °C the Bosch curve changes by about 34 Ω per degree. Near 130 °C it changes by about 2.4 Ω per degree, and the Caerbont curve by 1.7 Ω. The temperatures that matter most are covered by the smallest changes in resistance. The graph also shows the risk of using the wrong curve. A Bosch-type sender at 130 °C reads 89 Ω. On the Caerbont curve, 89 Ω is 113 °C, which is below the 115 °C warning, so the gauge would show a normal-looking number and no alarm while the oil was at the critical temperature. The other way round, a Caerbont-type sender read against the Bosch curve reads high, which would give false alarms but would not hide a problem. A reading that is too low is the more dangerous error.
How the gauge handles it
For these reasons the firmware on the device has been built to be cautious about curves.
Uncalibrated
As supplied, the gauge has no curve. It shows the sender's resistance in ohms with CALIBRATION REQUIRED underneath, never a temperature.
Calibration
A curve can only be loaded from points that I measure. A small tool checks the points (at least five, with the resistance falling as the temperature rises) and builds the table into the firmware. The datasheet curves are kept for comparison only.
Outside the table
Between two measured points the gauge interpolates in a straight line. Beyond the ends of the table it doesn't extrapolate. Colder than the first point it shows BELOW CAL RANGE. Hotter than the last point it shows in red and treats the reading as critical. The table therefore has to reach at least the 130 °C critical threshold, or the gauge will show red whenever the oil is hotter than the top point.
The Bosch curve has been loaded for bench building and for testing. An oil bath to 140 °C unsurprisingly just isn't practical for me in my study, therefore the real calibration will be done in the car. With the engine off and the filler cap removed, I'll point a laser thermometer into the oil and compare it with the gauge at around 60, 80 and 100 °C, then at higher temperatures after a harder run. More on that in a future post.
Gauge Measurement

The simplest way to read a sender like this is to feed it through a pull-up resistor from a supply and measure the voltage. The result then depends on the supply voltage, the resistor, and any difference in ground between the gauge and the tank. In a car, the ground at the dashboard and the ground at the oil tank can't be assumed the same. The illustrated design used avoids concerns over the ground.
Current source
The ADS122C04 has its own current source. It drives 250 µA out of pin A0, through a reference resistor (Rref, 2.00 kΩ, 0.1 %), along the signal wire and through the sender into the tank.
Two voltages
The ADC measures the voltage across Rref (Vref) and the voltage across the sender (Vs). The same current flows through both, therefore the sender's resistance is as follows;
Rs = Rref × Vs / Vref
The current cancels out, this matters as the chip's current source is only accurate to ±6 %. The ADC's own reference and the 3.3 V supply cancel as well. What remains is the accuracy of Rref, which is why it's a 0.1 %, 25 ppm/°C part.
Ground-sense wire
The low side of the sender voltage is measured at the tank, through a separate wire to the tank's bond stud, rather than at the gauge's ground. Any voltage difference between the gauge's ground and the tank is removed from the measurement.
3 wires to the tank
A signal wire to the spade, the ground-sense wire, and a return wire, twisted together. The return wire carries the 250 µA back to the gauge.
Protection
Each wire reaches the ADC through at least;
2 kΩ: Rref on one side; and then
two 2.2 kΩ resistors (R1 and R2) on the measuring pins.
If a harness wire shorts to 14.4 V, the current into each pin is limited to around 5 mA, within the chip's 10 mA rating.
Noise Filtering
The ADC samples its inputs at 256 kHz. Interference near that frequency, from the ignition, alternator or fan, can alias into the reading. Two 47 nF capacitors (C1 and C2) sit across pairs of pins, forming filters with a corner frequency of about 800 Hz, giving about 50 dB of attenuation at 256 kHz. They're C0G ceramics, because X7R ceramics are piezoelectric and turn vibration into voltage.
No capacitor to ground
A conventional filter would also put a capacitor from each pin to ground. Here, a shorted one would give a believable wrong reading with A1 shorted to ground and the tank 50 mV below the gauge's ground, a sender at 130 °C would read about 96 °C with no alarm.
With the capacitors across pairs of pins, a shorted capacitor gives SENSOR OPEN or SENSOR SHORT instead.
Measurement cycle

Four times a second, the gauge makes six conversions, taking about 150 ms in total.
Offset. The ADC's inputs shorted together, giving the converter's own error, which is subtracted from the other readings.
Vref. Across the reference resistor.
Vs. Across the sender.
Ground. The tank's voltage, with a 10 µA test current switched on. If the ground-sense wire is broken, that current pulls the pin up and the gauge shows GROUND FAULT.
Tap. The same check on the signal side, confirming R1's joint is intact.
Supply. The 3.3 V rail, through the chip's own monitor.
Before every conversion, the firmware writes the chip's settings and reads them back. Every result carries a checksum and a counter. If any check fails, that cycle is reported as ADC UNAVAILABLE rather than reusing an old value.
The faults the gauge reports:
SENSOR OPEN: the sender or its wire disconnected, the resistance over 5 kΩ, or R1's joint open.
SENSOR SHORT: the signal wire shorted to the tank, or the resistance under 20 Ω.
GROUND FAULT: the ground-sense wire broken, or the tank more than 0.1 V below or 0.2 V above the gauge's ground.
SUPPLY FAULT: the 3.3 V rail outside 2.9 to 3.5 V, or the measured current outside 210 to 290 µA, which is how a missing or wrong reference resistor shows up.
ADC UNAVAILABLE: the converter not responding, a checksum or settings mismatch, or its offset out of range.
One step of the ADC is 0.24 µV, and its noise is about 6.6 µV. At the hot end the sender voltage changes by roughly half a millivolt per degree, so the converter's noise is equivalent to around 0.02 °C. The accuracy will be set by the reference resistor and the curve rather than the converter.
In the next post (part 2) we'll look at the physical build and beyond.







Comments