temp sensor

General discussion on mikroPascal.
Author
Message
LGR
Posts: 3204
Joined: 23 Sep 2004 20:07

#31 Post by LGR » 14 Nov 2006 17:45

It's a positive-temp coefficent thermistor, which isn't completely linear, but it's much better than the NTC type, which are extrememly nonlinear. You should be able to linearize it with a small lookup table; maybe 10 sets of slope and intercept. You should be able to do that with a CASE statement.
If you know what you're doing, you're not learning anything.

janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

#32 Post by janni » 14 Nov 2006 18:41

It's not very linear, but it should not be a problem in the 150-200 °C range. Or you may linearize it by connecting additional resistor - in series with voltage supply method, or in parallel - in current mode (when current source is used).

There are subtypes of this sensor differing in resistance at 100°C

Typ Code xxx R(T=100°C)
KTY 84 - 130 970 ... 1030 Ohm
KTY 84 - 150 950 ... 1050 Ohm
KTY 84 - 151 950 ... 1000 Ohm
KTY 84 - 152 1000 ... 1050 Ohm

Nominal R(T) table is given by manufacturer in the -40..300°C range. Here's an excerpt:

T [°C ] R[Ohm]
100 1000
110 1063
120 1129
130 1197
140 1268
150 1340
160 1415
170 1493
180 1572
190 1654
200 1739
210 1825
220 1914
230 2006
240 2099
250 2195

This sensor is used in exhaust temperature measurement - almost what you intend to do :) .


zkt
Posts: 365
Joined: 03 Jan 2006 22:05

#34 Post by zkt » 14 Nov 2006 19:17

Yes I had just looked at those. What I didnt see was any app notes. Which would be helpful. Yes this is sort of in the exhaust gas, or intake gas, depending on your point of view. :wink: Can you think of any other components I`ll need befor I send the parts order, other than a pic with a/d, the KTY84/130 T/R, and a constant current source ?
zkt
gotta be something stupid
May the Repair Angel smile upon you

janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

#35 Post by janni » 14 Nov 2006 19:47

If you use a current source of 2mA, as the manufacturer advises, a 1847 Ohm parallel resistor linearizes the characteristics within 1.5K (assuming the ideal case :) ). Taking into account that you have to do calibration anyway and sensors are not ideal, just use 1k8 1% resistor. This will give you 885 Ohm at 200°C, or 1.77V. At 150°C the signal will be 1.54V so the span is not big.

Still, having 12-bit A/D (like in PIC16C773) and 2.5V reference (like LM385) this gives 0.13°C resolution. That should be more than enough, so you may use a processor with 10-bit A/D and no external reference.

So, what you need is 2mA current source, voltage reference (optional), buffer amplifier (never connect PIC directly to real world; even LM358 will do) with some components for a simple filter, sensor, linearizing resistor and, naturally, a processor. I may make you a drawing later tonight.

zkt
Posts: 365
Joined: 03 Jan 2006 22:05

#36 Post by zkt » 14 Nov 2006 20:00

Thanks janni :D I can`t thank you enough :)
zkt
gotta be something stupid
May the Repair Angel smile upon you

LGR
Posts: 3204
Joined: 23 Sep 2004 20:07

#37 Post by LGR » 14 Nov 2006 23:07

I agree that that thermistor is the best choice, but FYI, if you want to order small quantities of MAX6675, they're available for $10 here. http://www.sparkfun.com/commerce/produc ... cts_id=307
That sounds like a lot of money, but Maxim isn't cheap. :twisted:
Also, there's an interesting article on using it with a PIC here: http://www.picbook.com/downloads/doc/PI ... brator.pdf
If you know what you're doing, you're not learning anything.

zkt
Posts: 365
Joined: 03 Jan 2006 22:05

#38 Post by zkt » 14 Nov 2006 23:32

I spent a good hour looking for that chip in small quantities this morning. NEVER DID FIND IT. LOL . I bookmarked the supplier twice. Thanks :D
zkt
gotta be something stupid
May the Repair Angel smile upon you

janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

#39 Post by janni » 14 Nov 2006 23:43

