Rennlist - Porsche Discussion Forums

Rennlist - Porsche Discussion Forums (https://rennlist.com/forums/)
-   996 Forum (https://rennlist.com/forums/996-forum-60/)
-   -   Oil temp gauge using the built-in oil temp sensor (https://rennlist.com/forums/996-forum/827720-oil-temp-gauge-using-the-built-in-oil-temp-sensor.html)

Ahsai 08-05-2014 12:19 AM

Oil temp gauge using the built-in oil temp sensor
 
2 Attachment(s)
Hi folks,

Just wanna share with you it's possible to convert the stock DME oil temp sensor signal to drive a VDO 300F oil temp gauge. Takes about a dozen electronic components, a microcontroller, and 8 lines of Arduino code.

I used Duramatric to map the oil temp to the analogue sensor signal (tapped from the DME but no splicing needed so the whole mod is completely reversible), then I just made a circuit to drive the gauge based on the analogue signal. I figured out the different voltages needed to drive the gauge on the 5 diff temp settings on the gauge then just mapped those to the signal using a quadratic equation (implemented in the microcontroller). Alarm/LED warning based on programmable oil temp can also be added if needed.

I have not mounted the gauge but the photo below shows how it can be mounted in the single DIN slot with a proper face plate. I tested the gauge and it's very accurate. This may be too much trouble for most people but I can share more details if there are interests. A good project if you have a thing for electronic projects :)

Attachment 859100

Attachment 859101

G.T. 08-05-2014 01:12 AM

Very cool!

tokyopav 08-05-2014 04:14 AM

Very interested. Can you please share more details with me. Thanks.

Spinout 08-05-2014 08:50 AM

Nice job. I've always wanted an oil temp gauge for my 996. Subscribed.

Seeeu911 08-05-2014 08:55 AM

Oh you could build 50 for sale. Use a smaller digital flat gauge to better more subtly fit 996 interiors. Need an investor ?

philooo 08-05-2014 09:26 AM

I am EXTREMELY interested, I have been asking everywhere for this for years !!!!

you are a savior ;)

I am totally interested but I would need detail info as I know nothing about electronic but I am a qualified geek ;).

If you decide to sell the gizmo put my name on the list !

mikeborden 08-05-2014 10:02 AM

HOLY CRAP! That's COOL!

Do you know what the PID'S are? I think if you know that, you can put custom PIDS into some OBD readers on the IPhone and such and see the Oil Temp.

phil996cab99 08-05-2014 02:17 PM

Knowledge is power.

dmw996 08-05-2014 06:29 PM

Dude you are a mad scientist... Cool mod!

Ahsai 08-05-2014 07:15 PM

Thanks guys! Give me some time and I'll do a more detailed write-up.

@mikeborden, unfortunately the PID is not available for the regular OBDII ISO9141-2 protocol (which any generic OBDII reader uses). The PID is only available via Porsche protocol and h/w (e.g., Durametric). It will involve some serious reverse engineering (at least for me) to get the digital oil temp info from the DME. If someone knows how, please do share.

Ahsai 08-05-2014 07:20 PM

4 Attachment(s)
More photos in the meantime...these are demo photos, not the actual connectors

Attachment 859307

Attachment 859308

Attachment 859309

Attachment 859311

alpine003 08-05-2014 07:42 PM

Very nice bit of engineering. So this basically uses the factory input, saving someone from running a separate sensor and line into the cabin?

Personally for the effort involved, I'd rather try to find a good stock tap in point for a sensor and run the wiring through with aftermarket gauge kit.

Although I wear a pager and no cell phone so I might as well run a hot oil line into the cabin and do it really old school. J/k

Nice job either way.:thumbup:

Ahsai 08-05-2014 07:59 PM


Originally Posted by alpine003 (Post 11556570)
Very nice bit of engineering. So this basically uses the factory input, saving someone from running a separate sensor and line into the cabin?

Personally for the effort involved, I'd rather try to find a good stock tap in point for a sensor and run the wiring through with aftermarket gauge kit.

Although I wear a pager and no cell phone so I might as well run a hot oil line into the cabin and do it really old school. J/k

Nice job either way.:thumbup:

Correct because tapping into an engine oil port that has oil flow (to get accurate measurement) is not trivial (to me at least). Like I mentioned it's not for everyone for the effort but if you're a bit geeky or electronic savvy, it's not bad at all :)

knfeparty 08-06-2014 02:20 PM

I have a spares VDO gauge like that sitting around, as well as a soldering iron. I'll be making one as soon as you post a parts lost and instructions.

Ahsai 08-06-2014 03:33 PM

8 Attachment(s)
Ok, here's a very long write up. Enjoy :)
**DISCLAIMER: Use the following info at your own risks. I'm not responsible for any damage to your car or your self-esteem :)

Things you need:

A) DME female pin x1 and male pin x1.

http://www.mouser.com/ProductDetail/...LHPnvMw0tP4w==
http://www.mouser.com/ProductDetail/...ge2OikIF63U%3d

B) VDO Vision 300F Oil temp gauge ($30) or VDO regular 300F oil temp gauge ($20) (I highly recommend the Vision instead since it uses backlit lighting and it matches the rest of the stock gauges very well)


