Measuring temperature with a PIC


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425

    Default Measuring temperature with a PIC

    I've read many posts on measuring temperature. The problem is, it seems like there are so many choices. I need to measure temperature from 50F to 150F. It doesn't have to be that accurate, maybe within two degrees but not more than that.

    Can I use a PIC with the ADCIN command and a NTC thermistor? Is there something more accurate that is just as cheap? I can use any kind of PIC to do this.

  2. #2
    Join Date
    Nov 2009
    Location
    London
    Posts
    251


    Did you find this post helpful? Yes | No

    Default Re: Measuring temperature with a PIC

    Any PIC with an ADC should do the job. Just configure any 1 analog PIN to accept the reading, this PIN should be configured as an input pin and also as an analog pin by setting the correct TRIS / ANSEL register. You can also use readily available components like MCP3202 which has a good 12 bit resolution and then use Shiftin/shiftout commands to get data in/out of them.

  3. #3
    Join Date
    Jul 2011
    Posts
    35


    Did you find this post helpful? Yes | No

    Default Re: Measuring temperature with a PIC

    I would recommend the DS1820. There are many variations of this part, and any difference in the part number requires slightly different software, so watch that, but it's quick and fairly easy.

  4. #4
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Re: Measuring temperature with a PIC

    http://www.picbasic.co.uk/forum/cont...r-nine-of-them

    Here is an article on using the DS18B20 sensor... you can find them on Ebay for around 10/$10 or so.
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

  5. #5
    Join Date
    Jan 2011
    Location
    Sydney, Australia
    Posts
    166


    Did you find this post helpful? Yes | No

    Default Re: Measuring temperature with a PIC

    I find the LM35DZ an excellent temperature sensor (Celcius) and only cost a couple of dollars here in Australia.

    http://au.element14.com/national-sem...-92/dp/9488200

    I have not interfaced one with a PIC but have played with them on an analogue system with no problems.

    Cheers
    Barry
    VK2XBP

  6. #6
    Join Date
    Apr 2007
    Location
    Pennsylvania, USA
    Posts
    158


    Did you find this post helpful? Yes | No

    Default Re: Measuring temperature with a PIC

    I like the LM34DZ (same as above but calibrated in Fahrenheit. Cost $2.00-$2.50 available from mouser. Easy to use with a PIC and there is plenty of code floating around the forums to use.

    http://www.mouser.com/ProductDetail/...eSEq67kjn80%3d
    Shawn

  7. #7
    Join Date
    Jul 2003
    Location
    USA - Arizona
    Posts
    156


    Did you find this post helpful? Yes | No

    Default Re: Measuring temperature with a PIC

    LM35 or LM34 - nice and easy; minimal math on PIC to translate voltage to temperature.

    DS18B20 - simple digital interface; almost no math at all on the PIC

    Either choice should suffice: LM3x if you want to use analog input into PIC's ADC, DS18xx if you want to use digital interface.

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts