Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Multi Pt100 for Pic18 with unstable power

Status
Not open for further replies.
The general idea Pt100+R1 will stay.
Interestingly non of the contributors in this thread seems to refer to the simple voltage divider configuration, everyone is suggesting a constant current source topology and linearization methods presuming a linear resistance measurement.

The voltage divider circuit is nevertheless a valid option for a simple RTD thermometer, specifically if used with ratiometric measurement. But it's necessary to correct the nonlinear voltage divider characteristic in a foregoing calculation

Code:
V1 = Vref*Rpt100/(R1 + Rpt100)

A basic advantage of the circuit is that besides the RTD itself, accuracy depends only on reference resistor and ADC.


The special power supply only for Pt100 might be added.
Only reasonable if also used as ADC reference.
 

everyone is suggesting a constant current source topology

And what? I am not ready to build a board with 3*8=24 extra chips on it.
Do you have a proposal with 1 extra chip for whole scheme not for every channel? I will consider it.
2 extra chips? Maybe.
But I am not gonna add 2 chips there were I can put 1 resistor.
Chips steal money, place, make board more complicated, but what is the profit? I couldn find it yet.

Nonlinearity are already compensated.
On range 0 - 300 C max mistake is 0.7 C

111.png
 
Last edited:

And what? I am not ready to build a board with 3*8=24 extra chips on it.
Well, I did not suggest this topology. I consider the voltage divider solution a reasonable choice. It can be of course used with an ADC input mux.

If you rely on a current source design for some reason, you could also use a single current source through a second multiplexer, as previous mentioned. A certain advantage over the voltage divider solution is that you have less precision components and all temperature channels can share the same calibration.
 

Hi,

Interestingly non of the contributors in this thread seems to refer to the simple voltage divider configuration, everyone is suggesting a constant current source topology and linearization methods presuming a linear resistance measurement.

In post#15 I said that the ratiometric measurement gives accurate measurement..when VCC is used as VRef.
But i missed to say that using VCCand a resistive divider can also be used as VRef for accurate measurement.

This is more simple and same accurate as with precise constant current and precise VRef.
(Include linearization)

Klaus
 
Nonlinearity are already compensated.
On range 0 - 300 C max mistake is 0.7 C
Yes, we could say that you are abusing the quadratic fit to compensate the R1/(R1 + R2) function, which is a bad choice in mathematical terms. It "works" if you don't need better accuracy than 1 degree. But a quadratic fit with foregoing Rpt100 calculation gives much better accuracy. Just look at the residual error curves.

- - - Updated - - -

In post#15 I said that the ratiometric measurement gives accurate measurement..when VCC is used as VRef.
But i missed to say that using VCCand a resistive divider can also be used as VRef for accurate measurement.

This is more simple and same accurate as with precise constant current and precise VRef.
(Include linearization)
Yes, you also referred to the Rv topology in the initial posts. My previous comment doesn't apply to your posts.
 

Can anyone recomend simple current source?

Just added some load resistor, power voltage changed down, temperature reading changed for 5 C :(
 

Source current itself doesn't solve the problem.
For current 1mA on Pt100 span is 0.11V at range 0-300C.
So it needs amplifier....
 

Now I see it next way:
MC34063A 6.5V splitted into 2 independent lines:
-LDO LD1117(Vout=5.0) is feeding PIC
-LDO LD1117(Vout=3.3) is feeding up to 8 R+Pt100 dividers (current 5mA/channel).
So, V for Pt100 is stabilized, Vref+ for ADC is stabilized inside of PIC.
Nonlinearity is compensated by software, temperature range corrected to 0-250 C. 1 C resolution is provided, noise is also filtered by software.
Just 2 small chips added. Cheap and simple. Everything is exactly as I wanted, criticize me now :)
 

So, V for Pt100 is stabilized, Vref+ for ADC is stabilized inside of PIC.So, V for Pt100 is stabilized, Vref+ for ADC is stabilized inside of PIC.
So you have actually two reference voltages, gives more initial error and drift than necessary.
 

