moderator: split off from - Using one pin, for two ouputs, via another component such as a microcontroller ? - #9 by vaj4088 - Programming Questions - Arduino Forum
I've been trying to get this to work with a PT1000 to control a solar boiler. I'm able to calibrate with ice water but at higher temperatures the readings that I'm getting are consistently low. I've compared to a DS18B20 and the solar boiler unit that can also read PT1000s.
The MCP3551 is giving me 56 degrees C where the other two are giving me readings around 61,5. The DS18B20 and PT1000 are the same format and are in the same location in the boiler.
I'm not 100% sure about this but it seems the higher the temperature the higher the deviation.
Do I need to adjust the resistors for reading the PT1000 instead of a PT100? Or is there something in the code I need to adjust?
Thanks in advance!
Edit: Did some further testing. It seems like the conversion from ohms to degrees is correct but the measurement of RTD is off by 10 to 20 ohms. I've crosschecked this with a (cheap) multimeter and the original solar boiler unit (converted the temp back to resistance with the tables).
moderator mode: split of the question to form a new thread.
(changed title a little and removed your first line refering to the old thread)
depinguin:
Do I need to adjust the resistors for reading the PT1000 instead of a PT100? Or is there something in the code I need to adjust?
well apt 1000 has a resistance of 1000 ohms as opposed to pt 100 of 100 ohms.
They are not interchangable without circuit modifications.
Post your circuit diagram.
I would tend to believe th output of the DS18B20
Thanks for your help Rob.
I've used the attached scheme. Miso pin 12, sck pin 13 and I'm using pin10 for 34/36.
The calibration button is on pin7.
I'm also using an lcd screen on pins 9,8,5,4,3,2.
So far I've changed the resistors to 7k (7 times 1k until i can get to a shop) and that seems to improve things but my readings are quite unstable. Once i calibrate the readings jump between -0.1 and 0.8 (still with ice). Same thing with "room" temperature. It jumps anywhere between 18 to about 19.
Could it have anything to do with the resistors? I will try with 68k 1% as soon as i can get my hands on them.
Untitled.pdf (254 KB)
I do not understand your circuit if you are just measuring the resistance using two terminals you will get terrible accuracy and repeatability issues.
Your attatchment is missing.
Change in resistance with temperature is small, the connecting wires will also change affecting the reading.
For two wire measurement a thermocouple is a better choice.
Typically solar thermal energy control uses ptz because tracking delta t accurately gives best recovery and the use of ptz is justified.
This explains the differences between 2,3 and 4 wire connections.Resistance thermometer - Wikipedia
Attachment added, couldn't upload in jpeg format.
Thanks
It sounds like you have the serial sorted out as you get readings.
The problem is on the analogue side.
You need analogue signal conditioning using one of the schemes in the link i provided.
Using an arduino with the the correct analogue circuitry you can fairly easily measure to 0.1 deg c.
I've been using this. I went back to 6.8k resistors and now I get a stable value again but consistently about 10-15 ohm low..
Around 1000ohm the offset is about 5 ohms, at higher values (1400) the offset goes to about 35 ohms. Seems to vary linearly. This makes me think the problem is on the digital side?
The diagram you posted is missing the 1uF capacitor on the reference voltage..
Also the ldo seems to be missing .
Read the link you posted regarding reference voltage filtering.
Edit
quote
e. A
0.1°C accuracy can be achieved using a single point
calibration.
Using a separate op amp and an arduino its possible to achieve this over a 0 to 100 deg c range.
Arduino adc has 1000 discrete levels.
22 bit = 4 million levels.
At this resolution very careful design and pcb layout is required to keep the noise down.
Sorry about that, they (both of them) are included on the breadboard but doesn't change anything with or without.
At 1000ohm I get correct readings but the further away (both ways) from 1000 the higher the offset becomes. Below 1000ohm it overreads, above 1000ohm it underreads.
Sorry i edited while you posted.
Can you show a pic of your breadboard.
One source of error is connections which can generate potentials.
See edit.
Its a sensitive circuit.
Normally this is compensated by reversing the current flow and averaging the reading.
A plug in breadboard is not really suitable , it needs soldering.
Layout is also rather critical.
depinguin:
. I've compared to a DS18B20 and
This would indicate that you have the code working correctly.
This means there is up to 12 LSb flicker or the
temperature measurement precision is 0.09°C
maximum (Equation 6). This can be improved by taking
the average of multiple samples to precisely determine
temperature.
A 1% tolerance in RA produces a
20°C error and a 0.1% tolerance produces a 2°C error.
For lower tolerance resistors, RA must be calibrated for
precision temperature measurements.
In order to precisely calibrate RA, a calib
A thought has occurred.
What value have you calculated Ra should be ?
There is a relationship between that and the code value output.
You could use a lookup table and calibration to correct that but i suspect getting Ra spot on would be easier.
It's probably not as clean as it could be, but I want to breadboard everything before I start soldering the shields. Makes it easier to troubleshoot.
I don't really get why the deviation is (fairly) linear. If the problem were noise shouldn't it be more erratic?
I didn't calculate 6.8k, just used it from the PDF file I posted. I have to admit my knowledge of the schematics doesn't go very deep. I'm not quite sure how to calculate the value.
Having said that, again it seems strange I would get a linear deviation because of the resistor? I will try with different resistor values for Ra (Can I leave Rb as it is?) and report back.
Thanks for your help so far!
Graph of Ratio of Rptz to Ra.
With ra equal to Rptz. Edit , at 0 deg C.
Without knowing the point at which the graph crosses the 0 deg point how do you interpret your results ?
Hint
If you make ra equal to Rptz the sign changes if you subtract the correct offset.
You can do the same with a 6.8k resistor as ra.
Graph and extend the left line until it crosses the x axis.
depinguin:
It's probably not as clean as it could be, but I want to breadboard everything before I start soldering the shields. Makes it easier to troubleshoot.
I don't really get why the deviation is (fairly) linear. If the problem were noise shouldn't it be more erratic?
!
The graph is linear so i would expect the deviation to be linear also.
Small things such as contact resistance will have an effect.
Not an easy circuit to use on a breadboard,lots of things could go wrong a pic would be useful

