PT1000 RTD sensor interfacing

Regarding RTD sensors this may be of interest for people who struggle to get them working and accurate due to lack on information on how to interface them...
In case you like to make a decent interface yourself, read the below.

Normal thermistors are accurate but suffer from the metal oxide limit on temp range, so it stops at ca. 260’C.
Platinum RTD are easy to use over a very wide range (e.g. -70’C to 500 ‘C ) or even higher and a nice design advantage is that you can get them in really small and flat dimension (2x3x0.8mm). So you can build them into any difficult position and measure accurately.

So here is a guideline for interfacing a 2-lead RTD with an ATMega328p (nano, uno, or whatever): (for hardware)

  1. To be able to monitor a PT1000 resistance sensor, we need a voltage divider to enable a small current through the sensor.
    Here it is important to take the selfheating property of RTD sensors into account. For a PT1000 , the advised maximum current to use is 0.3mA. If you go over this, the sensor will drift due to self heating.

  2. Define the temp range you want to measure.
    The lowest point is the resistance at which you need to stay below the 0.3mA.
    So e.g. a PT1000 is 1000 Ohm at 0'C , so this means, that at this temp, the voltage over the sensor should be 0.0003 x 1000 = 0.3V. So, incase you use 5 Volt as source , the 2nd resistor of the divider is then 4.7/0.0003 = ~15.7kOhm.

From the above you can maybe already notice that the voltage range from 0 to e.g. 100'C is rather small, about 110mV.

So solve this, a few things you can do:

  • set the Vref of the ADC to the internal 1.1V and decouple the Vref with a 100nF capacitor (ceramic)
    (set bit 7 and 6 of ADMUX registor to 1):
    lda r16,0x60
    ld r17,0x7c
    and r17,r16
    sts 0x7c,r17
    Now you have the 10 bits resolution (1024) steps in the 0 to 1.1V range
    Using the interal Vref gives more accurate long term measurements then when using the Vcc line...

now we amplify the sensor signal (mv range) in such away that the highest temp you need to measure is close to the 1.1V level.
This we do with a general purpose operational amplifier as non-inv amplifier. lot of choices, but still the LM324 or LM224 (you have 4 in one) is good to go after decades ....
324RTD

You can set the gain by tweaking the feedback resistor and the divider resistor to get close to the 1.1V on the positive input.
on the negative input you use the same divider but use 1000 ohm for the lower one to make a 1:1 comparison.
The resistors are as critical as you want to measure, but as we in case of an ATmega 328P only have 10 bits you can do 0.1'C resolution over a range of 100 degrees at ease when you use stable 1% resistors (low TC ppm) the absolute tolerance does actually not matter too much: you can tune by software.
1% metal film resistors with 50ppm temp coeff. is more then ok.
Don't use too high Ohm resistors for the dividor as they introduce too much noise into your amplifier (depending on environment).
For e.g -30'C to + 90'C range use 18 kOhm for both dividers and 8k2 Ohm for the feedback resistor, the LM324 works fine at single voltage supply of 5 V and its rail-to-rail amplifier so no issue. A few small capacitors and a low pass (R of 400 Ohm with a 0.1uF to Gnd) on the ADCinput to filter out HF noise (if you live near a large Transmitter Antenna, have crappy PC or other HF emittors.
In total its for about 4.8 euro on parts and yeah 8 euro shipping. .But you can make multiple range RTD sensors with one LM 224 (4) and do much more accurate measurements (0.01'C) over a 50' or 0.001'C on 25' range of your interest even with a limited 10 bit ADC.
An RTD sensor is not expensive at all, ~3.2 Euro for a 2 lead .... type B just look for it as component.

Thats it.

Alex

Unfortunately, it is not. The output voltage swing of the LM324 is between 0 at 3.5V (V+ - 1.5V), if operated from 5V.

OK for this particular application, but if you need that upper output voltage range, there are much better choices, like the true rail to rail MCP602x series.

yes, I know but I run it at 12 Volts and 4 in package is 4 times cheaper.
For this application, the LM224 is just fine

The LM324 works. I added sense lines to stabilize it and compensate for lead losses, much less money then a high priced amp. I connected with 4 wires in a Kelvin configuration. The resistor will eventually become two leads, just connect the measuring and current source to these pins. This will remove the wire loses.

Hi,
Another solution;

About $13 AUD. the $2.47 is click bait.

Tom.. :smiley: :+1: :coffee: :australia:

1 Like

Hi Tom,

Yes, you can of coarse buy such interface..
But the whole point of my guide, is for those who prefer to build their own interface...
Many of ready made interface boards for e.g. Arduino alike do work well but it can limit your capability to fully utilize the power of a micro controller, or integrate electronics into one controll board.
e.g. with the MAX chip , comm goes through SPI and conversion time of the ADC is in the ms range (up to 21 ms ...).
It has better ADC resolution (15 bit) compared to 328P ADC (10-bit), but if you want sensors to communicate fast, then direct interfacing with the 328P ADC gives you an signal update every 13 clock cycles, add some more cycles for interrupt access and number conversion, but the point is: it takes about 1 us to get an update reading , calculate/convert it on a 328P at 16Mhz .....
So... 20.000 times faster then through e.g. a MAX chip..... (if you write the code in assembler, so you know exactly the timings)
It also enables other electronic signals to interact with sensor output, many reasons can exist for this...

It completely depends on what you are aiming to do with the sensor.

Alex

Hi Gilschultz,
Great setup
Yeah!, this opamp was developed by National Semi conductors (now its part of TI) in the early 70's.. :sweat_smile:
this opamp is still a very good piece of electronics and very effective in many industrial applications. the high temp range quad versions, LM224 or the low voltage type LMV324 .. the cost/performance per opamp is just great .
If you are into process control electronics and cost plays a role.
nothing can beat an 8-bit controller and such opamps...
code the critical parts in assembly and the world opens up, amaizing what you can do with only 32k of flash.

Hi,
If you look up Instrumentation Amplifier you will find an even more stable configuration.
You can even make one out of LM324.

Tom... :smiley: :+1: :coffee: :australia:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.