Go Down

Topic: humidity sensor (Read 3 times) previous topic - next topic


I am making a weather station using Arduino 2009

For my humidity sensor I chose a honeywell HCH-1000.
It was the cheapest (AUD $17) accurate one I could find.

The data sheet is at:


The HCH-1000 has a capactance of 300 to 360 pf over the 0 to 100% range.
Honeywell have an application note for the HCH-1000:


I use a CMOS 555 as an astable with the HCH-1000 as the capactance.
The data sheet is at:


The pulse width of the output can then be determined using the
arduino PulseIn function.

I adjusted the R component of the 555 so that the output pulse width
difference between 0 and 100% gives 1023 when using PulseIn.
This is to fit in with my other sensors which use adc(0 to 1023).
Note that the equations for timing are not exact as we have a significant
leakage resistor across the HCH-1000.

This sets the range of the sensor and no other adjustment is used.
The level must be set by software.

Code: [Select]
/*  A simple humidity sensor check program
   The circuit uses software one point calibration.
   Adjust the sensor_offset to give the known ambient humidity.
   The time taken to get each sample is around 75ms.

const int pin = 7;   // Analog input pin
unsigned long duration;
const int sensor_offset = 1889;  //the offset to give correct RH value

void setup()
 Serial.begin(9600);   // initialize serial communications at 9600 bps:
 pinMode(pin, INPUT);

void loop()
 duration = 0;
 byte j = 0;   // for start counter enter digits
 for (j = 0; j < 16 ; j +=1)
 duration += pulseIn(pin, HIGH);
 }  //pulse width has some jitter so get average to smooth
 duration /=16;
 long humid =( duration - sensor_offset)/10.23; //max is 1023 and to %
 Serial.print("sensor = " );                        
 Serial.print(duration);    // print the adc value to the serial monitor:
 Serial.print("\t humidity = ");      
 Serial.print(humid);   // print the temperature
 Serial.println(" %");
 delay(1000);   // wait 1 second before next sample                    

I calibrated the sensor using my Oregon scientific WMR 100.
This is the best I'm able to arrange. It is accurate enough for my use.

I have logged the data from the WMR 100 and my humidity sensor over some days and the result are within 2 % over this time.

The sensor circuit and other files are at the site given below.
Download HCH-1000.zip



Something that has always bothered me about inexpensive commercial humidity sensors is their low accuracy. Pick up two or three and often there is 20 to 30% difference between them.

I wanted to calibrate my kit humastat and was advised to use a sling hydrometer. Sadly I could not find one within my budget.

Have you run into any calibration concepts you feel are worth while?


Thanks for the reply.

I did buy 2 HCH-1000 one was dead on arrival. So I cant compare.

Sometimes I do get 3 or 4% different from my WMR-100. When
I compare the two plotted  outputs, the accuracy is there but peaks and troughs are at slightly different times.
I put this downs to the wmr-100 being in a sealed space and the
HCH-100 is in moving air.

One example I have come accross for calibration:


An extract is:

Calibrating the humidity sensor
The humidity sensor has a linear output and can be calibrated at two points, 0 %RH and 100 %RH.  First modify the code so that the read_humidity() function returns the counter_value by changing the last line to this  (return counter_value;).  For the 0 %RH point place the sensor in a plastic bag with several sheets of absorbant kitchen paper that have been dried in the oven for an hour.  It will take some time for the humidity to stabilize, so be sure to wait for it to stop changing.  For the 100 %RH point place some warm wet paper in a plastic bag with the sensor, taking care not to get the board or sensor wet.  Once agian it will take some time to stabalize.  When you have the two counter readings you calculate the conversion factors and change two variables in the code.

I dont dare try this at the moment for fear of killing another $17.


A calibration trick used for humidor hygrometers is to take a quantity of salt (table salt) and wet it.  The salt should not be dissolved, but very damp.  Put this in a sealed container and it will stabilize at 75% RH.

Not sure how well this tests your hygrometer that is intended for more normal environmental humidity levels, but it's cheap and easy.



In the bathroom with the shower running is 100% . So is under an outside roof while it is raining.

What allowance have you made  for voltage feed variation ,usb or battery or otherwise. They are all different on the arduino  


Thanks for your replies.

Put this in a sealed container and it will stabilize at 75% RH

I appears that other salts can aslo be used:


I'm not yet brave enough to put my lone $17 sensor in a bag of salt solution.

What allowance have you made  for voltage feed variation

I have covered this problem see:



Thank you, all of you. Looks like I have a reason to dust off an old project. I had found almost no calibration info before mentioning it  here.

Good luck carl47. I'd be interested to see how your project continues to develop. Thanks for sharing it with us.

Go Up