Forum Index
Sensirion SHT71 Code

 
Author Message
dkinzer
Site Admin


Joined: 03 Sep 2005
Location: Portland, OR

Posted: 25 July 2006, 22:26 PM    Post subject: Sensirion SHT71 Code

The attached file contains code to interface with the SHT71. It may also work with the SHT11 and other similar devices.

[Edit] The .zip file has been updated with source code that includes the dew point calculation code and a project file that can be used to build a stand alone test application. Also, subsequent to the original posting, it has been confirmed that this code works with the SHT11.



sensirion71.zip
 Description:
SHT71 code

Download
 Filename:  sensirion71.zip
 Filesize:  2.47 KB
 Downloaded:  1612 Time(s)



Last edited by dkinzer on 27 July 2006, 15:39 PM; edited 1 time in total
Back to top
zbasicandy



Joined: 26 Jan 2006

Posted: 26 July 2006, 12:56 PM    Post subject: SHT1x

Here is the dew point calculation PDF from the manufacturer.

The data I/O pin should have a 4.7K pullup along with a series "current limiting resistor 330 ohm / 1 K.

In case you cannot get a reading a recommended 4.7K pulldown should be on the clock pin.



Dewpoint_calculation_E_C1.pdf
 Description:
Dewpoint calculation

Download
 Filename:  Dewpoint_calculation_E_C1.pdf
 Filesize:  148 KB
 Downloaded:  1586 Time(s)

Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Location: Portland, OR

Posted: 26 July 2006, 15:18 PM    Post subject:

Thanks. I probably should have included that calculation. Here is a function that implements their calculation that can be added to the module.

Code:
'----------------------------------------------------------------------
'
'' SHT_DewPoint
'
' Calculate the dew point given the temperature (in Celsius) and
' relative humidity.
'
Public Function SHT_DewPoint(ByVal T As Single, ByVal RH as Single) as Single
   Dim H as Single

   H = ((log10(RH) -  2.0) / 0.4343) + (17.62 * T / (T + 243.12))
   SHT_DewPoint = 243.12 * H / (17.62 - H)
End Function
Back to top
zbasicandy



Joined: 26 Jan 2006

Posted: 26 July 2006, 15:39 PM    Post subject: SHT71

The SHT11 (as oppose to the SHT71) can be protected by a filter "SF1" from supplier www.Newark.com.

Quote:
The SF1 filter cap provides IP67 protection against water, dust and other contaminants for the humidity and temperature sensors SHT10, SHT11 and SHT15. It is a low cost part and very easy to use. The filter cap consists of a single piece of polypropylene including a filter membrane. It fits the outer dimensions of the SHT1x sensors and allows for compact system design. It also serves as an adaptor for mounting the sensor directly into the wall of a housing. Using a sealing ring, this results in a waterproof mounting solution.


If you buy the 8 pin dip mount SHT11 with internal pullup and current limit from www.Parallax.com for $30 you cannot use this filter cap.
Save some $ money and buy a SHT11 chip from www.newark.com for ~$10 cheaper and add your own resistors. (Precision wiring/soldering is needed)

Very Happy Very Happy Very Happy
Back to top
zbasicandy



Joined: 26 Jan 2006

Posted: 27 July 2006, 13:49 PM    Post subject: SHT11

The above algorithm works fine on our ZX-40 microcontrollers using the SHT11. No changes were made to the "code module" ... except for the pin numbers. Smile Smile Smile
Back to top
Display posts from previous:   
Page 1 of 1

 



ZBasic Microcontrollers Home
All content Copyright © 2005, 2006, 2007, 2008 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group