2015年12月10日木曜日

1.2 volt AGC, part 3

The AGC circuit is looking more promising now. My last post (1.2 volt AGC, part 2) ended on a rather gloomy note, noting heavy distortion even at low AGC levels, indicating a very low dynamic range.

My latest experiments were conducted a little more systematically and I realised a key error I had made: impedance matching. My initial evaluation of the AGC circuit (shown in part 1) was done by connecting a high-impedance piezoelectric earphone to the "hi output" of the AGC amplifier. My latest evaluation, however, used low-impedance 32-ohm earbuds. That caused excessive distortion and my pessimistic outlook.

The key to discovering my error was the insertion of the 100 microamp moving-coil meter in the AGC control line. The advantage of an analog meter over a digital meter is that the update of the analog meter is continuous, allowing me to more intuitively get a feel for what is happening with the circuit as I alter input or output parameters in real-time.

By watching the AGC current on the microammeter under different conditions, I could gather the observations described in the following sections.





Case 1: Observations when listening with a high-Z piezoelectric earphone

First, the very high headphone-level output from a portable radio was connected to to the input of the AGC amp and the volume set to maximum. Approximately 60 microamps of AGC current flowed into the base of the attenuator transistor. Again, this corresponds reasonably well to an LTspice simulation that showed a maximum of about 50 microamps of AGC current (when the amplifier was fed with a massive 10-volt peak-peak signal).

Observations:
  1. Connecting a high-impedance piezoelectric earphone to AGC amplifier output (either "hi" or "lo" output) did not affect the AGC current.
  2. Distortion was always present at any AGC level compared to taking the audio output directly from the radio. In particular, the low-frequency bass notes of music seemed the most distorted.
  3. Distortion was acceptably low (tolerable music listening) for input signal levels that resulted in AGC current of up to 50 microamps. 
  4. Distortion became unacceptably high (clipping distortion) for higher signal level that result in more than 50 microamps of AGC current.
  5. Even when increasing the input signal levels to maximum, the output signal levels never got uncomfortably or dangerously loud, because the amplifier would simply clip the output signal.

Case 2: Observations when listening with low-Z headphones

As in the previous case, before observations began, the very high headphone-level output from a portable radio was connected to to the input of the AGC amp and the volume set to maximum. Approximately 60 microamps of AGC current flowed into the base of the attenuator transistor.

Observations:
  1. Connecting a low-impedance (32-ohm) set of consumer headphones to the "hi" output of the AGC amplifier immediately resulted in a decrease in AGC current of about 10 microamps.
  2. Distortion was noticeably higher than with Case 1 for all levels of AGC current.
  3. Sometimes there seemed to be an AGC pumping effect, where the AGC would seem to work briefly (leading to a reduction in distortion), then after about a second the AGC would become ineffective (leading to clipping distortion). This cycle would repeat itself every few seconds. 
  4. Connecting the low-Z headphones to the "lo" output of the AGC amplifier produced only barely-audible output, but did not reduce the AGC current.
  5. Connecting the "lo" output of the AGC amplifier to an external commercially-bought headphone amplifier resulted in acceptably-high volume and acceptably-low distortion of approximately the same quality as in Case 1.
  6. Even when increasing the input signal levels to maximum, the output signal levels never got uncomfortably or dangerously loud, because the amplifier would simply clip the output signal.

Case 3: Observation of the effect of supply voltage

The original C. Hall circuit was designed for 1.5 volts, but I am running it off of 1.2 volts (and with different transistors). Increasing the supply voltage to 1.5 volts noticeably increased the AGC current, which reached more than 100 microamps (the maximum safe current of the meter) at only mid-level input signal levels (corresponding to a mid-level setting of the volume control on the external radio serving as the audio source). Again, this agrees in broad terms with an LTspice simulation that shows 1.3 mA of AGC current flowing when the supply voltage is 1.5 volts and the input voltage is 1 volt peak-peak. For an input voltage of 10 volts peak-peak the simulated AGC current goes even higher to 3.7 mA.

When using a 1.5 volt supply, the distortion-free dynamic range was increased compared to the 1.2-volt case. Furthermore, overall distortion was decreased at all levels of AGC current; the output audio sounded cleaner (for all levels of input signal) than when a 1.2-volt supply was used.

Discussion

For Case 3, we can explain the increased AGC current as follows. Increasing the supply voltage allows a higher control voltage to develop at the emitter of the detector transistor (Q5 in C. Hall's original diagram). This higher control voltage provides more electromotive force to overcome the threshold voltages of the two silicon diode junctions through which the control current must flow (the from the Q5 base, through the Q5 base-emitter junction and the Q1 base-collector junction, to ground). With only 1.2 volts of supply voltage, the maximum control voltage is also 1.2 volts, which is only barely enough to overcome the threshold voltage of two silicon diode junctions, each having an approximately 0.6 volt voltage drop (or possibly even more).

Though I was able to observe some degree of acceptably low-distortion AGC action, the low level of the control voltage -- only just enough to overcome the diode junction threshold voltages -- means that 1.2-volt operation may depend on the manufacturing tolerances of the particular transistors used for Q5 and Q1. In an unlucky case, it may be that the Q1 and Q5 junction threshold voltages are on the high side (closer to 0.7 volts), which will restrict the amount of AGC current that can flow and lead to distortion.

My current hypothesis to explain less AGC current leading to distortion is that with an insufficient AGC current, high input voltages are no longer able to activate the attenuator transistor Q1, meaning that the high voltages drive the amplifier into clipping.

For Case 2, distortion introduced by the low-Z headphones connected to the "hi" output of the AGC amplifier, I think there are several mechanisms at play. One mechanism is the reduction of the AGC current (that occurs when connecting low-Z headphones). As mentioned above, this likely causes clipping distortion in the amplifier. However, the situation is more complex because of the observed AGC pumping effect (Case 2, observation 3). I have no explanation for the pumping, but I did notice that increasing the emitter capacitance of Q5 (the detector transistor) from the original 10 uF to 110 uF reduced the AGC pumping. It also, of course, increased the AGC recovery time.

Though I don't have a clear explanation for the pumping mechanism, the lesson is clear: do not connect a low-Z load to the "hi" output of this AGC amp.

It is likely that the original circuit designer intended the output terminal labeled "hi output" to be used as a "high-impedance" output, but I had mistakenly interpreted it as a "high-level" output suitable for driving low-impedance loads. Unfortunately, neither reference above contains a detailed explanation of the circuit, which led to my confusion.

Conclusion and future work

When driven with a headphone-level signal source, the C. Hall AGC circuit can produce barely acceptable levels of low-distortion-output when running off of a supply voltage of 1.2 volts. A 1.5-volt supply gives less overall distortion and a wider dynamic range. In any case the output impedance of the AGC circuit should be properly matched to its load.

Since my receiver designs mandate the use of a 1.2 volt supply (to allow use of rechargeable cells and possible in-situ charging), I will proceed with connecting the 1.2-volt version of the AGC circuit to my regenerative receiver.  Though the dynamic range of AGC action is limited, it is present and noticeable, and I expect that even the limited AGC action will be useful when scanning the shortwave spectrum for weak signals. Furthermore, the low supply voltage causes the amplifier to clip if excessively large input signals are encountered, meaning that the primary purpose of the AGC amplifier -- hearing protection -- is fulfilled.

Now that I have again confirmed the viability of the AGC amplifier, the next problem to solve is the unwanted oscillation that occurs when connecting up the preamplifier stages between the regenerative receiver and the AGC amplifier.

Update 2015-12-10

It's working with my regenerative detector, and it's working well. Tuning my regen across a wide frequency range has never been so pleasant! Distortion is well within acceptable ranges and the AGC action is clearly working, allowing me to hunt for weak signals while protecting my ears when tuning across a powerful SWBC signal. More details in a future post.

2015年12月5日土曜日

1.2 volt AGC, part 2

Just a brief update on my 1.2-volt AGC experiments. I had previously mentioned that I was not getting enough gain from the C. Hall AGC circuit, and that adding a preamplifier resulted in motorboating.

I solved the motorboating, but still feel like I'm not getting enough gain.

First, regarding the motorboating: Previously the AGC amplifier was built on a solderless breadboard, and I suspected my motorboating problems may have been related to ground loops caused by small differences in ground potentials of the transistors, differences caused by the imperfect nature of the mechanical contacts on a solderless breadboard.

I rebuilt the amplifier using "ugly construction" techniques over a copper ground plane. Then, ahead of the AGC amp, I added a regenerative detector, an emitter-follower AF buffer, and a single common-emitter AF amp. Specifically, I added transistors Q2, Q3, and Q4 from my Vackar-style regenerative receiver, then connected the collector output of Q4 to the input of the C. Hall AGC amp.

The circuit diagram looks as follows.


The physical construction looks as follows. The top half of the breadboard is the Vackar-style regenerative detector (Q2); the bottom half of the breadboard is the AF part of the circuit: buffer, preamp, and AGC amp. The ugly construction techniques used for the AF part of the circuit would probably be disastrous with an RF circuit, but for a low-frequency AF amplifier I can take some liberties with leaving component leads long and not worrying too much about stray couplings between input and output.


This physical construction was, unlike the solderless breadboard version, mostly stable in terms of not having unwanted AF oscillations. However, if the input to the AF buffer (C2) was disconnected, then the AF chain had a tendency for a hissing or sputtering oscillation. But with the AF buffer connected to the regenerative detector, all was well.

The AF amp provided enough gain to listen to the regenerative receiver at the output of the AGC amp. (Input for the regenerative detector was a loop antenna coupled into the tank inductor by a link winding.)

However, I wasn't getting sufficient AGC action yet. The AGC action can be monitored by observing the base voltage at Q8 of the AGC amp. It should shoot all the way up to Vcc (1.2 V) on strong signals, but right now it's not doing that.

The problem is that the AF input to the AGC amp has to be large enough to trigger the AGC action. The AF output from my regenerative detector Q2 will be very small, and the Q3 buffer offers no voltage gain, so only one transistor, Q4, provides the gain for the AF signal that will be input into the AGC amp.

So the solution is to add more pre-amplification after Q4 and before the AGC amp input at C2, to boost the signal levels coming into the AGC amp to a level such that even moderately strong signals already start to trigger the AGC action.

The complexity of the AF part of the circuit is already somewhat high (8 transistors), and with additional pre-amplification that will rise to 9 or possibly even 10 transistors. That's a rather complex circuit, but once the AF amp is built, it can be re-used with any simple one-transistor regenerative detector. So the AF amp complexity can be hidden and just considered to be a black-box functionality, allowing future design effort to focus on the regenerative detector only.

And speaking of design efforts focusing on the regenerative detector, I've been doing some investigation of automatic regeneration control and have some promising circuit candidates working in the LTspice simulator. Once I perfect the AGC AF amp, I will work on verifying my automatic regeneration control ideas in hardware.

Update 2015-12-06


I added another common-emitter preamp. Furthermore, I added a 100 microamp moving-coil meter between between the Q1 base and the Q9 emitter to monitor the AGC current. However, I'm still not getting the AGC action I expect.

In my LTspice simulations the Q1 base current should be around 6 uA for an input signal of 10 mV, jumping up to 40 uA for an input signal of 100 mV, and leveling out at around 50 uA for any higher signal level.

In practice I only observed mostly no base current, but if I ran a local signal generator near the regen (injecting a large, powerful signal), I could barely get around 10 uA to flow for a moment. This indicates to me that my input signal levels, even with two common-emitter stages of amplification, are still too low.

However, I'm starting to be troubled by noise in the amplifier. Broadly speaking, the problem can likely be isolated to one of two locations: either the preamp stages, or the AF AGC amp itself. (This assumes the noise is not due to some interaction between the two stages.) I suspect the preamp is noisy.

My plan of attack is as follows.
  1. Add another common-emitter preamp, for 3 stages of common-emitter amplification.
  2. Connect headphones to the output of the preamp (possibly using an additional power amplifier to boost the signal level) and confirm that no abnormal noise is present. If noise is present, solve this first by rebuilding the preamp with proper attention to neat layout and power supply decoupling.
  3. Measure AF signal amplitude at the output of the 3-state common-emitter preamp and confirm that it is between 10 mV and 100 mV for typical signals.
  4. Connect preamp to the AGC amp and confirm no abnormal noise is present.
  5. Confirm that between 10 uA and 50 uA of base current is flowing into Q1 on strong signals.

Update 2, 2015-12-06

I'm pretty sure the "noise" in the AF chain is spurious oscillation. The AF chain can even go into fringe howl at some settings of regeneration. This is somewhat reminiscent of the problems I had with the earlier circuit version on the solderless breadboard: the AF AGC amp worked fine by itself, but adding preamp stages caused motorboating. I thought my new soldered construction had solved the motorboating, but it now seems it's not completely solved after all.

Again, I will solve this step by step. First, make a 3-stage common-emitter preamp, make that stable, then try to connect the AGC AF amp.

Update 3, 2015-12-07

When solving a complex problem, it's good to step back periodically and ask yourself if what you're doing actually makes sense. Doing some more experiments and simulations, I think I will need 10-11 transistors (1 buffer, 4 preamp stages, 6-transistor AGC amp) to get the AGC amp working as I expect, and even then the AGC dynamic range will be limited to around 30 dB before clipping distortion begins. In other words, I need 11 transistors for a limited AGC action. Since the original intent of this investigation was to to protect my ears when tuning across loud signals, a much simpler solution would simply be to use a germanium diode limiter across the AF amp output. That could probably be implemented with 6 transistors (1 buffer and 5 preamp stages to bring the AF output up to the ~300 mV level required for germanium diodes to clip). 

I probably will continue to develop this AGC amp an an educational exercise, but in practice it may be that a diode limiter is the simpler, more effective solution.

Update 4, 2015-12-08

I took some more measurements. I took speaker-level output from the headphone jack of a portable transistor radio, and fed that into the AGC amp without any preamplification (directly into C2). 

Setting the portable radio volume to maximum, AGC base current into Q1 was 40 microamps, with heavy distortion audible at the output of the AGC amp. Therefore the measured maximum AGC base current is 40 microamps, compared with a simulated maximum of 50 microamps.

The actual AF voltage level at the input of the AGC amp could not be measured due to unreliable readings from my multimeter, but I believe it is around 1.2 volts.

Reducing the volume of the portable radio such that AGC current was 30 microamps or 20 microamps still yielded noticeable distortion, especially on music.

Reducing the volume of the portable radio such that AGC current was 10 microamps or lower yielded mostly clean-sounding audio, even on music.

During speech, the AGC current correctly fluctuated down during pauses and back up again during words.

Conclusions for now:
  • Distortion is clearly present over half of the AGC range (Q1 base current between 20 and 40 microamps). The distortion-free dynamic range is therefore rather small. I should fix my multimeter (which probably has a weak battery) and measure the distortion-free AF voltage range, but my feeling is that the dynamic range between weak and strong signals (that I want to hear on shortwave) will exceed the small distortion-free dynamic range I observed.
  • The AGC amp requires a quite high headphone-level signal for effective AGC action.
  • Given the distortion and the requirement for large amounts of pre-amplification, it is questionable whether investing more effort into this amplifier is warranted. In practice, even when using this AGC amp, it will be likely necessary to frequently and manually reduce signal levels coming into the amplifier to prevent distortion. Since frequent manual adjustment of signal levels is required, the low-dynamic-range AGC brings little operational benefit over a simple diode clipper.