Smarty;
You are not at a dead end, but you may not like the alternatives.
First of all the Elk has a pull-up resistor on ALL of their zones (2000 ohm between the + side of the zone and 12 volt). This can cause problems with "voltage output sources" not use to driving a load such as this.
I plan to try to remove this pull-up resistor and perform some experiments with various analog type sensors (LM34 temp sensor for instance). Refer to
THIS post. I may try this later today and will post the results in that thread. It's to bad Elk did not make this a "jumper setting" option (i.e. be able to remove the pull-up resistor from the circuit via a jumper). I'm planning on trying to remove the pull-up resistor from an expansion board and NOT the Elk M1 main board, mainly because the component is more accessible and I'm not out as much money if I destroy the board (will this void the warranty??)
The other problem you have is once you are able to properly "read" the analog sensor with the Elk you have no way of extracting this reading in order to perform a calculation unless you are using something like HomeSeer.
Once you get the value into the PC you then have to perform a calculation in order to obtain the "real world" engineering units, which in your case is humidity.
I go over how to do this in
THIS How-To. I also use a real world example by incorporating this methodology in a garage door monitor that can read the distance (in inches) the bottom of the garage door is from the garage floor (i.e. exact position the garage door is opened). I perform calculations so a HomeSeer device is reading the "percentage" the garage door is opened rather than a raw distance number (more realistic number to display).
HERE are the details of this project. Ignore most of the responses as those people just don't understand the reasoning behind this project.
All of this was done to try to "educate" people on using "Analog to Digital" conversion techniques so they can accomplish projects such as yours. I feel like I failed miserably in this mission!
Anyway enough ranting. Here is how to calculate the equation you need in case you:
1) Get an analog to digital converter and are able to incorporate it into your Home Automation system.
2) Use a program such as HomeSeer (more details on this below).
For your sensor you state that at 0.8 volts you get 0% humidity and at 3.8 volts you get 100% humidity. Assuming this is a linear sensor you can use the slope intercept equation of:
Y = mX + b
Where Y = Humidity in %, and X = Voltage from the sensor in Volts.
So to calculate this equation lets use
X1 = 0.8, Y1 = 0
X2 = 3.8, Y2 = 100
So to calculate the slope (m) use:
m = (Y2 - Y1) / (X2 - X1)
m = (100 - 0) / (3.8 - 0.8) = 100 / 3 = 33.33
Substitute m and use X2 and Y2 pair values (3.8, 100) to calculate b
Y = mX + b
100 = (33.33)(3.8) + b
b = -26.67
So you now have an equation that when given a voltage, can calculate Humidity
Y = mX + b
Humidity = m(Volts) + b
Humidity = 33.33 (Volts) - 26.67
Let's check this calculation with the two data pairs. First let's use the value of X1 for voltage and see what the Humidity result is:
Humidity = 33.33 (.8) - 26.67
Humidity = -0.006, which is pretty close to 0 which is the Y1 value!
Now let's use the X2 value for voltage and see what the Humidity result is:
Humidity = 33.33 (3.8) - 26.67
Humidity = 99.984 which is pretty close to 100 which is the Y2 value!
So now we know the equation is correct. But, what resolution will you get if you use the 0-14 volt, eight-bit analog to digital capability of the Elk M1 analog zone?
Well Spanky mentioned above that the Elk can discern voltage increments in 0.055 volt steps (two to the eight power minus one for the "eight bit" resolution is 255 steps. Divide 14 volt full scale by 255 and you obtain 0.055 for the voltage resolution of the Elk).
So we already know that if we have 3.8 volts with your sensor you will have 100 percent humidity. So what humidity would you have with 3.8 - 0.055?
3.8 - 0.055 = 3.745
Let's calculate the Humidity for 3.745 volts using the equation above:
Humidity = 33.33 (3.745) - 26.67
Humidity = 98.15
So your resolution would be 100 - 98.15 = 1.85%
So what this means is if you first removed the pull-up resistor in the Elk for a zone and then set that zone as an analog input type, then had some type of program that could read the voltage value, then used the equation:
Humidity = 33.33 (Volts) - 26.67
and then used a program that could convert this voltage with that calculation, then were able to obtain that calculated value (via computer screen?) you would then have humidity for your system in 1.85% measurable increments.
May sound complicated, but it is not. If you don't feel like hacking the Elk M1 (which is understandable) there are inexpensive Analog to Digital converters out there. I believe some are mentioned in my Guide which I referenced above.
Another case would be to use HomeSeer. I'm presently working with someone to give HomeSeer the capability of reading a voltage value of an Elk Analog zone, perform a slope/intercept calculation such as the one above, then place that calculated result in a HomeSeer device. Can't go into any more details, but if this comes to fruition it will be an exciting capability for Elk/HomeSeer users.
