Shop OBEX P1 Docs P2 Docs Learn Events
HS1011 Humidity Sensor — Parallax Forums

HS1011 Humidity Sensor

Matthew BurmeisterMatthew Burmeister Posts: 49
edited 2009-05-08 04:19 in Propeller 1
i have been working on the HS1011 for a couple of hours, but i haven't have any success. i get results from 9 to 256. (i used a byte instead of a word to limit it from going above 256). Maybe it's my code or wiring.


con
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000

RHconstant = 12169

var
long returnlong
long humsen
byte humidity
pub main
tv.start(12)
repeat

  clk.MS(1000)
  tv.out($00)
  tv.str(string("Propeller Weather System"))
  tv.out($0d)
  tv.str(string("Humidity: "))
  rc.rctime(16,1,@humsen)
  humidity := (humsen - RHconstant) / 24
  TV.Str(Num.ToStr(humidity, Num#DEC))




If it is my code, any fixes or does anyone have a driver for it?

downsized_0507091921a.jpg

If it's wiring, any suggestions?
512 x 384 - 32K

Comments

  • CassLanCassLan Posts: 586
    edited 2009-05-08 03:58
    Does it change capacitance based on humidity? Because you need a resistance and a capacitace for an rc time measurement.

    Also it seems like the black wire, both leads of the resistor and one end of the sensor are all touching, I'm sure this is not what you want.

    Rick

    Post Edited (CassLan) : 5/8/2009 4:09:25 AM GMT
  • Matthew BurmeisterMatthew Burmeister Posts: 49
    edited 2009-05-08 04:06
    I'm not sure if it does change capacitance when humidity changes. It fluctuates to much to tell.
  • CassLanCassLan Posts: 586
    edited 2009-05-08 04:09
    not sure if you caught my edit above Matthew, try moving one end of the resistor and the black wire over one row in the breadboard.

    Rick
  • Matthew BurmeisterMatthew Burmeister Posts: 49
    edited 2009-05-08 04:19
    Same Result. I think it's a programming error?
Sign In or Register to comment.