Sunday, February 19, 2012

HIH-4030 Test

HIH-4030 Humidity Sensor
Chantelle Spence

Goal of the Test

The purpose of this testing is to receive the relative humidity of the surrounding environment as a function of temperature.

Description of Test

The testing of the humidity sensor included witting programing code, calibrating, and comparing measured percent relative humidity values. The code used is as follows:
float val = 0;
float RH = 0;
float my_room_temperature = 20; //in degrees C !
float max_voltage = 5; // maximum voltage
 
void setup()
{
 Serial.begin(9600);
}
 
void loop()
{
     val = analogRead(0); //output is connected to A(0)
delay(1000);
Serial.println(val); // printing output value
my_room_temperature = 20; // temperature reading in     centigrade!
 
RH= ((((val/1023.)*5) - 0.958)/0.0307)/(1.0546 – 0.00216* my_room_temperature) ; //calculate %RH
   
      Serial.println(RH); //prints %RH
 delay(1000);            
}
   
  Where the code used was determined using the data sheet which supplied the following information:
 
V OUT=(VSUPPLY)(0.0062(sensor RH) + 0.16), typical at 25 º C
True RH = (Sensor RH)/(1.0546 – 0.00216T), T in º C
Sensor RH=(V OUT - zero offset)/slope=(V OUT - 0.958)/0.0307
 
Therefore it can be determined that the RH=((V OUT - 0.958)/0.0307)/(1.0546 – 0.00216T) where T in º C. If the future this code will require temperature input from the temperature sensor, rather than assuming a constant temperature.
The used data sheet can be found at:
http://www.sparkfun.com/datasheets/Sensors/Weather/SEN-09569-HIH-4030-datasheet.pdf
Below is the image of the humidity sensor:




Where pin 1 was connected to ground, pin 2 was connected to analog output zero, and pin 3 was connected to +5V.

Results

The results vary from 19-21% RH when the offset is used.  However when the offset is not used readings were around 40%.  Using the above code, the output was rather constant and only fluctuated by +1%.  To compare the outputted percent relative humidity to the actual humidity the value, a humidity sensor from Petco was used.  This five dollar sensor displayed the actual relative humidity, which was used to calibrate and compare with the humidity sensor output values.

Recommended Actions Based on Results

When attaching and using all components on the Arduino, the humidity sensor will require updated temperature input, rather than using a constant temperature.  In order to make this change, the temperature values will be sent to the humidity sensor.

Integration into Payload

To incorporate this piece into the payload, it must be connected to the circuit board.  This instrument must be exposed to the environment and have temperature sensor input


No comments:

Post a Comment