Connect with us

Help reading an HIH-4010

Discussion in 'General Electronics Discussion' started by FuzzyWombatSoup, Dec 27, 2014.

Scroll to continue with content
  1. FuzzyWombatSoup

    FuzzyWombatSoup

    35
    1
    Nov 18, 2014
    I have an arduino and this guy http://www.mouser.com/ds/2/187/honeywell-sensing-hih4010-4020-4021 series-product-479677.pdf

    I have found http://forum.arduino.cc/index.php?topic=19961.0 as a starting point, but it's a bit different model sensor and does not output the voltage quite the same as the 4030, the RH values I'm getting seem to be roughly half of what other off the self weather stations read. The Fahrenheit value being used in the formula is matching other thermometers, so I know that part's right.

    Here's the bit of relevant code:
    Code:
      float max_voltage = 3.27;
      float hih_voltage = get_average(1);
      max_voltage = (3.27-(0.00372549*fahrenheit)) ;
      RH = ((((hih_voltage/1023)*5)-0.958)/max_voltage)*100;
    This is more of what's wrong with my math and me misreading the datasheet rather than arduino help, I guess.
     
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,477
    2,820
    Jan 21, 2010
    The datasheet (which appears not to be for the 4030) suggests that your value for max voltage should be 3.07 at 25C. That's around 77F, so your formula uses 2.98.

    Note that the correct datasheet shows the same (or highly similar) values, so that's not the reason.

    How did you solder this part? The storage and operating temperature ranges seem to be quite narrow and I suggest there is some scope to damage the device whilst soldering it.
     
  3. FuzzyWombatSoup

    FuzzyWombatSoup

    35
    1
    Nov 18, 2014
    Sorry about the confusion, I'm using an HIH4010. The 4030 was just me me refering how I started down this road. Nothing is solders, It's all on a breadboard. I am not clear on the process used to determine the max voltage of the sensor in the datasheet.
     
    Last edited: Dec 27, 2014
  4. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,477
    2,820
    Jan 21, 2010
    Look at this part of the datasheet:

    4010.png

    The actual voltages here assume that the supply voltage is 5V, however elsewhere in the datasheet it tells you that the output is ratiometric with the applied voltage, so as long as you use the same voltage for the supply of the sensor and the reference voltage of the ADC you're good to go with voltages that might not be exactly 5.00V (and this situation is the default -- you need not do anything special to ensure it is true).

    Assuming you use a 10bit ADC reading, 0V = a count of zero and 5V = a count of 1024 (note that you'll get a maximum of 1023).

    That means at 25C and 0% RH you get a voltage of 0.958V, and thus a count of 0.958/5 * 1024 = 196.2.

    At 75.3%RH and 25C, the count is 3.268/5 * 1024 = 669.3.

    You could use that relationship to determine the sensor RH (given an ADC reading of c) using

    RH = (c - 196.2) * 75.3 / (669.3 - 196.2)
    or
    RH = (c - 196.2) * 0.1592

    The next step is to do the temperature correction for the sensor. In the datasheet, the correction is given as:

    True RH = (Sensor RH)/(1.0546 – 0.00216T), (for T in degrees C)

    So for temperature in F (TF), the correction becomes

    RH = RH / (1.0546 - 0.00216 * ((TF - 32) * 5 / 9) )
    or
    RH = RH / (1.093 - 0.0012 * TF)

    I would advise you to double-check my calculations :)
     
  5. FuzzyWombatSoup

    FuzzyWombatSoup

    35
    1
    Nov 18, 2014
    I figured I'd update this. The supply voltage was inadequate which threw off results:)
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-