# Humidity Module Issues

#### tobyw

##### Member
Has anyone used one of these by any chance?

Humirel Humidity Module Based on HF3223

According to the datasheet, it outputs a frequency corresponding to the humidity. The calculation if gives for the frequency is 9740 - 18*rh

I am running some code as follows

Code:
``````setreq m8
count 1,1000,w0
debug rh
w0 = w0 * 2
rh = 9740 - w0 / 18``````
I'm assuming that count 1,1000 will give me a measurement in Hz? I then calculate the humidity from that reading as per the datasheet. I am pretty sure my maths is correct, since the result matches what the datasheet gives in the example look up table.

The problem is - my reading is up in the 90's or eventually goes over 100% when I put it outside, and the weather website says more like 60%!

Has anyone used a similar module? Any idea what I am doing wrong? Do I need to calibrate it...or am I missing something?

Thanks

Toby

#### Jeremy Harris

##### Senior Member
I've used the same basic sensor (the Humirel HS1101) and they do need calibrating in my experience. There are some details of the way I used these sensors (with my own humidity to frequency conversion using a CMOS 555) in this thread: http://www.picaxeforum.co.uk/showthread.php?20562-DIY-humidity-and-temperature-sensor&highlight=humidity

Without calibration I found that these sensors would give fairly big errors, just using the capacitance figures on the Humirel data sheet. It's not that uncommon to get 100% RH in the UK in winter, either. When the temperature drops (as it is doing right now) the RH increases. Currently my outdoor sensor is showing 93% at 2 deg C, the indoor one is reading 43% at 21 deg C. For the past few months I've fairly regularly seen 100% RH in the evenings, something that's been confirmed by dew appearing, which is a good indication that the air is saturated with water vapour.

#### Goeytex

##### Senior Member
Assuming the maths are correct you should be able to add or subtract from the final value to calibrate the output.

#### tobyw

##### Member

I put the sensor back outside and started getting ridiculous readings (way over 100%) so I checked everything and finally realised that my batteries were very low. I replaced with new batteries and suddenly the results are more sensible. Would this be because the module can't output the high frequency required when the voltage supply is low?

So all I have to worry about now is how to calibrate the thing. I guess Goeytex's idea of just applying a mathematical adjustment is the way to go - I just need to find something to calibrate it against....
Thanks all

#### g6ejd

##### Senior Member
Use your local airfield METAR, from the temp and Dewpoint they issue, you can easily calcuate RH and use that to get your calibration.

http://www.checkwx.com/wxmain/code/EGLL

Click on the current metar and read the humidity. If this is no-where near you just enter your location in the search box, there must be a station near you.

#### Jeremy Harris

##### Senior Member
Worth remembering that the sensor itself has a variable slope AND a variable offset, in effect, so needs a two point calibration. This is different to the Honeywell sensor that only needs a single point calibration.

