## Background:

My homemade seismometer uses a fully differential capacitance displacement sensor to detect the movement of the earth. The sensor interface is an AD7745 capacitance-to-digital converter. The AD7745 has some advantages:

- It's easy to interface. It provides excitation drivers and can interface directly with a fully differential capacitance bridge.
- It's low power -- less than 1mA supply current.
- It uses the I2C interface for communication.
- Relatively inexpensive at $11 or so in low quantities.

And disadvantages:

- The AD7745 was released around 1995 and is showing its age relative to other high-bit ADC converters.
- Advertised as a 24-bit converter, it can only really produce about 16-bits of noise free resolution.
- Susceptible to EM interference because there is no input filtering.
- It's not ratiometric. It relies on a 1.17V internal voltage reference.
- Pretty poor tempco of the converted capacitance.

# A chopper-stabilized sensor interface:

See the log files for all the details. The system uses a square wave modulator to drive the top and bottom of the capacitor sensor bridge between zero and VCC (the supply voltage). The maximum differential capacitance that the sensor can develop across the output is ±4pF when the displacement is ±5mm. At zero displacement all of the capacitors in the bridge are 2pF and the differential output capacitance is zero.

* *V(OUT+ - OUT-) = Vout = 2VCC ∆C/C1

If C1 = C2 = 10pF, Max Vout = ±0.8VCC.

If this output is fed to a 24-bit ADC using VCC for its reference (ratiometric conversion) then it should be able to produce a noise free resolution approaching 22bits (>130dB dynamic range). If theory matches reality then the capacitor sensor should be able to improve the displacement sensor performance by a factor of about 10x-30x, which would allow it to resolve displacements of less than 10nm. But that's still a long way from a professional instrument's capability.

This is the circuit I’ve designed to implement the concept.

The 100kHz clock generator for the modulation is a PIC10F202 — a 6 pin micro controller with an accurate internal clock. The exciters are driven by two Schmitt trigger inverters. The AC amplifiers are TP07 (or OPA376) opamps biased at TBD VCC. The SPDT switches are Vishay DG3157E -- which have low charge injection (<2pC).

I found a 24-bit sigma-delta ADC with decent noise performance — the MAX11200. When sampling at 245kHz (decimated to 5 Hz) the ADC is expected to have a noise free resolution of 21 bits — that’s a noise floor of 3.45µV p-p when using a 3.6V VREF ( input range = ±0.8VCC = 5.76V).

The LP2985 LDO has a bypass cap to reduce the noise on VCC. I'm pretty paranoid about noise on this circuit.

One last thing: This approach would lend itself to a force balance wide-bandwidth type seismometer.

To measure the AC output of the amplifier it's not necessary to use a chopper circuit. It's much easier to use a Fourier transform to detect the signal. This is a lot simpler than it may seem and is an enhancement of the simpler chopper detection. The measurement is also done at one frequency and is inherently free from any DC artifacts like offset and drift. The hardware is much simpler although the software is slightly more complicated.

Chopper detection is a form of auto correlation where a square wave is multiplied by its equal in both frequency and phase and the result of the multiplication integrated to calculate the amplitude.

A better way is to multiply the input signal by the sine and cosine of the square wave fundamental harmonic and integrate those two multiples. The cosine value is the real part of a vector and the sine is the imaginary part of the vector. With these two values, the phase and amplitude of the square wave fundamental harmonic can be calculated using normal vector arithmetic.

For instance, the absolute amplitude is the square root of the sum of cosine squared and sine squared.

Because only the fundamental harmonic of the square wave is being measured, the effective signal bandwidth around the fundamental is greatly reduced which greatly reduces the noise.

Think of this as a poor man's FFT where only one frequency is measured.

Only a single power supply is required with both the AC amplifier and ADC biased at 1/2 the power supply voltage with capacitor coupling. This eliminates all DC drift and offset because all signal processing will be done as pure AC. The bias voltage does not need to be precise, but should be a low noise source. A simple resistor divider can be used at the input of the non-inverting input of the AC amplifier with a capacitor to ground to reduce noise. A large value resistor is used for feedback to the inverting input to give a DC gain of one. The amplifier output can then be coupled directly to ADC.

Calculating the Fourier transform is very simple. The ADC samples at an integer multiple of the the source frequency. At minimum, it must sample at four times the square wave frequency. Each sample represents one point on both a cosine wave and sine wave. Note that a sine wave is simply a cosine wave shifted 90 degrees. For the cosine, the four samples are at 0 degrees, 90 degrees, 180 degrees and 270 degrees. For the sine, the four samples are at 90 degrees, 180 degrees, 270 degrees and 0 degrees.

Multiplication is commutative so it's possible to integrate first and multiply second. An array is used to hold the four sample values and for each cycle, the samples are added to the array and after sufficient cycles are measured, the sine and cosine correlation is done. A table containing the cosine values at 0 degrees, 90 degrees, 180 degrees and 270 degrees is used to multiply the sample array. The sine calculation uses the same table, but shifted by 90 degrees. The resulting vector amplitude can be calculated and also phase if desired.

Here is a sample of the code from https://sourceforge.net/projects/elliptical-controller/ where the brake current is being measured by a transformer coupled chopper circuit. The measurement is done in very harsh conditions because the elliptical generator output can go up to 300V while the brake current is PWM modulated which also increases the noise significantly.

The ADC is triggered by timer counter 0 overflow while the chopper is driven by timer counter 2 operating at 244 Hz.

I've also used the same technique to use a computer sound card to create an LCR meter. In fact, it's quite feasible to use a sound card as a detector in your project which would greatly reduce the hardware requirements. The sound card has very low noise and can resolve down to the nanovolt level using the above method.

bool checkADC(void){

/*

* This function implements a frequency tuned AC detector

* The ADC samples at exactly 32 times the chopper frequency

* Autocorrelation is used to extract the real and imaginary parts of the chopper fundamental harmonic

* Bandwidth is inversely proportional to sample size. 100 cycles are used as a compromise between noise and speed

*/

static byte sampleCount = 0;

static unsigned int cycleCount = 0;

//Wait for ADC to finish

if(ADCSRA & B00010000){

ADCSRA |= B00010000; //Clear ADC done flag

TIFR0 |= B00000001; //Clear TOV0 flag

samples[sampleCount] += ADC;

sampleCount ++;

if(sampleCount > 31){

sampleCount = 0;

cycleCount ++;

if(cycleCount > 100){

cycleCount = 0;

//Calculate chopper fundamental harmonic vector values using correlation with cosine and sine

float cosineSum = 0.0;

float sineSum = 0.0;

for(byte cosineIndex = 0; cosineIndex <= 31; cosineIndex ++){

byte sineIndex = (cosineIndex + 8) % 32;

cosineSum += float(samples[cosineIndex]) * cosine[cosineIndex];

sineSum += float(samples[cosineIndex]) * cosine[sineIndex];

}

//Calculate scalar value of chopper fundamental harmonic

current.value = sqrt(sq(cosineSum) + sq(sineSum)) * currentCalibration;

//Send current value to host for display

if(queueAppendByteVerbatim(&rs232writeBuffer, START) == true){

if(queueAppendByteVerbatim(&rs232writeBuffer, BRAKE_CURRENT) == true){

queueAppendFloat(&rs232writeBuffer, ¤t);

}

}

memset (samples, 0, 32 * sizeof(samples[0]));

return true;

}

return false;

}else{

return false;

}

}else{

return false;

}

}