AC/PC: Tracing Accurate Plate Curves using only wall AC and a PC and a little more


Copyright © 2003-2006 Author: Dmitry Nizhegorodov (dmitrynizh@hotmail.com). My other projects and articles



1.   Abstract

We describe a semi-automatic curve tracer capable of plotting accurate plate/grid characteristics. The device is easy to build either from scratch or as a mod to a vintage tube tester. A wall AC power source and a PC with a sound card are the main prerequisites.

2.   Introduction

An automatic plate curve tracer is desirable, as measuring tube parameters by hand is tedious, error-prone and may damage tubes. Commercial tracers such as SOFIA are expensive. Tube testers such as Eico 666 provide only merit tests, no plate curves. DIY projects involving DACs/ADCs such as [klaus] are very complex. Here we describe AC/PC, a DIY curve tracer that is not completely automatic but accurate and fast, and requires a little more than a PC, an old tube tester or plate/filament transformer(s) and variac.

The main idea of this design is to feed the tube subject to testing with AC, not DC. Many vintage tube testers that operated on AC (this includes merit testers such as Eico 666 but excludes transconductance testers such as many Hickoks) provide an excellent platform for AC curve tracing projects, often requiring minimal or no physical modifications.

Data saved onto a computer in wave files is in a from of dual array of 16bit samples, 44100 samples per sec, offering excellent precision and ease post-processing.

The tracer described here is billed as semi-automatic, meaning I plan to manually adjust grid bias voltage before recording a next plate line; anyone ready to replicate this design yet feeling an urge to have a one-button-pus solution will able to build a step-voltage grid bias source and have such solution without changing anything else in this design.

3.   The main idea

Instead of building sources of sweeping DC signals, DACs, ADCs, digitally-controlled stabilized high-current, high-voltage power supplies, etc we feed tubes with AC signal on plate and then record, using PC audio card, a portion of such AC plate voltage and a voltage across a small resistor in cathode of the tube. Both signals can be simultaneously recorded by a stereo sound card as the left and the right audio channels. The signals are saved as a stereo wave file (*.wav). If you have a laptop having only a mono (microphone) input jack, record the V and the I channels one after another into a single mono wav file.

A specialized Java program then builds a plate curve by plotting PCM samples in X-Y mode. By using several grid voltages and recording in "short-sample and wait" regime we can build plate curve family for a range of grid voltages with very good precision, fast, and without expensive analog and A-to-D machinery.

Each sample need not be long; around 1 sec is all that is needed. The PC program selects a portion (window) of a sample and plots the result in XY mode; the window can be repositioned alone the sample if needed. One sample for each desired value of grid bias is recorded; the PC program interactively updates the plot and if something is wrong with particular sample, it can be re-recorded. At the end you have a set of plate lines in digital format which can be printed out, saved or further analysed, exported etc.

4.   SPICE Simulation of AC tracer idea

Consider

curve-tracer-sc1.gif

Here V_AC represents a wall AC jack (or a variac plugged into a wall AC jack), thus providing up to 120VAC, 60HZ (in USA). V_GRID simulates stabilized, adjustable grid voltage supply which can step through a useful range of voltages. For this 2a3 simulation, it steps from zero to 110 VDC.

Resistor R_PI is plate current signal source, 1 mV equals to 1 mA of plate current. Resistor R_PU is plate voltage source, 1 mV represents 1V (1.001, to be exact) on plate.

Let's pretend that we are able to step through a range of V_GRID voltages and that the grid voltage steps after one period of plate AC. Let's also preted the computer audio cards input is stereo and is connected to R_PU and R_PI. The following is what will be recorded into a stereo wave file, the "right" and the "left" channels:

curve-tracer-out-u.gif curve-tracer-out-i.gif

Note that one-period-per-V_GRID is done purely to simplify this presentation and reduce SPICE simulation runtime; in reality many periods of AC will be recorded with each value of V_GRID; also, a stereo signal for each value of V_GRID will go into a separate file; duplication in each of the periods is not a problem and in fact a convenience as it helps to fight impurity of real measurements; yet the program tool will save the data in format almost exactly identical with the above plots.

The plate voltage is periodic AC signal and the plate current is halfe-wave rectified signal. This is intended and will show up as plate curves!

To simulate the workings of the Java application (described in the next sections) we switch PSICE probe display into XY mode, by specifying V(R_PU:2) as X axis variable. What we got is ... plate curves!!

curve-tracer-xy.gif

Remember that R_PU is 1/100th of R1 and R_PI si 1 ohm; hence, 1mv alone X means 1V on plate and ImV alone Y means 1mA through cathode.

5.   Some fine (and finer) details

Transformer PLATE. This is used in the simulation curcuit in order to demonstrate that a non-ideal transformer, with significant winding resistance, leakage inductance and stray capacitance can be used to deliver accurate V-I curves, with no elliptics/Lissajous visible. The transformer usd for this simulation is step-up 1:2.8, reflecting ~ 1K input resistance into the load.

V_AC. This voltage source is shown to produce 120V * 1.414 = 170V ampl, 60 hz. In the real AC/PC tester, this will be a variac providing ~ 0-135VAC. No super-power variac is needed, a modest 3..5 amp variac is adequate for most tubes.

V_GRID. The grid signal is a VPWL_FILE PSPICE source from library source.lib. Why not a VDC with parametric voltage output? I could not switch SPICE to X-Y mode in a AC sweep profile with parametric secondary sweep. Hence instead of a parametric VDC I used a VDC source with file. The format is supposed to be a collection of lines with <time> <voltage> pairs but I found a few details that matter. Namely, <time> is absolute time, not an interval. Second, if a line specifies time t1 and voltage v1, and the next line specifies t2 (t2 must be > t1) and a new voltage v2, then SPICE interpolates the values between t1 and t2. Something that I definitely do not want for this simulation. The solution that I found by trial came in this form: specify t1+dt <new_voltage>, where dt is negligible small, followed by t2 <new_voltage>>. Here is grid.txt which simulates a range of grid voltages, each active for 10 cycles of 60HZ:

curve-tracer-grid_u.gif

 0 0
 0.001ms  0
 16.6665ms  0
 16.6666ms  10
 33.3332ms  10
 33.3333ms  20
 50.0000ms  20
 50.0001ms  30
 66.6665ms  30
 66.6666ms  40
 83.3332ms  40
 83.3333ms  50
 100.0ms    50
 100.0001ms  60
 116.6665ms  60
 116.6666ms  70
 133.3332ms  70
 133.3333ms  80
 150.0000ms  80
 150.0001ms  90
 166.6665ms  90
 166.6666ms  100
 183.3332ms  100
 183.3333ms  110
 200ms       110
  
I generate such step signal source files using this simple emacs-lisp script:

 (defun spice-gen-step (duration start end step) 
   (let ((val start)(time 0))
     (while (< val end) 
       (insert (format "\n%sms %s" time val))
       (setq time (+ time duration))
       (insert (format "\n%sms %s" (- time .001) val))
       (setq val (+ val step)))))

  
Why V_GRID is floating? Grid curent does not affect voltage drop on R_PI if the grid supply is implemented floating above it, which means connected to the cathode directly. Also, plate current affects precision if R_PI is contributing enough. Thsi effect is more visible for high-mu tubes. For these two reasons V_GRID is visible. Todo: estimate error for grounded case

6.   Dissipation and loadlines in mV, mV coordinates.

Plotting dissipation lines and loadlines when the X axis is in mV that represents volts can be done straightforwardly using the techniques described in [tricks] with 1/1000 correction. Thus, a dissipation line of 16W is 16/Xvar*1000, or 16/V(R_PU:2)*1000 in our case. Aloadline that crosses points X1V,Y1mA X2V,Y2mA on "real" loadlines is a line that crosses X1mV, Y1mV, X2mV. Y2mV on our plot. Example: to plot a 3k loadline crossing 250V,60mA point: 60 + (250mV - V(R_PU:2)) / 3. See the plot on the right.

