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.

HS1101 capacitive humidity sensor; need nearly linear voltage to feed to a 1-wire ADC

Status
Not open for further replies.
As I have inferred and is in my profile, I'm really weak at analog :)

I have an HS1101 capacitive humidity sensor and I need to eventually get a digital readout from it. What I'd like to do is this:

HS1101 -> [x] -> 1-wire ADC -> distance -> 16F877A

My void exists in [x], conversion of the capacitance value to an analog voltage. I've seen a small variety of complex circuitry for doing this but I want to make the remote component count as small as possible. I am entirely ambivalent as to how I get the analog reference into the 1-wire ADC, but the 1-wire ADC -> ... is a necessary design requirement. Low power is also desired and the rate of sampling isn't crucial, about once per second is plenty fine.

I have seen multiple 555 examples fed directly into a microcontroller for counting but as just stated, this design won't suffice. I have also seen the HS1101 attached to op-amps but this output is far from linear.

It doesn't even have to be precisely linear as long as the LSB remains at least 1% within 0% to 100% accurate. So as long as I can accomplish this then I can do a table lookup for a somewhat linear slope. Of course I would prefer this 1% accuracy fit inside 8 or 16 bits from the ADC. :)

In summary:

  • 1% accuracy from 0% to 100% range
  • small component count
  • low power usage
  • about once per second sample rate
  • 8 or 16 bit (or in between) data output from ADC
  • HS1101 -> [x] -> 1-wire ADC
So, ideas?

Any sort of approach that meets these ideas should be great. For conceptual reference, this is for the **broken link removed** project and I will have both internal and external humidity sensors. I'll also have a similar but far more simple design for household.

-david
 
The factory calibrated Humirel sensors are generally only accurate to +/-2%
A HS1101 is behaves like a very small capactior, it varies between 150pf to 210pf or so depending on humidity. The 555 solution is about the best for low parts count and accuracy as it's got sensor compensation in the design.
Humirel make voltage output versions HTG353XCH but they're probably not cheap and are +/-3% and analog voltage is not the best over any sort of distance.

Note: The 16F877A has a 10 bit DAC

What's wrong with the TLC555? Current consumption is tiny with the HS1101, I've used it in my RS485 thermostat design with a PIC
 
Last edited:
A 555 doesn't talk well with others on a 1-wire network. The datasheet I have indicates 0.1% RH accuracy per deg Celsius.
 
Last edited:
I didn't say it did. In my first post I included a 1-wire ADC in the design. I previously read the application note you point to and that document uses the Honeywell HIH-3605 which is obsolete. Places that do have it charge a pretty penny and some. I have already considered the use of a device like the battery monitor and it is one of my options. I still need to get a nearly linear voltage output interpreted from a capacitive device which I already have in my hand. I purposely chose a capacitive device because I wanted to learn a little more about analog design. That said, I don't intend to spend a few months learning a lot about analog theory just to implement this design. At present I simply need to know enough to understand how to accomplish this. Another idea popped into my head earlier today; using a tiny mcu with an A/D input and a digital I/O pin. Using a variety of components to measure the charge voltage in a given amount of time. I'm not horribly concerned if the accuracy shifts slightly by a few percent based on temperature. I am disinterested in it shifting several percent. I may need to use a paired charge conversion with a standard ~180pF capacitor with a similar drift to measure the shift. That's all beside the point however. I need a functional implementation before I worry about precision.
 
I too would have been happy to find a simple voltage solution for the HS1101 but nothing worked as well as the TLC555 solution for either cost or simplicity.
I have DS1923 humidity / temperature sensor / logger which is a 1 wire (lots of PIC code out there) that will work with 1 wire sorry it's not analog though.

Search these forums for Cricket (my thermostat with humidity) for more info, I finally used the 555 solution but an analog temperature sensor LM34 with a precision VREF (TL431)

**broken link removed**
**broken link removed**
 
Easy read Capacitive Humidity Sensor direct from microcontroller

I ran out of ADC pins and didn't want to install a multiplexer or an external ADC for my 3 humidity sensors. I was tired of paying $15 to $35 each for humidity sensors like the vout HM1500 or the digital Sensirel SH75. In addition I found that many of the vout and freq out units had drifts exceeding 10% after 1 year in our application. My other issue is that the more sophisticated vout sensors keep getting model changes which requires design changes for us while the base level cap sensors remained the same and reliable. I needed an adequate solution that was cheaper and could be easily field re-calibrated. I looked at many of the 555 circuits but they seemed complex with lots of components which could have thermal drift. I wanted something that would be easy to integrate into remote mounted circuits dozens to hundreds of feet away while keeping costs low.

My design is based on reading the capacitance variance directly from the micro controller and have been reasonably satisfied with the results. The cheap sensors like the HCH-1000-002 and the HS1101 do not come pre-calibrated and I found over a 10% variance from sensor to sensor so calibration must be built into the software. Due to high rates of drift I needed a easy way to re-calibrate in the field.

After a very primitive calibration run, I ran a quick check using a sodium chloride (table salt) calibration solution my readings after averaging ran +- 1.5% of the 75.3% expected which is within the Hysteresis readings of the HCH-1000-002 sensor. Improved algorithms with more sophisticated averaging would make this more accurate.

The circuit is descried at http://correctenergysolutions.com/electronics/cap-humidity-sensor-circuit and is free to use. It basically uses a two digital IO lines one as a charge and the other as a sense. We charge the capacitor circuit through a resistor with a diode for fast drain back. We feed the sense line from the cap back to the micro controller. The capacitor is fully drained before the feed line is activated. We measure the time it requires for sense to convert from a logic low to logic high in a tight loop with a counter. Once the transition high on sense occurs the feed line is set to low which re-drains the sensor cap. As the capacitor value rises or falls with humidity the count value rises and falls proportionately. We measure the count in a tight loop because we found the variables in interrupt service for the timer caused undesirable variability in the readings.

We found a good count value with reasonable resolution using a 20 Meg feed capacitor on the HCH-1000-002 and a 40 Meg for the HS1101.

One concern was that the transition from logic low to logic high is defined as a range so I thought it would be sloppy. I checked this with no cap in circuit and by using a fixed capacitor. When the variable cap is removed from the circuit it consistently takes 18 cycles to charge the circuit whereas when the cap is present it ranges from 1080 to 1300. When we place a fixed capacitor in circuit it stays the same within a 6 or so cycles and normally stays within 1 cycle from test to test. I interpret this as a consistent transition voltage from low to high on sense which is basically doing the same thing as a analog comparator.

A analog comparator would probably be more accurate but I actually saw comparable variability up/down 1.5 to 3% when reading the vout HM1500 sensors through the ADC and had to run an averaging algorithm anyway. The difference is a sensor which is 4 times cheaper.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top