EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: bigun on July 09, 2023, 09:13:12 pm

Title: PT1000 + OpAmp Issue
Post by: bigun on July 09, 2023, 09:13:12 pm
I'll explain as best I can what I'm trying to accomplish, what I'm doing to accomplish this, and maybe someone can point to what I'm doing wrong.

The end goal here is to read temps ranging from 90F to 350F.  I have a PT1000 RTD, that I'm feeding into an OpAmp (LM358P on a schematic, but a LM324N in reality), then feeding into an ADS7830, and reading on a Raspberry Pi Model A via python.  In the end I'm going to have three PT1000's hooked up to the circuit, but I'm trying to just get the first one working right now.

The ADS7830 to the Pi reads flawlessly, feeding a ground to input A0, gives me a 0, feeding a 3.3v gives me 254 to 225, depending on how the connection is.  So, perfect!  0v to 3.3v will yield a range of 0 to 255.  A full 8-bit range.

So, I follow this (https://www.aeq-web.com/pt1000-temperature-sensor-arduino-lm358-messwandler/?lang=en) guide to build my circuit in TINA (and breadboarded out too).  On my breadboard I've replaced R2 and R4 with 10K pots.

First issue: Running the PT1000 in TINA from 0 \$\Omega\$ to 3k \$\Omega\$, outputs a range from 0v to 1.8v on the output of the OpAmp.  Not ideal as the ADS measures from 0v to 3.3v, so quite a bit of the range is lost. Unsure if I'm using the correct OpAmp or just don't fully understand how OpAmps work, but if I could get 0v to 3.3v out, it would be preferred.

Second issue:  In actual practice, I ground out the PT1000 input and leave the circuit completely open, and I get a range of 0.079mV to 1.9V.  Which is a little off from my TINA simulation.  Can this simply be chalked up to "reality vs simulation"?

Third issue:  Once the first issue is sorted, I feel completely lost on how to handle the values of R2 and R4 to measure between 90F and 250F.  From what I can tell, that temperature range will result in a range of Ohms from 1.125k \$\Omega\$ to 1.672k \$\Omega\$ out of the PT1000 according to the temp chart (https://www.sterlingsensors.co.uk/pt1000-resistance-table).  But I have no idea out to translate that out of the OpAmp.

Any help is appreciated, and I know this is a multilayered issue, but I think if I can get the first issue resolved, the rest of this can fall together much easier.

Title: Re: PT1000 + OpAmp Issue
Post by: langwadt on July 09, 2023, 09:25:33 pm
forget about the opamp and the 8 bit adc, get a +16bit adc
Title: Re: PT1000 + OpAmp Issue
Post by: bigun on July 09, 2023, 09:48:29 pm
forget about the opamp and the 8 bit adc, get a +16bit adc

You're not wrong, going from a resolution of 256 to about 65K should make a huge difference.
Title: Re: PT1000 + OpAmp Issue
Post by: bigun on July 09, 2023, 10:01:45 pm
forget about the opamp...

How do I get away from the OpAmp though?
Title: Re: PT1000 + OpAmp Issue
Post by: Nominal Animal on July 09, 2023, 11:09:22 pm
I like to use Analog Devices MAX31865 (https://www.analog.com/media/en/technical-documentation/data-sheets/MAX31865.pdf) for my three-wire Pt100 sensors; it also works fine for Pt1000, if you select an appropriate reference resistor (4k is optimal; I recommend using a large one with good stability and precision).  In addition to the reference resistor, you only need two bypass capacitors.  It communicates with your MCU using SPI (and a separate /DRDY data-ready signal), and has a 15-bit ADC with max. 21ms conversion time (i.e. about 45 conversions per second).

The ADC reading is uncorrected relative resistance (compared to the reference resistor), so you can apply Callendar-van Dusen equation to get a precise temperature across the sensor operating temperature range.

If you need even more precision, TI ADS1247 (https://www.ti.com/lit/ds/symlink/ads1247.pdf) can be used especially for the 4-wire configuration, or 3-wire configuration with compensation (https://www.ti.com/europe/downloads/2-%203-%204-Wire%20RTD%20Measurement.pdf).  A single chip can measure three Pt1000 sensors.
Title: Re: PT1000 + OpAmp Issue
Post by: langwadt on July 09, 2023, 11:12:11 pm
forget about the opamp...

How do I get away from the OpAmp though?


resistive divider of Vref made up of that PT1000 and a precision resistor (aim for 0.1mA to 1mA current), feed it directly to the ADC
Title: Re: PT1000 + OpAmp Issue
Post by: bigun on July 09, 2023, 11:35:58 pm
forget about the opamp...

How do I get away from the OpAmp though?


resistive divider of Vref made up of that PT1000 and a precision resistor (aim for 0.1mA to 1mA current), feed it directly to the ADC

Just got something drafted in TINA with a 4.7K resistor and the PT1000 using the resistance range I'm wanting -  and dang, that curve nearly looks like a line and it's perfect.  Fewer components, overall it looks like a win-win.

Only question - I don't see where current comes in except when it comes to the rating of the resistor itself.  Is that what you were referring to?
Title: Re: PT1000 + OpAmp Issue
Post by: ArdWar on July 10, 2023, 02:04:18 am
and dang, that curve nearly looks like a line and it's perfect.
It isn't actually a line. Depends on how much accuracy you want you may need to implement linearization algorithm, or just make a lookup table containing expected temperature for certain range of ADC readout value.
Of course you still can treat it as a single line if you don't need that much accuracy.

Fewer components, overall it looks like a win-win.
By doing that way you're compensating the lack of offset nulling and range amplification from OpAmp with more ADC bits.
16 bit ADC is often more expensive than OpAmp and here you're wasting it's full range and resolution too, but since you're only need a single piece it's worth using for the much less hassle IMO.

Only question - I don't see where current comes in except when it comes to the rating of the resistor itself.  Is that what you were referring to?
Current is for the whole Rbias+RPT1000 network. Don't set it too low that the charge picked by ADC sample and hold start to mess with measurement, and don't set too high that your RTD start to self-heat. For your application the usual 1K should work fine.
Title: Re: PT1000 + OpAmp Issue
Post by: jwet on July 10, 2023, 06:43:18 am
Going back to your first post.  The voltage swing of an LM358/324 is about 1.5v below the high rail, you could run it on 5v and it would be happy or find an opamp that has a better output swing.  Microchip makes many CMOS opamps that are easy to apply and make both Rail-to-Rail (R-R) in and R-R out.  The Maxim/ADI part mentioned is very nice but somewhat expensive and probably overkill if you're already happy with 8 bit resolution.
Title: Re: PT1000 + OpAmp Issue
Post by: voltsandjolts on July 10, 2023, 08:29:01 am
An example from the TI ADS1220 data sheet is attached.
Title: Re: PT1000 + OpAmp Issue
Post by: eugene on July 10, 2023, 02:15:20 pm
[...]

So, I follow this (https://www.aeq-web.com/pt1000-temperature-sensor-arduino-lm358-messwandler/?lang=en) guide to build my circuit in TINA (and breadboarded out too).  On my breadboard I've replaced R2 and R4 with 10K pots.

[...] I feel completely lost on how to handle the values of R2 and R4 to measure between 90F and 250F.  From what I can tell, that temperature range will result in a range of Ohms from 1.125k \$\Omega\$ to 1.672k \$\Omega\$ out of the PT1000 according to the temp chart (https://www.sterlingsensors.co.uk/pt1000-resistance-table).  But I have no idea out to translate that out of the OpAmp.

The opamp arraignment will work. Using the same supply for both the voltage dividers and the ADC will help reduce noise and other supply related problems. Getting RTDs to work really well requires a lot of thought and careful design, but sometimes getting them to work well enough isn't too hard.

I haven't used TINA, but I assume it will let you change the value of the RTD from 1100 to 1700 ohms to see what comes out of the opamp. You might as well use the simulator to find good values of R3 and R4. Adjust R4 to get more gain from the opamp, in other words to get more output range. Adjust R3 to try to move that range into the center of what your ADC will accept. There will be limitations, so don't expect to be able to use the entire dynamic range of the ADC, but you can optimize things.