Electronics > Projects, Designs, and Technical Stuff

TeensyLCR – A Teensy based DIY LCR Meter

(1/10) > >>

WeTec:
The story
I have a couple of industrial grade PCBs lying around that are used for audio measurements and was wondering what I could do with them. The boards have audio ADCs and DACs with I2S interface and BNC connectors for in- and outputs. Just for curiosity i dig into the theory of LCR meters. Basic LCR meters using frequencies in the audio range. So why not building an LCR meter with audio ADCs? I kept digging, reading stuff and found this very interesting document:
TIDA-060029 LCR meter analog front end reference design https://www.ti.com/tool/TIDA-060029
This demonstrates a LCR meter analog frontend using an auto balancing impedance bridge. Just a couple of OP amps and analog switches for ranging. Exactly what’s on the boards I have. Well, not exactly but more on that later.
However, it seems absolutely doable and I wanted to give it a go. This was my goal so far:
    • build a working LCR meter with an I2S audio codec
    • using the auto balancing impedance bridge principle
    • using a Teensy as the micro to communicate with the audio codec
I chose the Teensy because there is lots of support for audio stuff.

The first attempt
I started with one of the boards with a CS4272 audio codec, a Teensy 4.1 on a breadboard and some wires between them. Just putting a sine wave out and used the two inputs for measuring voltage and current was not a problem but I was not satisfied with the results. This was mainly because of the missing transimpedance amplifier (a crucial part of the auto balancing bridge). Modifying the board  with some cuts and extra wires was not possible. This was the reason to design a new board from scratch to have something to play with.

The first prototype
I found existing designs that are using the same principle but most of them are using a single channel ADC and a relative complex phase detector. I wanted to use both inputs of the CS4272 to measure voltage and current at the same time and calculating the phase difference in firmware.
Great help was the TI reference design linked above and the documents for the Evaluation Board For CS4272 https://statics.cirrus.com/pubs/rdDatasheet/CDB4272-2.pdf.
I used EasyEDA for the prototype design. Schematics are attached.

As you can see, I used four BNC connectors for true Kelvin measurement. For the prototype I used the sample service from TI and Analog Devices to get the OP amps, analog switches, the LDO and switching regulators. I salvaged some other parts from the boards mentioned above. I placed a couple of pin headers to connect keypad and display later. There is an EEPROM to store calibration data and other settings. There is a I2C temperature sensor next to the codec to be able to compensate temperature drifts (not implemented yet).
After some excessive coding sessions with Arduino and the Teensy Audio Library I was able to measure voltage and current and did the phase calculation with help of the Audio Library. The phase calculation works exactly the same way as in the TI reference design document. No fancy FFT stuff, just complex math. And it works very well! It works surprisingly well!

The device
I decided to go further and put the board with a display and a custom keyboard into a 19” case that I have laying around. Now I have a fully functional LCR meter. A very useful device:

Well, the case is quit big for just the main PCB, power supply, display and keyboard. I don’t wanted to buy or build a new case and size was not a limiting factor. But hey, plenty of space for future extensions (DC bias?).
Two 3D printed parts where made for the display and the keyboard front panel. I’ve used the keys of an old pocket calculator from the junk box.

The specs
I did measurements with 0.1% resistors from 100 Ohm to 1 MOhm as reference. Results are within 0.5%. So I guess I got a basic accuracy of at least 1% (not for all impedance ranges of course). I think I can improve that further by reworking the calibration routine.

I set the display resolution to 5 digits, which means in fact 100,000 counts. This is quite much for an accuracy of 1%. But this helps me to find out the limits of the device.
Please note: The CS4272 is a 24 bit codec but the Teensy Audio Library uses 16 bit only.

There are four ranges: 100R, 1k, 10k, 100k. The range will be selected automatically according to the impedance of the DUT.

Selectable test frequencies: 100 Hz, 1 kHz, 10 kHz  (48 kHz sample rate).

Selectable test levels: 300 mV, 600 mV, 1 V

The following complex parameter of the DUT can be measured (fixed combinations of them):
    • Rs   // equivalent series resistance (ESR)
    • Rp   // parallel resistance
    • Cs   // series capacitance
    • Cp   // parallel capacitance
    • Ls   // series inductance
    • Lp   // parallel inductance
    • Phi  // phase angle of impedance
    • Xs   // series reactance
    • Z    // impedance
    • Q    // quality factor
    • D    // dissipation factor
    • G    // conductance
    • B    // susceptance

Moving average of the readings can be set from 1 to 256.

Edit: updated schematics

GitHub project page: https://github.com/wschuma/TeensyLCR

moffy:
A nice lowish frequency VNA. :)

WeTec:
I will post more details and measurement results soon. Please be patient :)

WeTec:
I did some capacitor measurements yesterday. Here are the results.

Lets start with a 1.5pF ceramic cap:


Reading is 2.1pF. There is no open/short correction implemented yet.

10pF:


Reading is 10.8pF

100pF:


Reading is 102.1pF

Now some polystyrol film caps. 1.5nF 1%:


Reading is 1.5064nF.

Here is a 13.85nF 0.5% cap:


Reading is 13.943pF.

100nF 1%:


Reading is 100.21nF

1uF:


Reading is 1.0087uF

Ok, lets get to the big ones. Now with 100Hz test frequency and Cs-Rs mode. 1000uF:


Reading is 1.0199mF

5600uF:


Reading is 4.7295mF. Hmm, nearly 15% off. Did I found a bad one in my box?

4700uF:


Reading is 5.6286mF. What? A 5.6mF cap reads 4.7mF and vice versa?

WeTec:
Lets check another one.


Reading is 4.9859mF. Ok. Well, it is not uncommon that this type of caps have a relativ high tolerance value, e.g. +20%/-10%.

Now some big power supply caps. 10,000uF:


Reading is 10.032mF.

The (physically) biggest cap I have. 22,000uF:


Reading is 23.027mF. Quite low ESR by the way.

35,000mF:


Reading is 30.629mF. The value is 13% lower than specified. The upper end of the capacitance range?

However, it seems to work quite well so far...

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod