# RTD Temperature Measurement with 5V ADC.

1. ## RTD Temperature Measurement with 5V ADC.

Hi,

I want to design an RTD based temperature transmitter with a 5V ADC. I do not intend to use a lookup table though. I'll implement the reading with a formula so that won't be a problem.

I just want to know the conventional way of doing it. I know I can just measure the voltage and infer. Implementing the actual linear voltage measurement and inferring temperature is not a problem right now but implementing functions like "Out Of Range" and the likes is.

So please how are these functions implemented? Thanks in anticipation.

•

2. ## Re: RTD Temperature Measurement with 5V ADC.

A simple ratiometric RTD measurement can be setup with an ADC and a precision (e.g. 0.1 %) reference resistor.

Range check
 Code C - [expand] 1 out_of_range = adc_val < L_LIMIT || adc_val > H_LIMIT;

1 members found this post helpful.

3. ## Re: RTD Temperature Measurement with 5V ADC.

Range check
 Code C - [expand] 1 out_of_range = adc_val < L_LIMIT || adc_val > H_LIMIT;
Thank you very much FvM for responding promptly. I appreciate.

It's the voltage levels that I'm concerned with. I'm in doubt as to whether it would be something like:
* 0V <= PV < 0.05V ... "bad sensor"
* 0.05V <= PV <= 0.25V ... "Out of Range"
* 0.5V <= PV <= 4.5V ... "linear temperature range value"
* 4.75V <= PV <= 4.95V ... "Out of Range"
* 4.95V < PV <= 5V ... "bad sensor"

Please how is it done regarding voltage level?

4. ## Re: RTD Temperature Measurement with 5V ADC.

The only difference is that you are scaling the ADC value to float voltage, e.g.
 Code C - [expand] 1 float PV = adc_value*(5.0/4096);

You have to find out if the resource requirements for linking float libraries pay in your application. Alternatively you can scale the voltage threshold constants to integer numbers and compare with ADC values.

1 members found this post helpful.

5. ## Re: RTD Temperature Measurement with 5V ADC.

You have to find out if the resource requirements for linking float libraries pay in your application.
In addition to this excellent suggestion, I may add that binary shifts may be used, whenever possible, instead of integer division. Anyway, the ADC output will be some integer value. It is easy to define constants in the beginning...

1 members found this post helpful.

•

6. ## Re: RTD Temperature Measurement with 5V ADC.

Okay FvM and c_mitra, thanks for the suggestions.

•

7. ## Re: RTD Temperature Measurement with 5V ADC.

I didn't quite get the solutions I wanted.

What I want is to establish points for my computation. My values of Post #3 were just selected for the sake of the question, although they are in the right order. Also, if you look carefully at those values, you'll notice that there is a gap between the "linear temperature range" and "out of range". This gap should not be there. A selected RTD for temperature measurement would be one that spans through and exceeds the "linear temperature range" (in resistance changes) which in this case represents the range of temperature that I want to measure.

Now I have to select some values to represent the points I showed in Post #3 (ignore the actual voltage values I mentioned there). I also do not want a gap between the "linear temperature range" and the "out of range". Why I left that gap was because I am not sure how to demarcate where the "out of range" starts from where the "linear temperature range" ends.

Why I am bothered here is that say you want to recalibrate a temperature transmitter, you could get some loop current like 3.9895mA or something which is below 4.0000mA and yet the transmitter isn't saying "out of range". So I don't want to mark it at exactly 4.0000mA but I want an idea on where to mark it and reasons why so. I know we have a lot of experienced folks here and good thinkers too so that's why I'm bringing it up here.

The two "bad sensor" marks are critical too as the transmitter should not mislead users telling them that the sensor (RTD here) is bad when actually the sensor is still in good shape. The ADC may not give exactly 0V or 5V at sensor short-circuit or open-circuit respectively, so I don't have to select 0V and 5V prompt for that purpose.

8. ## Re: RTD Temperature Measurement with 5V ADC.

Hi,

to be true... I don´t know what exactly you are looking for.
Is it hardware? schematic?
Is it software?

***
A design usually starts with the reqirements.
Now we just know
* RTD
* Temperature transmitter (Without details..)

But first you should decide:
* temperature range
* temperature accuracy
* conversion/ouptput update rate

Then look for a suitable RTD.... and read it´s datasheet and the application notes from the manufacturere with example circuits and their specification.

