Temperature reading into AVR

Discussion in 'Embedded Systems and Microcontrollers' started by Konstabel, Jan 31, 2008.

  1. Konstabel

    Thread Starter Active Member

    Jan 31, 2008
    52
    0
    Hi!

    I was wondering if anyone has ever tried connecting a thermocouple to a micro prosessor. Can this be done directly to one of the A/D ports, or is there some sort of signal amplification or something else necessary?

    Thanks
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    As the signal level out of a thermocouple is generally in the millivolt range, some amplification is necessary. If the A to D has a 10 volt range and has 10 bits resolution, then the LSB will encompass the entire range of the unamplified thermocouple output. The conventional formula is to adjust the gain so the maximum output is just equal to the maximum voltage the A to D input can handle
     
  3. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    If convenience and minimal external circuitry is beneficial to your project, you may derive a bit of both if you consider using a 1-wire DS18B20 temperature IC. You have not outlined the accuracy in temperature that you are needing to achieve so only you can assess the suitability of this device to your solution.

    I have interfaced this device to an Atmega2313 and it worked quite well. The 1-wire interface only ties up one IO line so it has minimal impact on your available IO resources.

    Be sure to provide your ATMEGA88 (uC assumption based on one of your other threads) design with an ISP programming port in mind. You will not regret it.

    hgmjr
     
  4. Konstabel

    Thread Starter Active Member

    Jan 31, 2008
    52
    0
    Hi HGMJR,

    Yes I will be using the ATMega88. And yes I am designing with an ISP port in mind (in circuit programming?).

    I need to measure the temperature of a bucket of water, and I don't need anything more than ,5degree accuracy.
     
  5. chand1

    New Member

    May 22, 2007
    3
    0
    You have to amplify the thermocouple signal using an external OPAMP, to get the sutable signal level.
    Also you have to use cold junction compensation circuit ( because thermocouple always gives the voltage proportional to the temp between the tip of the sensor and the abolute zero deg).
     
  6. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Application note AVR318 describes the 1-wire interface.

    You indicated you needed 0.5 degree accuracy. Unfortunately, the DS18B20 only provides you with an accuracy of +/- 0.5 degrees.

    You would also need to take measures to hermetically seal the sensor since you require the sensor to be submerged.

    hgmjr
     
Loading...