LMT86LPM (0.25°C Accuracy) - HELP REQUESTED

I'm requesting help on these LMT86LPM Tempature sensors. I just got an order in from Mouser Electronics, and was wondering if anyone could help me with them.

I'm familar with how the DS18B20 works, and is wired up, and I even have the sketch for them, but these are more accurate than them.

It's basically the same exact pinout, GND, OUT, Vcc.

Anyone have any idea if they need a resistor like the DS18B20 w/4.7kΩ resistor?

Here's the direct link Mouser Electronics : LMT86LPM (Texas Instruments)

Data Sheet, direct link : Here

I just got my first Arduino Uno yesterday, and the first thing, besides a blink program, was hooking it up to a SSR (Solid State Relay) and turned my CFL light into a strobe light.. lol.

Anyways, if anyone could assist me, or point me in a decent direction as to where or how to get this up and running today, that would be really helpful.

Thanks

It is nothing like the DS18B20, it is more like the LM35. It outputs an analog voltage that must be measured with the analog in of the Arduino.

The data sheet tells all.

So I have my 6000 counts DMM hooked up to it.

I have power supply 5Vdc on Vdd, and ground.

I have DMM positive lead to middle pin, and ground lead on ground.

It reads 1.829 (1,829mV).

The data sheet says -10.9mV/°C

Range, 2.2v - 5.5v ; -50°C to 150°C.

1829mV / -10.9mV/°C = -167.79816513761467889908256880734

So that's -167.79816°C ?

-167.79816°C = -270.036688°F

But that's way out of range..

It says.. Sensor Gain of -10.9mV/°C

So if that's amplified.. then.. that's too high to begin with.

A quick look at the voltage/temp graph shows ~1volt@100°C.
10.9mV more than 1volt is one degree less than 100°C.

The table shows 2.100volt@0°C.
And ~10.9mV less for every °C.

There are formulas to counteract the non-linearity on page 11 of the datasheet.
Leo..

I'm taking a look at the equations. Not used to solving stuff like this with so many parentheses.

I honestly can't figure this out.. I'm really trying, but it seems difficult.

I'm even trying to make out the less accurate one, but I can't seem to figure it out..

Here's what I got.. the less accurate one..

Where V is in mV, T is in °C, T1 and V1 are the coordinates of the lowest temperature, T2 and V2 are the coordinates of the highest temperature.
V2 I'm guessing is max voltage, in mV. V1 is min voltage.. idk..

(V2 - V1) = 2200mV minus 400mV = 1800mV
(T2 - T1) = 150C minus -50C = 200C
(T minus T1) = What's T..? It never tells you what T is.

I can do this stuff, and I enjoy doing it, honestly.. I do videos for youtube with math and stuff, but I've never really done equations like these before.

The 6000 Counts DMM is reading 1.819vdc, so that's according to the chart, because I can't seem to figure out the equations, is.. 26°C

( °C * 1.8 ) + 32 = °F

26°C * 1.8 = 46.8 + 32 = 78.8°F

That's exactly what my Accurate tempature thing says too.

I just wish I could figure these equations out, then I could convert these voltages I'm getting.

2.1volt (0°C from table) - 1.819volt (measured) = 0.281volt

0.281 / 0.0119 (millivolt per °C) = 23.6°C

23.6°C * 1.8 + 32 = 74.5°F

Leo..

Wawa:
2.1volt (0°C from table) - 1.819volt (measured) = 0.281volt

0.281 / 0.0119 (millivolt per °C) = 23.6°C

23.6°C * 1.8 + 32 = 74.5°F

Leo..

if you divide 0.281 by 0.0109 (instead of 0.0119), you get 25.7°C, which is close to the tabulated value of 26°C for 1.820v. And 25.7°C = 78.4°F, which is close to his "accurate temperature thing" result.

If the divisor is 0.01078 (suitable for temp range btwn 10°C and 29°C) then the result is better.....

Or, if the OP's range of interest is, say 20°C to 30°C, then it might be even better to use the tabulated voltage at 25°C as the pivot point, with the slope between 20°C to 30°C. For measured 1.820v, that would give 26.02°C, only 0.02°C off from the tabulated value of 26°C, and for measured 1.885, 1.831, or 1.777, the error is zero.....

Here's my code..

