• Skip to main content
  • Skip to primary sidebar

Homemade Circuit Projects

Get free circuit help 24/7

New Projects | Privacy Policy | About Us | Contact | Disclaimer | Copyright | Videos 

You are here: Home / Arduino Engineering Projects / Digital Capacitance Meter Circuit Using Arduino

Digital Capacitance Meter Circuit Using Arduino

Last Updated on March 8, 2019 by Swagatam

In this post we are going to construct a digital capacitance meter circuit using Arduino which can measure capacitance of capacitors ranging from 1 microfarad to 4000 microfarad with reasonable accuracy.

Introduction

We measure value of the capacitors when the values written on the capacitor’s body is not legible, or to find the value of the ageing capacitor in our circuit which need to be replaced soon or later and there are several other reasons to measure the capacitance.

To find the capacitance we can easily measure using a digital multimeter, but not all multimeters have capacitance measuring feature and only the expensive multimeters have this functionality.

So here is a circuit which can be constructed and used with ease.

We are focusing on capacitors with larger value from 1 microfarad to 4000 microfarad which are prone to lose its capacitance due to ageing especially electrolytic capacitors, which consist of liquid electrolyte.

Before we go into circuit details, let’s see how we can measure capacitance with Arduino.

Most Arduino capacitance meter relies on RC time constant property. So what is RC time constant?

The time constant of RC circuit can be defined as time taken for the capacitor to reach 63.2 % of the full charge. Zero volt is 0 % charge and 100% is capacitor’s full voltage charge.

The product of value of resistor in ohm and value of capacitor in farad gives Time constant.

T = R x C

T is the Time constant

By rearranging the above equation we get:

C = T/R

C is the unknown capacitance value.

T is the time constant of RC circuit which is 63.2 % of full charge capacitor.

R is a known resistance.

The Arduino can sense the voltage via analog pin and the known resistor value can be entered in the program manually.

By applying the equation C = T/R in the program we can find the unknown capacitance value.

By now you would have an idea how we can find the value of unknown capacitance.

In this post I have proposed two kinds of capacitance meter, one with LCD display and another using serial monitor.

If you are frequent user of this capacitance meter it is better go with LCD display design and if you are not frequent user better go with serial monitor design because it save you some bucks on LCD display.

Now let’s move on to circuit diagram.

Serial Monitor based capacitance meter:

 
caution electricity can be dangerous


As you can see the circuit is very simple just a couple of resistors are needed to find the unknown capacitance.The 1K ohm is the known resistor value and the 220 ohm resistor utilized for discharging the capacitor while measurement process takes place.The Arduino sense the rising and decreasing voltage on pin A0 which is connected between 1K ohm and 220 ohm resistors.Please take care of the polarity if you are using polarized capacitors such as electrolytic.Program:
//-----------------Program developed by R.Girish------------------//
const int analogPin = A0;
const int chargePin = 7 ;
const int dischargePin = 6;
float resistorValue = 1000 // Value of known resistor in ohm
unsigned long startTime;
unsigned long elapsedTime;
float microFarads;
void setup()
{
Serial.begin(9600);
pinMode(chargePin, OUTPUT);
digitalWrite(chargePin, LOW);
}
void loop()
{
digitalWrite(chargePin, HIGH);
startTime = millis();
while(analogRead(analogPin) < 648){}
elapsedTime = millis() - startTime;
microFarads = ((float)elapsedTime / resistorValue) * 1000;
if (microFarads > 1)
{
Serial.print("Value = ");
Serial.print((long)microFarads);
Serial.println(" microFarads");
Serial.print("Elapsed Time = ");
Serial.print(elapsedTime);
Serial.println("mS");
Serial.println("--------------------------------");
}
else
{
Serial.println("Please connect Capacitor!");
delay(1000);
}
digitalWrite(chargePin, LOW);
pinMode(dischargePin, OUTPUT);
digitalWrite(dischargePin, LOW);
while(analogRead(analogPin) > 0) {}
pinMode(dischargePin, INPUT);
}
//-----------------Program developed by R.Girish------------------//

Upload the above code to Arduino with completed hardware setup, initially don’t connect the capacitor. Open the serial monitor; it says “Please connect capacitor”.

Now connect a capacitor, its capacitance will be displayed as illustrated below.

It also shows the time taken to reach 63.2% of the capacitor’s full charge voltage, which is shown as elapsed time.

Digital Capacitance Meter Using Arduino

Circuit diagram for LCD based capacitance meter:

The above schematic is connection between LCD display and Arduino. The 10K potentiometer is provided for adjusting the contrast of the display. Rest of the connections are self-explanatory.

The above circuit is exactly same as serial monitor based design; you just need to connect LCD display.

Program for LCD based capacitance meter:

