Sensirion humidity sensor


Closed Thread
Results 1 to 17 of 17
  1. #1
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107

    Default Sensirion humidity sensor

    Is anyone willing to share the code to talk to a Sensirion SHTxx humidity/temp sensor?
    Charles Linquist

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Not sure if you mean other than what's here?

    http://www.picbasic.co.uk/forum/sear...&query="sht11"

    hth,
    DT

  3. #3
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    Darrel,

    Should have done a search first!

    Thanks!
    Charles Linquist

  4. #4


    Did you find this post helpful? Yes | No

    Default

    Charles,

    If your interested I have working code that will give you a 100th of a percent in RH and a 100th of a percent in temperature for the full range of the sensor in Celsius, Fahrenheit and Kelvin. I also have code for checking the CRC thanks to Tom Estes. NavMicroSystems works fine but doesn't appear to handle negative temperatures though. If you're interested let me know and I'll post it when I get back to the office.

  5. #5
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    I'm interested. I have enough to do withought debugging even more code. Anything you could send would be greatly appreciated. If you want to send off-forum, I'll send you a private post with info.
    Charles Linquist

  6. #6
    Join Date
    Jul 2006
    Posts
    11


    Did you find this post helpful? Yes | No

    Default

    Charles, you have perked my interest with you claims. I am definitely interested in hearing about your approach.
    Regards,

    Ryan O'Hara
    www.ohararp.com

  7. #7
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    I have made many claims, but not about the Sensirion! I think you are requesting the code that CocaColaKid is talking about.
    Charles Linquist

  8. #8


    Did you find this post helpful? Yes | No

    Default

    The code was too long to post so I just attached it in a TXT file instead. I also included the data information that corresponds to the data output from the sensor. I used this information to verify my code math was correct. Hope this helps you guys out. If you have any questions please feel free to ask.
    Attached Files Attached Files
    Last edited by CocaColaKid; - 14th January 2008 at 14:42.

  9. #9
    Join Date
    Feb 2008
    Posts
    2


    Did you find this post helpful? Yes | No

    Default Thank you

    Thank you CocaColaKid. Your code works fine. But it takes 3 seconds to refresh data. Is there a way to reduce this time to a second? (with pic16f628a)

  10. #10


    Did you find this post helpful? Yes | No

    Default

    3 seconds sounds like an awful long time. I seem to read my sensor and once a second or so as I recall. There are only minimal pauses in the code and those add about 48 ms total. If it's taking longer than that I have no idea why.

  11. #11
    Join Date
    Jan 2008
    Location
    Dublin, Ireland
    Posts
    33


    Did you find this post helpful? Yes | No

    Default Hey Cocacola Kid

    Thanks for posting this code, Im just playing around with it now trying to get it to work. Can you tell me what chip this code will run on as is? Ive tried compiling it with MicroCode but it is giving me errors, most likely because i may need to change the way the fuse config is written.

    Tony

  12. #12
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by tonyfelloni View Post
    Can you tell me what chip this code will run on as is?
    Says in the file it's for a 16F88.
    What's the problem with the fuses?

  13. #13
    Join Date
    Jan 2008
    Location
    Dublin, Ireland
    Posts
    33


    Did you find this post helpful? Yes | No

    Default

    Hi

    I think ive got most of the fuses converted so MCS can read them. The onlyone thats not working for me is the fuse for the Oscillator switchover. I have the following

    @ DEVICE IESO_OFF

    The code compiles fine with this but when i check the fuse settings in the programmer software I see that it is not setting this one. Do I have the define correct or is this just a glitch? It is showingas enabled with above code.

    Cheers

    Tony

  14. #14
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    @ DEVICE2 IESO_OFF

  15. #15
    Join Date
    Feb 2008
    Posts
    2


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by cheser View Post
    Thank you CocaColaKid. Your code works fine. But it takes 3 seconds to refresh data. Is there a way to reduce this time to a second? (with pic16f628a)
    I changed the "sleep 1" with "pause 1" in the code. It is realy fast now. ("sleep 1" is 1 second, "pause 1" is 1 ms.)

  16. #16
    Join Date
    Jan 2008
    Location
    Dublin, Ireland
    Posts
    33


    Did you find this post helpful? Yes | No

    Default

    Thanks Skimask for that, workin fine now.

    Cheser cheers for you reply also. I was looking at the SHT11 data sheet the other day and if I remember it mentioned limiting the amount of queries sent to it over a second to reduce the self heating effect of the associated current.

    Also in the code it says that PORTB.6 is the DS18B20 data line. This is a different type of temp sensor altogether and im a bit baffled as to why its there and I have no idea what the temp slider on PORTB.7 is used for. The rest i think i can figure out. Im going to set it all up in the next week and see how it goes.

    Oh and a tip for anyone who is interested, the SHT11 Sensirion sensor is currently on sale on ebay.co.uk for £4 a pop and £.90 Postage. Compared to almost £20 with farnell.

    Best Regards

    Tony

  17. #17


    Did you find this post helpful? Yes | No

    Default

    The temp slider and the DS18B20 are components that I also use with this particular project. This is just the reading part for the SHT71, I just never took the other unused declarations out of code that's all.

Similar Threads

  1. Need a cheap touch sensor idea.. here it is
    By mister_e in forum Code Examples
    Replies: 20
    Last Post: - 16th April 2016, 22:42
  2. Replies: 10
    Last Post: - 17th February 2012, 07:19
  3. PICBASIC PRO-coding for wireless sensor node
    By syazila in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 10th February 2009, 00:05
  4. RH/Temp Sensor Example Code
    By Bruce in forum Code Examples
    Replies: 7
    Last Post: - 15th June 2006, 15:55
  5. Device Compatibility: Sensirion Parallax sensor
    By embdfreak in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th April 2006, 18:15

Members who have read this thread : 1

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