I recommendn to draw a really simple draft (hand drawn is OK) that shows shows your signal flow.

*****
Input side Errors:
An RTD supplied with a current source:
* accuracy, drift and noise of current source (
* accuracy, drift and noise of ADC_VRef
* accuracy, drift, noise, DNL, INL of ADC
* and wiring errors

Ratiometric measurement circuit: (RTD connected via R to ADC_VRef.
* accuracy, drift and noise of R
* accuracy, drift, noise, DNL, INL of ADC
* and wiring errors
I prefer this, because current source and VREF errors are cancelled out. A precise R is easy to find and cheap.)

Klaus

1 members found this post helpful.

9. ## Re: RTD Temperature Measurement with 5V ADC.

Thanks Klaus for prompt response.

Actually, the temperature range is dynamic and the URV and LRV are to be set by the user and the RTD too is supposed to be selected by the user. With these, accuracy is impacted and depends majorly on both the RTD selected and the ADC resolution. That is why I overlooked those parameters.

All the parameters you asked for are arbitrary for the time being and should only be considered as arbitrary constants for now.

The only actual value at this point is 0V-5V ADC input range.

Also, I didn't think a diagram would be of any use. If it's still necessary, then I might have something posted here.

What I actually want is to appropriately mark these points:
* 0V <= PV < 0.05V ... "bad sensor"
* 0.05V <= PV <= 0.25V ... "Out of Range"
* 0.5V <= PV <= 4.5V ... "linear temperature range value"
* 4.75V <= PV <= 4.95V ... "Out of Range"
* 4.95V < PV <= 5V ... "bad sensor"
Ignore the figures I mentioned. "PV" here is voltage representing temperature.

Suggestions might be in one form as expressions that may include, for instance, ADC resolution (as arbitrary constant) or so, or in another form as actual voltage values.

10. ## Re: RTD Temperature Measurement with 5V ADC.

We can't know your application better than you but in general there are two strategies here.

Select values which to the best of your knowledge represent a broken sensor (can't help you figure this out).

But the point is if you're temperature sensing a refrigerator you could call 100 degrees F a broken sensor. If you're temperature sensing an oven 0F is a broken sensor.

1 members found this post helpful.

11. ## Re: RTD Temperature Measurement with 5V ADC.

Hi,

Sadly no draft, no useful information.
Makes it hard to help.

I agree with asdf44.

You struggle with voltages but don´t know which RTD to use and what the temperature range is.... this is the wrong direction.

With these, accuracy is impacted and depends majorly on both the RTD selected and the ADC resolution.
No. The ADC resolution doesn´t impact (much) accuracy.

Klaus

12. ## Re: RTD Temperature Measurement with 5V ADC.

The application is not specific. I have to design it to cut across a wide range of industrial process applications. This is the reason why I'm considering only ADC voltage at this time. One user might use the transmitter to measure say 0 degF to 100 degF, another user might use it to measure say -20 degF to 160 degF. All that has to be done is that each user has to configure the transmitter to measure the temperature range that they want and they are going to use an appropriate RTD.

The voltage levels that I'm trying to determine here will be constants once determined and the configuration will fit temperature values to this voltage levels with calculated RTD resistance values and appropriately controlled current source.

I have thought up something already but I do not want to rule out experience. This is why I'm posting it here.

I'm expecting help to be in the forms that I mentioned earlier and with reasons why such decisions should be so. It is not as simple as to select a value. The actual range for control is the "linear temperature range". Point outside this range are safety points.

I don't want to select a voltage range (for the linear temperature range) that's too narrow so that the temperature spread will not become too inaccurate for wide temperature ranges. On the other hand, I do not want it to be too wide that the safety points become meaninglessly too close. I just want some optimal spacing.

•

13. ## Re: RTD Temperature Measurement with 5V ADC.

All that has to be done is that each user has to configure the transmitter to measure the temperature range that they want and they are going to use an appropriate RTD....
Why that cannot be implemented in software?

You can give the user one time chance (or multiple times, if that pleases the user) to calibrate the sensor (every time the sensor is replaced or as the user pleases) and store the parameters in the software.

You can also opt to transmit the raw resistance values to be cooked remotely. Or, you can process the temp and send it away to the remote station with a time stamp.

Only thing I see as a problem is that the user inputs may be incompatible with the sensor specs; this may put you in a fix.

It helps if you can break down your question into several parts and ask easy questions!!

--[[ ]]--