Anyone have luck reading RTD's?

Go To Last Post
34 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello Freaks.

Planning out my next project and it requires reading an RTD (resistive temperature device). Since I have a Mega64 on the board, I thought maybe I can use the ADC. The issue becomes having a stable voltage to apply through the RTD + ADC fluctuations.

Has anyone had any luck using the ADC or other methods with the AVR to read an external temp sensor? I think the most common in use is a 10K sensor.

Thanks folks!

Tom

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Tom,
Your best option assuming you want reasonable accuracy with the RTD would be to go with the traditional voltage reference, bridge circuit and op-amp differential config feeding the adc on the mega.

There are many circuits for this on the web.

PS put the reference and op-amp as close to the sensor as practical otherwise voltage drop in the lines will lower your accuracy.

If you just want a basic temp sensor the LM35/AD592 ic sensors are easy! to use, although you may still need an op-amp to amplify the signal to full scale on the ADC.

PPS also look at the Dallas-Semi DS18b20 good accuracy and serial o/p.

Best Wishes,

Darren

----------------------------------------------------
Those whom the gods wish to destroy
they must first teach to use c
----------------------------------------------------

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks Darren.

I will not need a temp sensor chip since the board will have a connection for an external RTD, so I just need an accurate reading of it. Thanks for the info, good points you made about the board layout. SInce I only have 5V on the board (from a wal-wart), I should get a precision reference IC for voltage through the RTD. Pretty much now the only variations is through the ADC.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Wich kind of RTD? NTC's and PTC's are easy to interface to AVR's, but PT100/1000 are more difficult.

Guillem.

Guillem.
"Common sense is the least common of the senses" Anonymous.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

TMBartman wrote:

Planning out my next project and it requires reading an RTD (resistive temperature device). Since I have a Mega64 on the board, I thought maybe I can use the ADC. The issue becomes having a stable voltage to apply through the RTD + ADC fluctuations.

To measure a resistor you must build a voltage divider with a second resistor.

Then, if the voltage divider and the ADC-reference powered from the same source the accuracy of this source dosn't matter.

TMBartman wrote:

I think the most common in use is a 10K sensor.

No, common are 100 or 1000 Ohm sensors (PT100, PT1000).

For PT100 you should use an ADC with gain, e.g. ATtiny26.

Peter

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@danni/Peter:

10k are quite common NTC sensors used with thermostats and many electronic appliances, since they have pretty good accuracy and a wide variation in a normal range (-50 to 105 ºC) that makes easy interfacing to common uC with 10bit ADC's.

PT100 and PT1000 are more complex, since they have a pretty small variation (0.3 ohms /ºC for PT100) and a wide operating/sensing range (-200 up to 800ºC) and really good accuracy/precision (0.1ºC), at a much greater cost. That usually implies using 16 bit ADC's.

Guillem.

Guillem.
"Common sense is the least common of the senses" Anonymous.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In industry, most RTDs are interfaced via a 'PUCK' which has the required analog circuitry encased inside. These output a 4-20mA signal which is much easier to process.

Something like this:

http://www.heatonc.com/images/ma...

Using 4-20mA means you can run the cable a distance and it is fairly immune to interference. All you need is a 12V supply and a precision 100ohm resistor and some protection diodes for the AVR.

How you solve the problem depends on what sort of resolution and accuracy you require. Looking at the specs for the above device, it uses a 14 bit a/d converter.
If you 'rool your own',very small resistances and currents are involved, temperature drift is a real concern. Interfacing to PT100 devices are not for the lighthearted, you want a good grounding in analog electronics to get the accuracy.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think we need more specific info' to provide useful help.
Please answer these questions -
What temperature range do you need to cover?
Can you choose the RTD yourself or is it a given, if so what is it.

I have coded for about 2 dozen architectures, and they all have their place.
Don't get too religious about them (but AVR is excellent!)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Agreed with Kartman. Usually industrial PT100 are interfaced by 4-20mA means. Direct connection at your board is not easy for beginners (I know because I had done it).

Guillem.

Guillem.
"Common sense is the least common of the senses" Anonymous.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

We use this sheme.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@zauberer:

24 bits ADC it's not small, but 16 is the absolute minimum if you want 0.1 precision and full scale, so you are fine with that ADC, specially if you use PT500 (but with a limited range?). Anyway, the main drawback is that common industrial PT100 are three wire (at least in western european cold chambers), not four wire, thus the compensation scheme your draw can't be used.

