Shop OBEX P1 Docs P2 Docs Learn Events
HS1101 Humidity sensor calibration — Parallax Forums

HS1101 Humidity sensor calibration

lfreezelfreeze Posts: 174
edited 2012-05-09 06:49 in Accessories
HUMIDITY HS1101 4 30 2012.spinI have been testing the HS1101 humidity sensor. I am getting results that seem reasonable, but I am not sure
if I have adjusted the math correctly. Has anyone got This sensor to work correctly with the propeller? If you have
please share the program, The sensor is reading between 38 and 45% humidity.I have
read most of the previous posts on this subject and this seems to be a common issue. I have attached the program I have been using
Thanks for any help you may offer
Larry


Sorry I can't seem to attach code correctly, here is the program

CON
_clkmode = xtal1 + pll16x ' use crystal x 16
_xinfreq = 5_000_000
OBJ
ser : "FullDuplexSerial"

PUB main | humidity
ser.start(31, 30, 0, 4800)
ctra[30..26] := %01000
ctra[5..0] := 2 '11
frqa := 1

repeat
dira[2] := outa[2] := 1
waitcnt(clkfreq/100_000 + cnt)
phsa~
dira[2]~
waitcnt(clkfreq + cnt)

humidity := (phsa - 12169)/3400 #> 0

ser.tx(13)
ser.str(String(" HUMIDITY = "))
ser.dec(humidity)
ser.str(string("%"))
waitcnt(clkfreq/2 + cnt)

Comments

  • kwinnkwinn Posts: 8,697
    edited 2012-05-07 16:07
    Calibrating humidity sensors is not easy. The simplest method to verify the sensor and software is working properly is to compare it to one that is calibrated.
  • lfreezelfreeze Posts: 174
    edited 2012-05-09 06:49
    Thanks for the response, I have ordered the sensirion module to use as benchmark for the correct humidity value. I will use this to modify the
    math in the hs1101 program. I'm not sure if this is the best approach, I have set up one hs1101 with a stamp and the program provided by parallax.
    I have set up a second hs1101 with a propeller and used the rcdecay counter program. I have tried many many variations of the propeller math but cannot
    get a valid numidity number that will track with changes in the humidity.

    Larry
Sign In or Register to comment.