Shop OBEX P1 Docs P2 Docs Learn Events
Question about ds1620 temperature IC — Parallax Forums

Question about ds1620 temperature IC

russ christensenruss christensen Posts: 84
edited 2009-03-30 21:15 in Propeller 1
Hi all, I have a DS1620 temperature chip and it seems to be working fine except for one little thing. The temperature does not seem to be accurate at all. As of me writing this, I have the ds1620 on next to me, has been running for 5 minutes, and has displayed the temp of 74 degree's F. About 6 inches from it, i have a weather station that my dad has, and it is showing the indoor temp at 68 degree's F. this is quite a delta. Honestly i have no idea if the weather station is accurate, but the thermostat for the house is set at 68 degree's, and it does not feel as warm as 74 in here. Just wondering if anybody knows if there is something else i'm missing. Any suggestions would be greatly appreciated. It may be noted that i'm using the ds1620.spin driver to get the temp using the method getttempf and i am outputing by serial to a vfd.

Russ

Comments

  • rjo_rjo_ Posts: 1,825
    edited 2009-02-07 05:26
    Russ,

    You are correct. I had the same experience and I suspected that the chip was warmer than the room. I have all three solutions... the lm34, the ds1620 and the sensirion sht117... which is a bad designation for a great device. I also suspected that maybe I needed to regulate the current going through the ds1620. I actually don't know the answer to your question. But I'm sure lots of guys here do[noparse]:)[/noparse]

    I hooked up the sensirion unit in about 5 minutes on my way out of town... because for some reason the last time I tried it... it didn't work...and that bothered me so much I couldn't leave the house without an answer. Thankfully, this time it worked like a charm. The SHT is so sensitive that you can hold your hand a few inches away from it and see the temperature change.

    I like the 1620 because it has some nifty signals coming out of it. And while you are talking about it let me throw in another question... is there any way to permanently assign the limiting values so that once you have set the upper and lower thresholds, you can disconnect the Prop and use the signals coming out of the 1620 to make a free standing thermostat?

    The next step for me is to order an infrared thermometer and point it at the 1620 and see what i get.

    Great question.

    Rich
  • russ christensenruss christensen Posts: 84
    edited 2009-02-07 05:32
    according to the spec sheet, if you assign the high/low temp, its stored in nvram, therefore can operate as a thermostat without needing the prop. take a look at the spec sheet it has all the details. and as for the chip being warmer than the room, i think that is accurate, according to the appkit manual, the chip should be wired with a .1 uF capacitor on the 5v in, and 1k resister on the data line. the way i've seen other people set it up is with 1k resisters on all the lines going to the prop so thats how i have it wired right now. one issue i've noticed is that if i use the capacitor, the chip won't even start when i call the method. if i don't use the capacitor, it starts just fine but gives me a temp reading 10 degree's higher than room temp. i know its getting a signal from the chip cause if i put my finger on it for a sec it, the temp will indeed go up.
  • rjo_rjo_ Posts: 1,825
    edited 2009-02-07 05:39
    I wasn't actually trying to pretend that I knew what I was talking about[noparse]:)[/noparse]
    I did look at the spec sheet ... gave me a headache and thats about it[noparse]:)[/noparse]
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2009-02-07 11:49
    I have used the fairchild fm75 and find it quite accurate. It may only be available in surface mount though.

    Have you checked out out if the datasheet says anything about self heating? There may be something you can do about it.
  • cessnapilotcessnapilot Posts: 182
    edited 2009-02-07 14:12
    Hi Russ,

    The DS1620 is just great to measure and regulate temperatures alone or in thermostat mode, too. However, the temperature it actually measures is the temperature inside of of the chip itself. You have to bring it into good thermal contact with the measured object. To measure the temperature of a room you might put some gray painted or eloxated metal sheet onto the DS1620 to distribute the heat generated by the chip itself and to get heat sensitive contact with the air of the room. (That metal sheet can nicely cover the electronics and can give place to an LCD display, as well.)
  • russ christensenruss christensen Posts: 84
    edited 2009-02-07 15:54
    so if i want ambient temperature in the area of the robot, i should have gotten something with an external temperature probe. Thanks for the information, they aren't too expensive i'll probably just order a different sensor and use this for something else that may come up.
  • rjo_rjo_ Posts: 1,825
    edited 2009-02-07 16:20
    Russ... I believe that it is very likely that the 1620 output temperature and the room temperature are related in a way that will get you where you want to go... with the difference being a function of the ambient temperature, which you could probably adjust for by simple iteration. I think the reason this isn't figured into the final documentation is that the actual values probably somewhat depend upon the final physical implementation. The reason you might want to stick with the 1620 is that eventually you get two extra pins and potentially you save programming space.

    BUT the sensirion unit appears accurate to me... eyeballing the output and comparing it to a RadioShack radio-controlled clock/thermometer... not exactly a gold standard or rigorous methodology[noparse]:)[/noparse]

    Even if the output of the sensirion is off slightly... the resolution is wonderful. So, exquisitely small temperature changes over short periods of time become useful.

    Also... if you think of temperature change rather than absolute values then the problem mostly goes away for both units.
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2009-02-08 05:21
    Here is some information I found relating to the DS1620 and internal heating...
    ·
    According to the information on this page under "Self-Heating Calculations" ...
    ·
    http://www.maxim-ic.com/appnotes.cfm/an_pk/3930
    ·
    ... The "Theta JA" for an 8-pin DIP .300 is 110 causing a resulting temperature rise of 0.957 Deg C.· That's about 1.723 Deg F.· But the document also says that this would be under the worst-case scenario.···
    ·
    Based on the data, it looks like the best package for dissipating any internal heat produced by the temperature sensor is going to be in an 8-pin SO .208 with a resulting temperature rise of 0.241 Deg C or about 0.434 Deg F.
    ·
    This difference doesn't seem like much, but from what I gather, MUCH of the temperature increase would be caused by subtle differences of even how the package was layed out on a PCB board.· You might even be able to lower some of the over all·effects by limiting the current into the DS1620s power supply to begin with.







    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • rjo_rjo_ Posts: 1,825
    edited 2009-02-08 05:57
    Beau... I set it up on the education kit and just took the 5V coming out of the first regulator... I didn't use a capacitor of any kind... didn't think I had to... there was a big one sitting right there[noparse]:)[/noparse]
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2009-02-08 06:10
    rjo_,

    "I didn't use a capacitor of any kind... didn't think I had to... there was a big one sitting right there" - I'm not sure that you do need an additional cap, since as you say, there is one already there.

    What I was referring to was regulating the current in addition to the voltage entering the DS1620, but really, there is so little of a change there that that wouldn't make much of a difference. I might think that the most effective positioning of the DS1620 would be to mount it in a way that there is adequate ambient air flow across the bottom of the IC as well as across the top of the IC. Keep in mind this is pure speculation and I have never tried it one way verses the other for any kind of comparison to see if there is an actual difference in doing it this way.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • JerryNJerryN Posts: 32
    edited 2009-02-08 22:45
    I have noticed a change of a few degrees F with warmup with the DS1620. This was with a 5 volt supply and I haven't tried 3.3v but I would think the internal heating would be considerably less at 3.3 v. Has anyone else tried the DS1620 at 3.3 v?

    My intended application is monitoring the supply and return air temperatures in my heating system and I would suspect that with normal heating/cooling system airflow the effects of internal heating in the DS1620 would be minimized.

    Jerry
  • OLUWASEYI JAMESOLUWASEYI JAMES Posts: 2
    edited 2009-02-08 22:56
    Is the PIR sensor capable of calculating the distance of objects detected. if so, can the calculated distance be displayed on a LCD screen?
  • russ christensenruss christensen Posts: 84
    edited 2009-02-09 04:35
    jerry, i don't know what was up with mine, but i was using 3.3v supply and it was showing an increase in almost 10 degree's. basically house was 68 degree's, readout in F was 78 degree's. and if i touched the chip it did seem to be hotter than the room. this was using the ppdb with the chip right on the board.
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2009-02-09 04:53
    russ christensen,

    Just curious... were you reading the sensor in High Resolution mode or in Standard Mode? The reason I ask, is that when reading in High Resolution mode, if you are not reading in One-Shot mode, then the values can be invalid.

    Can you post the code that you are using, and a schematic? Perhaps even a picture?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • JerryNJerryN Posts: 32
    edited 2009-02-09 04:54
    Russ - My test setup has the 8 pin DIP DS1620 on a solderless breadboard, running at 5 volts. Actually it is connected to a SX28, not a propeller. I haven't run detailed performance tests but it appears that the temperature increases 3 to 4 degrees F (I am using the DS1620's .5 deg C bit in the conversion) in a few minutes. The chip doesn't seem warm to the touch although the displayed temperature naturally rises if I keep my finger in place for a while. I guess I had better do some serious testing - I have a couple of old but pretty good chemical process thermometers I can use for comparison.

    How often are you sampling the DS1620? I am currently sampling at 2 samples per second and the clock signal is active only when the DS1620 is being read or written.


    Jerry
  • russ christensenruss christensen Posts: 84
    edited 2009-02-09 13:09
    beau: I've tried to figure out which mode i was running in. I'm just using the ds1620 module on the obex and using the gettempf function. then at first i was outputting to a debug terminal, then i also had it outputting to my vfd when it was working. I haven't had a chance to remake the circuit and send a picture, i found my camera so on my break at school i'll put everything back together so i can send you some pics.

    jerry: i'm sampling at 1 second intervals because thats what the datasheet of the thermometer says it updates at. if you sample more than that your just getting the same temp from what i read.
  • russ christensenruss christensen Posts: 84
    edited 2009-02-09 14:47
    as requested, here are the pics and code that i'm attempting to do this with. I'm guessing i'm missing something fundamental, but i'm lost. Any help would be appreciated. In order to not take up too much space, these pics also include the vfd i am having trouble with that was in my other post.
    3264 x 2448 - 2M
    2854 x 2220 - 1M
  • rjo_rjo_ Posts: 1,825
    edited 2009-02-09 15:37
    Russ...

    I'm going to set up a side by side comparison of the 1620 and the Sensirion unit. Have limited time, so it will probably take me a day or two to get some results.

    Rich
  • rjo_rjo_ Posts: 1,825
    edited 2009-02-09 16:22
    oops... I now get 83.4f out of the 1620 and 83.21f out of the sensirion...and my radioshack radio/clock/thermometer over by the window in the corner is within two degrees[noparse]:)[/noparse]

    The only thing I did different (as I recall) is that this time I hooked the 1620 up to the 3.3 volts...and I left the signal pins on the right side of the chip floating; whereas, before I had them hooked up... probably not the issue here. The issue would seem to be the 5 volts vs the 3.3 volts[noparse]:)[/noparse]

    And on my breadboard I am now using a power supply from SpinStudio... which has everything soldered as opposed to trusting the stability of jumpers...
  • rjo_rjo_ Posts: 1,825
    edited 2009-02-09 16:33
    Russ... by the way, I had the exact same experience with the PING module... a while back, I hooked it up and the numbers were all over the map. Tried it again after putting my new power supply together and now it works like a charm...

    My old setup measured out ok... but obviously, something was amiss.
  • JerryNJerryN Posts: 32
    edited 2009-02-09 16:40
    Russ - I now have some data on my DS1620 running at 5 volts and connected to an SX28. My reference is a Weston photographic process dial thermometer laying right next to the DS1620. The Weston stabilized at 67F and at initial turnon the reading from the DS1620 was 67.1F (Note that after conversion from C to F the minimum step size is 0.9F). After 2 minutes the DS1620 reading was 68F. After about 5 minutes the furnace came on and the Weston went up to 68. The DS1620 reading went up to 68.9. At 8 minutes the Weston Dial thermometer was reading 69 and when I quit watching at 10 minutes the DS1620 was still indicating 68.9.

    I have some more DS1620s but I haven't tried any of them yet. I haven't connected one to a propeller breadboard yet either.

    I don't know if any of this helps or not.

    Jerry
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2009-02-09 16:47
    russ christensen,

    I wonder if this might be a subtle software issue.

    The code in the OBEX for the DS1620 has a ShiftIO routine that basically toggles the clock from what ever state it starts out·in, and states that "the user must preset the clock line to the idle state"... looking at the DS1620 datasheet, the idle clock state appears to be HIGH, however I don't see that the clock line is being preset with the code from the OBEX, which would mean that the "default" idle state would be LOW.· In most cases this would not be an issue, but further looking at the DS1620 datasheet indicates that the data is valid on the rising clock edge.· There is timing padding within the ShiftIO routine that takes care of the leading clock edge which would be from LOW to HIGH if the clock line idle state was LOW, but not on the trailing clock edge of HIGH to LOW.· This might result in bit errors when reading the data.

    In other words...· The DS1620 basically expects a HIGH-LOW-HIGH clock transition with data being valid on the LOW to HIGH transition... with the current clock pin initial idle LOW state, the DS1620 is "sees" a LOW-HIGH-LOW for the clock transition.· As far as the DS1620 is concerned the data is still valid from LOW to HIGH, but it may be too early to read the data·resulting in possible bit errors.

    I haven't tried this, but the simple fix to initiate the idle clock state would be something like this in the DS1620 object.

    [b]PUB[/b] start(data_pin, clock_pin, rst_pin)
    
    '' Initializes DS1620 for free-run with host CPU 
    
      dpin := data_pin
      cpin := clock_pin
      rst := rst_pin
    
      high(cpin)            '<--- [b]Add[/b] this line to preset clock line
    
      high(rst)                                             ' activate sensor
      io.shiftout(dpin, cpin, io#LsbFirst, WrCfg, 8)        ' write to config register
      io.shiftout(dpin, cpin, io#LsbFirst, %10, 8)          ' set for CPU, free-run
      low(rst)                                              ' deactivate
      delay.pause1ms(10)                                    ' allow EE write
      high(rst)                                             ' reactivate
      io.shiftout(dpin, cpin, io#LsbFirst, StartC, 8)       ' start conversions  
      low(rst)
      started~~
    
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 2/9/2009 5:34:27 PM GMT
  • russ christensenruss christensen Posts: 84
    edited 2009-02-09 17:14
    when i get home from school i'll try that and post any differences, i'll try it both ways and record the values for maybe 10 iterations. we'll see what happens. any chance by looking at that code you can notice if i'm doing something wrong with the display? it still doesn't work, but it seems to be initializing ok cause the if statement is working and i'm getting output to the debug terminal. thanks for the help.
  • rjo_rjo_ Posts: 1,825
    edited 2009-02-09 17:38
    Russ,



    here is a rip/mod of the OBEX object...it is a lot easier to understand, but·it uses video on·pin12·rather than VGA and uses pins 8,9,10 for the 1620

    It is a lot simpler and will let you test your hardware· setup.· To get actual temperatire values,·you divide the displayed value·by 100.

    Vdd is 3.3V

    Vss is ground



    Rich
  • rjo_rjo_ Posts: 1,825
    edited 2009-02-09 17:45
    Make sure you have enough umph coming out of your walwart[noparse]:)[/noparse]
  • chrome sitarchrome sitar Posts: 8
    edited 2009-03-30 21:15
    I've been getting random miscommunication out of my ds1620 for three months now. Two or three good readings followed by either "0" or nubers in the 700's range. Changing my supply to 3V solved that problem completely. Thanks for the thread everybody.
Sign In or Register to comment.