Tags

On to testing the EC sub-circuit of the Ladybug Shield

EC Subcircuit on Ladybug Shield PCB

# Testing the Wien Bridge Oscillator

## 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.

## 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:

## 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.

### 200Ω Scope Relative to VGND

Probe on pin 1 of the MCP6244 (EC_SIGNAL):

Gain = 1 + 1K/200 = 6.  Shrunken Signal(Vpp) = 220mV, Vout = 6 * Vin = 6 * Shrunken Signal(Vpp) = 6 * .22 = 1.32V.  The Vpp on the scope was 1.06V.  I have seen the Shrunken Signal(Vpp) be 200mV.  This would make Vout = 1.12V (and hence Gain = Vout/Vin = 1.06/.2 = 5.3).  A bit larger then 1.06.  I attribute the difference to measurement.  Certainly the difference could be an error in the circuit.

Probe on pin 14 (EC_AIN, the rectified signal):

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.

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!)

Time (mins) | mV

ADC Range: +/- 1.024V (1 bit = .5mV)
0:00:00 | 489.00
0:01:00 | 489.50
0:02:00 | 490.50
0:03:00 | 491.00
0:04:00 | 492.00
0:05:00 | 493.50
0:06:00 | 495.00
0:07:00 | 496.50
0:08:00 | 497.50
0:09:00 | 499.50
0:10:00 | 501.00
0:11:00 | 503.00
0:12:00 | 503.50
0:13:00 | 505.50
0:14:00 | 507.50
0:15:00 | 509.00
0:16:00 | 510.50
0:17:00 | 512.50
0:18:00 | 514.50
0:19:00 | 516.50
0:20:00 | 518.50
0:21:00 | 520.50
0:22:00 | 522.00
0:23:00 | 524.00
0:24:00 | 526.00
0:25:00 | 527.50
0:26:00 | 529.00
0:27:00 | 531.50
0:28:00 | 533.50
0:29:00 | 535.00
0:30:00 | 536.00

### 100Ω Scope Relative to VGND

(the resistor read 99.1Ω on my DMM).  Probe on pin 1 of the MCP6244 (EC_SIGNAL):

Gain = 1 + 1K/100 = 11. 200mV (the shrunken signal’s Vpp) * 11 (the Gain) = 2.2V.  The scope measured 1.92V Vpp.  The wave is about 10 x amplified not 11.  Perhaps I am not amplifying the measured Vout/Vin (1.92/200 = 9.6) -> Gain  -> 1 + 1K/100 (11) correctly.

Probe on pin 14 (EC_AIN, the rectified signal):

Here the noise (Vpp) is 60mV.

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.

Time (mins) | mV

DC Range: +/- 1.024V (1 bit = .5mV)
0:00:00 | 965.50
0:01:00 | 961.50
0:02:00 | 960.00
0:03:00 | 958.50
0:04:00 | 957.50
0:05:00 | 957.50
0:06:00 | 958.00
0:07:00 | 957.00
0:08:00 | 957.00
0:09:00 | 956.50
0:10:00 | 957.00
0:11:00 | 957.00
0:12:00 | 956.50
0:13:00 | 956.50
0:14:00 | 956.50
0:15:00 | 956.00
0:16:00 | 956.00
0:17:00 | 956.50
0:18:00 | 956.50
0:19:00 | 957.00
0:20:00 | 957.50
0:21:00 | 958.00
0:22:00 | 958.00
0:23:00 | 958.00
0:24:00 | 958.50
0:25:00 | 961.00
0:26:00 | 961.00
0:27:00 | 960.50
0:28:00 | 962.00
0:29:00 | 962.00
0:30:00 | 962.50

# 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.