int LMT86 = A0;
int PinA0 = 0;
float TmpC = 0;
float TmpF = 0;
float voltage = 0;
float mV = 0;
const float mV_PerC = 0.01105;

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  PinA0 = analogRead(LMT86);
  voltage = PinA0 * (4.9 / 1023.0);
  mV = 2.1 - voltage;
  TmpC = mV / mV_PerC;
  TmpF = TmpC * 1.8 + 32;
  
  Serial.print(voltage, 4);
  Serial.print("Vdc");
  Serial.print(" : ");
  Serial.print(TmpC);
  Serial.print(" C");
  Serial.print(" : ");
  Serial.print(TmpF);
  Serial.println(" F");
  delay(1000);
}

Here's some images..
IMG # 1 : http://i.imgur.com/s6LBo7d.jpg
IMG # 2 : http://i.imgur.com/DbmFnSi.jpg

Actually, it's 0.01105 Vdc (FULL RANGE).

-50, -49 = 11 mV
-49, -48 = 11 mV
-48, -47 = 11 mV
-47, -46 = 11 mV
-46, -45 = 11 mV
-45, -44 = 11 mV
-44, -43 = 11 mV
-43, -42 = 10 mV
-42, -41 = 10 mV
-41, -40 = 11 mV
-40, -39 = 10 mV
-39, -38 = 11 mV
-38, -37 = 10 mV
-37, -36 = 10 mV
-36, -35 = 11 mV
-35, -34 = 10 mV
-34, -33 = 11 mV
-33, -32 = 10 mV
-32, -31 = 10 mV
-31, -30 = 11 mV
-30, -29 = 10 mV
-29, -28 = 11 mV
-28, -27 = 10 mV
-27, -26 = 11 mV
-26, -25 = 10 mV
-25, -24 = 11 mV
-24, -23 = 10 mV
-23, -22 = 11 mV
-22, -21 = 10 mV
-21, -20 = 11 mV
-20, -19 = 11 mV
-19, -18 = 10 mV
-18, -17 = 11 mV
-17, -16 = 10 mV
-16, -15 = 11 mV
-15, -14 = 10 mV
-14, -13 = 11 mV
-13, -12 = 11 mV
-12, -11 = 10 mV
-11, -10 = 11 mV
-10, -09 = 10 mV
-09, -08 = 11 mV
-08, -07 = 11 mV
-07, -06 = 11 mV
-06, -05 = 10 mV
-05, -04 = 11 mV
-04, -03 = 11 mV
-03, -02 = 10 mV
-02, -01 = 11 mV
-01,  00 = 11 mV
00, 01 = 11 mV
01, 02 = 10 mV
02, 03 = 11 mV
03, 04 = 11 mV
04, 05 = 10 mV
05, 06 = 11 mV
06, 07 = 11 mV
07, 08 = 11 mV
08, 09 = 10 mV
09. 10 = 11 mV
10, 11 = 11 mV
11, 12 = 11 mV
12, 13 = 10 mV
13. 14 = 11 mV
14, 15 = 11 mV
15, 16 = 11 mV
16, 17 = 10 mV
17, 18 = 11 mV
18, 19 = 11 mV
19, 20 = 11 mV
20, 21 = 11 mV
21, 22 = 10 mV
22, 23 = 11 mV
23, 24 = 11 mV
24, 25 = 11 mV
25, 26 = 11 mV
26, 27 = 10 mV
27, 28 = 11 mV
28, 29 = 11 mV
29, 30 = 11 mV
30, 31 = 11 mV
31, 32 = 10 mV
32, 33 = 11 mV
33, 34 = 11 mV
34, 35 = 11 mV
35, 36 = 11 mV
36, 37 = 11 mV
37, 38 = 11 mV
38, 39 = 11 mV
39, 40 = 11 mV
40, 41 = 11 mV
41, 42 = 11 mV
42, 43 = 11 mV
43, 44 = 11 mV
44, 45 = 11 mV
45, 46 = 11 mV
46, 47 = 11 mV
47, 48 = 11 mV
48, 49 = 11 mV
49, 50 = 11 mV
50, 51 = 11 mV
51, 52 = 11 mV
52, 53 = 11 mV
53, 54 = 11 mV
54, 55 = 11 mV
55, 56 = 11 mV
56, 57 = 11 mV
57, 58 = 11 mV
58, 59 = 11 mV
59, 60 = 11 mV
60, 61 = 12 mV
61, 62 = 11 mV
62, 63 = 11 mV
63, 64 = 11 mV
64, 65 = 12 mV
65, 66 = 11 mV
66, 67 = 11 mV
67, 68 = 11 mV
68, 69 = 12 mV
69, 70 = 11 mV
70, 71 = 11 mV
71, 72 = 11 mV
72, 73 = 12 mV
73, 74 = 11 mV
74, 75 = 11 mV
75, 76 = 11 mV
76, 77 = 11 mV
77, 78 = 12 mV
78, 79 = 11 mV
79, 80 = 11 mV
80, 81 = 11 mV
81, 82 = 11 mV
82, 83 = 12 mV
83, 84 = 11 mV
84, 85 = 11 mV
85, 86 = 12 mV
86, 87 = 11 mV
87, 88 = 11 mV
88, 89 = 11 mV
89, 90 = 12 mV
90, 91 = 11 mV
91, 92 = 11 mV
92, 93 = 12 mV
93, 94 = 11 mV
94, 95 = 11 mV
95, 96 = 12 mV
96, 97 = 11 mV
97, 98 = 11 mV
98, 99 = 12 mV
99, 100 = 11 mV
100, 101 = 11 mV
101, 102 = 12 mV
102, 103 = 11 mV
103, 104 = 12 mV
104, 105 = 11 mV
105, 106 = 11 mV
106, 107 = 11 mV
107, 108 = 11 mV
108, 109 = 11 mV
109, 110 = 12 mV
110, 111 = 11 mV
111, 112 = 12 mV
112, 113 = 11 mV
113, 114 = 12 mV
114, 115 = 11 mV
115, 116 = 12 mV
116, 117 = 11 mV
117, 118 = 12 mV
118, 119 = 11 mV
119, 120 = 11 mV
120, 121 = 12 mV
121, 122 = 12 mV
122, 123 = 12 mV
123, 124 = 12 mV
124, 125 = 11 mV
125, 126 = 12 mV
126, 127 = 11 mV
127, 128 = 12 mV
128, 129 = 11 mV
129, 130 = 12 mV
130, 131 = 11 mV
131, 132 = 12 mV
132, 133 = 12 mV
133, 134 = 11 mV
134, 135 = 12 mV
135, 136 = 11 mV
136, 137 = 12 mV
137, 138 = 12 mV
138, 139 = 11 mV
139, 140 = 12 mV
140, 141 = 12 mV
141, 142 = 11 mV
142, 143 = 12 mV
143, 144 = 12 mV
144, 145 = 11 mV
145, 146 = 12 mV
146, 147 = 12 mV
147, 148 = 12 mV
148, 149 = 11 mV
149, 150 = 12 mV

