# Cypress Developer CommunityTM

## Capacitance meter using 555 timer

Summary: 16 Replies, Latest post by danaaknight on 03 Dec 2013 07:59 AM PST
User
5 posts

I am attempting to complete a PSoC1 project involving using a 555timer circuit as a capacitance meter. Essentially the resistor/capacitor network in the circuit directly relates to the 555timer output in that t = 1.1RC. I am fine with the circuit design, my problem is in writing the main.c file for it. I need to be able to read in the 555 output, have PSoC recognize the T value, and calculate for capacitance and display it to the LCD. Any help would be greatly appreciated.

User
7646 posts

Some useful reference material, attached.

Some questions -

1) Range you want of T / F measurement ?

2) Resolution of the measurment ?

3) Accuracy of the measurment ?

Regards, Dana.

User
5 posts

It looks like counting the number of pulses in a given time frame would be the best solution. I essentially now need to write a main.c file to see the square wave, count how many pulses in a given time, divide the number of pulses by time to obtain T value, have PSoC calculate C from equation T = 1.1RC, and display the result on the LCD.

User
7646 posts

Here is a simple F counter project, attached.

Regards, Dana.

Attachments:
User
1362 posts

If you are using PSoC. why do you need the 555?

User
5 posts

How would you suggest ommitting the 555?

User
7646 posts

An LCR approach -

Normal
0

false
false
false

EN-US
X-NONE
X-NONE

MicrosoftInternetExplorer4

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;}

www.wseas.us/e-library/conferences/2005cancun/papers/495-106.pdf

Regards, Dana.

User
1362 posts

This is not using PSoC but should give you an idea.

http://embedded-lab.com/blog/?p=4400

User
7646 posts

Some questions -

1) Range of C values to be measured ?

2) Accuracy of measurement ?

3) Do you need ESR value as well for the C ?

Regards, Dana.

User
5 posts

There is no real definative answer to those questions. The better the range and accuracy the better, but there is no real set guideline as to range and accuracy. This is really supposed to be a first step into PSoC. I only have a very basic knowledge of the material.

User
7646 posts