I found that the HS1101 sensor has a fairly wide production tolerance. The offset is determined by the actual value of capacitance at a given fixed RH, the slope is determined by the relative change in capacitance with RH and varies from one sensor to another. My experience (admittedly with only 7 of these that I've calibrated so far) is that both factors vary a lot. There is also a fairly significant temperature sensitivity that needs to be taken account of when calibrating the sensor (keep the temperature the same for both the high and low point calibrations).

AFAICS, this module seems to use a similar principle to the ones I made. It uses the variable capacitance of the HS1101 to change the frequency of an oscillator. This may well be supply voltage dependent, so in all probability you will need a fairly well regulated supply to get good accuracy over time. I doubt that it will work well on a battery supply alone, as the voltage drops with age (or temperature) the frequency may well shift, upsetting the accuracy.

One other point is that I've found very wide variations in RH at different points outside, so I would be cautious of using the comparison with the local met data method as I doubt it will give you a figure that is better than maybe +/-10% accurate. I have two outdoor sensors, one at the side of my driveway and one in the back garden. I can often see a 5 to 10% variation between the two, caused primarily by differing local air temperatures (which changes local RH). The sensor positioned by the driveway nearly always reads lower RH then the one in the back garden. This isn't at all surprising, as the drive dries and heats up more quickly than grass, so the RH above it will be different.

It all comes down to how accurate you want your measurements to be. I found that the best that I could get (when checked against a wet and dry bulb thermometer) was about +/-4% accuracy from these sensors, even using a regulated supply and temperature compensation. The wet and dry bulb method is a fairly easy way to check spot readings for accuracy, as all you need are two identical and fairly accurate thermometers. I borrowed a proper calibrated one from a former colleague, but it would be fairly easy to make one using two DS18B20 temperature sensors. These are pretty accurate and if you fitted two inside sealed tubes, then wrapped one of the tubes with cotton wool and soaked it, you could easily check the true RH. This Wikipedia article explains how the wet-bulb thermometer method works: http://en.wikipedia.org/wiki/Wet-bulb_temperature

Last edited:

#### g6ejd

##### Senior Member
My Davis weather station correllates extremely well with my local MET Station (METAR reports) as does my Oregon Scientific variant of the same. Indoor RH is always (as expected ) different.

I've also got a Honeywell sensor (HIH4000 series) and out of the box that works well, in as much as it achieves the same readings as my other units. On that basis I'm satisfied my calibration using METARS is good enough.

#### Jeremy Harris

##### Senior Member
My Davis weather station correllates extremely well with my local MET Station (METAR reports) as does my Oregon Scientific variant of the same. Indoor RH is always (as expected ) different.

I've also got a Honeywell sensor (HIH4000 series) and out of the box that works well, in as much as it achieves the same readings as my other units. On that basis I'm satisfied my calibration using METARS is good enough.
I'm sure that for your specific location and local met you have checked and found it does work well. That doesn't mean that it works well everywhere though, and it certainly doesn't work for me. For example, I live around 3.26km away from (but around 150ft lower than) the Boscombe Down tower (which is where their METAR data comes from). Their current (at 09:45 UTC) METAR is giving 87% RH, 2 deg C. My driveway RH is 2deg C at 98%, my back garden RH is 92% at 3 deg C (rather perversely these are normally the other way around). This is exactly as might be expected from the terrain - I live in a deep valley with a stream running through it, Boscombe Down is high on an open chalk plain.

I agree that the Honeywell sensor does work well out of the box, I reckon mine has no more than a +/-5% error, even without calibration.

Indoor is massively different, as expected from the drying effect of heating. My current indoor reading is 44% at 21 deg C, with a rather high 88% at 4 deg C up in my loft (I'm combating a condensation problem up there at the moment).

#### Goeytex

##### Senior Member
According to the HF3223 Datasheet these modules are factory calibrated to + - 5% RH @25c.

One thing to consider is that Humirel has not existed since it was bought out in 2005 by Measurement Specialties. Measurement Specialties does not make or sell a HF3223 module. They make the HF3226 module which has slightly different different specs. A search of HF3223 on their site produces zero results. They do not even have an archived datasheet for the HF3223.

Since Humirel no longer exists and Measurement Specialties does not make/market the HF3223, my guess is that these are cheap Asian counterfeits/knock-offs of the original HF3220 originally manufactured by Humirel. Another less likely but possible alternative is that these are NOS purchased by these Asian sellers and sold at a discount.

In any case the HF3223 module is supposed to be factory calibrated to + - 5% RH . Apparently this is not the case.

#### Jeremy Harris

##### Senior Member
According to the HF3223 Datasheet these modules are factory calibrated to + - 5% RH @25c.

One thing to consider is that Humirel has not existed since it was bought out in 2005 by Measurement Specialties. Measurement Specialties does not make or sell a HF3223 module. They make the HF3226 module which has slightly different different specs. A search of HF3223 on their site produces zero results. They do not even have an archived datasheet for the HF3223.

Since Humirel no longer exists and Measurement Specialties does not make/market the HF3223, my guess is that these are cheap Asian counterfeits/knock-offs of the original HF3220 originally manufactured by Humirel. Another less likely but possible alternative is that these are NOS purchased by these Asian sellers and sold at a discount.

In any case the HF3223 module is supposed to be factory calibrated to + - 5% RH . Apparently this is not the case.
Thanks, that makes a great deal of sense to me, and perhaps helps to explain why the "Humirel" HS1101 sensors that I have (all of which were purchased from the Far East) seem to have such a poor tolerance relative to that given on the spec sheet (which seems to be a Humirel document). If they are knock-offs, then this is pretty much what might be expected. One bit of further evidence is that I originally bought a few of the HS1101 sensors from one supplier, then bought another handful from a different supplier. The two are outwardly similar, but use different colour plastic mouldings, have a different looking lead base and were in very different packaging. This further suggests that they may well be knock-offs of the original devices.

They work well enough, and seem reliable, it's only the calibration which seems to be off.

#### g6ejd

##### Senior Member
My sensors (Davis) sit at 8M above ground level and the correlation right now with Lyneham and Boscombe Down is within 4% - I'm closest to BD. I'm sure that both air temperature and humidity tends to be uniform in any broad region and there are not wild swings, yes in some localised areas near a river or water mass, water density in the air might be greater, but that does not tend to affect weather conditions which is why RH is derived from Temp and Dew-Point and to determine fronts, etc. ONe thing that happens most nights in the UK, is the RH climbs quite high and is typically / frequently 99% - but not just now as the difference between Temp and Dew Point is wide, leading to dry air So your sensor should at least track that change.

Quite probably at ground level the values will be different where humidity density is likely to be greater, but as a relative calibration (perhaps from an upstairs window and allowing the module to stabilise) that should give a degree of correlation with the METARS.

As this is all relative (RH), then I suppose the answer is to calibrate to your local environment if one has access to a calibrated source to do that against, which is the challenge here.

#### Goeytex

##### Senior Member
In the case of Toby's device, the error could be related to the nominal capacitance of the sensor, or the tolerances, & temperature coefficients of the components related to the oscillator.....or a combination of these.

If I wanted good accuracy using an "HS1101" ,I think l would make my own board using a genuine HS1101LF from a major distributor and then follow the datasheet precisely for the oscillator section.

#### Jeremy Harris

##### Senior Member
My sensors (Davis) sit at 8M above ground level and the correlation right now with Lyneham and Boscombe Down is within 4% - I'm closest to BD. I'm sure that both air temperature and humidity tends to be uniform in any broad region and there are not wild swings, yes in some localised areas near a river or water mass, water density in the air might be greater, but that does not tend to affect weather conditions which is why RH is derived from Temp and Dew-Point and to determine fronts, etc. ONe thing that happens most nights in the UK, is the RH climbs quite high and is typically / frequently 99% - but not just now as the difference between Temp and Dew Point is wide, leading to dry air So your sensor should at least track that change.

Quite probably at ground level the values will be different where humidity density is likely to be greater, but as a relative calibration (perhaps from an upstairs window and allowing the module to stabilise) that should give a degree of correlation with the METARS.

As this is all relative (RH), then I suppose the answer is to calibrate to your local environment if one has access to a calibrated source to do that against, which is the challenge here.
I suspect there is a fair bit of local variation for those not living in fairly flat terrain. I'm certain the stream that runs through my village contributes to the big difference I see from the BDN data, which isn't that surprising, as on cold mornings there is visible mist coming off the water and drifting up my road. Even now I'm seeing a 5% variation from the sensor in the garden to the sensor by the drive, although they've flipped and now the drive is showing 86% and the garden is showing 91%, with both at 3 deg C. BDN is now giving 81% at 3 deg C, so still a fair bit lower.

I found that calibration was fairly easy, if a bit tedious, using the saturated salt method. Once you have a couple of sealed jars made up with the desiccant and wet salt it doesn't take long to get a good calibration. I've been tempted to make a Picaxe based whirling psychrometer as a quick little project for getting a good RH calibration. I'm sure that a couple of DS18B20s hooked up to an 08M2 and a serial display would do the job easily enough. The professional one I borrowed (from BDN as it happens!) was a very simple affair, just a thermometer mounted in a thing like a football rattle. The bulb of the thermometer had pad of cotton wool around it, which you wet before use. Whirling the thing around gives an accurate wet bulb reading, which when compared to a dry bulb reading, with a bit of calculation, gives a pretty accurate RH.

I might be tempted to knock one up as a quick and dirty little project, but will perhaps stick it on another thread to avoid taking this one off topic.

#### g6ejd

##### Senior Member
Sounds an interesting project. I would be fascinated to see the outcome. I have multiple 18B20 so may have a go if I get time. I'm using an HIH-4010-004, which was £21 from Farnell and out of the box it immediately matched the Davis 6152, so for me that's a good product and it tracks the Davis unit perfectly. It could be the Davis unit is using one too.

This is the code extract from my Arduino reader for RH, it needs Temp and DewPoint (so it's from my METAR reader display). The 0.5 at the end is for consistency with the stations, as this code tends to round down, that fixes the problem.

RH = 100 * (exp((17.271 * dewp)/(237.7 + dewp))) / (exp((17.271 * temp)/(237.7 + temp))) + 0.5;

#### Jeremy Harris

##### Senior Member
I wholeheartedly agree about the HIH4010, the only downside is the relatively high price. I'm currently using 5 humidity sensors scattered around the house/garden for a particular project (ultimately a passive house ventilation optimisation system), and it would have been too expensive to use the Honeywell sensors. The (probably knock-off) Humirel sensors were only about £2 each, and when fitted with a CMOS 555 and a few pence of components seem reasonably accurate and reliable.

Measuring RH accurately with just two DS18B20 sensors should be fairly easy, although the psychrometric equations that have to solved to derive saturated and partial vapour pressures in order to derive RH are probably beyond the capability of a Picaxe (although I'm sure some might relish the prospect of trying to do all that math as integers!). However, the professional whirling psychrometer doesn't use any math, just a little look up table. This could be used in a Picaxe, or you could take the simpler approach of just looking up the RH on the table. Here's a link to a typical psychrometric table: http://andrewslog.files.wordpress.com/2008/04/48d16354-752c-4965-9c43-024073c31186.jpg?w=460&h=387

To get the wet and dry bulb temperatures only needs two DS18B20s. If they were fitted to lengths of wire, protected with a bit of heatshrink, and then one had a bit of wetted open weave muslin or similar wrapped around one of them, then both fitted so that they were at the ends of something that could be whirled around (like a football rattle) whilst keeping the two sensors separated, then you would get pretty accurate wet and dry bulb temperatures and could use the psychrometric table to find the true RH. This needs to be done in the shade if it's sunny, as radiant heating can upset the result. A Picaxe could be programmed to record the lowest temperatures measured (as these are the ones needed) and either display them, or use a look up table to show RH.