Author Topic: SHT15 sensor code  (Read 2845 times)

0 Members and 1 Guest are viewing this topic.

Rubeix

SHT15 sensor code
« on: July 12, 2012, 04:04:20 PM »
Hello,

I was trying to use the SHT15 sensor and looking for some code..So I found your code (http://wiring.org.co/learning/basics/humiditytemperaturesht15.html) but I don´t understand one thing.

The values you use on your code to convert de sensor output to temperature and humidity are note the same than the values advised on page 8 of the datasheet (http://www.sparkfun.com/datasheets/Sensors/SHT1x_datasheet.pdf. You also don´t make the Temperature compensation of Humidity Signal.
Is there a reason for that?Which is the meaning of your values?And where did you get them?
Nothing against you code..=) I am just asking all those questions because I need to make an accurate measure..so I would like to understand which calculations you are doing..

Thanks in advance
And also thanks for the code

Best regards   

barragan

Re: SHT15 sensor code
« Reply #1 on: July 16, 2012, 07:49:57 PM »
Regarding humidity reading on 12 bits:

humidity = -4.0 + 0.0405 * val + -0.0000028 * val * val;

note the value C1 on the table 7 is -4.0 C2 is 0.0405 and C3 is -0.0000028 or (-2.8000E-6) as stated on table 7.  ORH is the output from the sensor.

on temperature we have:

temperature = (float)val * 0.01 - 40;
from Numeral 4.3 T = d1+d2* SOt
for 5V d1 is -40 and d2 is 0.01 again for 14 bit conversion SOt is the 14 bit value read. You are right compensation is not done there but it shouldn't be problem as it might be done using the formula on numeral 4.2

Hope this is what you are asking for, let me know.