Jump to content

Connect oil pressure and oil temp sensors to analog inputs


TnF

Recommended Posts

Hello. I'm trying to integrate the oil pressure and temperature sensors from my Innovate Motorsports dual function gauge to my Link G4+ Xtreme black. I connected the signals to two analog input channels and i haven't had much luck. While i could connect the sensors directly to the Link ECU without any issues the problem is that they are connected to the gauge with makes several issues. I just now started to reverse engineer the oil pressure and here is what i found:

While power is off, the oil pressure sensor (resistive type) reads approx, 250ohms at 0 psi, and 20ohms at 100psi.

However when i turn the key on, and the mtx-d gauge activates, resistance measured goes to 0.8Mohms, and if i measure voltage it is at 0.037V.

When i start the engine at 55psi, ohms is about 200ohm, and voltage 0.006V. Note that the analog input wire is still connected on these measurements but the channels is turned off, so i don't know if it makes a difference.

I'll do more reverse engineering now, but any help is really appreciated! 

Link to comment
Share on other sites

So i reversed engineered both sensors, temp is an NTC, and pressure sensor is 260ohm-35ohms (0-100psi). Both signal lines have about 3.6V pull up and probably an internal shunt resistor to measure the current and therefore the resistance of the sensor. The temperature one should logically work connected to an analog input channel and not an analog temperature channel since the signal is already pulled up. However shouldn't be normally pulled up to 5V? I'll try with PCLink and see if i can measure it normally. Btw all measurements where done disconnected completely while using precision trim resistors to feed dummy resistance values to the mtx-d gauge to see the readings (aka their calibration). 

Link to comment
Share on other sites

