NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Sensors, Actuators, and Robotics » Capacitance Output Humidity Sensor and LM34 Temperature - Breadboard and Data Processing Differences

November 11, 2011
by JimSmith4321
JimSmith4321's Avatar

Can you please provide an overview of how to obtain data from capacitance output humidity sensors?
Or perhaps cite a beginners book (for someone with little or no electrical engineering training) on the subject?

I recently purchased a couple Honeywell HCH-1000 humidity sensors (not to be confused with the Lee-Dickens HC1000), thinking I could obtain humidity in the same manner as temperature using an LM34 and the ADC features of an AVR. After reading the reference material obtained from the Honeywell web site (which I'm sure to someone who knows what they are doing is well written) I'm thinking it's much more involved than that.

Thank you.

November 13, 2011
by Ralphxyz
Ralphxyz's Avatar

Hi JimSmith4321 aka Jim.

Google AVR Reading Capacitance or other phrase with AVR and Capacitance in it.

Here is one link that looks promising, you have to step through the discussion points, but just at a glance it looks good it certainly is very detailed and nicely laid out.

It sure would be nice to see a discussion of capacitance measurement here in the Nerdkit forum.

Ralph

November 13, 2011
by Ralphxyz
Ralphxyz's Avatar

And of course you started here!

Ralph

November 13, 2011
by JimSmith4321
JimSmith4321's Avatar

Thank you Ralphxyz.
Your last post can be taken two ways. First, yes, I started with Nerdkits, March of 2010. Have had much fun and learned a lot since then (still a very long way to go though). Second, thanks for pointing that project out, I suspect I will be studying it extensively.
However, what I was really hoping for was guidance on understanding the Honeywell data sheets, particularly the document titled HCH-1000 Series Humidity Sensor Calibration and Output Circuit Data (doc1). Looking at (and attempting to read) that document I think I need to build a Frequency Output Circuit using a 555 timer. And the output of that circuit - Fout I think - is fed into the MCU where the signal is somehow converted into a humidity reading. And that's where I'm lost because the following pages of doc1 seem to indicate there is a direct relationship between OUTPUT VOLTAGE and %RH. I'm scratching my head because another Honeywell document (Humidity Sensors Line Guide, doc2) clearly states that the HCH-1000 output is capacitance value. And yet another Honeywell document (Installation Instructions for the HCH-1000 Series Capacitive Humidity Sensors, doc3) has several graphs that show a direct relationship between Capacitance and %RH.
I'm somewhat coming to the conclusion that I should ignore doc1 and simply follow the guidelines for using an AVR to measure capacitance, and correlate that capacitance reading to %RH as shown in doc3.

November 14, 2011
by Ralphxyz
Ralphxyz's Avatar

I meant that you had at least started with the Nerdkit Capacitance project in order to get stated with your project.

JimSmith said:

I'm somewhat coming to the conclusion that I should ignore doc1 and simply follow the guidelines for using an AVR to measure capacitance, and correlate that capacitance reading to %RH as shown in doc3.

yup I agree, like I said I would like to see some more discussion about measuring capacitance or even more discussion on the Nerdkit Capacitance Touch Sensor. The Honeywell documentation seems to be all over the place, not that easy to follow.

From that project Mike or Humberto say:

In our system we set up an RC circuit with a capacitor and a resistor in parallel. We use the MCU to charge capacitor up to 5V (a digital high voltage). Then we turn the pin into an input pin, which essentially disconnects that node. This allows the capacitor to discharge through the resistor. The amount of time it takes the capacitor to discharge will be related to the resistor value times the capacitance.

Essentially to measure capacitance you need to know resistance and time, Using a 555 for the time component is one method but the Nerdkit method uses just the mcu they use a know voltage with a discovered time.

amount of time it takes the capacitor to discharge will be related to the resistor value times the capacitance.

So you end up with T = RC now if I could remember my high school algebra I could give you C knowing T and R.

Actually if I googled RC I would probable find a web app to input the values and get the result. Here is one RC Calculator

I used:

Voltage                           5
Resistance                    10
Time                               2 
Instantaneous Voltage    4 (68%)

Just as a example.

So now all you gotta do is learn how to use the mcu as a timer for pin change (voltage drop) :-)

Ralph

November 14, 2011
by JimSmith4321
JimSmith4321's Avatar

After writing my last post I spent a good deal of time studying the Honeywell docs and other websites about capacitance and came to the same conclusion.
With your last post reinforcing/confirming that, my thoughts on how to proceed are MUCH clearer. Thank you.

In fact, the basic idea is quite simple. Capacitance = Time / R. I suspect the real issue is going to be knowing how much time (not how many mcu instruction cycles) has elapsed from the beginning of the discharge to 0 volts.

November 14, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi JimSmith4321,

It looks like you guys have the basic idea behind how to do this down, I'm just going to throw in a few more things to think about.

Saying Time=R*C can be a bit misleading. The product of R and C does come out as a time, however it is not the time it takes the capacitor to reach its final value, it is the time it will take the capacitor to charge up to about 63% of its final value. It will take some thought to figure out the relationship between the time you measure with an analog comparator, and the true RC time constant.

A second issue you will have is figuring out what R is in your system. In our capacitive halloween video we didn't really care what the absolute time constant was since we only really needed to measure relative changes in the RC time constant. This means we only cared about the changes in the RC product, and as long as R wasn't changing it didn't matter what its absolute value was. If you want to backtrack what C is it will be a little tricker.

This is a cool project that touches on a lot of interesting concepts. I look forward to seeing it progress.

November 14, 2011
by Ralphxyz
Ralphxyz's Avatar

Well Jim should have a fixed resistor in parallel with the Humidity sensor so the resistance will be known.

Even using 63% (instantaneous voltage) should be easy to handle as Honeywell does have a graph of capacitance value to RH. Jim can implement a curve in his code to make the transition.

I was going to store a lookup table in onboard eeprom or external eeprom if needed for my weather station.

Ralph

Post a Reply

Please log in to post a reply.

Did you know that talking to the microcontroller over the USB/Serial link is easy under Windows, Linux, and OS X? Learn more...