Guillem.

Guillem.
"Common sense is the least common of the senses" Anonymous.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Temperature range is let's say.... 0 to 80 C give or take. I think I'll make it easier by specifying which RTD to use, such as PT100 or PT1000, etc...

So I'll spec which one the user must connect. Thanks for all of the great info!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If I could choose, for this range, I would suggest NTC, like 103AT2 from Semitec (-50ºC to 105ºC). Easy to interface directly to ATmega ADC (only a pull up resistor to AVCC, and a cap to decouple), quite precise in this range, easy to find everywhere, and much cheaper than PT100. Less headaches too.

Guillem.

Guillem.
"Common sense is the least common of the senses" Anonymous.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Guillem: we have 0.01% after callibration.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@zauberer: Nice job.

Which precission gave the RTD's you are using? We are using DIN IEC 751 Class B ones that give 0.5% precission. We can order Class A at a higher price for 0.2% precission. Our 16 bit ADC can give us about 0.05 up to 0.1% after calibration of the converter, but we don't calibrate the whole system with the customer RTD's, thus overall accuracy is 1%.

Guillem.
"Common sense is the least common of the senses" Anonymous.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Guillem:
before callibration

temp class A class b class C

-200 +0,55 +1,3 +2,2
-100 +0,35 +0,8 +1,4
0 +0,15 +0,3 +0,6
100 +0,35 +0,8 +1,4
200 +0,55 +1,3 +2,2
300 +0,75 +1,8 +3,0
400 +0,95 +2,3 +3,8
500 +1,15 +2,8 +4,6
600 +1,45 +3,3 +5,4

Ut=0,15+0,002t class A
Ut=0,3+0,005t class b
Ut= 0,6+0,008t class C

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There is a neat trick you can do for RTDs that gives a really simple circuit with only one precision component.
You pass the RTD exitation current through a reference resistor, use the voltage across this resistor as the ADC's reference voltage, and the ADC input across the RTD. Using and ADC with differential reference helps (diff input is pretty much essential) although the former is not essential for lower-performance apps if you put the reference R in the bottom leg of the RTD suopply so you get a ground-referenced value for the voltage across it. This gives a direct ADC reading representing ohms, and the supply only needs to have good short-term stability and low noise - no need for good absolute accuracy as errors are cancelled out.
I;m sure you'll see examples of this in appnotes for suitable ADCs, e.g. linear tech's delta-sigma range.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It would be really slick if someone made an RTD input IC with an I2C interface. I may be leaning towards using a third party solution. I spec'ed out for a PT100. Not sure how the ADC in the Atmel will scale up to the resolution yet....

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

It would be really slick if someone made an RTD input IC with an I2C interface. I may be leaning towards using a third party solution. I spec'ed out for a PT100. Not sure how the ADC in the Atmel will scale up to the resolution yet....


I suppose such a device might be useful when a full 10 bits or better of resolution is needed in the app. We've applied RTDs where a (relatively) wide temperature range was needed, but precision and accuracy wasn't that critical. E.g., monitor electric motor bearing temperature--range is from coldest weather to a darn hot motor, so about 200 degrees C range. That's only 8 bits for +/- 1 degree. ;)

The Aref signal from the AVR is buffered with a unity gain op amp into a constant-current excitation. You could do 2-wire, 3-wire, or 4-wire. Common op amps and a few resistors & caps. There is more circuitry for the pin protection: double-diodes to/from the rails & series R. The return signals (two, since three-wire) then feed a rail-to-rail op amp that does the offset of the third wire and converts back to voltage going to the AVR port pin.

The result is that it doesn't matter if the AVR Aref signal is higher or lower from unit to unit. Nor does it matter if it drifts over time or temperature or the phase of the moon or whether the air conditioner turns on.

Constant-current circuits are well known, as are current-to-voltage. So I don't know what your I2C device really buys you. Looking at the schematic there seem to be more parts to protect the signals ('cause they go to the real world) than for the excitation and signal conditioning. We get the +/- 1 degree results from unit-to-unit and channel-to-channel without individual calibration--plenty close enough for the type of app described. Of course it is a whole different ballgame if it is a "lab" precision app, but I'm guessing the approach is quite similar.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Guillem Planisi wrote:
@danni/Peter:

