# Measure an inductance or capacitance using an oscilloscope

Posted by Fred C (W6BSD) on Mar 18 2022

Resistors, inductors, and capacitors are passive components used in every electronic circuit. Usually, the value is marked on the resistor or capacitor, either as a color code or a number. Often, inductors have no markings, especially those with a ferrite core or an air core. To measure their value, professionals use an LCR meter1. A good LCR meter is convenient and easy to use, but it can be expensive. This article will explain how to use an oscilloscope to measure the value of the inductor using a known capacitor. The same method can also be used to measure the value of a capacitor using a known inductor.

The accuracy of your measurement will greatly depend on the precision of the capacitor. Try to use a capacitor with a low tolerance.

To measure the value of an unknown inductor, you will need an oscilloscope, a way to generate a pulse, a capacitor with a known value, and a pocket calculator.

To generate the pulse, you can use a signal generator. If you don't have a signal generator, you can homebrew a simple pulse generator using a NE555 or a couple of transistors. You can also use the GPIO PWM2 pin of a microcontroller such as the Arduino, ESP32, or ESP8266.

## The L-C Tank Circuit

An L-C Tank Circuit is a resonant circuit consisting of an inductor and a capacitor. Like a tuning fork that oscillates at its resonant frequency after hitting it, an electronic tank circuit oscillates at its resonant frequency after sending a current pulse. The resonant frequency of a tank circuit will depend on the values of the inductor and the capacitor. Using the following formula, we can determine the resonant frequency or the value of the inductor or the capacitor.

$$F = {\frac {1}{2\pi {\sqrt {LC}}}}$$
$$L = {\frac {1}{(2\pi F)^2 C}}$$
$$C = {\frac {1}{(2\pi F)^2 L}}$$

## Pulse generator

I will use a Raspberry-Pi Pico with the simple MicroPython program shown below to generate the pulses.

After importing the modules, I set a timer to blink the Raspberry-Pi's on-board LED. This part is optional, but it gives me a visual clue that the program is running.

Then, I use the PWM pin 16 to send a pulse at 1 kHz with a 50% duty cycle.

from machine import Pin, PWM, Timer

led = Pin(25, Pin.OUT)
timer = Timer()
timer.init(freq=2, mode=Timer.PERIODIC, callback=lambda x: led.toggle())

pwm = PWM(Pin(16))
pwm.freq(1000)               # 1kHz
pwm.duty_u16(int(65535/2))   # duty 100% = 65535


The Raspberry-Pi will make the tank circuit oscillate at its resonant frequency every five hundred milliseconds. On the rising and falling edge of the square signal. With the oscilloscope, I can then measure the resonant frequency of the L-C tank circuit.

## The circuit

The following two pictures show the schematic and the breadboard. The 10pF coupling capacitor between the RPi-Pico and the tank circuit will block any DC coming from the micro-controller. The tank circuit consists of a known capacitor of 100 pF and an unknown inductor.

The following oscilloscope screenshot shows the micro-controller sending a pulse every 500 milliseconds, followed by the "ringing" of the L-C tank circuit.

## Measurements

Zooming in on the pulse shows the oscillating tank circuit.

I use the cursors to measure the period of the wave (one full sinusoid). In our example, the period is 568.0ns and a frequency of 1.825MHz.

If your oscilloscope only displays the period, you can calculate the frequency by taking the reciprocal of the period. $$F = \frac{1}{\Delta T} = \frac{1}{548 \cdot 10^{-9}} = 1824817Hz = 1.8248MHz$$

It is now easy to calculate the value of the inductance. We plug the numbers we have into the formula:

• Frequency: 1.825 MHz = 1.825 . 106 Hertz
• Capacitor: 100 pF = 100 . 10-12 Farad
\begin{align} L &= {\frac {1}{\left(2\pi F\right)^2 C}} \\ &= {\frac {1}{ \left( 2\pi \times 1.825 \cdot 10^6 \right)^{2} \times 100 \cdot 10^{-12} }} \\ &= 7.6052 \times 10^{-5} \\ &= 76.6\mu{H} \end{align}

The value of our unknown inductor is $$76\mu{H}$$.

It is easier to use the calculator below than to punch all the numbers into your pocket calculator.

## LC Resonance Calculator

Enter the frequency you read from your oscilloscope and the capacitor. Then press click on the Calculate button to compute the inductance.

Frequency: MHz pF nH

You can enter any two values in this calculator, and the calculator will calculate the missing value. Don't forget to click the reset button before a new calculation.

1. An LCR meter is an electronic test equipment used to measure inductance (L), capacitance (C), & resistance (R).

2. Pulse Width Modulation