Notices
996 Forum
Sponsored by:
Sponsored by: LN Engineering

Oil temp gauge using the built-in oil temp sensor

 
Old 08-05-2014, 12:19 AM
  #1  
Ahsai
Addict
Rennlist Member
Thread Starter
 
Ahsai's Avatar
 
Join Date: May 2005
Posts: 7,281
Received 2 Likes on 2 Posts
Default Oil temp gauge using the built-in oil temp sensor

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

Name:  0804141906a (Medium).jpg
Views: 4934
Size:  40.1 KB

Name:  0804141902 (Medium).jpg
Views: 5406
Size:  69.4 KB
Ahsai is online now  
Old 08-05-2014, 01:12 AM
  #2  
G.T.
User
 
G.T.'s Avatar
 
Join Date: Oct 2011
Posts: 87
Likes: 0
Received 0 Likes on 0 Posts
Default

Very cool!
G.T. is offline  
Old 08-05-2014, 04:14 AM
  #3  
tokyopav
Banned
 
Join Date: Aug 2013
Posts: 258
Likes: 0
Received 0 Likes on 0 Posts
Default

Very interested. Can you please share more details with me. Thanks.
tokyopav is offline  
Old 08-05-2014, 08:50 AM
  #4  
Spinout
Addict
Rennlist Member
 
Spinout's Avatar
 
Join Date: Sep 2013
Location: York SC
Posts: 726
Likes: 0
Received 0 Likes on 0 Posts
Default

Nice job. I've always wanted an oil temp gauge for my 996. Subscribed.
Spinout is offline  
Old 08-05-2014, 08:55 AM
  #5  
Seeeu911
User
 
Seeeu911's Avatar
 
Join Date: Sep 2006
Location: Florida
Posts: 1,127
Likes: 0
Received 0 Likes on 0 Posts
Default

Oh you could build 50 for sale. Use a smaller digital flat gauge to better more subtly fit 996 interiors. Need an investor ?
Seeeu911 is offline  
Old 08-05-2014, 09:26 AM
  #6  
philooo
Addict
Rennlist Member
 
philooo's Avatar
 
Join Date: Mar 2010
Posts: 2,310
Likes: 0
Received 0 Likes on 0 Posts
Default

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 !
philooo is offline  
Old 08-05-2014, 10:02 AM
  #7  
mikeborden
User
 
Join Date: Nov 2013
Location: Memphis TN
Posts: 168
Likes: 0
Received 0 Likes on 0 Posts
Default

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.
mikeborden is offline  
Old 08-05-2014, 02:17 PM
  #8  
phil996cab99
User
 
phil996cab99's Avatar
 
Join Date: Mar 2002
Location: CVG-SFO-EWR
Posts: 483
Likes: 0
Received 0 Likes on 0 Posts
Default

Knowledge is power.
phil996cab99 is offline  
Old 08-05-2014, 06:29 PM
  #9  
dmw996
User
 
Join Date: Oct 2012
Location: Pleasant Grove, AL
Posts: 136
Likes: 0
Received 0 Likes on 0 Posts
Default

Dude you are a mad scientist... Cool mod!
dmw996 is offline  
Old 08-05-2014, 07:15 PM
  #10  
Ahsai
Addict
Rennlist Member
Thread Starter
 
Ahsai's Avatar
 
Join Date: May 2005
Posts: 7,281
Received 2 Likes on 2 Posts
Default

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 is online now  
Old 08-05-2014, 07:20 PM
  #11  
Ahsai
Addict
Rennlist Member
Thread Starter
 
Ahsai's Avatar
 
Join Date: May 2005
Posts: 7,281
Received 2 Likes on 2 Posts
Default

More photos in the meantime...these are demo photos, not the actual connectors

Name:  0622141816a (Medium).jpg
Views: 4193
Size:  99.3 KB

Name:  0622141815 (Medium).jpg
Views: 4221
Size:  81.8 KB

Name:  0622141814a.jpg
Views: 4209
Size:  66.8 KB

Name:  0623141915.jpg
Views: 4266
Size:  72.1 KB
Ahsai is online now  
Old 08-05-2014, 07:42 PM
  #12  
alpine003
Super User
 
alpine003's Avatar
 
Join Date: Mar 2010
Location: Chicago
Posts: 7,701
Likes: 0
Received 1 Like on 1 Post
Default

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.
alpine003 is offline  
Old 08-05-2014, 07:59 PM
  #13  
Ahsai
Addict
Rennlist Member
Thread Starter
 
Ahsai's Avatar
 
Join Date: May 2005
Posts: 7,281
Received 2 Likes on 2 Posts
Default

Originally Posted by alpine003 View Post
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.
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
Ahsai is online now  
Old 08-06-2014, 02:20 PM
  #14  
knfeparty
Addict
Rennlist Member
 
knfeparty's Avatar
 
Join Date: Sep 2006
Location: Jacksonville, FL Duval County
Posts: 4,211
Likes: 0
Received 1 Like on 1 Post
Default

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.
knfeparty is offline  
Old 08-06-2014, 03:33 PM
  #15  
Ahsai
Addict
Rennlist Member
Thread Starter
 
Ahsai's Avatar
 
Join Date: May 2005
Posts: 7,281
Received 2 Likes on 2 Posts
Default

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)

Amazon.com: VDO 310106 Vision Style Electrical Oil Temperature Gauge 2 1/16" Diameter, 300F: Automotive Amazon.com: VDO 310106 Vision Style Electrical Oil Temperature Gauge 2 1/16" Diameter, 300F: Automotive

Name:  0805142057 (Medium).jpg
Views: 4288
Size:  40.7 KB
Name:  0805142045 (Medium).jpg
Views: 4424
Size:  43.5 KB

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.
Name:  Drawing1.jpg
Views: 7149
Size:  47.1 KB

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.

ExpressSCH.pdf

Name:  ExpressSCH-page-0.jpg
Views: 9367
Size:  62.2 KB


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.

Name:  Drawing2.jpg
Views: 4326
Size:  27.8 KB

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.

Name:  0806140930 (Medium).jpg
Views: 4631
Size:  74.8 KB
Name:  0805140831 (Medium).jpg
Views: 4388
Size:  102.1 KB

======================================================================== ====================================
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);
}

Last edited by Ahsai; 08-06-2014 at 03:55 PM.
Ahsai is online now  

Thread Tools
Search this Thread
Quick Reply: Oil temp gauge using the built-in oil temp sensor


Contact Us - About Us - Advertising - Cookie Policy - Privacy Statement - Terms of Service

© 2019 MH Sub I, LLC dba Internet Brands

We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.
 
  • Ask a Question
    Get answers from community experts
Question Title:
Description:
Your question will be posted in: