Build it step by step
0 of 6 doneWire the display
SDA to A4, SCL to A5, VCC to 5V, GND to GND.
Build the test point
Put two spare rows on the breadboard for the capacitor. From D11 add the 10 kΩ resistor to the + row, and from D12 the 220 Ω resistor to the same row.
Sense the voltage
Run a wire from the + row to A0 and one from the − row to GND.
Upload
Install the LCD library and upload.
Measure a known part
Fit a 100 µF capacitor, + leg on the + row. The display should show close to 100 µF.
Use it
Test unknown capacitors. Always discharge big ones and keep the polarity right.
How do you build a capacitance meter?
Charge a capacitor through a 10 kΩ resistor, time how long it takes to reach 63 % of the supply, and show the capacitance on an LCD. You need Arduino Uno R3, Resistor 10 kΩ, Resistor 220 Ω, 16x2 LCD with I2C backpack (PCF8574), Breadboard 830 Tie Points, Jumper wires male to male (40 pcs, 20 cm) and Electrolytic Capacitor 100 µF. It takes 6 steps and about 60 minutes.
- Level
- Beginner
- Time
- About 60 min
- Parts
- 7
Parts list
- Development BoardsBuyArduino Uno R3 × 1
- PassivesBuyResistor 10 kΩ × 1
- PassivesBuyResistor 220 Ω × 1
- DisplaysBuy
- PrototypingBuy
- PrototypingBuy
- PassivesBuyUse one to test, with the polarity right
Tick what you already own. It saves to My Garage, so “Build with what I have” knows.
Wiring
| From | To | Why |
|---|---|---|
| Uno D11 | 10 kΩ resistor to the capacitor's + leg | Charge path |
| Uno D12 | 220 Ω resistor to the capacitor's + leg | Discharge path |
| Capacitor + leg | Uno A0 | Voltage sensing |
| Capacitor − leg | Uno GND | Return |
| LCD SDA / SCL | Uno A4 / A5 | I2C display |
| LCD VCC / GND | Uno 5V / GND | Display power |
Code
Arduino IDE, board "Arduino Uno" (processor ATmega328P, or ATmega328P (Old Bootloader) for clones). Install "LiquidCrystal I2C" by Frank de Brabander. Practical range is about 1 µF to 2000 µF; below that, analogRead() is too slow.
Runs on a virtual Arduino Uno in your browser, with sliders for the sensors. Happy with it? Verify and upload to your real board from the same page (Chrome or Edge on a computer).
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2); // try 0x3F if the screen stays blank
const byte CHARGE = 11, DISCHARGE = 12, SENSE = A0;
const float R_CHARGE = 10000.0; // ohms; measure your resistor for better accuracy
void setup() {
pinMode(CHARGE, OUTPUT); digitalWrite(CHARGE, LOW);
pinMode(DISCHARGE, INPUT);
lcd.init(); lcd.backlight();
lcd.print("Capacitance");
}
void loop() {
// 1. Discharge fully
pinMode(DISCHARGE, OUTPUT); digitalWrite(DISCHARGE, LOW);
while (analogRead(SENSE) > 0) {}
pinMode(DISCHARGE, INPUT);
// 2. Charge through 10 kohm and time to 63.2 % of 5 V (about 647 of 1023)
unsigned long t0 = micros();
digitalWrite(CHARGE, HIGH);
while (analogRead(SENSE) < 647) { if (micros() - t0 > 20000000UL) break; }
float seconds = (micros() - t0) / 1000000.0;
digitalWrite(CHARGE, LOW);
float uF = seconds / R_CHARGE * 1000000.0; // C = t / R, shown in microfarads
lcd.setCursor(0, 1);
lcd.print(" ");
lcd.setCursor(0, 1);
if (uF >= 1) { lcd.print(uF, 1); lcd.print(" uF"); }
else { lcd.print(uF * 1000.0, 0); lcd.print(" nF"); }
delay(1000);
}Test checklist
What you should see at each check. If a reading is far off, stop and use the troubleshooting list.
| Check | Expected |
|---|---|
| 100 µF electrolytic (about ±20 %) | Reads between 80 and 120 µF |
| 1000 µF electrolytic | Reads in the range 800 to 1200 µF, taking about 10 seconds |
| No capacitor fitted | The reading is near 0 or very small |
| Reverse an electrolytic by mistake | Do not do this: it can heat and burst |
If it does not work
The LCD is blank
Turn the contrast trimmer on the backpack, and try address 0x3F.
Readings are always about 5 to 10 % off
Measure the 10 kΩ resistor with a multimeter and put the real value in R_CHARGE.
Small capacitors read nonsense
Under 1 µF the charge time is only microseconds. This build is for larger values.
It never finishes
The capacitor may be leaky or a very large value. The sketch gives up after 20 seconds.
Still stuck? Find the fault step by step with your multimeter →
Common questions
What parts do I need for the capacitance meter?
Arduino Uno R3, Resistor 10 kΩ, Resistor 220 Ω, 16x2 LCD with I2C backpack (PCF8574), Breadboard 830 Tie Points, Jumper wires male to male (40 pcs, 20 cm) and Electrolytic Capacitor 100 µF. Electrolytic Capacitor 100 µF: Use one to test, with the polarity right.
How long does the capacitance meter take to build?
About 60 minutes for a beginner maker, in 6 steps.
How do I know the capacitance meter works?
100 µF electrolytic (about ±20 %): Reads between 80 and 120 µF. 1000 µF electrolytic: Reads in the range 800 to 1200 µF, taking about 10 seconds. No capacitor fitted: The reading is near 0 or very small.
The LCD is blank: what should I check?
Turn the contrast trimmer on the backpack, and try address 0x3F.
Readings are always about 5 to 10 % off: what should I check?
Measure the 10 kΩ resistor with a multimeter and put the real value in R_CHARGE.
Small capacitors read nonsense: what should I check?
Under 1 µF the charge time is only microseconds. This build is for larger values.
It never finishes: what should I check?
The capacitor may be leaky or a very large value. The sketch gives up after 20 seconds.
