OK by me.

 

-Vince

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Alfille
Sent: Wednesday, June 07, 2006 9:23 PM
To: [email protected]
Subject: Re: [Owfs-developers] Error in Humidity calculation in ow_2438.c

 

Ok, applied.

I have do admit a was strongly tempted to groups the terms divided by VDD.

With your permission, you note will also appear in the source code.

Paul Alfille

On 6/7/06, Vincent Fleming <[EMAIL PROTECTED]> wrote:

OK, this is a nit, but it will make owfs a little more accurate (admittedly, it's not very significant difference)…

 

The calculation given by Dallas for a DS2438/HIH-3610 combination is:

 

Sensor_RH = (VAD/VDD) -0.16 / 0.0062

 

And Honeywell gives the following:

 

VAD = VDD (0.0062(sensor_RH) + 0.16), but they specify that VDD = 5V dc, at 25 deg C.

 

Which is exactly what we have in owfs code (solved for Humidity, of course).

 

Honeywell's documentation explains that the HIH-3600 series humidity sensors produce a liner voltage response to humidity that is in the range of 0.8 Vdc to 3.8 Vdc (typical) and is proportional to the input voltage.

 

So, the error is, their listed calculations don't correctly adjust for varying input voltage.

 

The .16 constant is 1/5 of 0.8 – the minimum voltage produced.  When adjusting for voltage (such as (VAD/VDD) portion), this constant should also be divided by the input voltage, not by 5 (the calibrated input voltage), as shown in their documentation.

 

So, their documentation is a little wrong.

 

The level of error this produces would be proportional to how far from 5 Vdc your input voltage is.  In my case, I seem to have a constant 4.93 Vdc input, so it doesn't have a great effect (about .25 degrees RH)

 

The corrected calculation is below.

 

Regards,

 

Vince

 

PS: Honeywell also admits that there are variations in response by the sensors and will ship a calibration printout (according to their documentation) with any of these sensors, if asked.  SO, shouldn't we be checking that our calculated humidity isn't >100 or <0, since they vary, and may be off?

 

 

----------------------------------------cut me-----------------------

 

 

--- module/owlib/src/c/ow_2438.c.old    2006-06-07 20:29:26.858959153 -0400

+++ module/owlib/src/c/ow_2438.c        2006-06-07 20:29:59.129448997 -0400

@@ -133,7 +133,7 @@

 static int FS_Humid(FLOAT * H , const struct parsedname * pn) {

     FLOAT T,VAD,VDD ;

     if ( OW_volts( &VDD , 1 , pn ) || OW_volts( &VAD , 0 , pn ) || OW_temp( &T , pn ) ) return -EINVAL ;

-    *H = (VAD/VDD-.16)/(.0062*(1.0546-.00216*T)) ;

+    *H = (VAD/VDD-(0.8/VDD))/(.0062*(1.0546-.00216*T)) ;

     return 0 ;

 }




_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

 

_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to