Arduino Capacitance Meter Project

In this project you will learn how to make your own arduino capacitance meter (measure the value of capacitor from the range of pF to 1000’s uF). Generally, electronic hobbyist love to design their own gadget rather than buy. In this project we are using two approach for capacitance measurement i.e. charging and discharging approach arduino capacitance meter and multivibrator approach arduino capacitance meter. For measuring low value capacitor, we are using charging and discharging approach and for measuring high value capacitor we are using multivibrator approach. So, before starting describing circuit let’s talk about few terminologies.

Capacitor: A capacitor stores electric energy in the form of electric field being established by the two polarities of charges on the two electrodes of a capacitor.

Capacitance: It is the capability of an element to store electric charge within it. Quantitatively capacitance is a measure of charge per unit voltage that can be stored in an element.

From the formula of capacitor, we found that energy stored by the capacitor is

W = \dfrac{1}{2}cV^2

From the equation we found that the voltage across the capacitor being constant, current through it is zero. This means that the capacitor, an application of d.c. voltage and with no initial charge first acts as short circuit but as soon as the full charge is retaining, the capacitor behaves an open circuit.

Circuit Description of Arduino Capacitance Meter

The circuit of arduino capacitance meter is shown in figure 1 and is build around arduino uno board, a LCD, a timer IC and few other electronic components like resistors, capacitors etc.

arduino capacitance meter circuit

Circuit Connection Description of Arduino Capacitance Meter:

The purpose of using LCD is to display the value of capacitor. The LCD we are using here is of 16×2 alphanumeric type with 16 pins out. 8 Pins out of 16 pins are for data communication. Generally, LCD can be operated in two modes i.e. 8-bit mode and 4-bit mode. In 8-bit mode all the data pin (D0 – D7) is used for communication where in 4-bit mode only higher order data pin (D4 – D7) is used for communication. In the project Arduino Capacitance Meter uses 4-bit data mode. Pins D4 to D7 of LCD is connected to D7 to D4 pin of arduino uno respectively. Enable (E) and SET/RESET (RS) pin is connected to D11 and D12 pin of arduino uno board respectively.

Timer IC 555 is configured in astable multivibrator (Frequency Generator) mode and positive polarity of capacitor to be measured is connected to pin 2 of timer IC and negative polarity of capacitor is connected to ground. The output of timer IC from pin 3 is connected to D2 pin of arduino uno board. The capacitor of lower value generally in pF (Picco Farad) range is measured directly using analog pin using charging and discharging approach as shown in circuit diagram.

Working of Charging Discharging approach (used to measure lower value capacitance 1pF to 100nF).

In this approach the capacitor is first charged and discharged through known resistor. Time constant for a capacitor \tau = R \times C

Where R = Fixed value of resistor used for charging and discharging of capacitor

C = Capacitance of capacitor

The time constant is defined as the time in which charge on the capacitor goes to 63.2% of the maximum value of charge.

The arduino uno board basically measure the time taken by the capacitor to reach the 63.2% of its voltage when it is fully charged and 36.8% of its voltage when it is fully discharged.

From the above expression we found that a resistor is required to charge and discharge the capacitor but in above circuit we are not using external resistor. This is because arduino board have internal pullup and pull-down resistor and capacitor is charged and discharged through this resistor. In this way we can measure capacitance of capacitor using charge and discharge approach.

Multivibrator Approach (Measure capacitor of range 1uF – 1000uF)

Capacitor of high value can be measured using this approach. The timer IC is used in astable mode. In this mode output swing between high and low at constant rate i.e. frequency is generated.

Mathematic involved in Arduino Capacitance Meter

t_{high} = 0.693 \times C \times (R_1 + R_2)

Where R1 = resistor connected between Vcc and pin no 7 of Timer IC 555.

R2 = Resistor connected between pin 7 and pin 6 of timer IC

 t_{low} = 0.693 \times C \times R_2

We know that

 Frequency = \dfrac{1}{Total \ time \ taken} = \dfrac{1}{t_{high} + t_{low}} = \dfrac{1}{0.693 \times C \times (R_1 + R_2) + 0.693 \times C \times _2} = \dfrac{1}{0.693 \times C \times (R_1 + 2R_2)}  Frequency = \dfrac{1.44}{(R_1 + 2R_2) \times C}

The value of resistor is fixed for arduino capacitance meter, two resistor each of 100K-ohm is used. When we insert any capacitor, a constant frequency is generated which is measured by arduino board in term of time. As arduino have inbuild time library function in milli-second.

Capacitance can be calculated in term of time

C = 1.44 \times \dfrac{1}{F} \times \dfrac{1}{R_1 + 2R_2}

If we put the value of resistor in above expression it would look like

C = \dfrac{1.44 \times \ times \ in \ milli-second}{100 \times 10^3 + 2 \times 100 \times 10^3}  = \dfrac{1.44 \times time \ in \ micro-second}{300}
dav

In this way we can calculate the capacitance of capacitor.

If the capacitor is of lower value the error become high in multivibrator approach so we are using charging and discharging approach for lower value of capacitor.

A single pole double throw switch is used to switch between measurement of higher value capacitor and lower value capacitor.

Software Code of Arduino Capacitance Meter: The Software code is written in arduino programming language and compiled in arduino programming language. You can download the code from below and use in your system without making any modification.

Leave a Comment