Thanks Mike. Is what you suggest something like this? VCC + | | .-. | | ___ | | +|___|+ '-' | | .--------------. | ___ ||\ | | PIC | A o-------------|___|-+|+\ | | | | ___ | >-+----o ADC | .-. +--|___|--|-/ | | -->| |RTD | |/ | | | | | | | '-' | | | | | |\ | | B o----------+---------| > ------o VREF | | |/ | | .-. | | | | | | | | | | '-' '--------------' | | =3D=3D=3D GND (created by AACircuit v1.28.6 beta 04/19/05 www.tech-chat.de) Regards, Mark > -----Original Message----- > From: piclist-bounces@mit.edu=20 > [mailto:piclist-bounces@mit.edu]On Behalf > Of Mike Harrison > Sent: 06 July 2005 13:15 > To: Microcontroller discussion list - Public. > Subject: Re: [PIC][EE] PT100 temperature sensing >=20 >=20 > On Wed, 6 Jul 2005 12:21:13 +0100, you wrote: >=20 > >As suggested, I've had a bit of a read up on the application=20 > notes for MAX197. This is very purpose built IC and would be=20 > perfect (although it has 8 different channels and I only need=20 > 1), but looking at the prices from RS, it's a bit impractical=20 > to use (=A320 for one IC!) shame. > > > >However, this set me wondering - IIRC (I am a newbie don't=20 > forget) there are some PIC's with built-in ADC's could I not=20 > use one of these instead? or am I missing something? I=20 > think for 0.5C accuracy, I need a minimum of 10-bit ADC. =20 > Although I only want a temp range of 0C to 100C. I could=20 > transform and scale the voltage to get better accuracy from 8-bit? > > > >I know I have to produce a reliable 1-2mA fixed current for=20 > the RTD's excitation current. Any suggestions on how I=20 > should do this would be welcome. > > > >I assume I can then map the voltage reading back to the=20 > resistance (with some calibration factor applied?), and have=20 > the standard PT100 resistance table for lookup and interpolation. >=20 >=20 > To do PT100 on the PIC ADC, the best way is with an external=20 > dual opamp.=20 >=20 > V+---Rlimit--A--PT100--B--Rref -----Ground >=20 > Rlimit sets the current - around 220R. RRef is a precision=20 > low-TC reference resistor - value depends > on temp range required, e.g. 1K >=20 > opamp configured as a differential amplifier with inputs A,B=20 > producing amplified voltage across the > PT100. Gain about 5, depending on temp range required.=20 >=20 > opamp configurted as unity gain buffer from B to VRef of the ADC.=20 > This provides a voltage proporitional to the exitation=20 > current, so your ADC reading is directly > proportional to resistance, with no need for a constant=20 > current source as the effect of supply > voltage, and change in current with PT100 resistance are both=20 > cancelled out. >=20 > I have an excel spreadhsheet somewhere to help evaluate the=20 > effect of various component values > With a 10 bit ADC, my application did about 1 degree accuracy=20 > from -90 to +180 - you could get > better if your range is lower.=20 >=20 > As the PT100 curve is not far from linear, you can use a=20 > fairly small lookup table with linear > interpolation. A table in 10 ohm steps gives a maximum error=20 > of less than 0.05 deg.C from -100 to > +350 deg.C 5 ohm steps gives better than 0.01 degree error.=20 > Unless you're into serious ADCs these > errors are dwarfed by other factors. >=20 > >I assume there are some PICs that can perform floating-point=20 > arithmatic? Or do you rely on the 'C' compiler to provide=20 > the functionality? (never used the PIC 'C' compiler before,=20 > although I do know 'C'). >=20 > You don't need floating point as the range is limited. Just=20 > scale it up & use fixed-point. >=20 > =20 >=20 > --=20 > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist >=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D Please access the attached hyperlink for an important electronic communic= ations disclaimer:=20 http://www.csfb.com/legal_terms/disclaimer_external_email.shtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist