Given an inductor of an unknown (though magnitude-estimatable) value, and a resistor of precisely known resistance, how can one calculate the inductance of the inductor?

Tools I have at my disposal:

- Oscilloscope (both digital and analogue)
- Signal generator (can make any waveform up to around 20KHz)
- DMM

Some things I have noticed during my experimentations:

- If I apply a sine wave I see a phase shift.
- If I vary the frequency I see different levels of attenuation.
- If I apply a square wave I see sharp peaks at the rising edge and sharp troughs at the falling edge.

Ultimately I'd like something I can sample in some way with a microcontroller – be that with analogue inputs, the use of timers / input capture / output compare, etc, or whatever other means, to then calculate the inductance in use.

I know how to do phase measurement of digital signals, but can this be adapted to measuring the phase of a sine wave?

Alternatively, could I use an LC circuit and use the resonant frequency of that combination in some way?

## Best Answer

We've actually thought about how to do this from a microcontroller to make a cheap L/C/R meter. It needs to be cheap and small because we plan to make a business card that has a useful circuit on it.

Anyway, the answer is probably different from doing this manually with a signal generator and scope or automatically with a microcontroller.

Manually, you can set up a L-R low pass filter. That means input signal to one side of L, R to ground and output other side of L. By feeding in a square wave and looking at the result on a scope you can measure the exponential time constant. The time constant is T = L/R. When L is in Henrys, R in Ohms, then T is in seconds. This will be the time a step gets to 1 - 1/e of its final value, or about 63%. It may be easier to measure the 1/2 decay time, which occurs in .693 time constants. From that you can find the time constant, and from the equation above the inductance by knowing the resistance.

The automated way we will probably use is to measure the magnitude of a known AC signal fed thru the same filter. Higher frequencies will be attenuated more. If you feed in a square wave instead of a single pure frequency (sine wave), then you'll have to do a little more math. But the inductance can be calculated if you know exactly what you stuck in, the value of the resistance, and the magnitude of the outcoming AC signal.