
I have added a third stage to the preamp and fixed a couple of problem in the previous version.
In the previous version I had intended the final stage to have a gain of 4. When I tested the design in part 13, I put one scope probe on the input and one on the output and set the vertical gain two notches apart and saw what I expected, a gain of 4. However, the difference in gain between those two notches on the scope was actually 5. I had gotten the gain wrong, but I did not notice it for a few days until I wrote the code to make it autoscale. Then I could see a jump in the signal when it switched gain. The second problem was that I said I made the bandwidth wide enough so there would not be any phase shift in that stage. I was wrong about that too.
This design has three outputs with relative gains of 1, 4, and 16, and the phase shift in the final stages is small enough that it has not caused any problem yet. I am using the AD8032 op-amp. It works about the same as the MCP602 except that it recovers more quickly after hitting the rail.
I manually shift the phase of the drive signal in 9° steps to do a coarse ground balance. This moves the sampling point of one of the demodulators near the zero crossing of the ground signal. The remainder of the ground balancing is done by rotating the received signal in software.
The two channels of the demodulator autoscale independently. If a channel sees a voltage larger than 4.3 volts it steps down to the next lower gain. That drops the signal to about 1.1 volts. If it drops below .75 volts then it steps up to the next higher gain. The channel that is sampling near the peak of the signal will have to use a lower gain than the channel that is sampling near the zero crossing.
With this arrangement it now detects a penny at 6" in the presence of a constant ground signal about 1000 times stronger than the penny signal. That is about one coil diameter. With a penny on one arm of the windmill and a piece of foil on the other, the displayed phase angle switches back and forth between the foil range and penny range. But there is quite a bit of jumping around within the ranges.
I still have not worked out how to produce a repeatable variable ground signal for testing.
Robert Hoolko