7.   Load, rectifier, limiters

You may wonder, after looking at the plots above, "why the voltage limits across R_PU vary with V_GRID?". As evident from the plots above, the upper limit of voltage across R_PU is 200mV for Ug = 0, and ~ 470 for UG = 110.

The swing varies because the transformer reflects non-zero impedance into the load. At higher currents of Ug=0 it drops up to 300V.

AC source of zero impedance would cause plate lines to extends all the way until they meet with vertical 500mv line on the V-I plot. This is highly undesirable, as the operator of the tester must be careful to not overheat the tube at low biases, reducing the plate voltage, yet to get good coverage the plate voltage must increase proportional to bias.

The plot with 1k as source impedance shows that a load connected in series with the tube is highly desirable. Indeed, such load, chisen to be ~ 3x of tube Rp, would move the envelope of the plate lines close to the power dissipation line. In the real tester the load can be implemnted as a binding post into which a jack with appropriate load can be inserted.

How far the plate lines can penetrate into the region above the dissipation limit curve? We can answer this answer after realizing that a tube with sinusoidal signal on the plate disspates much less than a tube with fixed DC of the same amplitude. How much less? Approximately, 5 times and more.

This is so because the tube, conducting only during positive swings of V_AC, would disspate exactly .707 * Ipampl * .707 * Upaml = 0.5 * Ipampl * Uamlp if it were a linear devise. In reality, true RMS of Ip is ~ 0.5 * Ipamlp for Ug=0 and it decreases with Ug necoming more negative, becoming ~.1 a the end of useable triode range (110V bias for 2a3). Hence the lines can penetrate into the region above the power limit line at ~ 2x when Ug=0 and more with deeper bias.

Protective diode. Once we provide a way to add a load resistor, why not to provide a rectification diode? some tubes such as rectifiers shoudl be tested with both waves of V_AC, but most signal tubes shoudl not be stressed too much with negative voltage on plate; a regime with high impulse direct current and high negative voltage alerating can cause back emission in some tubes, [ac-regim].

Protective diodes. Since resistors R_PI and R_PU are to be used as inputs to send signals to PC audiocard, and the signals are in hundreds of millivolts range, it makes sense bypass the resistors with protective diodes limiting the voltage swing within a range most soundcard withstand.

Below are the schematic that shows a rectifying diode, a load resistor and the protective diodes.

curve-tracer-sc2.gif
curve-tracer-xy2.gif

Probes X and Y connected to R_PU and R_PI represent audio signal jacks fed into PC audio card.

8.   Ranges

the range shown is ideal for mid-to-high-power tubes such as 2a3, 300b, kt88, 6c33c. Small current tubes may benefit from R_PI increased by 10x. Tubes with exctra-low plate voltage (12V tubes) will benefit if R_PU is increased by 10x. Hence it may be usefult to provide two values of each, with a switch.

9.   Precision, parts, etc

A straightforward implementation of a tube tracer would involve a power varying-DC source, probably PC-controlled, with DACs/ADCs interfaces. There are numerous challenges alone the route, not the least one is complexity and sheer parts count.

Unlike that, AC/PC offers a good precision without complexity and can be built by anyone (standard requirements for safety working with high voltages apply). On top of that, do not build an AC/PC variant without isolation transformers. You will burn down either the tube, your PC, or both.

The shape of the AC source does not affect measurements. AC can be dirty, distorted, unstable, the power transformers can saturate - all these do not affect measurments.

We feed the tube's cathode-plate space with AC. It means the tube operates as a rectifier (with varying, grid-bias-controlled, plate resistance). Most tubes are quite happy to see a B- instead of B+, at least of matching magnitude, hence there is no real reason to rectify. Rectification is also likely to cause additional problems. And DC is more dangerous than AC... In an event when rectified B+ is desirable, a diode can be inserted between the plate transformer and R6. No other changes are required.

The circuit is quite tolerant to reactances in the path. Thus, large leakage a nd capacitance in the plate transformer do not introduce noticeable Lissajous; same can be said of inductances and capacitances in wiring and parts (including the load). This is very important as various parasitic capacitances due to wiring in tube testers can be quite large (hundreds of pF).

Uncalibrated or overloaded PC audio inputs will distort measurements, but these requirements can be met easily, see "Calibration".

Non-linear distortion in PC audio circuitry, if any, will likely to cancel out, not distorting the load lines much. For this, the levels of signal must be about the same. See "Calibration" for tips.

Severe clipping in audio will result in knees on the upper tails of the curves something that will be self-evident.

Audio or digital nice in PC audio will result in "blurry" lines.

The design is very resistive against noise and RF noise in particular. I live only a couple miles from a AM station and in my house any resistor over 100k seem to works as a receiver. In AC/PC's design, the output is taken from 1ohm resistors. These can be up to 5 ohms in variants of this design but all these values completely negligible RF noise. RF noise in the transformers? this will be cancelled out as common, just like other AC line noise.

The diodes across R_PI and R_PU guard PC's audio inputs against failures in the device and unexpected spikes that the transformers may induce. The threshold is well above measurement levels.

If the tube oscillates (see the tube tester moddding section), the result will be blurry lines. Note that unlike for DC curve tracers, the condition will be easy to spot and take into account.

The above explains that nothing but one factor - precision and stability of grid biasing - will affect the spacing between the lines. This spacing is what we want to know and why we need the load lines, right? Hence the next section is devoted to the grid voltage source.

10.   Grid voltage source

...

11.   Java application

Download jar file and run it as

java -jar curve_tracer.jar

the jar contains the sources.

Screenshot:

ac-pc-screen1.jpg

showing idle point details, loadline and distortion harmonics (since version 2.1):

ac-pc-screen3.gif

To give it a test drive, use this zip archive with 6n9s triode traces. Download it, start curve_tracer.jar, then click button "Load", select the zip. You should see the picture shown above.

Below are pretty random [so far] comments regards the program.

Wave file generator. While the code and the hardware producing wave files are under development, I needed some plate curves in stereo-wave format to facilitate debugging and code development. Based on java DSP demos at www.jsresources.org, [data-buffer], I hacked a DSP transform that takes in a stereo signal, reads data from left channel and interprets that as plate AC voltage. Then it applies Child's law triode formula to compute triode plate current and stores that value (after some ad-hoc scaling/normalization) instead of whatever was in the channel 2.

The code is here. The actual transform is:

      for (int idx = 0; idx < audioBytes.length;idx+=4) {
        int ch1Val = 0;
        int ch2Val = 0;
        int MSB = 0;
        int LSB = 0;
        if (bigEndian) {
          MSB = (int) audioBytes[idx];
          LSB = (int) audioBytes[idx+1];
          ch1Val= MSB << 8 | (255 & LSB);
          MSB = (int) audioBytes[idx+2];
          LSB = (int) audioBytes[idx+3];
          ch2Val= MSB << 8 | (255 & LSB);
        } else {
          LSB = (int) audioBytes[idx];
          MSB = (int) audioBytes[idx+1];
          ch1Val= MSB << 8 | (255 & LSB);
          LSB = (int) audioBytes[idx+2];
          MSB = (int) audioBytes[idx+3];
          ch2Val= MSB << 8 | (255 & LSB);
        }

        // transform 
        if (ch1Val < 0) ch2Val = 0;
        else {
          double effV = biasVoltage + ((double)ch1Val / 100.0);
          if (effV < 0.0) ch2Val = 0;
          else
            ch2Val = (int) (Math.pow(effV, 1.5) * 9.0);
        }

        if (DEBUG && idx < 1000) {
          System.out.println("-- ch1Val: " + ch1Val + " ch2Val: " + ch2Val);
        }

        if (bigEndian) {
          audioBytes[idx+2] = (byte) (ch2Val >> 8);
          audioBytes[idx+3] = (byte) (ch2Val & 255);
        } else {
          audioBytes[idx+2] = (byte) (ch2Val & 255);
          audioBytes[idx+3] = (byte) (ch2Val >> 8);
        }

      }
  
MONO Mode. If you have a laptop having only a mono (microphone) input jack, record the V and the I channels one after another into a single mono wav file. The program is able to detect a mono signal, scan such file searching for part two and align waves in both parts, recreating in-sync XY. You as the user also can change the phase using the phase adjustment control, in case something is not perfect.

Real-Time vs File-based input. The program can read samples from disc or directly from the sound card. The latter is more convenient and is assumed to be the main mode in finished project, file-based mode is very handy during program development and as a backup configuration when real-time mode has difficulties.

Working sets, sample arrays, scrolling, no averaging. Regardless of the mode, samples are stored internally as arrays, and in each array one semi-wave is selected as "working set". If the one the program is selected is not good (scratchy/distorted/polluted signal) you can scroll back and forth for the best one. Averaging does not really make a lot of sense because most periods are exact the same; only a few may be damaged, hence why let them distort the average?

File conventions. When the program reads from disc, it asks for the set of files to load. These can have any filenames, etc. By default the program attempts to read all wave files in the "current" directory.

Output format. One stereo wave file can be saved on disk representing complete curve set. One period per each V_GRID will be saved, thus the channels, if viewed in your favorite wave editor, will look exactly as the first two plots in the SPICE section of this web-page:

curve-tracer-out-u.gif curve-tracer-out-i.gif

12.   Calibration

The program operates in the domain of 16-bit integers; to map these to volts and milliamps it needs to know the scale. Calibration is the way to achieve that. It is sufficient to record a pair of AC signals - voltage on R_PU and voltage on R_PI - for known plate voltage and known current through R_PI. If the signal is saved on disc, a manifest for this calibration signal should specify the amplitudes. One way of doing that is to encode the amplitudes in file name. Example: 100v50mv.wav if the signal is not saved, the amplitudes are entered interactively. After the program is calibrated, volume controls on the sound card must not be changed.

13.   Normalization

Audio signal is normalized when it optimally occupies available dynamic range window, in other words, it is not too loud not too soft. With 16bit blue-book wave format offering

(* 20 (log (/ (expt 2 16) 2) 10)) = 90.31

dB of dynamic range, normalization may appear not needed for our application; yet precision of most audiocards is compromised under -80 dB and hence it is best not to waste more than 10-20 dB of overhead; Hence the controls of the audiocard must be adjusted so that the current channel is a few dB under clipping when the maximum current flows through the tube ( Ug=0 ). The voltage channel sensitivity should be adjusted to clip just above the voltage on a shut tube. Since the controls must not be adjusted until a plate curve set is finished, both extremes must be normalized *before* the set starts. Needless to say, for each batch of tubes these settings will differ.

14.   Complete analog schematic

...

15.   Construction variants

...

16.   Use of a tube tester

...

17.   Modding EICO 666 Tube tester to Acomodate the Curve Tracer

eico666.htm

18.   Acknowledgements

Thanks to everyone who emailed and motivatated me to finish this project. Special thanks to Bob [?] for researching references [], [], ..

19.   References

[klaus] www.klausmobile.narod.ru/projects/pr_02_kmtt_e.htm

[ac-regim]

[data-buffer] http://www.jsresources.org/examples/AudioDataBuffer.java.html


Author: Dmitry Nizhegorodov (dmitrynizh@hotmail.com). My other projects and articles