Making what amounts to a digital version of a Huntron 2000. First real attempt at diving into the world of opamps.
Circuit attached is basically the analog 'half' of everything.
Up at the top is the AC signal generator, which amounts to one of those ebay DDS modules, a voltage divider, some opamps for amplifying the signal, as well as a pickoff to monitor the output voltage via an A/D input on an MCU. No, that particular pickoff isn't peak detecting. Easy enough to do that in software. Shooting for a variable pk-pk output from about 0 volts to +/- 12v.
The 2 'halves' at the bottom are two identical 'channels' for detecting voltage and current across the device under test.
Take a signal that's potentially +/-12v maximum, divide it down, shift it positive, and push it to an A/D input on an MCU. If the signal is very small, turn up the gain at the output opamp as required.
Parts description and where they fit in to my little world...
V7 = ebay DDS, 0-X Mhz, ~1v pk-pk max
U5 = DDS output buffer
DP-R1A/DP-R1B = 100K digital pot
U6 = Buffering the digital pot output
R12/R6 = U7 set to gain of 10
U7 = signal amp, followed by TCA0372 for more current drive
U8 = Buffer for output
D5/R17/R10/D2 = follower / divider for input to A/D on MCU, keep it positive and below about 3.3v
D2 = 3.3v ZENER
R14 = Source resistance
R18 = D.U.T.
U1/U3 = channel input buffer/followers
R1/R7 & R9/R8 = input voltage dividers
C3/C1 = AC coupling cap's
DP-R2 = 100K digital pot
DP-R2/R3 = variable gain for U2
R5/DP-R3 = 100K digital pot with wiper providing offset voltage to U2
DP-R4 = 100K digital pot
DP-R4/R11 = variable gain for U4
R13/DP-R5 = 100K digital pot with wiper providing offset voltage to U4
R7/R8/D4 & R15/R16/D6 = divider for input to A/D on MCU, keeping the input positive and below about 3.3v
D8/D7 = ~12V ZENERs for a bit of protection
OpAmps are all TL084 except for the current booster opamp described above
I've built this circuit, and it works for the most part. Opens, shorts, resistors, capacitors, inductors, all show traces that match what I'd expect, straight lines, circles, and so on. I don't have matched cap's between the two channels, so I've got some errors there. Resistors are all 5% or 10%, more errors there, but overall, it works as expected...
EXCEPT...
On the real Huntron, when you put a diode across the leads, the curve stays centered on the X axis (voltage), with the expected rise on the Y axis (current).
In my circuit, the curve gets shifted above (or below depending on how I hooked up the diode) the X axis, but still has the expected rise on the Y axis...just shifted up (or down) by X amount depending on the Vf of the diode. Obviously (or maybe not) I can shift the curve back down to centered manually by adjusting the offset voltage on the output opamp (positive input of U2 or U4), but that's not the right way to go about it.
I think my problem is somewhere around the AC coupling cap's (C1 & C3)...maybe the cap's are getting "saturated", so instead of swinging between +1 and -1, they're swinging between +1.5 and -.5 (not the real numbers, just throwing something out there to see what sticks).
I'm not even remotely sure where the issue is.
OpAmps are not my game. I think I'm just damn lucky it worked as well as it did on the first design attempt. Probably missed one of those "traps for young players". I've consulted the good book (e.g. The Art of Electronics), can't find anything definitive there.
Any swell answers/fixes/drinks?