So I tested it and it will not work :( Technically it can be made to work by connecting an external pull up resistor to 5V when connecting the Link ecu directly to the sensors, but i'm not sure what will be the effect if both 5V and Mtx-D pull-ups are connected to the same signal line. This is due to the voltage difference which would theoretically back feed into the MTX-D unit. I don't know what pull-up resistor they use internally so I'm not sure how risky it will be. Maybe I can measure it. Theoretically I could start using a very high ohms pull-up resistor to limit the current and test it out. But can anyone recommend?

Another way to read the values is connecting it via their serial output if Link can implement their SDK, since they use a proprietary protocol.

Link to comment
Share on other sites

Hi TnF,

Do you have the gauges grounded through the ECU? Maybe you are getting some interference here? Please let me know if this is the case. I have noticed that with all the analog gauges you need to make sure that they are both connected to the same grounding source. Preferably ECU gnd

Sincerely,

Rich 

Link to comment
Share on other sites

Hi TnF,

Do you have the gauges grounded through the ECU? Maybe you are getting some interference here? Please let me know if this is the case. I have noticed that with all the analog gauges you need to make sure that they are both connected to the same grounding source. Preferably ECU gnd

Sincerely,

Rich 

Yes it is definitely not a grounding issue. I did some more research, and while it is not mentioned specifically in the help file, in order to use any type of resistive sensor connected to an AN Volt channel, you will need to add an external pull-up (partially mentioned) specifically 1K (not exactly mentioned), with the exception of the AN Temp 1+2 channels where you can either use the internal pull up or have an external one of specific values which you can select in PcLink. Please see my diagram below. If you exclude the blue circled section (mtx-d) to the right, then the Link ecu should be able to measure the sensors just fine. If you exclude the left circled blue section (link ecu) then the mtx-d gauge can read the sensors just fine. The problem here is that, when measuring a resistive type sensor you are actually measuring the current flow through the sensor and a fixed internal resistor of known value connected to it in parallel. This allows you to do a simple calculation to calculate the resistance value of the sensor and therefore the value of whatever it is measuring. However since the pull-up voltage expected by the Link ECU is 5V, if you connected the signal wire of the sensor directly to an AN volt channel directly (what I did - aka without the 5V pull up in the diagram and the 1K resistor), there is a lower current flow than what it should be, therefore measuring wrong values. And I can't just connect a 5V pull up there as pictured because if I do, 1) there will be current flow back to the 3.6V pull-up line, and 2) if (1) wasn't an issue or things blow up, the mtx-d gauge would read wrong.

So i'm kinda stuck here.

mtx-d.png

Link to comment
Share on other sites

Tnf, both these sensors should work fine  spliced directly to link AN volt input without any extra pull-up. The fact that the gauge uses a pull up to 3.6v does not matter you will just not be taking advantage of the full 5v resolution.

this type of connection is done all the time for sharing gauges and piggy back ecu installs.

Link to comment
Share on other sites

Ahhhh.... I see. Yes this is correct. You should be able to use a cal table and do the math adjusting the OHM's to get the sensor to read properly.

I have actually tried this way initially and it didn't work. It seems the ADC is pretty limited, thus you have an upper limit in the ohms cal table (about 65000 ohm), but like i mentioned above when the mtx-d is connected to the sensor, if i measure the resistance across it comes out to a very high ohms value outside the range of what i can calibrate (0.8 Mohms in a particular case), similar to if i measure voltage of the signal line (0.037V in the same case). Also i am speculating how the mtx-d measures the sensors, it might have a constant current source from what we do not know. Also 3.6V is a weird pull-up voltage, this thing is not powered by a lithium battery (3.7V which is near to this value), it should have a micro-controller running at either 3.3V or 5V.

Tnf, both these sensors should work fine  spliced directly to link AN volt input without any extra pull-up. The fact that the gauge uses a pull up to 3.6v does not matter you will just not be taking advantage of the full 5v resolution.

this type of connection is done all the time for sharing gauges and piggy back ecu installs.

Are you actually 100% sure of this? Because like i said if you read my tries above it didn't work. Also it doesn't make much sense from a calculation base of view. This is because you are actually measuring the current to determine the ohms value since fixed pull-up voltage; higher pull-up voltage = higher current through the sensor and vise-versa. I know it works on piggyback situations because most sensors are pulled up to 5V from factory either way. This is not the case here however.

 Maybe someone from Link can shed some light on this!

Link to comment
Share on other sites

Tnf, both these sensors should work fine  spliced directly to link AN volt input without any extra pull-up. The fact that the gauge uses a pull up to 3.6v does not matter you will just not be taking advantage of the full 5v resolution.

this type of connection is done all the time for sharing gauges and piggy back ecu installs.

I thought the same thing....

Link to comment
Share on other sites

You should be able to share the signal no problem. You can feed the signal to an AN volt channel for the pressure and a temp channel with pullup turned off for the temp input.

You can then do a calibration based off voltage.

Simply measuring the voltage in Vs the gauge reading. Using Cal 1-3 and having the input set as volts and out put as temp/pressure.

Link to comment
Share on other sites

You should be able to share the signal no problem. You can feed the signal to an AN volt channel for the pressure and a temp channel with pullup turned off for the temp input.

You can then do a calibration based off voltage.

Simply measuring the voltage in Vs the gauge reading. Using Cal 1-3 and having the input set as volts and out put as temp/pressure.

That's correct but apparently something ELSE is going on in this case. Normally you have the pull up voltage resistor in series with the variable resistance sensor so that you essentially get a voltage divider. But if you seen the measurements I posted above, the voltage measured between the signal line and ground, is very very small (0.0XX V) at all times (aka even when the sensor changes resistance value), essentially showing as short to ground (0V) to the link ecu. Thus something else must being going on. I spoke with my cousin which is an electronic engineer, and assuming innovate tried to keep the cost down, is that they probably used a very cheap microcontroller for the gauge, and then used a single 1 channel precision ADC that is switched between the 2 sensors. However this doesn't still make much sense if the pull-up line is fixed, but let's say they didn't have enough current capability so they switch the pull up line between the 2 sensors? This will explain why the multimeter measures 3.6V pull up voltage, due to averaging. Hopefully I have a portable oscilloscope so I will check if this is the case, because everything is weird in this system.

Link to comment
Share on other sites

Ok i was right! The mtx-d pulls the sensors line high everytime it wants to take a measurement! And it does this alternatively between each sensor, confirming it uses a single ADC (probably). I had a screenshot of both sensor lines connected to my oscilloscope and they were exactly half apart (i lost my screenshot but take my word for it). Frequency of the measurements was about 12.5hz. So every 80ms it takes a measurement from one sensor, aka 40ms between each sensor. So let's say at 0ms it takes a temp reading, at 40ms it will take a pressure reading, then at 80ms a new temp reading, and then at 120ms a new pressure reading! So what do you think should i do next? 

IMAG002.png

Link to comment
Share on other sites

I would say if its doing that you are out of luck in sharing the signals. You will have to pick ECU or gauges.

 

It is doing that! I need to do some more measurements to verify exactly what it is going on, but i have potential solutions for this problem.

- The simplest one is that if it does indeed a voltage measurement (aka voltage divider) when it pulls up the line, then i can technically pull up the line to the same voltage continuously so that Link can take measurements as well. Of course from what i've seen the pull-up voltage is much lower than 5V, but i need to check that using DC coupling. I will need to play with the pull up resistor though in this case since i need to much the effective resistance to the internal value since the extra one will be connected in parallel. I'm not 100% sure that this will work though.

- The other solution is to put an arduino (atmel) microcontroller that will take measurements when mtx-d is not taking measurements and then output them in 0-5V analog voltage to the LINK ecu. This will 100% work for sure.

- The easiest way though, is since Link has serial communication is that if you could implement their protocol/SDK so we can read values over serial. And since their system works much like canbus you can have many innovate devices connected together which can feed all the data via serial freeing up the analog inputs. But i'm not sure if that's much to ask:

http://www.innovatemotorsports.com/support.php

http://www.innovatemotorsports.com/support/downloads/SDKSetup.zip

http://www.innovatemotorsports.com/support/downloads/Seriallog-2.pdf

http://www.innovatemotorsports.com/support/manual/OT-2 SDK.pdf

http://www.innovatemotorsports.com/support/downloads/Innovate-OT-2-SDK-v1.31.zip

http://www.innovatemotorsports.com/support/downloads/LogWorks3Setup.exe

 

Link to comment
Share on other sites

Serial is not an option unless the device can work with our PClink protocol.

This can not be changed as it is what PC link uses for all its communication.

 

 

 

 

Link to comment
Share on other sites

Serial is not an option unless the device can work with our PClink protocol.

This can not be changed as it is what PC link uses for all its communication.

 

 

 

 

So essentially I need to implement my own solution. Let's see how it goes :)

Link to comment
Share on other sites

Yep. If it was me I think I would be fitting a couple of extra senders to run the ECU.

Not possible in my case, not to count all the negative factors going that route. Either way i was correct after all and i did it :)

Went with number (2) aka the micro-controller route. While it can't be done in analog is much easier this way, cheaper and more efficient. What i did is to connect an Arduino micro-controller that takes measurements when the mtx-d pulls up the line and then feeds them as 0-5V to the analog inputs of the Link ecu. Then you do a table calibration there and you are done. Since the microcontroler has 10bit ADC resolution is good enough. Output is done via pulsewidth modulation at 980hz. I should add a small capacitor to smooth out the voltage but i didn't bother yet. Here the code says it all:

  const int oil_in = A0;
  const int temp_in = A1;
  const int oil_out = 5;
  const int temp_out = 6;
  int oil_value = 0;
  int oil_value_good = 0;
  int temp_value = 0;
  int temp_value_good = 0;


void setup() {
  // put your setup code here, to run once:

  pinMode(oil_out, OUTPUT);
  pinMode(temp_out, OUTPUT);
 
}

void loop() {
  // put your main code here, to run repeatedly:
  oil_value = analogRead(oil_in);
  if (oil_value > 100)
  {
    oil_value_good=oil_value;
    analogWrite (oil_out, oil_value_good/4);
  }
  
  temp_value = analogRead(temp_in);
  if (temp_value > 100)
 {
    temp_value_good=temp_value;
    analogWrite (temp_out, temp_value_good/4);
  }


}

And see my screen attachment i lost last time - mtx-d does do alternative measurements indicating they are using a single ADC

IMAG010.png

Link to comment
Share on other sites

  • 1 year later...
On 10/16/2017 at 11:06 AM, Stower93 said:

So was this a success? Im just looking at hooking up my innovate oil pressure/temp to my pnp supralink on the xs loom. Not much point if it didnt work.

Yes but not so simple. The analogread will sometimes read on the rising or falling edge of the innovative pull up so you would end up with wrong values showing as spikes in the datalog. Solution was to calibrate some limits in the nominal value ranges and use some filtering to end up with nice data. These should be ok for datalog purposes but i wouldn't use them as control data, even for engine protection as there are not guaranteed to be 100% reliable and accurate data. For this i would run separate sensors, or use something else rather than innovate (not the best systems built down to a price - oil pressure sensor is not a good sensor, old tech). Using a digispark which is a tiny arduino, and here's my code:

 


  #include <MedianFilter.h>
 
  const int oil_in = 0; //P5
  const int temp_in = 1; //P2
  const int oil_out = 1; //P1
  const int temp_out = 4; //P4
  int oil_value = 0;
  int oil_value_good = 0;
  int temp_value = 0;
  int temp_value_good = 0;

MedianFilter filter1(14, 470);
MedianFilter filter2(14, 890);
 
// the setup routine runs once when you press reset:
void setup() {                
  // initialize the digital pin as an output.
  pinMode(oil_out, OUTPUT);
  pinMode(temp_out, OUTPUT);
}

// the loop routine runs over and over again forever:
void loop() {
  oil_value = analogRead(oil_in);
  if (oil_value > 106 && oil_value <471)
  {
    filter1.in(oil_value);
    oil_value_good=filter1.out();
    analogWrite (oil_out, oil_value_good/4);
  }

    temp_value = analogRead(temp_in);
  if (temp_value > 306 && temp_value < 895)
 {
    filter2.in(temp_value);
    temp_value_good=filter2.out();
    analogWrite (temp_out, temp_value_good/4);
  }
}

Link to comment
Share on other sites

  • 4 years later...

Amazing work and impressive level of troubleshooting and detail! So thanks for that. 

Currently in the same position here, have older style 2pin sensors, however happy to ditch the gauges, is it still possible to wire in the sensors directly to the Link G4x? (asking as some things don't work wjth the G4X that did in the +) 

There's mentions of them being crappy sensors? I'm keen to use for engine protection, low pressure - shut down/limit etc can someone explain why crap and if they could be used for protection or not. 

Cheers! 

Link to comment
Share on other sites

The old two wire sensors are not good options.  They were orignally designed in 1970 by VDO for use with their consumer level gauges, gauges in those days where very low resolution and were really just an indication what was going on.  

The problem with them is they are very low resistance so they need a strong pull-up which consumes a lot of your available 5V output current, they are not linear, and their resistance curve varies significantly with the sensor temperature.

Have a look at Honeywell MIP series, decent sensors for about 50-60USD depending where you are.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...