# Humidity Sensor Problem

#### shegxy

Mar 6, 2013
1
My whole circuit is a humidity sensing/control circuit. I have got a sensor that senses humidity; however its output is capacitance (the capacitance across its terminals changes with change in humidity). The challenge with it is the range of the capacitance change is very small (about 200 Pico farads). Secondly, this capacitance has to be fed to a microcontroller. The microcontroller only accepts voltage signals as its inputs (or so I think). The controller is PIC 16F877A. I was advised to convert the capacitance to voltage using a weihn bridge then amplify the resulting voltage using LM744.
I have done this but I am not making headway with both the weihn bridge circuit and the amplifier. Can anyone help with values of components I can use and help with the circuit design?

#### CocaCola

Apr 7, 2012
3,635
You might find it best to use a dedicated chip to do the measurement like the AD7745/AD7746 as the accuracy and resolution will be very good and than just interface that to the micro...

Jan 2, 2012
259
see below...

Last edited:

#### Electrobrains

Jan 2, 2012
259
...Can anyone help with values of components I can use and help with the circuit design?

I doubt that you need high accuracy measurement with signal conditioning etc. I suppose the humidity sensor itself has several % error margin.

Instead I suggest a very simple, low-cost Capacitive Sensor Interface for your uC.

With the circuit below, you can measure the capacitance.

Function: The digital uC output keeps the Capacitor shortened. When "0" is output, T1 switches off and the capacitor will start charging. From that point you start measuring the time. When the voltage has reached "ref", the comparator will switch its output and tell you to end the time measuring.

The voltage over C is linearly proportional to the time, if the current is constant.
If you want high accuracy, you can put a Constant Current Source in place of R1 and a precision shunt voltage reference instead of R3.
If you still want high accuracy with R1, you can linearize the RC curve in software.
If you don't need high accuracy, you can measure the time linearly, but use a higher sensor voltage U+.
The higher the voltage U+, the higher accuracy you will get. Just look that the maximum voltage over C is not exceeded (you could put a Zener diode over it as protection). The reference voltage should also be less than the max value specified for the comparator.

You might as well be able to use a normal OP-Amp instead of the comparator.

Micro controllers with built-in A/D converters could probably take over the task of the comparator, if the Capacitor would be large and the charging slow.

p.s.1: Some uC's already have the comparator built-in.
p.s.2: If you put a fixed (precision) Capacitor at C and use a Potentiometer with a serial Resistor instead of R1, you can in a similar way measure the Position of the Potentiometer or Rheostat (especially useful if your uC doesn't have A/D Converters).

Jan 5, 2010
7,682
Last edited:

S
Replies
2
Views
995
John Devereux
J
S
Replies
1
Views
1K
Replies
0
Views
772
Replies
7
Views
4K
Replies
1
Views
2K