Here are the drawings. Sorry for the quality.
Image
It's the simplest schematics I could think of. The resistor and capacitor on the right should be placed close to processor's analog input.
The current source may be based on temperature compensated LM334
Image
(you'll have to calculate the values of R1, R2 according to datasheet). The dashed line means thermal contact.

zkt
Posts: 365
Joined: 03 Jan 2006 22:05

#40 Post by zkt » 15 Nov 2006 15:23

Thanks again Janni. You`ve been a LOT of help. I`ve got to be away from my desk for much of the day. :evil: Cant wait to get back and look at this stuff. :D
zkt
gotta be something stupid
May the Repair Angel smile upon you

janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

#41 Post by janni » 15 Nov 2006 15:32

I've forgotten to add that this particular type of KTY is polarization sensitive, so one has to observe proper connection. It's not exactly a diode, but it's geometry is not symmetrical.

I've checked the KTY linearization and, in your range of interest the linearization resistor of 2k7 is much better than what I've taken from some internet source.

While calculating the resistors for current source, do not assume diode tempco of -2.5mV/°C as in LM334 datasheet. For 1N4148 it's closer to -1.5mV/°C.

zkt
Posts: 365
Joined: 03 Jan 2006 22:05

#42 Post by zkt » 15 Nov 2006 22:38

Had a glance at the LM334 datasheet. Seems straightforward enough. Wondering how you calculated the value of the linearization resistor though ? What about substituting a 1N914 for the (?1N9798?) ? How would that affect things? And if you have the time- Do you have the design equations for the other couponents ? I should know this stuff :oops: I redrew the schematic (more poorly than you perhaps :lol: ), to make sure I got the values right. Then the scanner blew up. :evil: Output R= 7k, C= 10n ? Vcc bypass:C=??. Noninverting input R=47k,C=.47u ? R parallel to kty84=78K? Were you a doctor befor you became an engineer ? :lol: Oh yea, asume any old opamp, the cheaper the better, will do.
zkt
gotta be something stupid
May the Repair Angel smile upon you

janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

#43 Post by janni » 16 Nov 2006 01:48

I probably was a doctor because the values seem quite readable to me :) . I always put a dash on sevens, so what you read as 7 was supposed to be 1. I used a pocket PC screen to draw the schematics - my hand is usually more steady than the digitizer shows.

Starting from the output: R=1..2k, C=1..10nF. This is just to separate the opamp's output from A/D input. The blocking capacitor at opamp's supply is 100nF. Resistors at the opamp's inputs are both 22..47k. The simple filter has a capacitor of 470nF (largest popular value). The time constant of this filter is too small to significantly reduce 50Hz noise, but longer time constant would affect the time response. If you want, you may add second order active filter after the buffer amplifier. Simple digital filtering - like performing the A/D conversions at multiple of 50Hz frequency (for example 32 measurements evenly distributed during 20ms) gives quite good results.

I didn't perform real optimization to estimate the linearization resistor (1.8k was taken from some German forum, later I've just checked that 2.7k value gives smaller and acceptable error) - that is until now. Inspired by your question I did it correctly by fitting KTY84 temperature dependence with:

y(x)= R*(a+b*x)/(I*R-a-b*x),

where x is temperature, y(x) is table data for KTY84, I=2mA. R is the linearization resistance, a and b are coefficients of a stright line dependence of voltage vs temperature we want to obtain.

For 0-250°C range the optimal value is R=2.9k giving theoretical error of -3°C at 0°C and +/-1.5°C in 10-250°C range.

It is possible to have better lineatization in narrower temperature range, but I doubt that you need it.

In the current source you may use any silicon diode (the one proposed was 1N4148), as long as you know it's tempco and junction voltage for specified current.

jaf
Posts: 1
Joined: 07 Mar 2012 10:07

Re: temp sensor

#44 Post by jaf » 07 Mar 2012 10:16

I was doing some reseach on circuit design for the KTY Sensors and came upon this "ancient" posting. Would anybody happen to have a copy of the final (or close to it) schematic that was mentioned in this posting? I would appreciate any pointers and it would save me a bunch of time. Thanks in advance.

Cheers,
Joseph

janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

Re: temp sensor

#45 Post by janni » 08 Mar 2012 16:32

I'm afraid that the drawings are gone :( . Still, the concept was simple enough - KTY sensor with linearising resistor in parallel, supplied by a current source. One measures the voltage drop on KTY - simplest solution involves a buffer amplifier (i.e. gain of 1, non-inverting).

Note that this is an old discussion - times change and new sensors are available. For example, you could consider digital sensors.

Post Reply

Return to “mikroPascal General”