Attachment 859497
Attachment 859498

C) The driver(~$15) (see the schematic for parts needed)

D) A programmer to flash the ATtiny85 micro-controller $10 Arduino nano from eBay and these links
http://arduinodiy.wordpress.com/2012...-arduino-nano/)
http://forums.4fips.com/viewtopic.php?f=3&t=1080

E) Arduino IDE (free download here http://arduino.cc/en/Main/Software)

======================================================================== =========================================
Explanation of how everything works together.

1) Oil temp signal from DME plug III/Pin 5

This signal (relative to ground) varies from 0-5v. Higher the temp, lower the voltage (NTC type sensor) e.g,. 1.8V=120F, 1.0V=165F, 0.5V=210F. Using Durametric, I figured out the voltage<->temp mapping (100F to 220F). 220F is the highest I could get my oil temp up to. I just added (0v=300F) based on my estimate and used the Excel trendline to extrapolate the rest of the range (220F to 300F). More measurements above 220F can increase the extrapolation accuracy even further.
Attachment 859494

2) VDO Vision 300F Oil temp gauge

This gauge has 5 terminals - "+", "-", "S", and two terminals for its light bulb. The "+" is connected to the 12v ignition power and "-" to ground. "S" is normally connected to a VDO temp sensor then to ground. Without the VDO sensor, we can still drive the gauge by supplying regulated 9v to "+", and applying variable voltage to the "S" pin to get different gauge temp readings.

3) The circuit

The principle is very simlpe. The circuit supplies the correct voltage to drive the "S" pin of the gauge based on the oil temp sensor voltage input. The tricky part is how to figure out this mapping and how to implement it digitally (easy calibration).

There are two voltage regulators U1 and U2: 5v for the micro-controller (ATtiny85) and 9v for the gauge and the opamps. The input signal feeds the opamp buffer U4 (1:1, no amplification) to ensure negligible current drawn from the DME (thanks to the extremely high input resistance of the opamp). The output of the opamp feeds the micro-controller's U5 input pin.

The micro-controller then converts this voltage (0-5v) to a PWM singal. The simple RC low-pass filter (R2 and C4) then filters this PWM signal to a steady DC voltage that feeds the second opamp U3(with a x2 amplification) to drive the gauge.

Attachment 859496

Attachment 859505


4) If you use the VDO Vision (or regular) 300F Oil temp gauge, you can just flash the ATtiny with the code below and follow the inline instructions in the code. You can skip 5) and 6) below.


5) 9-point Calibration

First load a calibration flash that just implements a direct mapping (i.e., Vout = Vin) to the ATtiny. Then use the potentiometer (SW1 set to "Calibrate/Test") to simulate the oil temp sensor signal and feed different Vin to find out the voltage levels needed for the 9 diff temp marks (i.e., 120, 160, 180, 200, 220, 240, 260, 280, and 300F).

Then from the Excel curve in 1) above, figure out how to convert the oil temp signal to this voltage. Then load a new flash that implements this conversion (turns out to be a quadractic equation) to the ATtiny.

Attachment 859495

6) Testing

Set SW1 to "Calibrate/Test", adjust the potentiometer to diff voltage in 1) and verify the gauge's reading is correct.
Flip SW1 back to "Active" and the driver is now ready.

7) Tap into the DME (reversible and no splicing needed)

Just solder a "Y" or "T" wire between the two pins in A) above. Remove the DME PlugIII/Pin5 and insert this piece between the socket housing and the oil temp sensor green/red wire. Insulate any exposed metal parts appropriately. Tug it away and zip tie it neatly.

Attachment 859499
Attachment 859500

======================================================================== ====================================
The Arduino Code

/*
VDO Vision oil temperature gauge driver (7/31/2014) by Ahsai
Tap the DME NTC oil temp sensor voltage reading of 2003 Porsche 996 (0 - 5V. High voltage = low temp)
Reads an analog input, converts it to voltage, then converts the voltage to voltage_out
using a function (based on Durametric reading, gauge calibration data and Excel spreadsheet trendline equation).
Write voltage_out to analog output pin D1, as a fraction of 5.0v, to drive the VDO gauage
*/

// the setup routine runs once when you press reset:
void setup() {}

// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin A3 and convert the analog reading (which goes from 0 - 1023) to voltage (0 - 5V):
float v = analogRead(A3) * (5.0 / 1023.0);
float vout = 2.0; // To ensure the needle stays below 120F when the temp is below 120F
//y = -0.3023x2 + 1.3098x + 0.294
if (v < 2.0) { vout = -0.3023*pow(v,2) + 1.3098*v + 0.294; }
// If using a non-Vision VDO oil temp gauge, comment out the previous line and uncomment the following line
//if (v < 2.0) { vout = -0.2352*pow(v,2) + 1.3098*v + 0.3117; }
//float vout = v; // Uncomment this line for calibration
// convert vout (0 - 5.0V) to output (0 - 255) and write to D1
analogWrite(1, (int)(255.0*vout/5.0));
delay(100);
}


All times are GMT -3. The time now is 09:11 AM.


© 2024 MH Sub I, LLC dba Internet Brands