Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Humidity HS1101 to %RH (more integer math help)

Status
Not open for further replies.

blueroomelectronics

Well-Known Member
Thanks to all for the LM34 math help (works like a charm)
Now any help with a simple table fro the HS1101 humidity sensor datasheet.
Here's the table
%RH frequency in Hz
0 7351
10 7224
20 7100
30 6976
40 6853
50 6728
60 6468
80 6330
90 6186
100 6033

The real trick will be temperature to HS1101 compensation, but that's beyond the scope of the tests.
 
I was going to suggest storing the table and using linear interpolation to get inbetween values. However, your data appears to jump in the middle - the values increase by 130 (ish) but between RH 50 - 60 they jump 260. I found a data sheet but the table in that is completely different. Unless your short on program space it would be simpler to store 100 values than try to interpolate.

Mike.
 
hi Bill,

The 70 value is missing.

If you subtract 6033 from your reading and plot the result the slope is almost linear, wouldn't it be easy to calculate the RH% from the Freq rather than a table?.

EDITED: Plot added.
 
Last edited:
Bill,
Like Mike I see the datasheet gives different values from the list you have published, this versions not linear

RH% Freq
0
5
10 945
15 870
20 800
25 735
30 670
35 610
40 550
45 495
50 440
55 390
60 340
65 290
70 240
75 190
80 145
85 95
90 50
95 0
100

These values have 6210 subtracted [ ie:95%RH]
 
Last edited:
blueroomelectronics said:
Here's the table
%RH frequency in Hz
0 7351
10 7224
20 7100
30 6976
40 6853
50 6728
60 6468
80 6330
90 6186
100 6033
The relation between RH and f is almost linear, as Eric said.

A good approximation I've found is:

f = -13.2*RH + 7358

RH = -0.0753*f + 554

According to the first formula, for example, RH=70 => f=6434.

Knowing that the slope is -.0753 is useful even if you calculate
RH from a small set of data stored into a look-up table.
 
Last edited:
hi Bill,
This table is from our datasheet.
Extrapolated for table top/bottom end values.

EDITED: now a gif.

You can see the right hand column is very close to the actual RH%

Depends how accurate you require the RH%
 
Last edited:
Wow thanks again, expect Cricket PCBs in the mail.

Now the schematic and testing are 99.9% done (I'll post the revised schematic on my site), it's on to the layout. Same size as the Inchworm, Firefly & Dragonfly PCBs 107mm x 57mm (Hammond 1591B case)

Design thoughts, the Cricket needs to generate as little of its own heat as possible. Slow running PIC, latching relay, low baud rates, LCD display, parts location (the LM34 is in the lower left of the PCB)
There is a provision for 3xAA Alkaline for running during power fail (or running sans RS485)
So the problem is the main power source.

A 5V switch mode wall wart (they are cheap now) this is the least expensive route and will keep the kit price down

A LM2575 or other low power switching regulator (can handle up to 40V so 24VAC HVAC can be bridged on to it) $$

A "Roman Black" switching 5V supply (not tested)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top