Tuesday, December 13, 2011

PSoC3 - HH10 Humidity Sensor

I got a chance to work with the HH10D humidity sensor(sparkfun link)recently,as part of a greenhouse control system,to be implemented on the PSoC3(using the CY8CKIT-001).

From the datasheet(PDF),
"The HH10D relative humidity sensor module is comprised with a capacitive type humidity sensor, a CMOS capacitor to frequency converter and an EEPROM used to holding the calibration factors."

So,the code basically has to,
  1. Read the calibration factors from the I2C EEPROM,
  2. Sense the Frequency being output by the sensor,
  3. Use the data from 1. and 2. to calculate Relative Humidity using the formula given in the datasheet,RH=(offset-Soh)*sens/2^12,where offset and sens are 16bit calibration constants read in step 1,and Soh is the frequency output read in step 2.
(I'll be writing a separate post on the common application of Frequency Measurement,soon.)

This code was tested on the CY8CKIT-001,and was written in PSoC Creator 2.0.

Heres what the top design view looks like:


You can find the code in my 4shared account,linked here.

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

No comments:

Post a Comment