10k are quite common NTC sensors used with thermostats and many electronic appliances, since they have pretty good accuracy and a wide variation in a normal range (-50 to 105 ºC) that makes easy interfacing to common uC with 10bit ADC's.

PT100 and PT1000 are more complex, since they have a pretty small variation (0.3 ohms /ºC for PT100) and a wide operating/sensing range (-200 up to 800ºC) and really good accuracy/precision (0.1ºC), at a much greater cost. That usually implies using 16 bit ADC's.

Guillem.

Aren't you thinking of Thermistors? Thermistors come in Negative Temperature Coeffecient (NTC) and Positive Temperature Coeffecient (PTC) form and are nominally 10K ohms at room temperature. NTC & PTC Thermistors are quite non-linear throughout their operating range.

Resistive Temperature Detector (RTD) are quite linear - to something around 0.5%, or better. RTDs are quite expensive compared to Thermistors. I don't recall the composition of Thermistors but, RTDs are manufactured from Platnum resistance wire. In all of my work with RTDs over the past 25 to 30 years, I have never seen a NTC stype RTD - all that I have used have been PTC RTD devices. In fact, the natural charactistic of Platnum resistance wire is a positive temperature coeffecient.

If using a Thermistor, either some form of linearization correction will be required or, only a very small portion of the operating range can be used accuratly.

If using an RTD, unless very high linearity is required, no linearization correction is required and, the RTD can be used throughout its full operating range.

For the PT100 and PT1000 RTDs, the 100 & 1000 are the measured resistance of the Platnum resistance wire at room temperature, usually around 77 degrees F or 25 Degrees Celcius.

Using an RTD is no harder to use then a Thermistor but, each technology will use electronic massaging (scaling and linearization) methods that are more suited to their particular temperature verses resistance characteristics.

When using a Thermistor, as with an RTD, self-heating needs to be taken into account when biasing the device/s in a resistive voltage divider or bridge configuration. The smaller the bias current used in the temperature measuring configuration, the smaller the self-heating hence, the smaller the temperature error. For NTC type Thermistors, self-heating will be more prevelant at higher temperatures, I.E. lower resistance values. The PTC Thermistor and Platnum RTD will exibit a higher degree of self-heating at lower operating temperatures.

Both the Thermistor and the RTD have some nasty equations to manipulate. For the RTD at least, most of those equations can be manipulated to the measurement multiplied by a constant, depending on the exact scaling.

Omega Engineering has some excellent information on RTDs

Information on RTDs can be found at:

http://www.omega.com/rtd.html

Information on Thermistors can be found at:

http://www.omega.com/prodinfo/th...

You may find the following link particularly useful:

http://www.omega.com/temperature...

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

TMBartman wrote:
Hello Freaks.

Planning out my next project and it requires reading an RTD (resistive temperature device). Since I have a Mega64 on the board, I thought maybe I can use the ADC. The issue becomes having a stable voltage to apply through the RTD + ADC fluctuations.

Has anyone had any luck using the ADC or other methods with the AVR to read an external temp sensor? I think the most common in use is a 10K sensor.

Thanks folks!

Tom

I guess my question is what are you trying to measure and what are you going to do with that measurement.

You mentioned a temp range of 0-80 degrees. How accurate does it need to be?

If you are going cheap and dirty a half bridge will work. Basically you form a voltage divider from a precision resistor and the RTD. Measure the voltage, linearize it using a table lookup and your done. Cheap simple, accurate, but with limited range and resolution. This is what you would tend to do if you want to measure a temperature for reporting purposes. Generally when you want to know if something is 'hot' or 'cold'.

More expensive but better range would be a full bridge + an instrumentation amp like the Analog Devices AD627. This is the same as above, but with reference resistor divider (say two 10.0K resistors). The AD627 then amplifies the output of the bridge. Things can be adjusted to give you exactly the range you want. This is useful for control applications. (For control applications you want better resolution than for pure monitoring)

PS: General Purpose Industrial signal conditioners for RTDs use a calibrated current source to excite the RTD. This is used because it is linear and simple for the end user to integrate into their system. However it's more complicated and expensive. You typically need an accurate voltage and current reference which adds cost, etc. (I wouldn't recommend this for a custom design)

