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.

Capacitance calculation

Status
Not open for further replies.

ibwev

Member
I am trying to use a capacitive humidity sensor (HCH-1000-002) with PIC16F690. I have read about 2 different circuits to detect the capacitance of the humidity sensor. One uses Timer 555 (NE555S-13 – see Figure 1) and the other uses resistors and the comparator in the Pic (see Figure 2)


Figure 1
humidity circuit.png


Figure 2
humidity circuit2.png

1) Which is the best circuit?
2) How do I calculate the capacitance?
 
For the 555 circuit, look at the applications section of the 555 data sheet. Transpose the free-running oscillator equation to solve for C as a function of Freq.
For the other circuit, I would have to know what the code is doing with AN0, RA2 and RA3? Likely, it is measuring the time it takes to charge/discharge the capacitor to a given threshold as defined by the internal comparator.

I just looked at the data sheet. That is a rather poor sensor. Its capacitance is effected by the measurement frequency, the ambient temperature, and by-the-way, slightly by changes in humidity. Good Luck...
 
Last edited:
Both designs require a microcontroller ; although, one might use an off-the-shelf frequency meter for the 555-based circuit (with appropriate re-numbering of the pins). If you are comfortable with microcontrollers, then there is no advantage to the 555-based design.

Microchip has a application notes on capacitance measurement that include the code. A newer chip could be substituted for the 16C family used in this early note:
http://ww1.microchip.com/downloads/en/AppNotes/00611b.pdf
Here is a note on the theory:
http://ww1.microchip.com/downloads/en/AppNotes/01014a.pdf
A newer note utilizes the charge-time measurement unit (CTMU) included in some chips:
**broken link removed**

John

Edit: It took me awhile to find a link to this series of capacitance measurement chips. I have used the CAV424 several years ago. It might be a simpler solution, if you do not want to use a microcontroller. There is also the CAV414 and CAV444.
http://www.analogmicro.de/english/index.html
 
Last edited:
Yes the pin numbers for 5678 are the wrong way around, pictorially however not looking at the pin numbers it does look correct.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top