Page 1 of 1

### Capacitance Meter

Posted: Sat Sep 18, 2010 8:52 pm
Thanks to johngineer for posting my capacitance meter project on the blog. Here are some more details.

This is the finished project mounted in an Adafruit enclosure:

More pics here

I got the basic idea from mikewitt here. It uses an oscillator circuit made from a 555 timer in astable mode. The frequency of the oscillator depends on the capacitor being measured. I have attached a schematic of the measurement circuit at the end of this post (LCD hookup not shown). Ladyada has a tutorial showing how to hook up the LCD and mount it in the enclosure.

Measuring the frequency is a bit tricky because it ranges from a couple of hertz up to a few hundred kilohertz. In the software I implemented two different methods to measure the frequency:
1. Count the number of cycles in one second. This works well when the frequency is high, but if it’s low you have to wait many seconds to get enough cycles for an accurate estimate.
2. Measure the time for a single cycle, in microseconds. This works well when the frequency is low.
My sketch tries method 1 (using the AVR chip’s Timer1 with an external clock) and if that doesn’t give a good result it uses method 2. The result is displayed on the LCD character display.

I used a proto shield, with a small daughter-board mounted above it to hold a pushbutton and a socket for the capacitor, so they fit in the holes in the front of the enclosure. (Photo)

Now, I don’t really know how accurate this capacitance meter is. I haven’t tried to calibrate it against a “proper” meter. It’s good enough that I can use it to read ceramic caps, instead of a magnifying glass. The main drawback is that it doesn’t work for values below about 1 nF. It can read smaller values if I use different resistors in the measurement circuit, but then it wouldn’t work well for large values (100 uF). I had to pick a compromise.

Parts used:
• Diavolino Arduino clone from Evil Mad Scientist Laboratories
• DIY shield
• 16x2 character LCD
• Arduino enclosure
• LM555CN timer chip
• 1k ohm 1% resistors (2)
• Tactile pushbutton switch
• Socket strip to plug in the capacitor being measured

### Re: Capacitance Meter

Posted: Sat Sep 18, 2010 9:01 pm
Here's the source code for the Arduino sketch.

### Re: Capacitance Meter

Posted: Sun Dec 11, 2011 7:09 pm