Measuring Impedance Using An Open-Source Instrumentation Platform
Measuring Impedance Using An Open-Source Instrumentation Platform
net/publication/323481153
CITATION READS
1 4,695
4 authors:
All content following this page was uploaded by Zumret Topcagic on 20 April 2018.
platform
Abstract
The article presents development and design of a precision LCR meter based on an
affordable open-source instrumentation platform. The design of the instrument has
been performed by an interdisciplinary group of students. A project-based approach
has been used in order to make a practical use of engineering knowledge within the
group of participants. The results cover all the necessary project results achieved by
the participants from the state-of-the art analysis in the domain of LCR meters to
dissemination of project results. These may serve as a guide for similar project
specifications. Alternatively, the presented results may be used in preparing student
assignments in electrical impedance measurements based on affordable hardware.
Keywords
LCR, impedance, measurement, education, industrial project
Introduction
Electrical impedance is an important parameter used to characterize the behavior
of a two-terminal (one-port) electrical circuit. It demonstrates to what extent the
circuit opposes the alternating current flow. Impedance is a complex quantity
electrical engineering. Starting to design electrical circuits and devices, young engi-
neers often realize that a physical electrical component may not match the expect-
ations based on its ideal model. We used a project-based learning approach,1,2 to
improve the understanding of the physical components’ behavior. We decided to
propose a project activity that would give the participating students a first-hand
experience with the caveats of impedance measurements.
We have defined the scope of the project in the initial project proposal. Based
upon the desired outcomes, the students were allowed to plan the project activities
4 International Journal of Electrical Engineering Education 0(0)
Results
LCR measurement instruments
The project participants have analyzed typical commercially available LCR meters
for their measurement method, technical characteristics, and price–performance
ratio. The analysis should help to determine a list of goals the designed instrument
should achieve. They have identified a variety of commercial LCR meters in the
following main categories:
Handheld digital multimeters can measure resistance and capacitance, some even
inductance of a passive electrical component. The measurement is usually based on
time constant method. The meters in this class are affordable and have a typical
accuracy of 1%. These instruments measure only a dominant electrical value and
cannot provide complex measurement results. These instruments are affordable
and their price starts at 15 USD.
Handheld LCR meters are portable, lightweight, and operate on batteries. Most
models can operate at multiple test frequencies and provide an interface to an
external PC, usually via USB port. They are intended for general use and are
practical for field maintenance and repair applications. These meters utilize AC
measurement methods and can typically provide resistive and reactive readouts.
The expected accuracy of measurement is within 0.2–0.1%. The price range is
moderate, within 200–1,000 USD.
Benchtop LCR meters, in general, offer more features compared to handheld instru-
ments which include programmable frequencies, computer control and data collection
for automated applications, DC bias voltage, DC bias current, and sweep capabilities.
They offer a better measurement accuracy of up to 0.01%. They are used for
laboratory tasks like AC calibration of inductance, capacitance and resistance
standards, measurements of dielectric constant, and testing of components and sensors
in production. The price range is high, in range from 2000 to 20,000 USD.
that VC ðTÞ ¼ Vmax ð1 e1 Þ 63%Vmax , so the capacitance can be directly calcu-
lated from measured s as C ¼ s=R.
Adequately, if voltage source is connected to an inductor, the voltage on an
inductor decreases as VL ðtÞ ¼ Vmax ðes Þ; s ¼ L=R and inductance is obtained from
t
VR VZ
R
DUT
D
D
R
DUT
L
Virtual bridge
Figure 1. Typical circuits for impedance measurements. DUT: device under test.
6 International Journal of Electrical Engineering Education 0(0)
Z1
Zx ¼ Z3
Z2
With a bridge circuit we can measure impedance using relatively simple indica-
tor instruments. No complex measurement instruments are required, which was of
a particular importance in time of analog instruments. The method is, however,
cumbersome as not only modulus but also the phase of the impedances should be
“balanced” in order to get zero reading of the detector (D).
driven instruments are available by the provider, and custom solutions can be
made by the user as the entire system software is open and well documented.
The system offers a pair of fast analog inputs and fast analog outputs, operating at
125 millions of samples per second (MS/s) with a precision of 14 bits. The inputs are
DC coupled, with bandwidth of 50 MHz (3 dB). Additionally, it provides 16 general
purpose input/output, four low-speed analog signal inputs, and four low-speed analog
signal outputs. Data access, configuration, and control of the system is enabled over a
wired Gigabit Ethernet connection, or, alternatively, using a Wi-Fi module in the
form of USB dongle. The Zynq, 7010 system-on-chip is powered by a Xilinx’s build of
Linux operating system. The SoC utilizes a dual-core Cortex A9 processor combined
with a 28K logic cell FPGA for heavy real-time signal processing.7 A web interface is
commonly used as a user interface as there is no native display provided. The system
architecture is presented in Figure 2 with technical specifications listed at the official
RedPitaya documentation website.8
The deployed hardware platform boots from an SD card into a Linux-based Red
Pitaya operating system running on an ARM Cortex processing core. The minimum
SD card size is 4 GB. Red Pitaya is a networked device and the initial configuration
should normally be provided through DHCP in a local network. An IP discovery
service assists the user through first-time configuration operations.
Upon booting, the device is operated through a web browser using a STEMLab
interface. This is an environment designed by the manufacturer of a device, from which
the user can start one of the preinstalled instruments, initiate Standard Commands for
Programmable Instrumentation (SCPI) server providing Matlab/Scilab/Python/
LabView data connectivity or load additional instruments. Apart from a set of officially
supported measurement solutions, a user can download applications that were devel-
oped by the Red Pitaya community or their own software solutions. The source code of
the core system and of the existing instruments is available under GPLv2, representing a
solid WebIF-based instrument opened for full customization. Basic use of provided
instruments requires little technical knowledge from end product user. For mobile use, a
Wi-Fi access is possible, even with stand-alone operation in AP mode. Apart from web
interface, a console terminal is provided locally or via a secure shell socket connection
for advanced manual configuration including application installation.
The normal operation of Red Pitaya instrument relies on three core elements: a
web-based graphical input/output interface, a controller running as a native Linux
application, and an FPGA for signal generation and acquisition, as shown in
Figure 3. Figure 4 demonstrates an optional command line application mode
without the web interface.
Development framework
With a project explicitly encouraging teamwork and collaborative development, a
suitable framework for online exchange of project documentation as well as a set
of programming tools was required.
8 International Journal of Electrical Engineering Education 0(0)
LTC2145 DAC1401
Xylinx
2×14bit ADC 2×14bit DAC
Zynq 7010
125Ms/s 125Ms/s
SoC
Cortex
Ethernet ARM9
ETH-PHY
Core 1
PHY11G 800 MHz 8 × LED
4 × slow ADC
Arx 7 FPGA
SDRAM 28k Logic Cells
17600 LUT 4 × slow DAC
35200 FF
240kB RAM RS232
80 DSP Slices
TXS02612
SD 2 × high speed IO
SDIO
Micro USB
5V 2A
PSU
WEB interface
(HTML+JavaScript)
Source: <app_name>/web/
TCP/IP Client
Server
WEB
NGINX
browser
Controller (C)
Binary: <app_name>/controller.so
Source: <app_name>/web/
FPGA
(HDL)
Image: <app_name>/fpga.bit
Physical interfaces
ADC, DAC, GPIO
Controller (C)
Binary: /opt/bin/tool_name
Source: /src/uls/<app_name>
FPGA
(pre-built)
generate/acquire
Physical interfaces
ADC, DAC, GPIO
Z tþNT0
VZI ¼ hVZ ðtÞ; sinð2pfo tÞi ¼ VZ ðtÞsinð2pf0 tÞdt (1)
t
Z tþNT0
VZQ ¼ hVZ ðtÞ; cosð2pfo tÞi ¼ VZ ðtÞcosð2pf0 tÞdt (2)
t
1
T0 ¼ (3)
f0
where f0 is the excitation and reference signal frequency and N is the number of
periods sampled. In a same way the in-phase IZI and quadrature IZQ
current components are obtained. If we assume the voltage and current over
OUT0
IN0
Zx
Instrumentation IN1
platform
Rs
GND
DUT are VZ ðtÞ ¼ jVZ jsinð2pfo t þ uVZ Þ and IZ ðtÞ ¼ jIZ jsinð2pfo t þ uIZ Þ then the
voltage and current amplitudes and phases are obtained from
qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi VZQ
jVZ j ¼ 2 V2ZI þ V2ZQ uVZ ¼ arctan (4)
VZI
qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi IZQ
jIZ j ¼ 2 I2ZI þ I2ZQ uIZ ¼ arctan (5)
IZI
Figure 6. Photo of the actual measurement setup with a STEMLab connected to a protoboard
containing the measured impedance (DUT) as well as a reference resistor. The black probe
provides the output excitation signal while the two copper-colored probes are the input signals
IN0 and IN1 used to measure the excitation voltage and the voltage over the reference resistor,
respectively, as also sketched in Figure 5.
The first validation was done using a resistor of R ¼ 1785 X as a DUT and a
reference resistor of 1 kX. The resulting current and voltage waveforms are pre-
sented in Figure 7 utilizing an excitation frequency of 10 kHz. As expected, the
current and voltage waveforms are in phase which is well seen from the top graph
showing development of current and voltage with time (samples) as well as from
the bottom graph, presenting the current/voltage signals in an X/Y plane. The
latter should look as a line for a resistor and as an ellipse for impedances possess-
ing a nonzero phase value.
The second example utilizes a DUT consisting of a parallel connection of a
capacitor and a coil as presented in Figure 8. The values of the capacitor and coil
were determined with a professional LCR meter giving a capacitance of C = 96 nF
and a resistance and inductance of R ¼ 7:88 X and L = 6.256 mH, respectively,
Burnik et al. 13
DUT
C L
Figure 8. Real model of parallel connection of a capacitor and a coil, the coil is modeled as a
connection of an ideal resistor and inductor in series. DUT: device under test.
1
Z ¼ Z C kZ L ¼ kðRs þ jxLs Þ (7)
jxC
Figure 10. Measured impedance modulus and phase of a parallel connection of a capacitor and a
coil as a function of frequency.
Burnik et al. 15
Figure 11. Impedance modulus obtained by the developed method (green), benchtop instru-
ment (blue), and theoretically calculated values (red).
The results acquired using STEMLab are shown in Figure 9 for an excitation
frequency of 6600 Hz. The top as well as the bottom graph shows the expected
phase shift of the voltage and current signals of about 60 .
Furthermore, a frequency sweep from a frequency of 1–10 kHz in 250 linear
steps was performed. With this approach it is possible to show the resonant behav-
ior of the circuit at a frequency of around 6500 Hz as shown in Figure 10. The top
graph presents an impedance modulus (absolute value) while the bottom graph
presents its phase response, both as a function of frequency. The complete mea-
surement using STEMLab and Matlab took place for 950 s.
Once the algorithm for complex impedance measurement has been tested, a
native measurement program in C language has been created. The measurement
in the same frequency range took 38 s, which demonstrated a significantly more
efficient realization.
Characteristics of the developed LCR meter were also compared to the meas-
urements on a precision benchtop LCR meter. The frequency characteristics of
amplitude and phase characteristics using the developed measurement method
(own) and a benchtop meter are shown in Figures 11 and 12 together with theo-
retical values obtained through equation (7).
From the readouts one can identify some further calibration was required to
improve the precision of the method.
16 International Journal of Electrical Engineering Education 0(0)
Figure 12. Phase impedance characteristics of own method (green), benchtop instrument
(blue), and theoretically calculated values (red).
Funding
The author(s) disclosed receipt of the following financial support for the research, author-
ship, and/or publication of this article: This project was partially financed by the European
Union from the European Social Fund. The project is held within the Operational
Programme for Human Resources Development 2007–2013, development priorities
“Business and adaptability encouragement and preferential specializations,” scholarship
scheme under the approved program “Creative path to practical knowledge”.
ORCID iD
Urban Burnik http://orcid.org/0000-0002-8652-4977
References
1. Dutson AJ, Todd RH, Magleby SP, et al. A review of literature on teaching engineering
design through project-oriented capstone courses. J Eng Educ 1997; 86: 17–28.
2. Gavin K. Case study of a project-based learning course in civil engineering design. Eur J
Eng Educ 2011; 36: 547–558.
3. Creative path to knowledge, http://www.sklad-kadri.si/en/human-resources-develop
ment/creative-path-to-knowledge/ (2013, accessed 4 July 2017).
4. Tumanski S. Principles of electrical measurement. Boca Raton, FL, USA: CRC Press,
Taylor & Francis Group, 2006.
5. Sawhney AK. A course in electrical and electronic measurements and instrumentation. 4th
ed. Delhi, India: Dhanpat Rai & Sons, 1983.
18 International Journal of Electrical Engineering Education 0(0)
6. Red Pitaya: Open instruments for everyone by Red Pitaya – kickstarter, https://www.
kickstarter.com/projects/652945597/red-pitaya-open-instruments-for-everyone (2015,
accessed 4 july 2017)
7. Ossmann M. Red Pitaya – not just a USB scope module. Elektor, December 2014,
pp.38–42.
8. Welcome to the Red Pitaya documentation – Red Pitaya STEMLab 0.97 documentation,
http://redpitaya.readthedocs.io/en/latest/ (2017, accessed 4 July 2017).
9. Cimerman M, Topcagic Z, Golinar L, et al. Laboratorijski merilni sistem na osnovi
naprave Red Pitaya. In: Proceedings of the 23rd international electrotechnical and com-
puter science conference, 24 September 2014, vol. B, p.215, Portoroz, Slovenia.