I've borrowed a few MX-5 sensors to try and get some accurate resistance curve data:
To do the measurements I will be using two sources of temperature data. One is a DS18B20 digital thermometer with a built-in 9 bit ADC (0-511), the other being a K type thermocouple (still waiting for the amp to arrive for this):
To measure the resistance from the OE temp senders, I will use a voltage divider circuit fed to an Arduino Mega with 10 bit ADC resolution (0-1023).
To begin with I am using two 1% resistors to test the voltage divider circuit.
My multimeter had the following to say:
10k reading as 10.00k
470 reading as 471
I hooked up the Arduino with a 12V power supply in addition to the USB, so results aren't skewed from voltage drop. At worst I saw a 2% error in resistance readings (probably mostly to do with ADC resolution?)
Here I have the OE sensor hooked up and the DS18B20:
It seems to be spitting out the right data:
When the thermocouple amp arrives I'll grab data from that at the same time then log the whole range (from each sensor, so we have a good sample). I plan to use an ice bath and also boil some water, with the final step being heated oil to get above water's boiling temp. If I melt the sensors at this stage at least I'll have the rest of the data!
So this is what I've done with my Friday night, just like the rest of the cool kids!
OE thermistor resistance curves
Moderators: timk, Stu, zombie, Andrew, -alex, miata
- timk
- Racing Driver
- Posts: 1928
- Joined: Fri Dec 31, 2004 3:16 pm
- Vehicle: NC
- NitroDann
- Forum sponsor
- Posts: 10280
- Joined: Thu Nov 05, 2009 12:10 pm
- Vehicle: NA6
- Location: Newcastle NSW
- Contact:
Re: OE thermistor resistance curves
MAD!
Sick, in for results.
Sick, in for results.
http://www.NitroDann.com
speed wrote:If I was to do it again, I wouldn't even consider the supercharger.
- droo
- Fast Driver
- Posts: 286
- Joined: Fri Apr 18, 2008 10:32 am
- Vehicle: NA8
- Location: The People's Republic of Bendigo
Re: OE thermistor resistance curves
If you have an NA8, i'd be curious if you could do the air temp sensor in the airflow meter/maf or whatever it's to be called.
(also, your 470ohm resistor looks fine to be 471 ohms with 1% values on the metal type / blue resisters)
(also, your 470ohm resistor looks fine to be 471 ohms with 1% values on the metal type / blue resisters)
- mrpham
- Forum sponsor
- Posts: 856
- Joined: Tue Sep 20, 2011 8:42 pm
- Vehicle: NA6
- Location: Brisbane
- Contact:
Re: OE thermistor resistance curves
Very very cool!
I have a K-type thermometer I used ages ago to take intake air temp readings, you're more than welcome to borrow if needed.
http://omgpham.com/wp-content/uploads/2011/07/IMGP4174.jpg
I have a K-type thermometer I used ages ago to take intake air temp readings, you're more than welcome to borrow if needed.
http://omgpham.com/wp-content/uploads/2011/07/IMGP4174.jpg
Current Forum Specials!
Frame Rail Braces - http://goo.gl/xJtRTs
COPs Bracket - http://goo.gl/sxJWhF
Build Thread - http://goo.gl/L3ZuKU
Frame Rail Braces - http://goo.gl/xJtRTs
COPs Bracket - http://goo.gl/sxJWhF
Build Thread - http://goo.gl/L3ZuKU
- Okibi
- Speed Racer
- Posts: 10898
- Joined: Thu Aug 21, 2003 11:00 am
- Vehicle: NB SE
- Location: Perth, Western Australia
- Contact:
Re: OE thermistor resistance curves
Sub'd
If you had access to a car like this, would you take it back right away? Neither would I.
- timk
- Racing Driver
- Posts: 1928
- Joined: Fri Dec 31, 2004 3:16 pm
- Vehicle: NC
Re: OE thermistor resistance curves
A little update; the amp arrived for the thermocouple so I wired it up using SPI:
I then put the three temp sensors in a cup of cool water as a test:
I didn't expect things to be this close!
I changed the known resistor value for the voltage divider to 1k to get a bit more resolution where it is needed most. As a test I replaced the Mazda thermistor with a 1k resistor and it measured bang on 1000! Great success!
I then put the three temp sensors in a cup of cool water as a test:
I didn't expect things to be this close!
I changed the known resistor value for the voltage divider to 1k to get a bit more resolution where it is needed most. As a test I replaced the Mazda thermistor with a 1k resistor and it measured bang on 1000! Great success!
- gslender
- Speed Racer
- Posts: 2330
- Joined: Sat Feb 19, 2011 10:49 pm
- Vehicle: NA6
- Location: Brisbane, QLD
Re: OE thermistor resistance curves
Would you mind sharing the Arduino code and parts you've used, how you wired it up etc.
G
G
MX5 91 NA6 LE completely stock and loving it!
MX5 92 NA8/ITBs Silver "aka Track Beeotch"
MX5 92 NA8/ITBs Silver "aka Track Beeotch"
- timk
- Racing Driver
- Posts: 1928
- Joined: Fri Dec 31, 2004 3:16 pm
- Vehicle: NC
Re: OE thermistor resistance curves
Sure, I'll do it when I'm on the right computer and I remember! I'll be publishing all the sensor data too.
The Adaptronic uses a 12 bit ADC with points in 5 degree steps. I know the MegaSquirt uses Steinhart–Hart approximation with three known points. We should see how close we can get things with the equation, I think it will be pretty much spot on if we choose sensible points. The equation will be good for extrapolating the very cold temps too.
The Adaptronic uses a 12 bit ADC with points in 5 degree steps. I know the MegaSquirt uses Steinhart–Hart approximation with three known points. We should see how close we can get things with the equation, I think it will be pretty much spot on if we choose sensible points. The equation will be good for extrapolating the very cold temps too.
- timk
- Racing Driver
- Posts: 1928
- Joined: Fri Dec 31, 2004 3:16 pm
- Vehicle: NC
Re: OE thermistor resistance curves
gslender wrote:Would you mind sharing the Arduino code and parts you've used, how you wired it up etc.
Here's the Arduino code, I essentially just copied and pasted bits of the temperature sensor library examples and merged them, so the variable naming could be better:
Code: Select all
#include "Adafruit_MAX31855.h"
#include <OneWire.h>
#include <DallasTemperature.h>
// This is GNU licensed, b*tches. Yes I'm talking to you B&G.
#define ONE_WIRE_BUS 2
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
int thermoDO = 3;
int thermoCS = 4;
int thermoCLK = 5;
Adafruit_MAX31855 thermocouple(thermoCLK, thermoCS, thermoDO);
int aPinIn = 0; // Analogue Input on Arduino
int val = 0; // The raw analogue value
float Vout = 0.0; // Voltage at point between resistors relative to ground
float Vin = 5.0; // Vcc (5 Volts)
float Rknown = 1000.0; // The known resistor (1 kohms)
float Runknown = 0.0;
void setup(){
Serial.begin(9600);
delay(500);
digitalWrite(13, HIGH);
sensors.setResolution(10); // IC Default 9 bit
sensors.begin();
}
void loop(){
sensors.requestTemperatures();
Serial.print("T1: ");
Serial.print(sensors.getTempCByIndex(0));
Serial.print(", ");
Serial.print("T2: ");
Serial.print(thermocouple.readCelsius());
Serial.print(", ");
Serial.print("ADC: ");
val = analogRead(aPinIn); // Read in 10 bit ADC val (0-1023)
Serial.print(val);
Serial.print(", ");
Serial.print("R: ");
Vout = (Vin/1024.0) * float(val); // Convert to voltage
Runknown = Rknown*((Vin/Vout) - 1); // Calculate Runknown
Serial.println(Runknown);
}
Analog pin 0 is the voltage divider input to measure resistance.
For the DS18B20, I use the Dallas Temperature Control Library - digital pin 2 is the OneWire data line from the DS18B20 thermistor.
For the MAX31855, I use the Adafruit MAX31855 Library - digital pins 3,4,5 are the SPI (DO, CS, CLK) lines to the MAX31855 thermocouple amp.
Cheers
- gslender
- Speed Racer
- Posts: 2330
- Joined: Sat Feb 19, 2011 10:49 pm
- Vehicle: NA6
- Location: Brisbane, QLD
Re: OE thermistor resistance curves
Thanks Tim
MX5 91 NA6 LE completely stock and loving it!
MX5 92 NA8/ITBs Silver "aka Track Beeotch"
MX5 92 NA8/ITBs Silver "aka Track Beeotch"
- timk
- Racing Driver
- Posts: 1928
- Joined: Fri Dec 31, 2004 3:16 pm
- Vehicle: NC
Re: OE thermistor resistance curves
droo wrote:If you have an NA8, i'd be curious if you could do the air temp sensor in the airflow meter/maf or whatever it's to be called.
Sorry I missed this question, I think you would pretty much have to pull one apart to do it properly. If you have a sacrificial one I can do it for you.
Cheers
- droo
- Fast Driver
- Posts: 286
- Joined: Fri Apr 18, 2008 10:32 am
- Vehicle: NA8
- Location: The People's Republic of Bendigo
Re: OE thermistor resistance curves
I have 3, one has been sacrificed, i'll find the pin-out for you and PM it. Of the other two, one is stock and one has been modified, i change between the two every few weeks to do my own comparisons with inlet setups i've been experimenting with.
From my own checks, its a thermistor of some sort, which has a very VERY slow reaction time as it's moulded in a black plastic spine in the AFM (the spine with the little nobby nipple), and as the AFM gets pretty warm from various sources of heatsoak, i'm wondering if it's a sensor that's used as a one off or sparse periodic readings (maybe for IA Control?)
From my own checks, its a thermistor of some sort, which has a very VERY slow reaction time as it's moulded in a black plastic spine in the AFM (the spine with the little nobby nipple), and as the AFM gets pretty warm from various sources of heatsoak, i'm wondering if it's a sensor that's used as a one off or sparse periodic readings (maybe for IA Control?)
Return to “MX5 Audio, Electronics & Lighting”
Who is online
Users browsing this forum: No registered users and 221 guests