Crazy circuit diagram for a HS1101 humidity sensor - Page 1
Forum section: electronics / beginners

author: zorthgo
author_rank: Regular Contributor
timestamp: November 23, 2012, 08:27:16 pm
content: Hi Guys, has anyone hook up a humidity sensor before? Since the HS1101 only has two pins I thought it worked as a variable resistor much like the light sensor, but apparently not. I was looking at the wiring diagram at the parallax site and it makes no sense what so ever. One leg is hook up to the VSS (I assume ground) but there is no end hooked up to the VCC. If I am not supplying a voltage, how can I get a voltage out? I need to hook this up to my microprocessor and I need to monitor the voltage output of the sensor but I can't seem to understand how to hook it up. Can anyone understand these diagram below?Much appreciated!

author: kxenos
author_rank: Frequent Contributor
timestamp: November 23, 2012, 08:42:07 pm
content: It must be a capacitive sensor. You give a square pulse and measure the capacitance. There are capacitive sensor ICs but they're quite expensive.If you can deal with 1% resolution and digital interface, look for DHT11 module on ebay.

author: Simon
author_rank: Unknown
timestamp: November 23, 2012, 08:54:48 pm
content: you can use the sensor in an oscillator and the frequency will be determined by the humidity

author: zorthgo
author_rank: Regular Contributor
timestamp: November 23, 2012, 09:44:05 pm
content: Thanks! I will look at the DHT11. I don't know how to measure capacitance and I am in a time crunch to get this turned in.Simon: So, far I only know how to measure voltage difference on my Microprocessor. I can't handle frequency stuff yet. So, I need something that gives me a change in voltage in order for me to be able to do anything useful with it.

author: Unknown
author_rank: Unknown
timestamp: November 23, 2012, 10:44:46 pm
content: Quote from: kxenos on November 23, 2012, 08:42:07 pm1% is excellent for a humidity sensor and something you are not going to practically approach under anything less than laboratory conditions. If you are getting in the wild real world results within 3% you are doing very well indeed. Suffice to say the DHT11 is a good option and you wont do better without a big spend.

author: DavidDLC
author_rank: Frequent Contributor
timestamp: November 24, 2012, 08:43:34 am
content: Quote from: zorthgo on November 23, 2012, 09:44:05 pmCheck for this:http://www.nerdkits.com/videos/halloween_capacitive_touch_sensor/

author: lewis
author_rank: Frequent Contributor
timestamp: November 24, 2012, 04:21:37 pm
content: Quote from: zorthgo on November 23, 2012, 08:27:16 pmThe Humidity sensor is a variable capacitor, with its capacitance being proportional to humidity. The circuit you've shown is a discharge time measurement circuit. There are a couple of ways to do it, but it works like this:You need to very quickly toggle the microcontroller's port pin between a digital output set at logical 1, and an analogue input (either comparator input or ADC). When the pin is an output, 5V (or whatever the micro's supply voltage is) will flow through the 220R resistor and charge the capacitance of the humidity sensor very quickly. Then, you switch the port pin to an analogue input connected to a comparator in the micro. The capacitance of the humidity sensor will discharge through the 10M resistor at a rate proportional to its capacitance. You then measure how long it takes to discharge to some fixed level, and the time it takes then represents your capacitance.Let's assume the comparator has a reference voltage of 0.6V, and you configure the comparator to generate a software interrupt when the input voltage goes below this level. You start off by charging the humidity sensor to the full supply voltage of the micro by making the port pin a digital output at logical 1. Then, you make the pin an analogue input at the same time as starting a timer, counting up at some division of the clock rate. The humidity sensor is now discharging through the 10M resistor, with the discharge voltage being applied to the comparator in your micro. When the voltage falls below 0.6V, the comparator generates an interrupt and the interrupt routine stops the timer. Bingo! the value in the timer now represents the capacitance of the humidity sensor! You repeat this process over and over to continuously sample the sensor at whatever rate you deem necessary.If you don't have a comparator in the chip, you can use the ADC to do the same thing. This time, you would read the pin voltage with the ADC at a fixed TIME after making it an analogue input, and the value in the ADC register represents the capacitance. This is not quite as good, there's more of a tradeoff between dynamic range and resolution, but would work. The principle is the same.Using either method requires calibration. You need to know what the value in the timer (or in the ADC) actually represents in terms of %RH.Also, take a look at some of the PICs that offer a CTMU (charge time measuring unit).