PSS: Unless your design requires it, the temp range you specified can be covered by a lot of different devices, everything from fully conditioned IC's with I2C interfaces (simple), to thermistors (sensitive), and thermocouples (twitchy to condition but robust).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Carl:

I agree with you in many things: NTC's and PTC's are thermistors, while RTD's (PT100/500/1000) are platinum resistors that exhibit PTC behaviour, but with much smaller changes in theyr values. Although more linear, you need much more resolution with ADC for full scale/precision measurement, or an amplifier if you would use them in an smaller temp range with less resolution/accuracy, as Lee suggested.

On the other hand, althoug heavily non linear, NTC's can be used with AVR's internal 10 bit adc (plus LUT) for the whole range (-50 to 100 or 150 ºC depending on NTC or PTC) with less than 0.5ºC of resolution in the central (linearized) region and only an external resistor and a filtering capacitor. Simplier, cheaper, more adequate for this application (in my opinion, of course).

One last point: 10k NTC's are the ones that present 10KOhms of resistance at 25ºC, while PT100 presents 100 ohms resistance at 0ºC, not at 25ºC.

Some years ago, I had post one LUT and some little explanation about how I use 10K NTC's with internal ADC for a M64 in this forum.

Guillem.

Guillem.
"Common sense is the least common of the senses" Anonymous.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have you considered an integrated temperature sensor like the Texas Instruments TMP100? I2C interface, eight can coexist on the same bus, and reads directly in degrees C, 12 bits, to 1/16 degree (0.06%). It doesn't have the pedigree nor the range of a platinum RTD but it sure is convenient for moderate ranges. They're comparable in price (and size!) to an NTC thermistor. The quoted 2% accuracy (in my experience) turns out to be a constant offset, probably from the internal reference, and can be calibrated for.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Guillem Planisi wrote:
One last point: 10k NTC's are the ones that present 10KOhms of resistance at 25ºC...
Guillem.

Guillem,
No arguments from me on your points of topic.

And as for:
"...while PT100 presents 100 ohms resistance at 0ºC, not at 25ºC."

I've had this discussion on this forum at least 3 or 4 times over the past few years. Each time, I state the reference point for RTDs at 25ºC, rather then 0ºC. I know better!!! I just seem to get something crossed in the discussion.

Thanks for point out the error of my senility! Otherwise know as "Can't remember shit (CRS)" disease! Sorry for the confusion.

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Otherwise know as "Can't remember shit (CRS)" disease!

Pretty soon they will name it after you-- Carl Remembers Shit.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks Lee, :roll:

I suspect you're right up there with me - if not actually further along... :lol:

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, I am, but there is no L in CRS. :)

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What about using thermocouples?

I'll believe corporations
are people when Texas executes one.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thermocouple anyone?

I'll believe corporations
are people when Texas executes one.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thermocouples share similar issues with RTDs. Its all about small signals and down at these levels every wire junction is a potential thermocouple. Thermal drift is a real problem and requires an understanding and some experience in order to avoid it. It all comes down to what temperature range you want to measure and at what precision.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:
Thermocouples share similar issues with RTDs. Its all about small signals and down at these levels every wire junction is a potential thermocouple. Thermal drift is a real problem and requires an understanding and some experience in order to avoid it. It all comes down to what temperature range you want to measure and at what precision.

Not to mention mastering the concept of Cold Junction Compensation.

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey Carl, sometimes I had similar problem, and I'm only 36: since I usually work with 10K NTC's, and they are referred to 25ºC, is really easy to apply it to PT100/500/1000.

To all others: Thermocouples are usually easier (than PT100) to work with if you have an external high resolution ADC and minimum knowledge about compensation, but they have the worse precission I know. And it adds to the precission of the cold junction compensation. Although you also need 15 or more bits of resolution, since range can be as high a 1300ºC/2200ºF.

Since I had worked with NTC, PT100, Thermocouples K and J, I would prefer NTC if the range allows for it, otherwise, I found easier to use Thermocouples. And then, if possible, PT1000 instead of PT100.

Guillem.

Guillem.
"Common sense is the least common of the senses" Anonymous.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ah, and 4-20mA are even easier to work with...

Guillem.

Guillem.
"Common sense is the least common of the senses" Anonymous.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

anyone can help to interface the TMP100/121/123/141, the TI temp. sensor and AVR interface???