So you have actually two reference voltages, gives more initial error and drift than necessary.
Yes, but all of them are stabilized. At least datasheets promise low span of voltages.
For my purpose it will do.
(That what you notice can be fixed by getting busy couple of PIC pins, but I dont think it is necessary to do it now. Experiments will show the truth anyway.)
 
Last edited:

The simple question is, what's against using the same stabilized voltage for ADC reference and Pt100 excitation, getting zero instead of doubled reference voltage evoked error?
 

The simple question is, what's against using the same stabilized voltage for ADC reference and Pt100 excitation, getting zero instead of doubled reference voltage evoked error?

That is because PIC18F46K22 has reference voltage inside.
PIC18F4502 for instance hasn't it, so I would have been obliged to use the same Vref, but in this case I believe stability of PIC and LDO would be enough not to use same Vrefbut to spare a pin instead.
 

So you are saying, you give up the option of a true ratiometric measurement and choose the less accurate solution because your PIC has an internal reference? You can e.g. use Avdd as reference input and don't loose a pin.

46K22 reference is specified with +/- 6% tolerance and about -100 ppm/K typical drift, Presumed you can life with the drift, you need at least additional adjustment for initial error, even with a 10 bit 46K22 ADC.
 
Hi,

I'm completely with FvM.
With ratiometric measurement, you don't need highly stable voltages and currents, the errors will be cancled out automatically.
Using the internal VRef makes it impossible to cancel those errors
Just some resistors and capacitors.

*****
If you insist on using the internal VRef, then use the voltage at ARef and generate a constant voltage/current source for the PT100.
But it is just more effort without gaining precision.

Klaus
 
I experimented with changable the same Vref. It works OK only if Vref is stable.
Anyway I agree with both of you and will think out using same votage for Vref and for feeding Pt100. Thank you.

Now I want to keep the situation of separate LD stabilizer for Pt100 channels.
 

Besides the recent considerations about ratiometric measurement, there are of course some additional requirements. ADC Vref must be free of excess noise and should be near Vdd (e.g. 4 - 5 V) to avoid additional errors. In most cases, a good filtered 5V analog supply from a linear regulator connected to AVDD will do.

There may be still reasons to choose a different solution (e.g. two reference sources) for your design. Just wanted to point out state-of-the-art for simple and accurate RTD measurements.
 
Just wanted to point out state-of-the-art for simple and accurate RTD measurements.

That's exactly the point I started the shread. For some reason I can't build completely correct measure channels, but I improved the rest with community intellect.

Another big issue is P PI PID regulators but it is worth of big separate conversation.
 

Besides the recent considerations about ratiometric measurement, there are of course some additional requirements. ADC Vref must be free of excess noise and should be near Vdd (e.g. 4 - 5 V) to avoid additional errors. In most cases, a good filtered 5V analog supply from a linear regulator connected to AVDD will do.

1. Ratiometric determination is good (perhaps better) but we need to measure both Pt100 and the series resistor- that will consume 16 ADC channels. I do not know how many channels PIC provides. They are all internally multiplexed and, I presume, are single ended.

2. The Vref should be close the max span for max accuracy. If the span is about 1V and the Vref is 4V, we are losing about 2 bits of accuracy.

3. For max accuracy in ratiometric determination, we shall have the ref resistor in the same range as the unknown. In that case, 330R may be split into 150R and 180R and use 180R as the ratio. But the inputs are single ended and will measure Pt100 and Pt100+180R. Not much gain, IMHO.

4. I agree that linearisation of R1/(R1+R2) is not good and we shall really use conductance rather than resistance. But then R(Pt100) is usually expressed as a quadratic in T and the inverse formula is generated from tables.
 

Hi,

In some points I don't agree.
* no need for 16 channels.
* you loose 2 bits of resolution, but not necessarily also 2 bits of accuracy. But I agree that you should adjust the range.
* one resitor each PT100 is enough

***
As said before: VRef should have the same filter(characteristic) as the signals, for good ratiometric results.

Klaus
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top