depinguin:
Edit: Did some further testing. It seems like the conversion from ohms to degrees is correct but the measurement of RTD is off by 10 to 20 ohms. I've crosschecked this with a (cheap) multimeter and the original solar boiler unit (converted the temp back to resistance with the tables).
Have you implemented the code to rtd resistance conversion ? Equasion 3.
Attached the breadboard. Probably too messy? 
Isn't the problem with those lines that I should have a line that is steeper, not so much higher or lower (to see where it crosses the axis)?
I've tried different values for Ra (between 4.7K and 70K) and after calibration I get roughly the same deviation when moving away from PT=1000ohm.
The higher the value for Ra, the less stable the values I get for the PT. at 6.8K I get values within 0.1C and at 70K the values are within 1.0C.
I possibly need to look at adjusting Rb? Or the combination of Ra and Rb?
I use the library from this thread:
http://forum.arduino.cc/index.php?topic=164643.0
The code is implemented in this library.

depinguin:
Attached the breadboard. Probably too messy? 
Isn't the problem with those lines that I should have a line that is steeper, not so much higher or lower (to see where it crosses the axis)?
Yes i suspect the slope is wrong hence my question in 15.
Applying equasion 3 will change the slope.
The offset to get zero crossing is actually calculated for you when you press calibrate.
Graph was an example to give you an idea of what is happening.
If you plot a graph of your values it may cast some light.
depinguin:
I possibly need to look at adjusting Rb? Or the combination of Ra and Rb?
It should not make much difference but if Ra is too high you may have problems with noise and resolution.
The worked example in the datasheet is for a PT100 though not a 1000.
Other thing may be repeatability between different units.
Have you checked the price of .01% resistors.
It did not work for me however as the length of the cable to the ptz caused several deg error.
If you connect the ptz as in this diagram then cable length is compensated for.
I looked at your pic and if i see correctly your ptz appears to be a simple 2 wire model and i cannot see its length..
I checked the library you linked and it appears to implement equation 3, so its back to analogue.