The lock-in amplifier (LIA) is an invaluable tool in scientific instrumentation , allowing the extraction of weak signals from noisy backgrounds, even where the amplitude of the noise is much greater than the signal . First described in 1941, early LIAs were based on heaters, thermocouples and transformers . More modern LIAs have been fully digital or implemented on field programmable gate array (FPGA) devices, which are able to exceed the performance of their analog counterparts. However, the cost of modern LIAs may prove prohibitive, particularly in cases where large numbers of input channels are required. By employing Red Pitaya hardware, we are able to define an open-source LIA solution which is comparable with considerably more costly approaches. Characterized by wide dynamic range and the ability to extract signal from noisy environments, LIAs are phase sensitive detectors due to their operating principles. A reference signal in the form of a sinusoidal wave is generated either internally by the LIA itself, along with a cosinusoidal wave, or externally by some other source which can also be manipulated to form a cosinusoidal reference. This reference is multiplied by the input signal which carries the desired data modulated at the reference frequency. A low pass filter is then used before outputting the signal. In this way the LIA amplifies and outputs the component of the input signal which is at the reference frequency, attenuating noise at other frequencies. Components out of phase with the sine reference will also be attenuated, due to orthogonality of the sine and cosine functions of equal frequency, hence the LIA is considered phase sensitive. Components in phase with the sine function will result in a non-zero value in the X output, whilst those in phase with the cosine function will produce a non-zero value in the Y output. X and Y can be combined by R = √ X2 + Y 2 to provide a magnitude value, while phase φ = arctan Y X . FPGAs offer easily implementable micro-circuitry design via the use of hardware description language (HDL) such as Verilog or VHDL. A broad range of applications can be realized using these devices including LIAs without recourse to detailed knowledge of micro-electronics . The Red Pitaya STEMlab 125-14 is a single board computer (SBC) with an integrated FPGA in the form of a Xilinx Zynq 7010 SOC, allowing for the implementation of reprogrammable micro architecture which would otherwise necessitate dedicated hardware. The reprogrammability of this FPGA makes it applicable for the LIA functionality described here and allows for further expansion and modification by end users. Two DC coupled analog inputs are available in the form of user selectable ±1 V or ±20 V, 125 MS/s analog-to-digital converters (ADCs - Linear Technologies LTC2145CUP-14) with 1 MΩ/10 pF input impedance/capacitance. In this article, we detail an LIA which we have implemented on the STEMlab’s FPGA chip, along with open source operational and data transfer software developed specifically for this application. We demonstrate that this device shares many capabilities with more expensive alternatives such as a sweepable internal signal generator, single or dual input/output modes, wave form control and the ability to increase the number of available inputs and outputs by interfacing across multiple STEMlab units. Comparison is made with the Zurich Instruments HF2LI LIA, which is specified for operation up to 50 MHz demodulation frequency. Whilst an extensive software application is provided with the HF2LI, the open source nature and readily available software and hardware of the LIA presented here allow for an attractive option where cost is a consideration. Research into low-cost FPGA based LIAs has produced a number of alternatives, including high resolution designs operating at up to 6 MHz demodulation, and simulations have been presented for a high frequency LIA based on the Red Pitaya STEMlab. Typically, FPGA LIAs have been developed with specific experimental objectives13,14 . The STEMlab is the basis for a range of related measurement instrumentation from PyRPL, including an LIA. A low cost FPGA-based LIA has also been developed which operates at low demodulation frequency, and FPGA-based LIAs have been compared with analog devices in terms of signal accuracy. However, we believe that this article is the first to characterize a high frequency, open source LIA. The open source code may lead to a range of future uses in research, education and industry.
The article was published by: G. A. Stimpson,1, 2, a) M. S. Skilbeck,1 R. L. Patel,1, 2 B. L. Green,1 and G. W. Morley1, 2, b) 1)Department of Physics, University of Warwick, Coventry, CV4 7AL, United Kingdom. 2)Diamond Science and Technology Centre for Doctoral Training, University of Warwick, Gibbet Hill Road, Coventry, CV4 7AL, United Kingdom.