Humidity sensor

Ben967

Member
Hi guys,
Just bought a humidity sensor, the seller said the humidity level is typically 1M at 30% relative humidity to 1K at 90% relative humidity. Has anyone worked with a sensor like this before and knows a way I could use this to calculate the humidity level as a percentage?
Thanks, Ben
 

Andrew Cowan

Senior Member
If it is purely resistive, try a voltage divider with the sensor as one half, and a 100K as the other. Feed that into an ADC port.

A
 

russbow

Senior Member
Ben, could you post a link to the device you bought.

There are a number of sensors available, and without Hippy's crystal thingy, we can't guess
 

Jaguarjoe

Senior Member
If it is purely resistive, try a voltage divider with the sensor as one half, and a 100K as the other. Feed that into an ADC port.

A
If the input resistance of the ADC is only 25K it won't work well with high resistance voltage dividers. You'll need a good op-amp in there.
 

Dippy

Moderator
Why not contact the seller?
He should be providing the information as he is charging you for the product.

I genuinely and naively don't understand; why not research the product before buying? :confused: (yeah, yeah, it was cheap... couldn't resist it. Ebay takes yer money and the Cavalry, sorry, Forum comes to the rescue ;))
 

hippy

Ex-Staff (retired)
You could try emailing the seller to see if they have any additional informations. If there's no markings on the device, you could perhaps post a photo and people could make guesses but that's all they are likely to be. You can also scour Google looking for a match.

Without a datasheet it's rather like a tin of food without a label; you can only try it and see what happens. If it is resistive then you could try connecting a resistance meter and seeing what happens as humidity varies. It may work or work for some time even if it is meant to be AC operated. You could build an oscillator and put it in a path that provides AC and see what happens. An RC setup could work for AC; PWMOUT and read from C with PULSIN perhaps. I have no idea, am simply guessing at possibilities.

A DC resistive sensor should probably work in an AC resistive setup so that's probably best to try. How well it works would come down to experimentation and calibration.

The Tech Supplies' (SEN008) is a high quality voltage output proportional to humidity device so easily interfaced but is consequently on the more expensive side. There are other cheap sensors which possibly aren't so accurate and may require experimenting with. They may be a better option to choose as once one of those is made to work to some degree ( if possible ), others can buy the same device knowing what it is and what they can expect.
 

westaust55

Moderator
This cropped up in a past post that I recalled.
http://www.picaxeforum.co.uk/showthread.php?t=10131&page=4

From the limited known data (resistance and dimensions) I would suggest it is one of these:
http://www.mutr.co.uk/product_info.php?products_id=267


A somewhat similar RapidOnLine product has these specs:
Technical Specification Show Hide
Rated voltage 1V rms
Rated current 0.2mA
Operating frequency range 0.5 to 2kHz
Operating temperature range 0°C to +60°C
Operating humidity range 90% RH
Impedance range @ 60% RH 25°C 14.2 to 38.5kΩ
Humidity accuracy –5 to +5% RH
Hysteresis @ 40 to 80% RH 2% RH
Temperature dependence (ref.) 0.6% RH/°C
http://www.rapidonline.com/netalogue/specs/61-0984.pdf
 

Ixolotl

New Member
Apologies for raising the thread, but I've just been having a play with a similar (very cheap :D) humidity sensor, and I thought I might as well share the results:-

http://www.technobotsonline.com/index.php?dispatch=attachments.getfile&attachment_id=492

Using an 08M I faffed around with the pwm command, but the lowest frequency you can get is around 2KHz at 25% duty cycle, and the results were a bit unpredictable and seemed to have a weird time-constant. I also tried to copy the Basic Stamp's RCTIME command, but failed. Next I tried a 555 timer generating a 1kHz "squarewave" (more like the alps with deju-vu :eek:) into an ADC input, but again the results didn't seem very meaningful, although it was obviously working to some degree.

The last, and most successful attempt was using the tune command to charge a cap, and read the voltage from it. In order to keep the voltage across the sensor in spec, I used a 20M resistor from Output2 in series with the sensor, to ground. In parallel with the sensor was a cap (I tried 100uF, 10uF and 0.68uF) and the ADC reading was taken from between the sensor and resistor, at one end of the cap. I also attached a DS18B20 to get some idea of interaction with temperature. Code as follows:-

Code:
Symbol Temperature = b0
Symbol Humidity = w1

Temp:
readtemp 1,Temperature
goto RH

RH:
tune 0, 15,($90)
readadc 4,Humidity
goto DataOut

DataOut:
sertxd (#Temperature,",",#Humidity,13,10)
pause 1000
goto Temp
I cut and pasted the output into Excel and drew the attached graphs, to get some idea of responsiveness and hysteresis. The RH graph is inverted (80-RH), the Temp graph is true, first set of results use a 100uF cap, second the 0.68uF. The 10uF results were similar. The first set of results (Temp1 and RH1) show some "handling noise" (read p*ss*ng about! :rolleyes:) at first, followed by a small peak in temp and a larger peak in RH where I blew on it. After watching the decay, in units of 10 second samples, I blew on it "a bit longer and harder", as per IEE8633846, ISO99999, RAL3524 et al.

The second set of traces show the initial charging of the cap better, reaching equilibrium much faster, followed by me blowing on it in much the same way as my second attempt. After the sensor output had settled again I gave it a quick blast with a heatgun, and you can see the large spike in temperature, with the corresponding fall in relative humidity, caused by heating the air. You can also see the hysteresis in the sensor, as the level never quite comes back up (down?!?) to where it was before. I did some dodgy calculations based on vague assumptions and came up with a figure of 5% hysteresis, which isn't far off the spec, and close enough to the sexy £50 SPI sensor (whose name I forget :confused:) which gives +/-2% in its spec. I also suspect that the reason the capacitor size appears to make so little difference in the decay time is because the sensor lag overwhelms it.

Obviously this is just mucking around, but I'm interested in making small(ish) sensors for a home automation system, distributing them on a serial network - one of the prime concerns is cheapness! I don't know if I will end up using this design, but at £0.60 per sensor (plus £4 for the DS18B20), versus £50.....

Hope this is of interest to someone, let me know if I've made any obvious mistakes, or if you come up with a better idea I can steal!

Ix
 

Attachments

Last edited:

Technical

Technical Support
Staff member
It's an interesting approach, but we have found that most people don't have much long time sucess with these cheapo sensors.

www.techsupplies.co.uk/sen008 is £18, not £50, but obviously still a lot more expensive than 60p. But it is simply plug and play into a ADC pin.
 
Top