That's the full range. Took me almost two hours to type everything, then another 45 minutes to write a program to gather the info and calculate the answer on the fly.

The Software is a keyboard bot. It selects the text, puts it into the clipboard, then takes that value, places it in the software, then the software calculates it while it's running (on the fly).

Here's what the software looks like.. Written in VB.NET for Microsoft Windows 7.

The Bot Software can do any range, now that I have the software, and spent the time gathering the information on the datasheet chart(s).

Gathers all the mV differences, divides it by the total samples, and spits out an average. Then it divides that by 1000 to show the actual voltage value.


My Voltage on the Vcc and GND pins isn't an exact 5Vdc. Measured it with it working, and it seems it's something like 4.892 or something.. According to my UNI-T UT61D 6000 Counts DMM.

I figured Voltage drop was involved, so I took the Vcc Wire that originally went to the Vcc pin, and took the GND wire out, and measured them without them being hooked up the LMT86 Chip.

Something like 4.892 Vdc I got.. I thought the Arduino Uno was supposed to spit out a perfect 5 Vdc?

So if anyone has anything to tell me, or can help me with it.. the voltage.. That would be nice.

I also tried hooking up a dedicated 5.052V Microsoft PS, to the pins of the LMT86 by Texas Instruments. It's very well made, keeps a steady voltage a few seconds even after I unplug it.

So ran the program again, only with the OUT or DATA pin going out to the A0 input on the Arduino Uno.

I was getting crap like 380 Degrees on the Serial monitor.. So I watched it for min or two.. felt the chip, and the chip wasn't as hot as the serial monitor was displaying.

So I was like.. I guess I can't give the chip a dedicated power supply.. So idk. I experimented a little. Big whoop. I knew it wasn't going to hurt the microcontroller. Just wanted to see if it made any difference with accuracy or whatever.

Before you go any further.
You are now measuring the sensor with default Aref (the ruler)
The ruler (Arduino's 5volt supply) is not very constant.
The result (temp) also won't be constant.
If Arduino's 5volt supply goes up (longer ruler, ruler's divisions get bigger), the temp reading wil go down.

The LMT86 supply should have very little influence on the sensor output voltage.
Arduino's 5volt supply is the biggest problem.
Leo..

