SHT_75 with picbasic pro


Closed Thread
Results 1 to 20 of 20

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Here is some code for the SHT11 for calculating dewpoint. I have not compared datasheets to know how similar (or not) they are. But this may help:

    http://www.picbasic.co.uk/forum/show...=3851#post3851

    That is quite the equation! From NavMicroSystems post above:
    Code:
    '** Dewpoint Calculation
        ' See: SENSIRION Application Note "Dewpoint Calculation"
        ' logEW = (0.66077+7.5*T/(237.3+T)+(log(RH)-2)
          ' DP = ((0.66077-logEW)*237.3)/(logEW-8.16077)
    
    DewPoint:
      
      TempDP=Temp/10
      logEW=6608
      sign=TempDP.bit15
      wz=ABS TempDP
      wx=(7*wz)+(wz/2)                              
      wy=2373+wz
      wj=wx/wy
       For ix=15 to 0 step -1
        wx=(wx//wy)<<1
        wz.bit0(ix)=wx/wy
       Next
      wx=(-sign^((wj*10000)+(wz**10000)))+sign        
      logEW=wx+logEW
      wx=RHtc
      wj=(NCD wx) - 1
      wx=wx<<(15-wj)
      wz=0
      For ix=14 to 0 step -1
        wy=wx**wx
        wz.bit0(ix)=wy.bit15
        bt=~wy.bit15
        wx=(wy<
       Next
      
      wx=((wj*4000)**49321)+(wz**6021)
      logEW=wx+logEW-30000            
      sign=logEW.bit15
      logEW=(-sign^(((ABS logEW)+2)/4))+sign
      wx=1652-logEW
      sign=~wx.bit15
      wx=ABS wx
      wy=20402-logEW
      wj=wx/wy
      
       For ix=15 to 0 step -1
        wx=(wx//wy)<<1
        wz.bit0(ix)=wx/wy
       Next
      
      DP=((23730**wz)+5)/10
      DP=(-sign^DP)+sign
    And attached is an application note for dew point calculations.
    Attached Images Attached Images
    Last edited by ScaleRobotics; - 29th November 2010 at 15:21.
    http://www.scalerobotics.com

  2. #2
    Join Date
    Jun 2008
    Location
    Varese , Italy
    Posts
    326


    Did you find this post helpful? Yes | No

    Default sht_75 with picbasic pro

    Hi scalerobotics,

    yes, the sht_11 has the same interface characteristics of the sht_75 so the code would be OK,

    Thanks for helping me,

    Regards,
    Ambrogio
    IW2FVO

    Quote Originally Posted by scalerobotics View Post
    Here is some code for the SHT11 for calculating dewpoint. I have not compared datasheets to know how similar (or not) they are. But this may help:

    http://www.picbasic.co.uk/forum/show...=3851#post3851

Members who have read this thread : 0

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