Vector Impedance Meter
Most of my professional work is under NDA, so it isn’t shown on this site. This project is from my MSc and can be shared in full.
An LCR meter built for the Instrumentation module. It applies a sine wave to a component, measures the voltage across it and the current through it, and uses an FFT to find its impedance and phase. The phase tells it whether the part is a resistor, capacitor or inductor.

- Module
- ELEC70055 Instrumentation, Imperial College London
- Year
- 2024, MSc
- Tools
- KiCad, LTspice, FreeCAD, STM32CubeIDE
- Result
- Working at the final demo
- 100 Hz–100 kHzTest frequency range
- 1 MHzADC sample rate
- 4-wireKelvin connection to the part
- ±20°Phase tolerance for sorting R, L and C
- 85Components on a 2-layer PCB
Inside the meter
Built from the KiCad board and the FreeCAD case. Scroll to take it apart.
Loading the 3D view…
Measuring impedance
The STM32 outputs a sine wave from its DAC through the part. One path converts the current through the part into a voltage; the other measures the voltage across it. Both go through the same multiplexer, gain stage and ADC, so any offset affects both equally and cancels when one is divided by the other. An FFT gives the magnitude and phase at the test frequency.
Measurements
Frequency sweeps from 10 to 100 kHz on four capacitors. It measured capacitors from tens of picofarads to nanofarads, resistors from a few ohms to 200 Ω, and inductors in the millihenry range.
- 10 nF
- 15 pF
- 20 pF
- 22 pF
- 10 nF
- 15 pF
- 20 pF
- 22 pF
- ADC count (0–4095)
- From ADC, calibrated
- Bench measurement
Show the numbers · 10 nF
| kHz | Bench pk-pk (V) | Phase (°) | ADC count | Calibrated (V) |
|---|---|---|---|---|
| 10 | 1.78 | -70.3 | 2080 | 1.780 |
| 20 | 1.40 | -75 | 1626 | 1.414 |
| 30 | 1.20 | -84 | 1398 | 1.231 |
| 40 | 0.98 | -88 | 1088 | 0.981 |
| 50 | 0.86 | -96 | 949 | 0.869 |
| 60 | 0.98 | -100 | 1075 | 0.970 |
| 70 | 0.98 | -104 | 1144 | 1.026 |
| 80 | 0.90 | -110 | 970 | 0.886 |
| 90 | 0.76 | -114 | 780 | 0.733 |
| 100 | 0.62 | -115 | 667 | 0.642 |
Why these parts
- Microcontroller
STM32F405, not ATmega328PB
The test signal had to reach 100 kHz. With an external DAC the ATmega managed about 1 kHz. The STM32 has a DAC and DMA built in, and ADCs fast enough to sample at 1 MHz.
ATmega328PB with an MCP4812 DAC
- Current
Auto balancing bridge
An op-amp holds one end of the part at virtual ground, so all its current flows through a known shunt resistor. The voltage across the shunt gives the current.
A series resistor, which loads the part
- Connection
Four wires
Two leads carry the current and two sense the voltage. No current flows in the sense leads, so their resistance does not affect the reading.
Two leads, which add their own resistance
- Range
Four switchable shunts
If a reading saturates the ADC at 4095, the firmware switches to the next shunt and measures again. This widens the range of parts it can measure.
One fixed shunt
- Voltage
INA128 instrumentation amplifier
Its 120 dB common-mode rejection lets it measure the small voltage across the part while ignoring what both leads share.
A discrete difference amplifier
- Power
Linear regulators
Two MIC5205 LDOs make 5 V and 3.3 V from USB. A switching regulator would add ripple to the measurement.
A switching regulator
What went wrong
The board runs from a single 0–3.3 V supply. With the bridge referenced to 0 V, the negative half of the signal fell below the supply rail and was clipped. Adding a 1.65 V reference fixed it, but reduced the dynamic range.
The negative half of the signal falls below the 0 V rail and is clipped, so the current reading is wrong.
A 1.65 V reference moves virtual ground to the middle of the supply, so the whole signal fits.

- Two Kelvin lines were shortedLow potential and low current were joined in the schematic. Cutting tracks and adding patch wires restored the four-wire connection.
- Too much gainThe gain stage assumed a small signal. After the 1.65 V offset the signal was already large, which narrowed the measurable range.
- One op-amp too manyThe quad TLV9054 had a spare channel that could have replaced the TL071.
- Above 100 kHzThe bridge cannot hold virtual ground at higher frequencies. Commercial meters add extra circuitry for this.
The hardware




Based on Adil Malik’s STM32 FFT LCR meter.