I am having some troubles getting a Honeywell HIH4602 A/C sensor to work. It is my first attempt to program an analog sensor and I really need some help.
This is the code I have done so far but I keep getting errors.
Well, I don't really know how to write the code; I have made the circuit and connected it to the board as it is shown in the data sheet but I can't manage to do more than that.
I should get a read-out of the relative humidity inside an environmental chamber.
Think over again:
What do you actually get with analogRead. Its NOT voltage, but 'steps' indicating the voltage put to the pin.
each step is 5V/1023 = ca 5mV/step
What if: float raw = analogRead(A1);
changed to
float raw = analogRead(A1) *5.0/1023.0
got a multimeter ?
Indors (30-35%RH) the reading should be 1.8 .. 1.9V to the analog input (based on info from datasheet)
If you dont fint this voltage - somthing is wrong. (hardware or connections)
From formulas given - calculate True RH
I have managed getting the sensor to work by removing the resistance; although it gives out the humidity percentage, it can be anywhere between 0 and 60 and when I blow over, it will give out even negative values.
Thank a lot, guys, but it def. doesn't work with a resistor on it, it shows a constant -29.07 and removing the resistor (and applying the code above) gives ascending/descending values between 10 and 80 and won't stabilize no matter for how long it runs.
Most probably the sensor is broken...it is just frustrating as I have ordered it 5 days ago.