 |
 |
View previous topic :: View next topic |
Author |
Message |
djsb
Joined: 29 Jan 2011 Posts: 49
|
|
Posted: Sat Mar 22, 2025 2:52 am |
|
|
Thanks. A very clear explanation and something I will try over the next few weeks.
I'm passing these explanations/solutions onto the students I help in an embedded systems class.
I'll also start looking for other temperature sensors with better accuracy at some point. But I also need to have a better understanding of the PIC's ADC limitations, as well as the limitations of the fixed voltage reference.
Lots to keep me occupied. |
|
 |
temtronic
Joined: 01 Jul 2010 Posts: 9445 Location: Greensville,Ontario
|
|
Posted: Sat Mar 22, 2025 5:33 am |
|
|
FWIW...
I've used 1,000 of the LM35C over the past 3 decades, in remote industrial temperature control systems. Cost is more but..far better specs ! Accurate analog sensor.
After I got into using PICs, started using the DS18B20 digital temp sensor. It's a 'One wire' device,so has unique ID in it, a few other nice features like 'parasite' power ( one wire does both power and data )
I found using analog sensors to take several readings, then average those. Relying on just ONE reading can be fatal in any control application.Say an EMI spike hits the sensor's lead to the ADC... hmm PIC says it's 500* now !
Olympic averaging is nice. Take 10 readings, toss high and low, average the remaining 8.vert fast for PIC to divide by 8 !! You can (should) add a small cap to the analog line as a 'hardware' filter, helps smooth the readings as temperature is slow response.
The DS18B20 devices are nice,only need 2 wire ( I/O pin and gnd) and several can be put in parallel, though I often dedicate one I/O pin per devices,that way any problems in wiring doesn't take out all of the sensors. There is a 'trick' to find faults when using 2 or more on one wire though. |
|
 |
Ttelmah
Joined: 11 Mar 2010 Posts: 19765
|
|
Posted: Sat Mar 22, 2025 7:27 am |
|
|
Have to agree wholeheartedly. We use these in a lot of locations, and
with a proper external 2.048V reference, it becomes worth having fractional
degrees. For +ve only, gives the same 10mV/degree, but without the
500mV offset. You can sense -ve temperatures but then have to add an
external -ve source, and add an offset to the voltage fed to the ADC.
With this reference you get 5 counts per degree. Really simple.  |
|
 |
djsb
Joined: 29 Jan 2011 Posts: 49
|
|
Posted: Sat Mar 22, 2025 11:27 am |
|
|
Thanks. I'll do further research into these options and pass on your recommendations. |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|