THE PROBLEM:
I am having trouble getting some decent measurements when I use capacitors as DUT. In terms of measuring resistors, there is not much of a problem but when it comes to capacitors and especially when using a series RC network as DUT, I could not get it to match to a theoretical nyquist plot. If i measure only resistors the error fall below 1% from the reference value obtained from FLUKE 115 Multimeter. However when I use measure a (11nF) capacitor, i only get 1.0 or around that range of values of impedance measurement from 5kHz to 100kHz.
MY INTENTION:
To investigate different Nyquist plot of different circuit models sequentially with MUXs. (Intended impedance range around 1kOhms to 10kOhms. (10KHz to 100KHz)
MY SETUP:
The VIN and VOUT of the AD5933 are subjected to an AFE with the AFE subjected to multiple MUXs. The Attiny84 is just there for digital control extension in controlling the feedback and calibration MUXs. (The feedback MUX is an overkill for the gain adjustment).
IMPORTANT CODE SNIPPETS:
(Calibration)
gain[i] = (double)(ref/1.0)/sqrt(pow(real[i], 2) + pow(imag[i], 2));
phaseRef[i] = atan2(imag[i],real[i]);
(Frequency Sweep - Unknown)
magnitude = sqrt(pow(real, 2) + pow(imag, 2));
impedance[nr][i] = magnitude * (gain[i]); // with AFE
phaseAngleRad = atan(imag / real) - phaseRef[i]
realSample[nr][i] = (impedance[nr][i] * cos(phaseAngleRad));
imagSample[nr][i] = (impedance[nr][i] * sin(phaseAngleRad));
WHAT I TRIED SO FAR:
I looked upon the simulation for reference
If I measure a DUT of a series RC network of 1KOhms and 1uF Capacitor this is the resulting waveform
With resulting waveform around 0V
If I measure a DUT of a series RC network of 1KOhms and 11nF Capacitor this is the resulting waveform
Resulting waveform is not around 0V
WHAT CAN I DO TO CORRECT THIS?
Or is it that I cannot measure below 1uF? How do i calculate the limits of my capacitor calculations?
Datasheet Links:
THANK YOU FOR YOUR HELP!