This article gives an outline of the process used in designing the Fan controlled by humidity sensor to use my Generic heating / cooling controller design (hcctl).

Arduino thermistor thermometer – a tutorial gave a method for designing a thermometer based on a formula predicting the behaviour of the sensor. This article explains a different approach where that is not possible.

Above is a characteristic from the manufacturer’s data.

The curves to no lend themselves to simple curve fits, so a cubic spine interpolation will be made based on key points from the curve.

Four our purposes, the mean curve (green) is sufficient for design.

Above, the mean curve was digitised to capture the shape of the curve, 17 points were used.

Above is a table of the digitised characteristic.

Above is a table of calculation of the cubic spline interpolation parameters over the 17 points. These are a basis for interpolating R at any given RH.

Above is a set of key circuit parameters, and calculated values of R at a set of RH values. From R, V into the ADC is calculated, and the ADC count. Also important is the Thevenin equivalent source resistance Req which is calculated.

Above is a plot of the calculated ADC count and Req values.

Now we need to nominate the setpoint, differential and alarm parameters, and calculate the ADC counts to store in the EEPROM.

Above, a small table converting the chosen setpoint, differential and alarm parameters to EEPROM values.

Above is a screen dump of the EEPROM file with the calculated values plugged in. This file is then written to the device EEPROM.

## References

- Duffy, O. 2012. Generic heating / cooling controller. http://owenduffy.net/module/hcctl/index.htm.