Testing the EC Circuit – Ladybug Shield Alpha 1

Testing the Wien Bridge Oscillator

Design:

Layout:

scope Relative to VGND

Pin 8 is the Vout for the Wien Bridge Oscillator op amp.

Results

Looks good. In subsequent check of pin 8 relative to VGND, the Vpp seemed to vary between 800mV and 1.12V. I do not think this affects the results of the EC measurement because Vin is back calculated from Vout (see below).

Shrink the AC Signal

The next step is to shrink the AC signal before it goes into the all important EC measurement op amp.

Design

Scope Relative to VGND

Pin 3 on the MCP6244 is input into the EC measurement op amp. Here is the scope reading relative to VGND:

Measuring ECv

Design – Getting to an EC Signal

The first part of the circuit for measuring the ECv is getting an AC waveform for the EC Signal:

Design – Rectifying

The second part is rectifying the EC waveform into a DC value:

Design – Conversion From Analog to Digital

The schematic for the ADC:

Testing

As I discussed in this post, I will use resistors instead of a probe for this level of testing.

I put a resistor in the BNC connector’s input through holes. A challenge I have is making sure the connections are solid between the resistor’s wires and the EC probe’s BNC through holes. I soldered two wires to the BNC through holes and put the resistor on a breadboard to improve this connection.

The noise (Vpp) is 100mV. I have been seeing a range of 60-100mV. 80mV is what I was measuring on the prototype board when I measured the rectified signal. I need to find out if this is noisier than what is acceptable.

ADC Results

Getting unexpected results. Given the results from the scope, I expected the ADC value to be around .56V. What I saw was a sample started at 489mV and gradually increased. So far I have not isolated the problem, but I have noticed unexpected probe results on these pins in the past. Thus, I do not think it is the ADC – although why would the scope show a more realistic value? Is there something about the gain loop that would cause this discrepancy? Something in the design of the op amps (particularly around the rectification – which is certainly fancier than just one op amp and diode!)

ADC Results

As before, the values do not fluctuate wildly. They seem to start high, go down, then creep back. These values seem like an algorithm could work with them. For example, take a sampling over a few minutes and average. Then use the mV to the 2nd digit. With that said, I wonder if I am seeing a problem like I noted for the previous ADC results.

Findings

I was relieved to see the Wien Bridge Oscillator, Shrunken signal, EC_SIGNAL, and EC_AIN send out promising signals. Results I questions:

The Waveform created by the Wien Bridge Oscillations seems to vary a bit from a Vpp of 1.2 to ~800mV. The word “oscillate” makes me leap to the thought of “unstable” however I have no idea why there is variability. I assume this does not affect the value for EC_SIGNAL since Vin (the shrunken signal) is back calculated after measuring Vout via the ADC.

The amplification of the waveforms for EC_SIGNAL seem to be off by a magnitude. I need to check to see if I understand how amplification -> Gain works.

I am not sure why the ADC value drifts over time. I noticed a drift using the scope, but have not been able to easily reproduce. It does make me think the culprit – if there is one – is in the rectifying circuit. I am new to this design over using a simple op amp and diode.

Some progress, a few questions. That’s it for now. Please find many things to smile about.