Frequency to Humidity Design

General Overview

With the way we designed the frequency determiner, this module is very simple. The input from the frequency determiner, is somewhere between 300 (10% humidity), and 375 (85% humidity). Notice that when we designed the frequency determiner, we assumed that when humidity changes by 1%, the frequency changes by 1. This ignored the fact that the humidity is NOT a linear function. However, it is close enough, that we can use this approximation of 1% change in humidity being equivalent to a change in counts of 1.

Available Documentation

  • function module
  • subtractor
  • 7 bit register to latch output from function module

    Errors in linearizing

    Note that the frequency we obtain from the frequency determiner is correct with respect to humidity, however, as noted above, we designed our system to have a change in counts of 75 between 10% and 85% (change of 75%). Thus, we linearize the capacitance vs. humidity function, and assume a chage of counts of 1 for a 1% change of humidity. The following function gives us a linear approximation of the humidity.

    386 - number of counts from frequency determiner = humidity

    The number 386 was based around giving a minimal error in the calculation above from the real humidity. Here is a comparison between our humidity and the real humidity.

    actual humidity calcultion of count from frequency determiner count 386-count=our humidity
    10% 375(112)/112 375 11%
    20% 375(112)/115 365 21%
    30% 375(112)/118 355 31%
    40% 375(112)/121 347 39%
    50% 375(112)/124.5 337 49%
    60% 375(112)/128 328 58%
    70% 375(112)/132 318 68%
    80% 375(112)/137 306 80%
    90% 375(112)/143 293 93%

    Since the function is least linear in the humidity range above 90%, our humidity calculation will be least accurate (max of about 4% off) for values above 90%.

    Signals Used

  • en - enable for the output register to latch result of subtractor
  • freq_value - input to function module from frequency determiner
  • humid_value - output from function module (7 bits, max of 100)
    Back to Design Index.
    Back to project home page