If you have ever squinted at a tiny, faded brown disc on a PCB, you already know the frustration of identifying passive components. The direct answer to reading a standard 3-digit ceramic capacitor code is simple: the first two digits are the significant figures, and the third digit is the multiplier (number of zeros) in picofarads (pF). For example, a code of 104 means 10 × 10⁴ pF, which equals 100,000 pF, 100 nF, or 0.1 µF.
While memorizing the EIA (Electronic Industries Alliance) standard is useful, bench work demands precision. Faded ink, microscopic surface-mount device (SMD) packages, and tolerance variations make visual inspection unreliable. In this guide, we will break down the complete ceramic capacitor coding system, and then build an automated ESP32-based capacitance meter that measures the component and outputs the exact EIA code to your serial monitor.
The Ceramic Capacitor Code Chart (EIA Standard)
Ceramic capacitors, particularly multilayer ceramic capacitors (MLCCs) and older ceramic discs, rely on a 3-digit numbering system defined by the EIA. The base unit is always the picofarad (pF). Below is the data-dense reference table for the most common codes you will encounter in RF filtering, decoupling, and timing circuits.
| Code | Significant Figures | Multiplier (Zeros) | Picofarads (pF) | Nanofarads (nF) | Microfarads (µF) | Common Application |
|---|---|---|---|---|---|---|
| 101 | 10 | 1 | 100 pF | 0.1 nF | 0.0001 µF | RF tuning, high-frequency bypass |
| 102 | 10 | 2 | 1,000 pF | 1 nF | 0.001 µF | Snubber circuits, EMI filtering |
| 103 | 10 | 3 | 10,000 pF | 10 nF | 0.01 µF | Audio coupling, general decoupling |
| 104 | 10 | 4 | 100,000 pF | 100 nF | 0.1 µF | Standard IC VCC decoupling (most common) |
| 105 | 10 | 5 | 1,000,000 pF | 1,000 nF | 1.0 µF | Bulk decoupling, low-frequency filtering |
| 222 | 22 | 2 | 2,200 pF | 2.2 nF | 0.0022 µF | Crystal oscillator load matching |
| 473 | 47 | 3 | 47,000 pF | 47 nF | 0.047 µF | Timing circuits with 555 timers |
| 224 | 22 | 4 | 220,000 pF | 220 nF | 0.22 µF | Power supply ripple smoothing |
Tolerance Letter Codes
You will often see a letter trailing the 3-digit code (e.g., 104K). This indicates the capacitance tolerance. According to Vishay's ceramic coding documentation, the standard tolerances are:
- J: ±5%
- K: ±10% (Most common for X7R/Y5V dielectrics)
- M: ±20%
- Z: +80% / -20% (Typical for older Z5U dielectrics)
Project Build: ESP32 Capacitance Meter & Code Decoder
Rather than relying on a magnifying glass, we can measure the capacitance directly using the RC time constant method and let a microcontroller calculate the EIA code. We will use the ESP32-WROOM-32 DevKit V1 (30-pin variant). This specific board variant is chosen because it exposes GPIO34, an input-only pin connected to the internal 12-bit ADC, which is ideal for reading analog voltage decay without the risk of accidental output shorts.
Estimated Time: 45 minutes
Estimated Cost: ~$12 (assuming you already own a breadboard and jumper wires)
Parts List & Pin Mapping
| Component | Specification / Variant | ESP32 GPIO Pin | Function |
|---|---|---|---|
| Microcontroller | ESP32-WROOM-32 DevKit V1 (30-pin) | - | Main logic & ADC |
| Charge Resistor | 10 kΩ (1/4W, 1% tolerance) | GPIO 25 | Charges the capacitor |
| Discharge Resistor | 220 Ω (1/4W) | GPIO 26 | Safely discharges the capacitor |
| Test Capacitor | Any ceramic cap (100pF to 10µF) | GPIO 34 (via junction) | Device Under Test (DUT) |
Circuit Wiring & Assembly Steps
The measurement relies on charging the unknown capacitor through a known 10 kΩ resistor and measuring the time it takes to reach 63.2% of the supply voltage (3.3V). For the ESP32's 12-bit ADC (0-4095 range), 63.2% of 4095 is approximately 2588.
- Prepare the Power Rails: Connect the ESP32 3.3V pin to the positive breadboard rail and GND to the negative rail. Do not use the 5V pin; exceeding 3.3V on GPIO34 will permanently damage the ESP32 ADC.
- Wire the Charge Path: Insert the 10 kΩ resistor. Connect one leg to GPIO 25 and the other leg to an empty junction row on the breadboard.
- Wire the Discharge Path: Insert the 220 Ω resistor. Connect one leg to GPIO 26 and the other leg to the same junction row used in Step 2. The 220 Ω resistor limits the discharge current to ~15mA, protecting the ESP32 GPIO from overcurrent when dumping the capacitor's stored energy.
- Wire the Analog Sense: Connect a jumper wire from the capacitor junction row to GPIO 34.
- Connect the DUT: Insert the unknown ceramic capacitor into the junction row (positive leg if polarized, though standard MLCCs are non-polarized) and the breadboard ground rail.
Complete ESP32 Firmware (Arduino IDE)
The following C++ code is fully compilable in the Arduino IDE (ensure you have the ESP32 board manager installed via Espressif's official documentation). It includes pin definitions, timeout error handling, and a lookup function to map the measured value back to the nearest standard ceramic capacitor code.
// Target Board: ESP32-WROOM-32 DevKit V1 (30-pin)
// Ceramic Capacitor Code Decoder & Meter
#define CHARGE_PIN 25
#define DISCHARGE_PIN 26
#define ANALOG_PIN 34
#define ADC_MAX 4095.0
#define THRESHOLD 2588 // 63.2% of 4095 (RC time constant)
#define R_CHARGE 10000.0 // 10k Ohms in Farads calculation base
#define TIMEOUT_MS 5000 // 5 second timeout for large caps
void setup() {
Serial.begin(115200);
pinMode(CHARGE_PIN, OUTPUT);
pinMode(DISCHARGE_PIN, OUTPUT);
pinMode(ANALOG_PIN, INPUT);
// Initial state: discharge
digitalWrite(CHARGE_PIN, LOW);
digitalWrite(DISCHARGE_PIN, LOW);
Serial.println("ESP32 Ceramic Capacitor Meter Ready.");
Serial.println("Insert capacitor and press any key to measure.");
}
void loop() {
if (Serial.available() > 0) {
Serial.read(); // Clear buffer
measureCapacitance();
}
}
void dischargeCap() {
digitalWrite(CHARGE_PIN, LOW);
digitalWrite(DISCHARGE_PIN, HIGH); // Pull low through 220R to GND internally
delay(100); // Allow time to drain
digitalWrite(DISCHARGE_PIN, LOW);
}
void measureCapacitance() {
dischargeCap();
unsigned long startTime = micros();
digitalWrite(CHARGE_PIN, HIGH); // Start charging through 10k
while (analogRead(ANALOG_PIN) < THRESHOLD) {
if ((micros() - startTime) > (TIMEOUT_MS * 1000UL)) {
Serial.println("ERROR: CAP_READ_TIMEOUT: ADC threshold not reached.");
Serial.println("Causes: 1. Cap > 100uF. 2. GPIO34 disconnected. 3. Cap is shorted.");
digitalWrite(CHARGE_PIN, LOW);
return;
}
}
unsigned long elapsedTime = micros() - startTime;
digitalWrite(CHARGE_PIN, LOW);
// Calculate Capacitance: t = R * C => C = t / R
// elapsedTime is in microseconds, R is in Ohms. Result in microfarads (uF)
double capacitance_uF = (double)elapsedTime / R_CHARGE;
double capacitance_nF = capacitance_uF * 1000.0;
double capacitance_pF = capacitance_nF * 1000.0;
Serial.print("Measured: ");
if (capacitance_uF >= 1.0) {
Serial.print(capacitance_uF, 2); Serial.println(" uF");
} else if (capacitance_nF >= 1.0) {
Serial.print(capacitance_nF, 2); Serial.println(" nF");
} else {
Serial.print(capacitance_pF, 0); Serial.println(" pF");
}
String eiaCode = decodeEIACode(capacitance_pF);
Serial.print("Nearest EIA Ceramic Code: ");
Serial.println(eiaCode);
Serial.println("-------------------------");
}
String decodeEIACode(double pF) {
// Standard E12/E24 base values for ceramic caps
double bases[] = {1.0, 1.2, 1.5, 1.8, 2.2, 2.7, 3.3, 3.9, 4.7, 5.6, 6.8, 8.2};
int multipliers[] = {0, 1, 2, 3, 4, 5, 6, 7}; // 10^0 to 10^7
double minDiff = 1e9;
String bestCode = "Unknown";
for (int m = 0; m < 8; m++) {
for (int b = 0; b < 12; b++) {
double testVal = bases[b] * pow(10, m);
double diff = abs(pF - testVal);
if (diff < minDiff) {
minDiff = diff;
// Format code: 2 sig figs + multiplier digit
int sigFigs = round(bases[b] * 10);
String codeStr = String(sigFigs) + String(m);
bestCode = codeStr;
}
}
}
return bestCode;
}
Debugging: Common Errors & First Checks
When working with analog measurements on the ESP32, noise and wiring faults are the primary culprits for failure. If your serial monitor outputs the exact error string ERROR: CAP_READ_TIMEOUT: ADC threshold not reached., do not immediately assume the microcontroller is bricked. Follow this ranked diagnostic path:
- Verify the GPIO34 Junction: The most common mistake is wiring the capacitor to the ground rail instead of the analog sense junction. Use your multimeter in continuity mode to verify that the positive leg of the capacitor, the 10 kΩ resistor, the 220 Ω resistor, and the wire to GPIO34 all share the exact same breadboard node.
- Check for a Shorted DUT: If the ceramic capacitor has failed short (common in MLCCs subjected to mechanical flexure or overvoltage), the ADC will read 0V indefinitely. Remove the capacitor and measure its resistance with a DMM; it should read open-loop (OL). If it reads near 0 Ω, discard the component.
- Validate the Charge Resistor: If you accidentally used a 100 kΩ or 1 MΩ resistor instead of 10 kΩ, the RC time constant will exceed the 5-second software timeout for any capacitor larger than a few nanofarads. Pull the resistor and measure it to confirm it is within 1% of 10,000 Ω.
Extending and Simplifying the Build
The beauty of this RC-decay topology is its scalability. Depending on your bench needs, you can easily modify this design.
How to Extend the Build (Adding an OLED Display)
To make this a standalone bench tool, add a 0.96-inch I2C SSD1306 OLED display. Wire the SDA line to GPIO 21 and SCL to GPIO 22. Install the Adafruit_SSD1306 library via the Arduino Library Manager. Replace the Serial.print() statements in the measureCapacitance() function with display.println() calls. This eliminates the need for a USB tether and allows you to probe capacitors directly on a workbench.
How to Simplify the Build (Downgrading to an Arduino Uno)
If you do not have an ESP32, this exact circuit topology works on an Arduino Uno R3, but you must adjust the firmware math. The Uno operates at 5V logic and uses a 10-bit ADC (0-1023 range).
Required Changes:
1. Change THRESHOLD to 644 (63.2% of 1023).
2. Change ADC_MAX to 1023.0.
3. Connect the sense wire to Analog Pin A0 instead of GPIO34.
Because the Uno's micros() resolution is 4µs (compared to the ESP32's 1µs), the Uno version will be slightly less accurate for very small ceramic codes like 101 (100 pF), but it will perfectly resolve 103 (10 nF) and above.
Understanding the ceramic capacitor code is a fundamental bench skill, but automating the verification process bridges the gap between theory and practical embedded debugging. Keep this reference chart bookmarked, and let the microcontroller do the heavy lifting when the silkscreen fades.






