Shop OBEX P1 Docs P2 Docs Learn Events
Humidity chip — Parallax Forums

Humidity chip

ArchiverArchiver Posts: 46,084
edited 2004-01-05 21:03 in General Discussion
Hi,
I'm currently trying to use a stamp 2sx to get a reading for
temperature and humidity from a sensirion SHT71 for a college
project. I am just wondering if anyone would have any code or links
to code that would work for this. The code im using is from
www.emesystems.com but it is not working or else my chip is broken.
Any help would be greatly appreciated.
Yours Sincerely,
Fearghal O'Connor

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-12-02 20:19
    You are referring to:
    http://www.emesystems.com/OL2sht1x.htm
    Be sure you have the pullup resistor on the sda line. Also,
    Sensirion now recommends a pulldown resistor on the sck line, in
    order to avoid an occasional lockup when the power supply does not
    come up cleanly.

    There is also data on the Parallax web site:
    http://www.parallax.com/dl/src/prod/sht%20docs%20code.zip
    and Jon Williams' N&V article
    http://www.parallax.com/dl/docs/cols/nv/vol3/col/91.pdf
    http://www.parallax.com/dl/docs/cols/nv/vol3/code/91.BS2

    -- Tracy
    http://www.emesystems.com



    >Hi,
    > I'm currently trying to use a stamp 2sx to get a reading for
    >temperature and humidity from a sensirion SHT71 for a college
    >project. I am just wondering if anyone would have any code or links
    >to code that would work for this. The code im using is from
    >www.emesystems.com but it is not working or else my chip is broken.
    >Any help would be greatly appreciated.
    > Yours Sincerely,
    > Fearghal O'Connor
  • ArchiverArchiver Posts: 46,084
    edited 2003-12-02 20:50
    We have demo code (based on work by Tracy) for the SHT11 on our web
    site. You should be able to start with it and work forward.

    http://www.parallax.com/detail.asp?product_id=28018

    -- Jon Williams
    -- Applications Engineer, Parallax
    -- Dallas Office


    Original Message
    From: fearghaloconnor [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=kRhGxQG6qtG2E6DghgtlpzBHu_hfzvq6uyJpcoQWBR5U9QqP5hvu4KP_VePQgkKUahj__iklQ_pnGD7NMdAAtaY]fearghaloconnor@y...[/url
    Sent: Tuesday, December 02, 2003 1:45 PM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Humidity chip


    Hi,
    I'm currently trying to use a stamp 2sx to get a reading for
    temperature and humidity from a sensirion SHT71 for a college
    project. I am just wondering if anyone would have any code or links
    to code that would work for this. The code im using is from
    www.emesystems.com but it is not working or else my chip is broken.
    Any help would be greatly appreciated.
    Yours Sincerely,
    Fearghal O'Connor


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject
    and Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/




    This message has been scanned by WebShield. Please report SPAM to
    abuse@p....
  • ArchiverArchiver Posts: 46,084
    edited 2003-12-02 20:52
    Fearghal,

    The code on Tracy's site works for sure. I would triple check to make sure
    you have it hooked up correctly. Are you using the same pins as the site
    describes? If not you need to change the code in three places, if I remember
    correctly. What exactly is happening when you try to use the sensor?

    Jonathan

    www.madlabs.info

    Original Message
    From: "fearghaloconnor" <fearghaloconnor@y...>
    To: <basicstamps@yahoogroups.com>
    Sent: Tuesday, December 02, 2003 11:44 AM
    Subject: [noparse][[/noparse]basicstamps] Humidity chip


    > Hi,
    > I'm currently trying to use a stamp 2sx to get a reading for
    > temperature and humidity from a sensirion SHT71 for a college
    > project. I am just wondering if anyone would have any code or links
    > to code that would work for this. The code im using is from
    > www.emesystems.com but it is not working or else my chip is broken.
    > Any help would be greatly appreciated.
    > Yours Sincerely,
    > Fearghal O'Connor
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2004-01-05 17:01
    Dear Tracy,
    I posted a message on the basicstamp group page a
    number of weeks ago inquiring about youre code for the
    Sht 1x/7x on http://www.emesystems.com/OL2sht1x.htm. I
    still have one or two questions regarding your code.
    For reasons unknown, my pin 1 doesnt work so I need to
    use a different pin for the data line. Is there other
    places in the code that will need changing? Also there
    are two different diagrams on the page for the set up
    of the resistors connected, do I need the resistor in
    series on the p0 line, and do I need the capacitor
    between Vdd and Vss? Will the code work for both sht1x
    and sht7x? I look forward to hearing from you because
    this humidity sensor is causing me severe difficulty.
    Yours Sicerely,
    Fearghal O'Connor




    __________________________________
    Do you Yahoo!?
    Find out what made the Top Yahoo! Searches of 2003
    http://search.yahoo.com/top2003
  • ArchiverArchiver Posts: 46,084
    edited 2004-01-05 21:03
    > Dear Tracy,
    > I posted a message on the basicstamp group page a
    >number of weeks ago inquiring about youre code for the
    >Sht 1x/7x on http://www.emesystems.com/OL2sht1x.htm. I
    >still have one or two questions regarding your code.
    >For reasons unknown, my pin 1 doesnt work so I need to
    >use a different pin for the data line. Is there other
    >places in the code that will need changing? Also there
    >are two different diagrams on the page for the set up
    >of the resistors connected, do I need the resistor in
    >series on the p0 line, and do I need the capacitor
    >between Vdd and Vss? Will the code work for both sht1x
    >and sht7x? I look forward to hearing from you because
    >this humidity sensor is causing me severe difficulty.
    > Yours Sicerely,
    > Fearghal O'Connor


    You need to change two pin definitions in order to use p2 instead of p1:
    dta con 2 ' for SHIFT commands
    dtain var in2 ' as input for conversion-done flag


    I should update that page and program soon to PBASIC 2.5. Under
    PBASIC 2.5, the separate definitions become rolled into one,
    dta PIN 2

    As far as the schematic is concerned, you certainly need the pullup
    resistor to +5 volts. Also the resistor (200 or 330 ohms, not
    critical) in series in the dta line is necessary to avoid contention
    when both the Stamp and the chip are outputs at the same time. The
    resistor in series with the sck line is only for good measure.
    Sensirion now recommends a pulldown resistor (4.7 kohm or 10k, not
    critical) from the sck line to common. (Note pulldown, not pullup!).
    Without that resistor, in rare cases when the power comes up with
    noise, the interface will not initialize correctly. Don't forget the
    capacitor. Here it is, then:

    ' STAMP SENSIRION
    ' 330 ohm isolation, optional
    ' p0
    /\/\---o--pin 3 sck, clock
    ' ;---/\/\
    ' pull-down, optional
    ' | 4.7k
    ' Vss--o-o
    pin 1 common
    ' | 330 ohm isolation, required
    ' p1
    /\/\---o--pin 2 dta, data
    ' |
    ' === 0.1uf or larger
    ' |
    ' o---/\/\
    ' pull-up, required
    ' | 4.7k
    ' Vdd--o
    pin 4 +5 volts

    The program works for the sht1x and for the sht7x. Be careful, and
    observe that the '7x has a different pinout.

    -- Tracy
Sign In or Register to comment.