• Skip to main content
  • Skip to primary sidebar

Homemade Circuit Projects

Need circuit help? Post them in the comments! I've answered over 50,000!

Blog | Categories | About | Contact | Calculators-online
You are here: Home / Arduino Projects / Digital Capacitance Meter Circuit Using Arduino

Digital Capacitance Meter Circuit Using Arduino

Last Updated on December 5, 2024 by Swagatam 4 Comments

In this post I will show how 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:

 
Cap meter 2


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.

Cap meter 3

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:

Webp.net compress image 5

You'll also like:

  • 1.  Accurate Speedometer Circuit
  • 2.  How to Make a Shunt Resistor
  • 3.  How to Interface Servo motors with Arduino
  • 4.  High Voltage Meter Circuit [for Measuring 10kV]
  • 5.  Ultrasonic Distance Meter Circuit Using 16×2 LCD
  • 6.  Mp3 Player Using DF Player – Full Design Details

About Swagatam

I am an electronics engineer with over 15 years of hands-on experience. I am passionate about inventing, designing electronic circuits and PCBs, and helping hobbyists bring their projects to life. That is why I founded homemade-circuits.com, a website where I share innovative circuit ideas and tutorials. Have a circuit related question? Leave a comment.... I guarantee a reply!

Previous Post: « Arduino Tachometer Circuit for Precise Readings
Next Post: How to Control Servo Motor Using Joystick »

Reader Interactions

Comments

  1. Madina Shanu says

    August 17, 2017 at 9:13 am

    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

    Reply
    • Swagatam says

      August 17, 2017 at 2:52 pm

      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

      Reply
  2. Shahan Shah Gsm says

    August 16, 2017 at 6:45 am

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

    Reply
    • Swagatam says

      August 17, 2017 at 2:11 am

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

      Reply

Need Help? Please Leave a Comment! We value your input—Kindly keep it relevant to the above topic! Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Subscribe to New Circuit Ideas

Categories

  • Arduino Projects (87)
  • Audio and Amplifier Projects (132)
  • Automation Projects (17)
  • Automobile Electronics (101)
  • Battery Charger Circuits (82)
  • Datasheets and Components (102)
  • Electronics Theory (143)
  • Free Energy (37)
  • Games and Sports Projects (11)
  • Grid and 3-Phase (19)
  • Health related Projects (25)
  • Home Electrical Circuits (12)
  • Indicator Circuits (14)
  • Inverter Circuits (87)
  • Lamps and Lights (142)
  • Meters and Testers (69)
  • Mini Projects (46)
  • Motor Controller (64)
  • Oscillator Circuits (27)
  • Pets and Pests (15)
  • Power Supply Circuits (108)
  • Remote Control Circuits (50)
  • Security and Alarm (64)
  • Sensors and Detectors (100)
  • Solar Controller Circuits (59)
  • Temperature Controllers (42)
  • Timer and Delay Relay (49)
  • Transmitter Circuits (29)
  • Voltage Control and Protection (37)
  • Water Controller (36)

Calculators

  • 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
  • Transistor Astable Calculator
  • Transistor base Resistor Calculator
  • Voltage Divider Calculator
  • Wire Current Calculator
  • Zener Diode Calculator
  • Filter Capacitor Calculator
  • Buck Converter Calculator
  • Boost Converter Calculator
  • Solar Panel, Inverter, Battery Calculator
  • Wire Current Calculator
  • SMPS Transformer Calculator
  • IC SG3525, SG3524 Calculator
  • Inverter LC Filter Calculator

People Also Search

555 Circuits | 741 Circuits | LM324 Circuits | LM338 Circuits | 4017 Circuits | Ultrasonic Projects | SMPS Projects | Christmas Projects | MOSFETs | Radio Circuits | Laser Circuits | PIR Projects |

Recent Comments

  • Swagatam on Simple Delay Timer Circuits Explained
  • Swagatam on The Role of Inductor Coil in SMPS
  • Swagatam on 7 Modified Sine Wave Inverter Circuits Explored – 100W to 3kVA
  • Swagatam on 7 Modified Sine Wave Inverter Circuits Explored – 100W to 3kVA
  • Victor on 7 Modified Sine Wave Inverter Circuits Explored – 100W to 3kVA

Company

  • Privacy Policy
  • Cookie Policy
  • About Me
  • Contact
  • Disclaimer
  • Copyright
  • Videos
  • Sitemap

Social Profiles

  • Twitter
  • YouTube
  • Instagram
  • Pinterest
  • My Facebook-Page
  • Quora
  • Stack Exchange
  • Linkedin
  • © 2025 · Swagatam Innovations