//-----------------Program developed by R.Girish------------------//
#include<LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
const int analogPin = A0;
const int chargePin = 7 ;
const int dischargePin = 6;
float resistorValue = 1000; // Value of known resistor in ohm
unsigned long startTime;
unsigned long elapsedTime;
float microFarads;
void setup()
{
Serial.begin(9600);
lcd.begin(16,2);
pinMode(chargePin, OUTPUT);
digitalWrite(chargePin, LOW);
lcd.clear();
lcd.setCursor(0,0);
lcd.print(" CAPACITANCE");
lcd.setCursor(0,1);
lcd.print(" METER");
delay(1000);
}
void loop()
{
digitalWrite(chargePin, HIGH);
startTime = millis();
while(analogRead(analogPin) < 648){}
elapsedTime = millis() - startTime;
microFarads = ((float)elapsedTime / resistorValue) * 1000;
if (microFarads > 1)
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Value = ");
lcd.print((long)microFarads);
lcd.print(" uF");
lcd.setCursor(0,1);
lcd.print("Elapsed:");
lcd.print(elapsedTime);
lcd.print(" mS");
delay(100);
}
else
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Please connect");
lcd.setCursor(0,1);
lcd.print("capacitor !!!");
delay(500);
}
digitalWrite(chargePin, LOW);
pinMode(dischargePin, OUTPUT);
digitalWrite(dischargePin, LOW);
while(analogRead(analogPin) > 0) {}
pinMode(dischargePin, INPUT);
}
//-----------------Program developed by R.Girish------------------//

With the completed hardware setup upload the above code. Initially don’t connect the capacitor. The display shows “Please connect capacitor!!!” now you connect the capacitor. The display will show the capacitor’s value and elapsed time taken to reach 63.2% of full charge capacitor.

Author’s Prototype:

Get New Circuit Diagrams in your Email

You'll also like:

  • 1.  Stud Finder Circuit – Find Hidden Metals Inside Walls
  • 2.  Simple Transformer Winding Tester Circuit
  • 3.  How to Interface Servo motors with Arduino
  • 4.  How to Measure Gain (β) of a BJT
  • 5.  Satellite Signal Strength Meter Circuit
  • 6.  How to Make Arduino on Breadboard – Step by Step Instructions

About Swagatam

Swagatam is an electronic engineer, hobbyist, inventor, schematic/PCB designer, manufacturer. He is also the founder and the author of the website: https://www.homemade-circuits.com/, where he loves sharing his innovative circuit ideas and tutorials.
If you have any circuit related queries, you may interact through comments, and get guaranteed replies from the author.

Reader Interactions

Comments

  1. Madina Shanu says

    August 17, 2017

    to u and yr family.
    Sr i want to glow up 7000 to 8000 leds with 220 v ac and want them just blinking.
    Kindly guide and help me giving a appropriate ckt.

    Thanks and best regards in advance

    • Swagatam says

      August 17, 2017

      Madina, you can use the designs shown in the following link and connect LEDs in series and parallel at the points where the word load is specified..each series string should have 93 LEDs in series with a 1K/2 watt resistor

      https://www.homemade-circuits.com/2013/07/simple-triac-timer-circuit.html

  2. Shahan Shah Gsm says

    August 16, 2017

    Hello sir can u send .net a circuit .of wifi in which range is 3 km

    • Swagatam says

      August 17, 2017

      if it's possible we'll try to update it



Primary Sidebar

Categories

  • 3-Phase Power (15)
  • 324 IC Circuits (19)
  • 4017 IC Circuits (52)
  • 4060 IC Circuits (27)
  • 555 IC Circuits (99)
  • 741 IC Circuits (20)
  • Arduino Engineering Projects (83)
  • Audio and Amplifier Projects (126)
  • Battery Chargers (83)
  • Car and Motorcycle (96)
  • Datasheets (78)
  • Decorative Lighting (Diwali, Christmas) (33)
  • Electronic Components (101)
  • Electronic Devices and Circuit Theory (36)
  • Electronics Tutorial (121)
  • Fish Aquarium (5)
  • Free Energy (34)
  • Fun Projects (15)
  • GSM Projects (9)
  • Health Related (22)
  • Heater Controllers (31)
  • Home Electrical Circuits (107)
  • How to Articles (20)
  • Incubator Related (6)
  • Industrial Electronics (28)
  • Infrared (IR) (40)
  • Inverter Circuits (99)
  • Laser Projects (13)
  • LED and Light Effect (101)
  • LM317/LM338 (22)
  • LM3915 IC (25)
  • Meters and Testers (69)
  • Mini Projects (152)
  • Motor Controller (69)
  • MPPT (7)
  • Oscillator Circuits (25)
  • PIR (Passive Infrared) (9)
  • Power Electronics (35)
  • Power Supply Circuits (86)
  • Radio Circuits (10)
  • Remote Control (50)
  • Security and Alarm (66)
  • Sensors and Detectors (132)
  • SG3525 IC (5)
  • Simple Circuits (75)
  • SMPS (29)
  • Solar Controllers (63)
  • Timer and Delay Relay (55)
  • TL494 IC (5)
  • Transformerless Power Supply (9)
  • Transmitter Circuits (42)
  • Ultrasonic Projects (17)
  • Water Level Controller (45)

Calculators

  • AWG to Millimeter Converter
  • Battery Back up Time Calculator
  • Capacitance Reactance Calculator
  • IC 555 Astable Calculator
  • IC 555 Monostable Calculator
  • Inductance Calculator
  • LC Resonance Calculator
  • LM317, LM338, LM396 Calculator
  • Ohm’s Law Calculator
  • Phase Angle Phase Shift Calculator
  • Power Factor (PF) Calculator
  • Reactance Calculator
  • Small Signal Transistor(BJT) and Diode Quick Datasheet
  • Transistor Astable Calculator
  • Transistor base Resistor Calculator
  • Voltage Divider Calculator
  • Wire Current Calculator
  • Zener Diode Calculator

© 2023 · Swagatam Innovations