Ok so I solved the negative temperature problem.
the problem is now it is reading too high (27.5 degrees) in a 20 degrees environment.
sprintf(str, "%+1.1f", T);
Is this reading by the PSoC5 or by a multimeter?
Is the ADC reference set to a Vdd derived reference or the internal
bandgap 1.024 reference ? If former Vdd is +/- 5% typically out of
You need to perform a complete signal path error analysis to know
what accuracy, precision you will get.
The equation given in the PDF is mixing units mV and V. You should take that into account when you rearrange the equation,
And where do you get the Item 85.543 from?
Vo - 1.8663V = T[°C] * 11,8639mV/°C = T * 11.8639mV
T = (Vo - 1.8663V) / 0.011.8639 V
As you can see a calibration at the midpoint of your temperature scale could get rid of some errors.
dividing 1/0.0118639 yeilds 85.543.
I have used (0.0 to 2.038 single ended 0 to Vref*2) input range of the ADC with a 100K conversion rate and it gave me more reliable results. but still there is a big difference between the real value and the measured value.
I am switching to the long equation. any idea on how to get the sqaure root of a float number?
The sensor tolerance is +/- 1.5 C, what are you using to determine T to
compare to PSOC result ? Ice bath one of the easy methods to cal a T
sensor at one point.
GCC and sqrt - http://forums.debian.net/viewtopic.php?f=8&t=109385
The first thing you should do is to use the equation for V0 that is relevant for your temperature range (given in Table 2 of the attached document). Secondly use a more accurate temperature sensor than using a digital thermometer that is installed in a watch. This will give you true temperature reading to compare with PSOC result.
@deniz, just a thought, do you think customer still watching a 6 month old thread ?
At least regular visitors here can look for forum with new stuff since their last visit (you just need to remember when it was :). And inside there the newest threads are on top making it easy to find new stuff even after a week or so.
Realtime examination of all your thread history history pretty awesome.
But is this a geometric progression of time needed, and soon you will have no time
to eat, sleep :(