Wawa:
Before you go any further.
You are now measuring the sensor with default Aref (the ruler)
The ruler (Arduino's 5volt supply) is not very constant.
The result (temp) also won't be constant.
If Arduino's 5volt supply goes up (longer ruler, ruler's divisions get bigger), the temp reading wil go down.

The LMT86 supply should have very little influence on the sensor output voltage.
Arduino's 5volt supply is the biggest problem.
Leo..

First.. Could you please explain..

I'm having trouble understanding 2.100v (0°C From Table) - 1.8413 (Voltage Reading)..

I don't understand why I have to subtract my voltage reading from 2100mV (2.1v)..

I feel so stupid.. I really do. I don't understand it. I would like to better understand what's going on.

Why is 2.1v used to subtract from my voltage reading?

After I learn that, then I'll try to figure out what your trying to tell me in your last "quoted" reply.

If you you or anyone has the time or patience, I'd like to better understand what I've asked about.

The table in the datasheet is in °C.

Pivot point is 0°C.
Everything above are positive numbers, everything below are negative numbers.

If you subtract the voltage/pivot point from the voltage you're measuring...
And apply a scaling factor to that resulting voltage...
You get the temp in °C.

Converting that to °F is easy.
°C * 1.8 + 32 = °F
Leo..

Wawa:
The table in the datasheet is in °C.

Pivot point is 0°C.
Everything above are positive numbers, everything below are negative numbers.

If you subtract the voltage 2.1 (0°C) pivot point from the voltage you're measuring...
And apply a scaling factor to that resulting voltage 0.01105v
You get the temp in °C.

Converting that to °F is easy.
°C * 1.8 + 32 = °F
Leo..

Thanks.. I think I kinda understand.

I figured out how to get the voltage, from a given °F.

I'm gonna choose 98.6°F alright?

98.6°F - 32 / 1.8 = 37°C

37°C * 0.01105v = 0.40885v
0.40885 + 2.100v = 2.50885v should be the reading on the DMM.

Even though it's not displayed in the chart. It's correct.

2.1v - 2.50885 = 0.40885
0.40885 / 0.01105v = 37°C
37°C * 1.8 = 66.6 + 32 = 98.6

Clearly.. It's correct.

I did a video on YouTube for converting Celsius to Fahrenheit, and Fahrenheit to Celsius on Jan 15th 2016.

So 2.1v is in the middle. According to the chart.

If I subtract that from the measured voltage, I get..
2.1v - 1.840v = 0.260v

What's 1.840v in reference to 2.1v ?
It's higher °C than 0°C, according to the chart.

It's 2mV higher than 24°C, which is 1.842..
or simplified, it's just 24°C higher than 0°C.

Alright.. So if I subtract and take away 1.842 from 2.1, I get 0.258v

What's the meaning of 0.258v?

Well.. that's how far away 1.842v is from 2.1v (°0C)

If I multiply 0.258v by an average of 0.01105v for every single degree in celsius..

