Hi Lawrence, Thanks for all your input. You have some good ideas that I will have to think about. What can you tell me about thermistor drift? I haven't seen any specs so I don't know what to expect. I know self heating can be a problem but the ones that I have are the size of dimes, so I wasn't expecting any problems. What is the difference between the expensive thermistors and the cheap ones? My impression was that it is very difficult to make thermistors that are identical in performance and can be used as interchangeable items. What you were paying for is the interchangeability and therefore didn't have to calibrate each thermistor. A quick calculation for the resolution of the resistance using 16 bits (for my interest): Assume only 15 bits will actually be used to be conservative. Thermistor change in resistance is about 15% for the -5 to +20 deg C range. Therefore, the number of counts per degree is 2^15* 15%/25 deg. = 197 counts / deg. (a high degree of comfort) Of course this assumes that everything is repeatable and there is no noise! Repeatability of the Schmitt trigger on TOCK1 is an unknown to me. Any comments? It is a good idea to use caps for the PIC RC and measurement that are not affected too much by temperature. What type do you suggest. These timing and cap errors should be removed though (in theory) by doing a calibration cycle using a known resistance just prior to doing a temperature measurement. Do you have a suggestion for the type of resistor that I should use for the reference resistance? I haven't looked to see if I could find some temperature coefficients. In my mind this is going to be more important as the temperature accuracy is only going to be as good as the reference. Yes you are right about the noise on the wires, twisting is a minimum and shielding is likely required. I will have to see how much noise I get and it is something to watch out for. Maybe, as you suggested, an averaging of values is a good idea. Thanks for all your ideas, Gordon Williams ----- Original Message ----- From: "Lawrence Lile" To: "Gordon Williams" ; "pic microcontroller discussion list" Sent: Wednesday, December 20, 2000 10:46 AM Subject: Re: [EE]: Thermistor temperature measurement > Gordon, > > So far I think you are taking on quite a task. I know you can solve these > problems, but Here are my concerns: > > 1. Thermistor accuracy. You'll need one of the more expensive thermistors. > Of course, you can calibrate out many problems in a one-off. What about > drift? > > 2. Lookup table - this is the bet way to get a leg up. Once you get the > thing halfway working, CALIBRATE your lookup table against an accurate > thermometer. The math will get you 3/4 the way there. > > 3. 2-3 feet of "antennae" between your sensor and the PIC. this is > definitely going to cause trouble. Shield that cable! For this reason > alone I'd consider another approach. AN512 is by nature a relatively high > impedance input, and > > IF ((high impedance) & (long antannae) ) > > troubles++; > } > > if ya know what I mean. > > 4. switching 50Watts - this will also cause trouble. No doubt you'll end > up with a slight power supply variation each time you switch some power, > making your sensor reading bobble one or two bits. If there is a big space > between your calibrated lookup points, maybe 10 or 12 bits, this won't be a > problem. Same with driving an LED display. > > 5. 16 bits - this is good. > > 6. Linearize with a parallel resistor - this is an old trick which can help > keep the readings in a nice range. Do a few calculations, you'll find a > range where a parallel resistor makes your thermistor behave a lot nicer. > This is less critical with a lookup table but can be a problem solver. > > 7. RC mode oscillator - these also introduce inaccuracies. Since you are > measureing *time* when you use AN512 A/D, your oscillator actrually > contributes a lot to the accuracy. I'd use a 4mhz ceramic resonator or > xtal. > > 8. LED display - see above. These current hogs eat power supply regulation > for breakfast. If you weren't operating in a freezer, I;d recommend a > serial LCD, but they don't like cold. You may be stuck with LEDs, or > expensive wide temperature LCD's. Maybe you should run this thing from a > separate regulator? > > 9. Use a temperature stable capacitor for your RC oscillator and especially > for your AN512 measuring cap. I know AN512 supposedly is immune to > capacitor vatiations and power supply variations. Also, santa claus is > supposed to show up next week. Don't bet on them. > > Of course, you are a smart guy, and can probably solve ALL of these > problems. Just watch out for them. > > I'd seriously consider one of those packaged temperature chips (Dallas xxxxx > can't remember it) in your > application. It will be easier to implement, less susceptible to noise, > more accurate, and only cost a couple bucks more. If it saves you pulling > out hair it'll be worth it. If you are getting paid and it saves you 5 > minutes it will pay for itself. > > > --Lawrence Lile > -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.