In this thread Ian inspired me to design a modern version of the "pocket" oscillator: viewtopic.php?t=1501
I decided I needed a challenge and this is what I came up with:

Battery-Powered Low Distortion Pocket Oscillator With Timer

Circuit Description
Wien Bridge
IC1A and IC1B form an all-inverter Wien bridge oscillator. A two op amp oscillator, using inverters, eliminates the common mode distortion of a single op amp approach. It also provides a balanced output which is a big plus.
C9, C10, R17 and R18 are the input arm of the Wien bridge. C11, R19 and R20 are the feedback arm which are connected to op amp IC1B in a shunt feedback topology. The values of the input arm are scaled; the capacitor value is doubled to 20 nF and the value of R17+R18 are half that of R19+R20. Scaling the input arm makes its impedance at resonance equal to the 11.3KΩ impedance of the feedback arm. At resonance the gain of IC1B is "-1."
IC1A is an inverter whose gain is nominally “-1.” The input of IC1A is taken from the output of IC1B. VR1 and IC2 permit fine adjustment of that gain to initiate and regulate oscillation. R16 and C8 close the feedback loop around IC1A. The output of IC1A feeds the input arm of the Wien bridge to provide overall positive feedback.
The oscillator can be made to run at 100 Hz, 1 kHz and 10 kHz using 100nf, 10 nf or 1 nF capacitors. For 100 Hz C7 should be 220 uF.
Oscillator AGC Control Loop
Sustaining oscillation requires very small and precise gain corrections. Most oscillators require AGC which is usually in the form of a feedback-based signal limiter. FETS, Cadmium-Sulfide photocells, lamps, diodes, thermistors and VCAs are often used. The availability photocells and thermistors for this application are now limited. This oscillator uses the H11F1M optically controlled FET with an isolated LED emitter. The H11F1M “OPTOFET” is desirable due to its wide availability, low cost and ease of control.
To keep the oscillator simple and have reduced battery drain it was decided to rectify the outputs directly using a diode bridge comprised of D7-D9. R13, R14 and C7 average the rectified voltage at the outputs of IC1A and IC1B. In addition R13 and R14 limit LED current and isolate the rectifier bridge from the outputs.
The H11F1M, IC2, is not known for low distortion. At terminal voltages >25mV (or less) it distorts significantly. The key to using it in this application is to operate it at very low terminal voltage and also at very high Rds values to minimize distortion.
It’s fortunate that the amount of level change needed to stabilize an oscillator is in fractions of a dB, perhaps hundredths of a dB.
Increases in oscillator output level drive the H11F1's LED further into conduction. This reduces the FET’s resistance from Drain to Source or "Rds." The reduction in Rds is then used to reduce the gain of IC1A. (The H11F1 is actually a bidirectional device so Drain and Source are interchangeable.)
The H11F1’s FET is used as a shunt attenuator of positive feedback to control gain. A slight amount of positive feedback is introduced at IC1A’s non-inverting input. Reducing this positive feedback then lowers gain. R11 and R12 attenuate IC1A’s output by 60 dB. The H11F1’s FET parallels R12 to provide variable gain. The combination of attenuation and positive feedback keep the terminal voltage low. The 10K value of R12 permits a high operating Rds to minimize distortion from delta-Rds. THD <0.00025% is achieved with a common 5532 op amp and low-cost OPTOFET.
The AGC can be viewed as an above threshold limiter with a finite slope above rotation. When stabilized, the oscillator is running above threshold. VR1 is adjusted to initiate oscillation by balancing positive feedback, Wien bridge component tolerances and op amp gain. Increasing gain above the rotation point permits VR1 to adjust output level: Increased gain pushes the limiter further up it’s slope.
The oscillator is designed to run at a +18 dBu elevated level. There are numerous reasons for this. One significant reason is that elevated output level is required to overcome the diode drops of D7-D9 and the H11F1’s LED forward voltage. The second reason is to provide load isolation. The finite closed loop output impedance of IC1A and IC2A, although very low, subject the oscillator to level dysregulation when heavily loaded. Output pads are used to provide load isolation and a low output impedance.
The supply current is about 15 mA. About half the current is signal current in the line level pad and load. Although a buffer could be used to eliminate the line level pad, its supply current would be about the same as the signal power “wasted” in the pad. Load current would then be added onto that. The buffer would potentially add distortion. Another alternative would be to have large value build-out resistors in the range of 300Ω per leg. To reduce measurement errors due to the oscillator output being loaded, a lower source impedance around 49Ω per leg is desired.
Output Pads
The oscillator has two outputs: Line level at 0 dBu and -40 dBu Mic level.
The line level output pad is formed by R21-R24. This is a balanced center-tapped “L” pad with 18 dB of attenuation. The differential load seen by the oscillator is 798Ω.
The output impedance of the pad is a low 86Ω differential and 43Ω single-ended. Low output impedance reduces level measurement errors when fed into medium and high impedance loads. By using a pad, low output impedance is available while only modestly loading the oscillator. Shorting one output to ground does not significantly affect the level of the opposing output.
For a variable output level a potentiometer can be connected to the output. If the pad is removed and 100Ω build-out resistors are used instead, the variable output can deliver more than +16 dBu.
The mic level output is attenuated by 58 dB to produce a -40 dBu level. An H-pad is made up of R25-R27. The output impedance is 150Ω. Capacitors C12 and C13 block phantom voltage and are sized large enough for 100 Hz operation. R25 and R26, in addition to being a pad, also limit peak current into the outputs to less than 1 mA.
IC1A, IC1B, IC2, R12 and the output connector signal ground “G” terminals are biased at +9V relative to 0V DC. Since the supply is floating, the “G” terminal and the Vref line cause the supply voltages to bracket signal ground making them appear to be +/-9V.
Power Supply With Auto-Off
Batteries are a significant operating cost of any non-rechargeable battery-powered instrument. An Auto-Off timer is included to save batteries. An external DC input is also available to power the unit.
R1 and D1 are a Zener clamp to limit the input voltage to +18V. When a plug is inserted batteries are disconnected through a normally closed contact. D2 prevents the batteries from being discharged by the Zener when the external DC connector is removed or when an external plug is inserted and the supply is not powered. D2 also limits the supply voltage to around 17.4 VDC.
The power switch and timer is Q3, a BS250 enhancement mode P channel MOSFET. When C2 is fully-charged R5 or Q2 holds Q3 in the off state. When C2 is discharged below Q3’s Vgs(threshold), Q3 is turned on and the timing cycle begins. Vgs(threshold) is -1V to -3V. With Q3’s Source referenced to +18V, the turn-off voltage is +15V to +17V relative to DC 0V. Below this voltage Q3 conducts.
Q1 and Q2 turn Q3 on or off. When S1 is in the Off position R4 turns Q2 On to force Q3 off. This also charges C2 through R6 to terminate a timed cycle.
When S1 is in the On position D3 conducts and Q2 is turned off. Q1, a BS170 N channel MOSFET, is continuously turned on which discharges C2 and forces Q3 into conduction. This turns the oscillator on.
S1 in the timer position also turns off Q2. D3 prevents Q1 from being turned on until S2 is pressed to begin the timing cycle. When S2 is pressed and Q1 conducts, C2 is rapidly discharged. After S2 is released C2 begins charging through R5 and R6. To extend the timing cycle S2 can be pressed at any time.
Although S2 could be used to discharge C2 directly the peak current from a charged C2 would rapidly damage the switch.
The timing accuracy isn’t particularly accurate owing to capacitor tolerance and leakage, other leakage, the Vgs threshold of Q3 and other factors. Fortunately, for the purpose of extending battery life it doesn’t have to be. With the values shown the timer runs the oscillator for about an hour.
When the timer has completed and turned the unit off C2 remains continuously charged by the batteries through a 10MΩ resistor (R5+R6). When switched off by S1, Q2 maintains a charge on C2. C2's electrolyte stays continuously formed as long as batteries are installed. A circuit topology that had C2 discharged when off would require the electrolyte to be reformed each time it was turned on. Depending on how often it was used, the time C2 remained discharged could be days, weeks or months. The dielectric absorption, "DA," effects of a large value electrolytic capacitor, made worse by one not fully-formed, could make discharge unpredictable at low currents. The unit could turn itself off and then, due to DA and the high impedance, turn itself back on. The standby current to sustain electrolyte formation is very, very small. On one sample cap I measured 10 nA after 24 hours.
Q3 turns off gradually due to the slow rate-of-change as C2 charges. During the last few minutes of a timing cycle the supply voltage and output level will begin to sag. Pressing S2 at any time will restart the timing cycle.
The BS170 and BS250 have a maximum +/- 20V Vgs. R6 limits Q3 gate current in the event the supply voltage were to exceed 20V (e.g. operating on an external supply) and it limits current between Q1 and Q2 in the event of a device or wiring fault. R6 also allows Q2 to rapidly turn off Q3 without having to fully-charge C2.
R2 and R3 reduce Vgs for Q1 and, along with C1, provide a delayed turn-on of Q1 with some added noise immunity.
The operating current with the oscillator on is about 15 mA which should provide 24-36 hours operation with alkaline 9V batteries.
When switched "Off" static current drain is << 1uA. When the timer has completed its' cycle and is off, the current drain is <<2 uA.
R8, R9, D4 and D5 are a rail splitter to establish a reference at half the supply voltage which can range anywhere from 15-18 VDC. The reference, which is nominally +9V relative to DC 0V, sets the bias point for IC1, IC2 and signal ground.
D4 is a front panel power On indicator which takes advantage of existing reference current to provide illumination without added current burden. D5 compensates for the added forward voltage drop of D4.
C3, C4 and C5 are in a "delta" configuration to bypass the pseudo-bipolar supply. C6 bypasses the 5532 at its supply pins.
When operating on batteries, or when powered by an external floating supply, the oscillator will float to whatever potential the signal ground is referenced to. The generator output is analogous to a center-tapped transformer output with high common mode impedance and is essentially immune from ground loops due to galvanic isolation.

I'll post FFTs of the oscillator comparing a 5532, OPA2134 and OPA1621.



