Parallax HS1101 Humidity Sensor
xanadu
Posts: 3,347
I'm using this sensor and the demo come it comes with on a *semi-new BS2 USB HW board. The sensor has been in storage for over a year but was working last time I used it. On both the debug terminal and LCD it is outputting a four digit percentage, instead of a two digit percentage. I will probably just order another sensor, but in the meantime I was wondering if there was a way to check the sensor I have, possibly resistance across the two pins?
*The new BS2 was purchased locally and when I got home I noticed it had already been used and repacked, but I ran a bunch of similar math functions on it and they came out okay.
I also omitted the 220 ohm resistor in the PDF because the HW board has them built in.
Thanks.
*The new BS2 was purchased locally and when I got home I noticed it had already been used and repacked, but I ran a bunch of similar math functions on it and they came out okay.
I also omitted the 220 ohm resistor in the PDF because the HW board has them built in.
Thanks.

Comments
I measured it at .244nf but I don't think my multimeter is accurate.
I c&v the code but there was one funny character so I replaced all of the characters and numbers in the RCTIME section just to be sure.
I also tried a different pin on the HW board.
I think I'm going to order another sensor, I need some other small parts anyway. I don't think I could have missed anything else at this point, double checked everything.
' {$STAMP BS2} ' {$PBASIC 2.5} time VAR Word humidity VAR Word RHconstant CON 12169 ' Relative Humidity Constant * 10 DO HIGH 7 PAUSE 1 RCTIME 7, 1, time time = time * 10 humidity = (time - RHconstant) / 24 ' Debug Display: DEBUG HOME, DEC humidity PAUSE 100 LOOP' What's a Microcontroller - PolledRcTimer.bs2 ' Reaction timer program modified to track an RC-time voltage decay. ' {$STAMP BS2} ' {$PBASIC 2.5} timeCounter VAR Word counter VAR Nib DEBUG CLS HIGH 7 DEBUG "Capacitor Charging...", CR FOR counter = 5 TO 0 PAUSE 1000 DEBUG DEC2 counter, CR, CRSRUP NEXT DEBUG CR, CR, "Measure decay time now!", CR, CR INPUT 7 DO PAUSE 100 timeCounter = timeCounter + 1 DEBUG ? IN7 DEBUG DEC5 timeCounter, CR, CRSRUP, CRSRUP LOOP UNTIL IN7 = 0 DEBUG CR, CR, CR, "The RC decay time was ", DEC timeCounter, CR, "tenths of a second.", CR, CR END' {$STAMP BS2} ' {$PBASIC 2.5} time VAR Word humidity VAR Word RHconstant CON 12169 ' Relative Humidity Constant * 10 DO HIGH 7 PAUSE 1 RCTIME 7, 1, time time = time * 10 humidity = (time - RHconstant) / 24 ' Debug Display: DEBUG HOME, DEC humidity, " " PAUSE 100 LOOPI just noticed, I get really strange results if I touch the wire going into either of the headers. If I wiggle them just right I think that it works correctly...
The measurement is matching my humidity meter now
I spent some more time on this and wanted to follow up that the BOE socket(s) were okay after all. I think touching the wires might have added the needed capacitance to get a reading. I'm going to try a new sensor now.
I used this sensor a couple years back on a BS2 BOE board and had no problems with it. I am not sure how that can make a difference, but it seems to be the only variable left.
Since the HW board already has 220 ohm resistors on the pins I left that off, otherwise I'm following the schematic exactly. I have tried a few different 10 meg resistors.
Any other ideas?
I think that the capacitive cell may need continuous calibration over time. Even though I show a strange reading, if I adjust the code enough I can see that the sensor still works to some degree. It just doesn't seem to work inside of the parameters it needs to.
I had emailed your support on Friday because I needed to do some humidity comparisons over the weekend, sorry if that counts as a double post or harassment I just needed this working on Saturday and thought maybe someone would be there. I was able to get it close enough to show the humidity going up and down which is all I really needed it for. Nick wrote back and said that he was looking into it.
I'll probably just get the temp/humidity module at some point if this project continues. Given the price and simplicity of the HS1101 I kinda figure that it might have some downsides like what I'm experiencing now.