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:
- 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.
- Measure the time for a single cycle, in microseconds. This works well when the frequency is low.
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.
- 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