1 Measurement Principle#
Refer to the scheme on the website below
Referring to the LCR tester, the basic working principle is to apply a sine excitation signal to the DUT, and then measure the voltage across the DUT and the current flowing through the DUT, from which the properties and parameters of the DUT can be calculated.
For an ideal capacitor, the current phase should lead the voltage across the capacitor by 90°. However, real capacitors have losses, which can be equivalently represented as a parallel combination of an ideal capacitor $C_p$ and an ideal resistor $R_p$. Therefore, the phase of the current leading the voltage will be less than 90°, and this phase difference is the loss angle.
Assuming the voltage across the DUT is $\dot{V}=V\cos(\omega t)$, the current flowing through the DUT is $\dot{I}=I \sin(\omega t - \varphi)$, the projection of the current on the imaginary axis is the current flowing through the ideal capacitor, and the projection on the real axis is the current flowing through the loss resistor.
Thus, the capacitive reactance of the parallel capacitor can be calculated as $X_{Cp}=\frac{V}{I \cos\varphi}$, and the capacitance value $C_P=\frac{1}{\omega X_{Cp}}=\frac{I \cos \varphi}{\omega V}$.
The value of the loss resistor is $R_p=\frac{V}{I \sin\varphi}$.
The ratio of the reactive power consumed by the component to the active power is defined as the Q value of the component, and the reciprocal of the Q value is the D value (tangent of the loss angle)
The parameters needed above can be obtained using the orthogonal algorithm:
After multiplying and passing through a low-pass filter, the DC components $-\frac{1}{2} VI \sin\varphi$ and $\frac{1}{2} VI \cos\varphi$ can be obtained, allowing us to calculate the required tangent of the loss angle
At the same time, the following parameters can be obtained
2 Parameter Simulation#
The existing ADC input voltage range is 0~2V, with an input bias of 1V; the DAC output voltage range is 1V peak-to-peak, and bias can also be added,
The capacitance value ranges from 1nF to 100nF, and when the shunt resistor is 0.33Ω, the output voltage peak-to-peak ranges from 4-200mv. When measuring inductance at a frequency of 1MHz, with inductance values ranging from 10uF to 100uF, the output voltage peak-to-peak ranges from 15-150mv. Since the ADC module's input range is 0~2V, the signal is amplified 9 times, increasing the peak-to-peak value to about 1.8V.
2.1 Debugging Records#
The signal output from the DAC does not match the impedance of the LC filter, resulting in a low signal amplitude at the input of the LC filter.
After powering on the detection circuit for the DUT, there is a -500mv bias at the input.
The LC filter is designed as follows; when the DAC outputs a 1MHz signal, the higher harmonics are quite severe, so an LC low-pass filter with a passband of 1.2MHz is designed to filter out higher frequency noise.
3 PCB Design#
3.1 Initial Version#
R8 is used to connect to the test fixture, with the excitation signal input from P1, passing through the capacitor or inductor under test at R8, and the current flowing into the subsequent current detection circuit through C5,
With this design, the input impedance of the circuit is the impedance value of the DUT at a specific frequency, while the output impedance of the front amplifier is 50Ω, which will cause the amplitude of the input signal to not be the expected value.
3.2 Improvements#
Remove the 50Ω resistor used for impedance matching at the output of the front amplifier, utilizing the low output impedance characteristic of the operational amplifier, ensuring that all output signal voltage is applied to the input of the above circuit.
The reason for this improvement is that if the operational amplifier's output stage does not drive capacitive loads, the LC filter, and long coaxial cables, the output does not need to connect to a matching resistor.
4 FPGA Program Design#
According to the principles above, two ADCs are needed to collect current and voltage signals, and one DAC to generate the excitation signal. Therefore, the DE0nano is chosen, which has two extended 40-pin headers that can connect to two ADDA modules.
The FPGA's crystal oscillator frequency is 50MHz, which is divided by PLL to produce 20MHz and 80MHz, where the ADC clock is 20M and the DAC clock is 80M. These are then connected to ADC_Interface and DAC_Interface respectively.
The signal width collected by the ADC is 10 bits, discarding the lowest two bits for subsequent signal processing. After collecting 1024 samples, it pauses for 0.5 seconds before the next collection.
The DAC section uses an NCO to generate a sine wave signal, switching frequency words via a rotary switch, outputting to DAC_interface, left-shifting by 1 bit before outputting, and then amplifying by 2 times through a non-inverting amplifier to enhance the signal driving capability.
The current and voltage data collected by the ADC is stored in RAM, and phase shifting is achieved by changing the starting address for reading. The ADC's sampling rate is 20M, and when collecting 100K signals, 200 points are collected per cycle. Therefore, to achieve a phase shift of $\frac{\pi}{2}$, data can be read from RAM starting at 50, and the read signal will be the signal read from RAM starting from 0, phase-shifted by $\frac{\pi}{2}$.
The data collected by the ADC is unsigned, and performing multiplication filtering will not match the calculation results. Therefore, an additional module is added to convert unsigned to signed numbers, perform multiplication after conversion, and then send it to the low-pass filter to obtain the required values. The output of the low-pass filter is truncated to retain only the high 16 bits of data, reducing the impact of jitter on the DC signal results.
5 Measurement Results#
The output of the first Lowpass is $VI\cos\phi$, the output of the second Lowpass is $\frac{1}{2}VI\cos \varphi$, and the output of the third Lowpass is $V^2$. The calculation process for capacitive reactance is as follows:
Based on the fitted relationship between the simulated input current and output voltage, it can be concluded that the amplitude of the collected output voltage equals the current ÷ 0.305, thus the capacitive reactance is the third output ÷ 2 ÷ the first output ÷ 0.305.
5.1 Circuit Display#
6 Future Plans#
Add SPI communication to transmit the sampled and calculated data to the TI development board for further computation and display.