Sensirion RH sensor Temp Compensation using an 8 bit PIC

Yep, been there.

Forget about polynomials at runtime. Use a LUT. Devise a best-fit utility which will allow you to define a sequence of straight lines which fit the curve within the accuracy you need. Will certainly take less const data memory space than the difference in code.

Steve

--

formatting link

Reply to
Steve at fivetrees
Loading thread data ...

This suggestion is quite reasonable, but it's overkill. An 8:8 format would suffice as it's stated above that the sensor itself is only accurate to 3%. Numerical analysis 101 says that the result can't be more accurate than the data with which one starts.

If the accuracy of the sensor is as stated, a table lookup is probably quickest and easiest. It can probably be a one-point table at that.

BTW: Is RH meaningful at or below freezing?

Reply to
Everett M. Greene

Thanks Steve.

PS - you have 4 x w's in your sig.

Reply to
K Ludger

I agree that the result is reasonable to be 8.8 however the polynomial has one term (0.00008) that is 8 parts in

10^6. This is needs at least a 16 bit fract to be relavent.

Yes. RH in air below freezing exists. The air at that temperature is dry but not completely so.

There is a parallax app note for the Sensirion SHT11 sensors with example code in basic.

I went to the Sensirion site and it appears that there are two polynomials needed to get accurate readings. The first to get RHuncompensated and the second to compensate for temperature variances.

Regards

w..

Reply to
Walter Banks

I did, didn't I? (Confession: I type the sig, rather than paste it. Bad habit. I typo'ed. D'oh!)

Steve

--

formatting link

Reply to
Steve at fivetrees

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.