Microchip LM74 Temperature Sensor - Wrong Temp

Discussion in 'The Projects Forum' started by TimothyBlue, May 5, 2010.

  1. TimothyBlue

    Thread Starter Member

    Jan 4, 2009
    11
    0
    I am an amateur hobbyist so please bear with me if I ask something obvious or dumb.

    I am working with a Microchip TC74 digital thermal sensor. I am hooking this sensor directly to to a I2C bus on a Microchip PIC18F2550 microcontroller. The circuit is being powered by 5V from the USB port on my computer.

    The temperature I am reading from the sensor is very jittery. I am reading it 5 times per second and the temperature fluctuates by a few degrees Celsius during a 10 read cycle. I think that this is probably because the 5V power from the USB port is dirty. I looked at it on the scope and there is a lot of noise. I am going to order the 3.3V version of the sensor so I can regulate the 5V down and try to clean it up some with some filter caps.

    My other issue is that the temperature is being read about 8 degrees higher than it should be. I have put a couple of different thermometers in the room next to my sensor and it is always running hot. The data sheet for the TC74 says. "Output current should be minimized for best temperature accuracy. Power dissipation within the TC74 will
    cause self-heating and temperature drift error." I do not know how to limit the current since I am hooking it directly up to the PIC and I was hoping that someone could explain this to me.

    I am using this sensor to try and monitor the temperature in a room from my computer using USB. Maybe I am not even using the correct sensor. I want it to be digital because it seems easier to use, but I am wondering if anyone would have other sensor suggestions?

    Any help would be appreciated.

    TIA,
    Tim
     
  2. elementalrage

    Active Member

    Jul 30, 2009
    59
    3
    I would suggest posting your schematic. Sounds like you need a current limiting resistor in there.
     
  3. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Here is the datasheet for the TC74.
    http://ww1.microchip.com/downloads/en/devicedoc/21462c.pdf

    To limit current, you want to place a resistor between you power rail and Vcc.

    The TC74 wants an average of 200 uA to Vcc. The PIC can source 20mA, so it may be a good idea to use a resistor.

    Ive looked at app note TB050 on Microchips website, and they have them connected directly.

    As for the error, its odd. it is rated at 1 degree C per VOLT over max (6)
    and a total error of 3deg.

    Where did you purchase this part? An authorized dealer I hope?

    The only other thing may be you timing. But that shouldn't affect the temperature, only the communication over the I2C bus.

    App note TB050: Monitoring Multiple Temperature Nodes Using TC74 Thermal Sensors and a PIC16C505
    http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en011965
     
    TimothyBlue likes this.
  4. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    That might be interpreted as output current incurred by running the I2C interface (what other output is there?). You may see an improvement by reading the sensor once every 10 seconds, vice 10 reads/second. How much do you expect the temperature to vary in a given period?
     
    TimothyBlue likes this.
  5. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Well here is one problem. It can only do 8 a sec anyway.

    Try changing you sample speed as beenthere suggested. I would at least start a 8 samples a sec, if no good, try slower.

    [​IMG]
     
    • 74.png
      74.png
      File size:
      25.3 KB
      Views:
      131
  6. TimothyBlue

    Thread Starter Member

    Jan 4, 2009
    11
    0
    Thank you for all of your replies. After reading the data sheet some more I also saw that my sample rate may be too high, but I also read somewhere that if the new sample was not complete that it would just resend the old value. Not sure if this is true or not.

    Here is my circuit. I think it is correct. I had to create a new device in Eagle because I could not find the TC74 anywhere.

    ~Tim
     
  7. TimothyBlue

    Thread Starter Member

    Jan 4, 2009
    11
    0
    I purchased the part at Mouser and I have a few of them that all seem to act the same, so I don't think it is defective.
     
  8. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    I see you dont have a cap between Vcc and GND. Is that just kept off the schematic or is it NOT there?

    This device is VERY sensitive to capacitance, so I would decouple. as close to the IC as possible.

    You are doing it with the signal lines, but not the power.
     
    TimothyBlue likes this.
  9. TimothyBlue

    Thread Starter Member

    Jan 4, 2009
    11
    0
    retched,

    No, I do not have a decoupling cap at at the power inputs of the IC. Should it be 0.1uf like normal?
     
  10. elementalrage

    Active Member

    Jul 30, 2009
    59
    3
    That is correct.
     
  11. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Yes .1uF will be fine.

    That may be the whole problem. Im interested in hearing the result.
     
  12. TimothyBlue

    Thread Starter Member

    Jan 4, 2009
    11
    0
    Thank you for all of your help.

    I modified the circuit to have a current limiting resistor and a decoupling cap. I also slowed the poling rate to once every second. Now the temperature is stable and correct.

    Here is the new schematic.
     
  13. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Very good to hear.

    Now when you say "Is it hot in here?" You will know for sure. ;)
     
Loading...