I get.. 0.258 * 0.01105 = 0.0028509 (lol, not quite.. It' a pretty tiny number).

But if I divide 0.258v, which is the distance from 2.1v or (0°C)..
0.258v / 0.01105v = 23.348416289592760180995475113122

Why do we divide it though..?

Because 0.01105 is one unit of tempature in degrees celsius. It's an average voltage for the entire range of temperatures in the range of °C in the chart.

When we divide 0.258v by 0.01105v, we are asking how many units (°C) 0.258 is worth according the the single units of 0.01105v.

So.. 0.258v / 0.01105v = 23.238.

It's worth 23.238 times more than 2.1v(0°C).

Thanks for the hint, I think I understand it.

Yes, I think you get it.
How far away the measured voltage is from 2.100volt is how far the temp is from 0°C.

But the starting point doesn't have to be 0°C.
Take e.g 25°C as anchor point. That's 1.831volt (table).

Measure the sensor voltage, and calculate how far away that is from 1.831volt (25°C).
Divide the difference by the ~sensor gain in that temp range (~-0.01078).
Then you get a °C value how far it is away from 25°C.
Leo..

Wawa:
Yes, I think you get it.
How far away the measured voltage is from 2.100volt is how far the temp is from 0°C.

But the starting point doesn't have to be 0°C.
Take e.g 25°C as anchor point. That's 1.831volt (table).

Measure the sensor voltage, and calculate how far away that is from 1.831volt (25°C).
Divide the difference by the ~sensor gain in that temp range (~-0.01078).
Then you get a °C value how far it is away from 25°C.
Leo..

My finger is grabbing the sensor. My DMM is showing me a voltage of 1.739v

1.831v (°25C known Pivot point) - 1.739v (DMM Voltage) = 0.092v
0.092v / 0.01105v = 8.3257918552036199095022624434389°C from 25°C.

So... 8.3257918 units of 0.01105v Per °C (Full Range Average).

25°C + 8.3257918°C = 33.3257918°C

33.3257°C x 1.8 = 59.9862 + 32 = 91.98626°F

The accuracy of the sensor is 0.25°C (0.45°F)

So the actual tempature could be..
91.98626°F - 0.45°F = 91.53626°F
91.98626°F + 0.45°F = 92.43626°F

But according to the digital meat thermometer I have sitting in the same location, is showing 91.4°F

So I'm going to take a guess, and say the accuracy could usually mean it's less, and not more than the reading I'm getting. That usually also goes for resistors with specific tolerances I've measured.

I have a few Vishay 0.1% tolerance 15,000kΩ resistors, and it measures 14,980kΩ, which sounds about right, according to the tolerance on the datasheet I read on Mouser Electronics.

So what if I wanted to go lower than 0°C? Negatives?

Let's see..

The known range I'll be shooting from is -25°C (2.366v).

My DMM is giving me a reading of 2.415v.
2.366v (-25°C) - 2.415v (DMM Voltage) = -0.049v
-0.049v / 0.01105v (full range average per °C) = -4.43438914027

We know what the pivot point is.. It's -25°C (2.336v)

The measurement in °C resulted as -4.43438914027°C

-4.43438914027°C + -25°C = -29.4343891403°C

Which is.. -29.4343891403°C * 1.8 = -52.9819004525 + 32 = -20.9819004525°F

lol, I think I got this down pat now.

I'm sorry, but I like to use my 0.01105v average, because I spent over an hour gathering all the voltage differences from all the temperatures on the chart. It's a solid 0.01105v difference average for every degree.

I understand that your pulling the average from a specific range, and being more specific, and maybe even being more accurate, but I haven't seen a difference between the digital meat thermometer and the sensor.

Using 0.01105v as a full range average seems to be the sweet spot.

So if I wanted let's say.. a range from 0°F (-17.777°C), that would nice.
So let me use -18°C (2.292v) (that's my anchor, or reference point).

I put my finger on the sensor, and my DMM is showing a voltage of 1.739vdc

2.292v(-18°C) - 1.739v (DMM Voltage) = 0.553v
0.553v / 0.01105v = 50.045248868778280542986425339367 (Units from -18°C)

50.045248868778280542986425339367 + -18°C = 32.0452488688°C

32.0452488688°C * 1.8 = 57.68144796384 + 32 = 89.68°F

Which is different from the 91.98626°F that I got last time, because I used a different °C anchor point.

So maybe if I change the average.. hmm.. Even though I think 0.01105v is good enough.

I'll use -18°C to 50°C as my range. That's a roughly a range from 0°F - 120°F.

My software tells me that's an average of 0.0107941176470588v per degree in that range.

I scanned -18°C to 50°C, and it returned 0.0107941176470588v per degree.

So let's run the calculations again.

2.292v(-18°C) - 1.739v (DMM Voltage) = 0.553v
0.553v / 0.0107941176470588v = 51.231607629427904592060227635759

Ahh.. much better.

51.231607629427904592060227635759 + -18°C = 33.2316076294°C

33.2316076294°C * 1.8 = 59.81689373292 + 91.81689373292 (Much better !!)

So yeah. that works then. So my new range is -18°C to 50°C (0°F - 120°F)

But can't measure boiling water, because water boils at 100°C (212°F)

So, looks like I'll run my software with a range of -18°C to 110°C.

So my software retuned 0.011v as the average, with 128 samples.

2.292v(-18°C) - 1.739v (DMM Voltage) = 0.553v
0.553v / 0.011 = 50.272727272727272727272727272727
50.272727272727272727272727272727 + -18°C = 32.2727272727°C

32.2727272727°C * 1.8 = 58.09090909086 + 32 = 90.09°F

I'll stick with that then. That seems good enough. With specified LMT86 accuracy of (±0.25°C) or (±45°F).

Thanks so much for all the help I got on this from everyone, I really think got the hang of this now.

Next step could be directly calculating in °F.

The ratio of °C to °F = 5 to 9.

Take e.g 32°F (0°C) as anchor point (because we know the exact voltage from the table).

All we have to do now is calculate the °F voltage steps.
0.0107941176470588 * 5 / 9 = 0.0059967...

~ -5.99mV per degree F.

I think you can calculate the temp yourself now.
Leo..