HSP12P Humidity Guage

Just bought one of these guys: http://canada.newark.com/jsp/level5/module.jsp?moduleId=en_US/69954.xml

Thought it would work just like a thermistor and merely needed a voltage divider and a formula based on the resistance to calculate the RH. Problem is I always read 1023 (5v) on the analog PIN. I've tried various resistor sizes and even w/o a resistor but can't get any sort of reading off of it.

My google-fu skills have left me empty handed as well. Can't find anyone who has interfaced one with an Arduino. I have learned a bit such as the fact that DC will cause it to die out after a long period of time, so people recommend either charging a capacitor and powering it off of that or just turning it on once or twice a day for a quick reading. I'm mostly doing this for the learning experience and am not too concerned if I burn out a $6 resistor, so I dont care if I get that fancy.

So if anyone has any pointers I'd greatly appreciate it!

There is a note on the top of the page that you provided the link to:

Not for use with DC Voltage or DC Bias

Sort of makes it a problem using it with an Arduino, doesn't it.

I use that sensor, it's a good low cost humidity sensor if used correctly.

And you can use it with just an Arduino and a resistor of about 33K ohms.

Wire up the sensor and resistor as a voltage divider, except between two digital outputs, not between 5 volts and ground.

The two digital pins are then alternately driven high and low, providing the AC drive signal required to prevent damage to the sensor.

That looks very similar to the humidity sensors we discussed in this thread: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1253792412

Thanks for the input. Never would have thought to do it with the 2 digital inputs. I will try that tonight.

Alright, just wired it up and wrote the code and it seems to work. I can only get a reading when the current is flowing in the one direction, so I'll probably have to set up a function that loops through switching the current several times and averaging out the readings. I'm getting a 1.41% humidity reading here in my apartment, and when I lick my finger and hold it near the sensor it rises dramatically. I'll have to borrow a humidity sensor from work to compare the readings to see how accurate it is. The fact that it got as high as 180% when my finger was near it worries me, so I'll probably have to tweak the calculation a bit.

I forgot to mention that due to the capacitance of the sensor (though it IS a resistive sensor, it has significant capacitance), you need to delay a short time after switching the current, before taking your reading.

This could account for some or all of the error. The humidity in a typical building hangs around 30 to 50 %, depending on season & etc. 1.41% is indeed quite low.

The fact that it got as high as 180% when my finger was near it worries me

Well that is clearly an imposable reading. Coupled with:-

I'm getting a 1.41% humidity reading here in my apartment,

I would say it isn't working at all. While 1.41 might be achievable in a lab in an apartment I would say it was equally as impossible as 180%. Have you measured it another way like wet and dry bulb?