Monday, February 19, 2018

"Tandem Match" Transformers and Calculating their Maximum Flux Density

This blog post discusses the "Tandem Match" directional-coupler topology and how to determine flux-density in the cores of this directional-coupler's two transformers.


(Note:  In the circuit above the values of the two resistors labeled "R" should be the same as the characteristic-impedance of the transmission-line system being analyzed.  E.g. each R should be 50 ohms if the transmission-lines are 50 ohms.  Also, the load should really be represented by a complex impedance, "Zload".  I am using a resistance "Rload" for simplicity.  And for the same reason I am assuming ideal transformers.)

Selecting toroid cores for a Tandem-Match directional coupler depends in large part upon the maximum anticipated flux-density in each transformer's core (the core for the current-sense transformer and the core for the voltage-sense transformer).  Too small of a core and it might burn up from excessive core loss, and too large a core means you are probably wasting money and certainly wasting space.

Iron-powder cores and Ferrite cores have, essentially, the same maximum flux limits versus frequency (these are the limits that the Mini Ring Core Calculator uses and which are based on (and interpolated from) Amidon's recommendations.):



Flux density is a function of the voltage across the "driven winding" of a transformer and follows the relationship below:


(Flux-density equation derivation can be found here.  Note that the 10^8 factor in the numerator is  because Ae is in cm^2, not m^2, and we are calculating Gauss, not Teslas (1 gauss = 0.0001 tesla).)

The voltage (Vrms in the equation, above) is easily determined for the voltage-sense transformer -- the voltage across its driven-winding is simply the voltage seen at the directional-coupler's output port.  In the circuit, above, it is Vo.

But the voltage across the "driven winding" of the current-sense transformer isn't as obvious.  However, it can be derived by "reflecting" the impedance connected to current-sense transformer's n-turn secondary into the transformer's primary, and then calculating the primary's voltage by multiplying the primary's current by this reflected impedance.

But what is this reflected impedance?

Back when I designed the Directional Coupler for my Automatic Antenna Tuner (see Tuner, Part 5 and Tuner, Part 8, I made the assumption (through analysis that was simplified to the point of error) that this reflected-impedance was 25/(n^2) ohms.

With this blog post I am revisiting this assumption -- with a bit more analysis I discovered that the current-sense transformer's reflected-impedance is only 25/(n^2) in one case -- when the output load (Rload, in the circuit above) is shorted.  For all other loads, this impedance is greater than 25/(n^2).

I'm going to derive this reflected impedance in this post, and I will also derive the reflected impedance seen at the primary of the voltage-sense transformer, although this latter value isn't important because we already know the voltage across this transformer's driven-winding.

Deriving the Reflected-impedance of the Voltage-sense Transformer:

I'll first derive the reflected-impedance of the voltage-sense transformer's secondary as seen at this transformer's n-turn primary.  I'll use "Loop Analysis" for this derivation.

First, let me define the loops I will use:


Here are the equations for these four loops:

   Loop 1:  Vi - Va - Vo = 0

   Loop 2:  Va*n - R*(i1/n + i4*n) = 0

   Loop 3:  Vo/n - i4*n*r - R*(i4*n + i1/n) = 0

   Loop 4:  -Vo + Rload*(i1 - i4) = 0

If I rearrange loop 4's equation to be an expression for i1 and then substitute it into the loop 3 equation and rearrange, I derive the following relationship for the impedance seen at the driven-winding of the voltage-sense transformer:

Vo/i4 = Rload*R*(2*(n^2) + 1)/(Rload - R)

Although this equation isn't important for calculating the voltage-sense transformer's flux density (because we already know the voltage across the transformer's driven-winding -- it is simply Vo), it is interesting to note that when Rload = R (e.g. when both are 50 ohms), this impedance is infinite.  In other words, no current flows through the transformer.

And this result makes sense, because when Rload = R, the directional coupler's output load is "matched" to its design-impedance, and the reflected power (represented by the voltage Vr in the circuit, above) should be 0.  And Vr is only 0 if there is no current flowing through the transformer.

But, although this equation isn't important for calculating the voltage-sense transformer's flux density, it is useful for deriving the reflected-impedance of the current-sense transformer's secondary as seen at its 1-turn primary...

Deriving the Reflected-impedance of the Current-sense Transformer:

I can rearrange the Vo/i4 equation (just derived) to be an expression for Vo:

Vo = i4*(Rload*R*(2*(n^2) + 1)/(Rload - R))

This equation for Vo can then be substituted into the loop 4 equation's Vo term.  We can then express i4 in terms of i1:

i4 = i1*(Rload - R) / (2*R*(n^2) + Rload)

Substituting this equation for i4 into the loop 2 equation, we can derive the current-sense transformer's primary impedance (reflected from the secondary):

Va/i1 = R/(n^2) + R*(Rload - R)/(2*R*(n^2) + Rload)

The primary's impedance is a function of Rload, R, and n.  Not a simple relationship, is it?


Calculating Flux Density:

Using this revised equation, let's see how the flux density in the current-sense transformer varies with Rload.

I'm going to assume the same parameters I used when designing the direction coupler for my Automatic Antenna Tuner.  Specifically:

  • Toroid core:  FT50, Type 43  (Ae = 0.129 cm^2)
  • Frequency:  3.5 MHz
  • Transmit Power:  200 watts, continuous carrier
  • Worst-case SWR:  3:1

(So, given a transmit power of 200 watts, if the SWR is 3:1, only 150 of those 200 watts will be delivered to the load.)

I am assuming that the load is connected directly to the directional coupler's output.  In other words, the load and the directional coupler can be considered as a lumped-element circuit, and thus the current through the directional coupler (i1 in the drawing, above) is, in essence, the same as the current being delivered to the load.  (I am assuming for this discussion that i4 is negligible compared to i1).

If the load at the directional coupler's output port is 50 ohms, there are no reflections and the voltage across the load is equal to (200 watts * 50 ohms) ^ 0.5, or 100 Vrms, and the current through the load, and thus through the directional coupler, is 2 Amps rms.

For a 3:1 SWR, the maximum and minimum resistive load values (with no reactance) values are 150 ohms and 16.67 ohms.

If the load at the directional coupler's output port is 16.67 ohms, the voltage across the load is Vo =  |Vforward| - |Vreflected| (that is, subtract |Vreflected| when Rload is less than 50 ohms -- the reflected wave is out of phase with the forward wave).  That is:

Vo = 100 - 100*(SWR-1)/(SWR+1) = 50 Vrms.

The current through the 16.67 ohm load, and therefore through the directional coupler, is:

i1 = Vo/Rload = 50/16.67 = 3 A rms.

Given a 3:1 SWR, the maximum load resistance is 150 ohms.  In this case the  voltage across the load is Vo = |Vforward| + |Vreflected| (add |Vreflected| when Rload is greater than 50 ohms -- the reflected wave is in-phase with the forward wave):

Vo = 100 + 100*(SWR-1)/(SWR+1) = 150 Vrms.

And the current through the 150 ohm load, and therefore through the directional coupler, is:

i1 = Vo/Rload = 150/150 = 1 A rms.

(Again, assuming i4 is much smaller than i1).

We can use these currents and Rload values to calculate Flux Density, and we will note a very interesting result:


The current-sense transformer's Flux Density is unchanged, regardless of Rload (i.e. regardless of SWR).


Note that I haven't verified this statement for complex loads.  But it certainly seems to be true for resistive loads.

And note, too, that for this to be true, |Vmax| and |Vmin| on the transmission line must be calculable according to the following equations:

|Vmax| = (1 + |Γ|)*|Vforward|

|Vmin| = (1 - |Γ|)*|Vforward|


So what does this result mean for our current-sense transformer's Flux Density calculation?

Rather than go through the complicated calculation of calculating Va/i1 for the max and min loads, we can instead simply use the 1:1 SWR load (i.e. Rload = R = 50 ohms), which reduces the transformer primary's voltage equation to:

Va = i1 * R/(n^2)

Where i1 is the transmission line current when Rload = R = 50 ohms (for a 50 ohm system).

And, given this value Va, the Flux Density in the current-sense core is:

Bmax = (Va * 10^8) / (4.44 * f * N * Ae) gauss

(Per the equation earlier in this post.)

Combining the two:

Bmax = ((i1 * R/(n^2)) * 10^8) / (4.44 * f * N * Ae) gauss

Note that if we design the voltage sense transformer so that its inductance is high compared to our Rload values, then i4 should be much smaller than i1, and the current through the transformer is essentially the current into the load presented to the directional-coupler's output port.

Using this new information for the current-sense, below are my corrected Automatic Antenna Tuner transformer calculations (note that these calculations include effects such as the transformer inductance, which was not discussed above -- refer to my Tuner, Part 5 post for more detail):

First, for 80 meters:


And now for 10 meters:




Links to my Directional Coupler blog posts:

Notes on the Bruene Coupler, Part 2

Notes on the Bruene Coupler, Part 1

Notes on HF Directional Couplers

Building an HF Directional Coupler

Notes on the Bird Wattmeter

Notes on the Monimatch

Notes on the Twin-lead "Twin-Lamp" SWR Indicator

Calculating Flux Density in Tandem-Match Transformers


And some related links from my Auto-Tuner posts:

Part 5:  Directional Coupler Design

Part 6:  Notes on Match Detection

Part 8:  The Build, Phase 2 (Integration of Match Detection)


Standard Caveat:

I might have made a mistake in my code, designs, equations, schematics, models, etc.  If anything looks confusing or wrong to you, please feel free to comment below or send me an email.

Also, I will note:

This information is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.



Tuesday, February 6, 2018

Counterfeit LM2596 Regulator Boards

Recently Dick Benson, W1QG, mentioned to me that he had ordered 10 LM2596 adjustable voltage regulator boards from eBay for the incredibly low price of $10.99, including shipping.


Well, this seemed like a great deal to me, too!  So I also placed an order for 10 boards.

Dick received his boards while mine were still in transit.  While testing them, he discovered that the switching frequency was 50 KHz, not the 150 KHz specified for an LM2596 switching regulator.

Hmmm...could the regulators on these boards actually be LM2576 regulators that have been relabeled as LM2596 regulators?  Or (and probably more likely) are these regulators poorly implemented copies of the LM2576 regulator that have been relabeled as LM2596 parts and that might fail later in a disastrous way?  Without looking at the die itself and comparing it with the die of a true LM2576, there's no way for me to know.


Measurements, Original Board:

My boards arrived and I ran some tests of my own...

Below is one of the 10 boards in my test setup.  I configured the setup so that the output voltage would be 5V with an output current of 1 amp (i.e. 5 ohm load resistor).  The input voltage is 12V:

(Click on image to enlarge)

(The 10 watt, 5 ohm resistor will be dissipating 5 watts and thus gets very hot, so I placed it in a clay flower-pot saucer.)

Measurements:

    o Measured Input Current: 0.511A
    o Measured Output Voltage:  5.00V
    o Calculated Input Power:  12.0 * 0.511 = 6.13W
    o Calculated Output Power: (5.00 ^ 2)/5 = 5.0 W
    o Calculated Efficiency: 5.0/6.13 = 82%

The measured Output Ripple:

    o  Amplitude:  234 mVpp
    o  Frequency:   52.8 KHz  -- This part cannot be an LM2596!

See oscilloscope capture, below:

(Click on image to enlarge)


Measurements, Counterfeit regulator replaced with LM2596:

I replaced the fake LM2596 on one of the boards with a real LM2596:


Measurements:

    o Measured Input Current: 0.508A
    o Measured Output Voltage:  4.99V
    o Calculated Input Power:  12.0 * 0.508 = 6.1W
    o Calculated Output Power: (4.99 ^ 2)/5 = 4.98 W
    o Calculated Efficiency: 4.98/6.1 = 82%

The measured Output Ripple:

    o  Amplitude:  102 mVpp
    o  Frequency:  147 KHz



Dick, W1QG, had reported poor ripple performance on his boards due to high-ESR of the output caps.  I thought I'd do some experiments of my own with some capacitors I had on hand.

First...

Replace original 220uF, 35V electrolytic output cap with a 100uF, 10V tantalum cap:


Measurements:

    o Measured Input Current: 0.500A
    o Measured Output Voltage:  4.96V
    o Calculated Input Power:  12.0 * 0.500 = 6.0W
    o Calculated Output Power: (4.96 ^ 2)/5 = 4.92 W
    o Calculated Efficiency: 4.92/6.0 = 82%

The measured Output Ripple:

    o  Amplitude:  54.4 mVpp
    o  Frequency:  146 KHz



Next...

Replace the output cap with a 330uF, 10V, 100 milliohm ESR tantalum cap:


Measurements:

    o Measured Input Current: 0.501A
    o Measured Output Voltage:  4.96V
    o Calculated Input Power:  12.0 * 0.501 = 6.01 W
    o Calculated Output Power: (4.96 ^ 2)/5 = 4.92 W
    o Calculated Efficiency: 4.92/6.01 = 82%

The measured Output Ripple:

    o  Amplitude:  52.8 mVpp
    o  Frequency:  149 KHz  



Note that the ripple amplitude is essentially the same for the 100uF and 330uF tantalum capacitors!  This implies that the ripple current amplitude, for these caps, is probably due to ESR, not capacitance value.


And finally, I thought I'd try a through-hole cap...

Replace the output cap with a 220uF, 63V Elena electrolytic cap:


Measurements:

    o Measured Input Current: 0.501A
    o Measured Output Voltage:  4.96V
    o Calculated Input Power:  12.0 * 0.501 = 6.01 W
    o Calculated Output Power: (4.96 ^ 2)/5 = 4.92 W
    o Calculated Efficiency: 4.92/6.01 = 82%

The measured Output Ripple:

    o  Amplitude:  83.2 mVpp
    o  Frequency:  146 KHz  


Note that the ripple is worse!  


Replacing the potentiometer with a resistor:

Another modification I made was to replace the pot with a fixed resistor.  Pots fail, and when they fail they will usually fail open.  If this happens on this board, the regulator board's output voltage will go to its maximum value, probably frying circuitry downstream.

So I'd much rather replace the potentiometer time-bomb with a resistor!  Fortunately, this is easy to do.

If you remove the potentiometer, you will see under it pads for an SMD resistor.  Simply load the correct value of resistor onto these pads and, voila, you will have a fixed-voltage regulator board!

If you look at the LM2596 datasheet (section 9.2.2.2.2) and compare it to the regulator board, you will see that the datasheet's R1 is already stuffed (with 330 ohms in my case) and that the SMD pads under the potentiometer are for R2.

With an R1 of 330 ohms, then, for a 5V output, R2 should be 1K ohms.

Here's the board I modified to be 5V fixed output:


(This board has also been modified with the correct LM2596 regulator and a 100uF tantalum output cap).


W1QG Measurements:

Dick also ran his own tests on his boards.  Here are his results:

As I mentioned, the ESR of both the input and output caps is substantial.
  
The PCB I used was probably one of the worst, but I cannot confirm this.
       
This 220 uF @ 35V output cap has an ESR of 0.57 ohms, and its actual C is 173 uF (not shown):
       

 In all cases, the input voltage was 12V, and the output was set to 5V into a 5 ohm load.
      
This output cap was replaced with a tantalum rated at 220uF, 10 V:
       

 The ESR is 0.058 ohms which is about 1/10th that of the "stock" version. 

Also note that it's physical size is about 3 to 4X bigger with the voltage rating of only 10V.  Its capacitance was 208 uF. 

The stock cap was replaced with this tantalum, and another measurement made:

    
     
For the last measurement, the counterfeit IC  (LM2576) was replaced with the ON Semi LM2596.

Results:
      
        
Changing to the low ESR Tantalum provided a 13.9 dB reduction in the pp level.
         
Then changing the IC to a "real" LM2596 reduced the pp ripple by 21 dB from the original. 


Other Notes:

The LM2596 datasheet contains a wealth of information regarding component selection.  It is well worth the read.

In my tests the board itself was dissipating about 1 watt of power (for a 1 amp output at 5v and and input voltage of 12v).  The board gets noticeably warm!  If dissipating more power (and perhaps even at this power), I would recommend heat-sinking the board.  To accomplish this, I would scrap away the solder-mask on the back side of the board (under the LM2596's tab) and solder a heatsink to this area (copper would be a great choice for heatsink material).

Here's a schematic I've drawn of the boards that I received from eBay:


I checked the component values (but not voltage ratings) on one of the ten boards I received, and the values are all within 10 to 20% of the values shown on the schematic.

Specifically:

  o  The input 100uF cap measured to be 87uF, ESR of 0.66 ohms.

  o  The output 220uF cap measured to be 200uF, ESR of 0.28 ohms.

  o  The 100nF caps measured to be 117nF and 120nF.

  o  The 47uH inductor measured to be 45uH.

All measurements were made at 1 KHz using a GenRad 1657 Digibridge.



Standard Caveat:

I might have made a mistake in my code, designs, equations, schematics, models, etc.  If anything looks confusing or wrong to you, please feel free to comment below or send me an email.

Also, I will note:

This information is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Saturday, December 16, 2017

Save and Restore HP 3478A Calibration Data with Matlab


The HP 3478A is a very nice 5½ digit auto-ranging digital multimeter, first marketed by Hewlett-Packard in the 1980's.

A few years ago I purchased one to log voltages to a computer for some experiments I was performing -- the 3478A has a GPIB interface that allows a computer to control the instrument (I use a National Instruments GPIB-USB-B dongle to connect the 3478A to my laptop's USB port).

I recently found a second one at a swapmeet for a very inexpensive price, and I discovered one reason why it was so cheap when I returned home -- when I powered it up, the first message it displayed was "UNCALIBRATED".  (I also discovered that the DC and AC amp functions were broken, too, which might have been the better reason for its low price).


The broken Amps functions I decided to leave for another time, and instead I decided to tackle the calibration problem.

The cal procedure is straightforward (read the manual before attempting), as long as you have appropriate equipment.  But first I needed to answer the question -- which functions and ranges were out of calibration?  I wanted to avoid recalibrating the entire instrument.

Discovering which ranges are out of cal is quite simple -- if the "CAL" annunciator on the LCD is visible and blinking, that range (for the function selected) is out of calibration.  If no "CAL" is seen, then that range is in calibration.

 (Click on image to enlarge)


Stepping through all ranges of all functions, I discovered that the CAL annunciator was present for the 30 mV and 300 mV DCV ranges and for the 3 Meg Ohm Resistance range.

Using an old Power Designs 5020 Precision DC Source and my HP 34401A as references, I performed the calibration procedure (per the manual) for the 30 mV and 300 mV DCV ranges.


I calibrated the 3 Mohm range with a GenRad Decade Resistor box set to 1.000000 Meg ohms.

After finishing these calibration steps I cycled power on the 3478A -- hurray! the "UNCALIBRATED" message had disappeared and in its place I saw the "SELF TEST OK" message.

This exercise in calibration got me wondering -- how might a 3478A lose its calibration?

The obvious way is if a user attempts a calibration without knowing what they are doing.  For this reason, most cal labs will place a sticker over the front panel's CAL ENABLE switch (see the sticker on the panel in first image of this blog post, above) to keep knob-twisters and button-pushers from inadvertently initiating a calibration cycle.

But there's another way for it to lose its calibration data...

The HP 3478A stores its calibration data in SRAM.  And if power to this memory is lost, its contents (and thus the calibration data) is lost.

To keep this SRAM powered when AC power has been turned off, the 3478A contains an internal 3.0 volt battery whose sole purpose is to keep power applied to this SRAM when the instrument is powered off.  (The SRAM is powered by the diode-or'd combination of this battery and the instrument's 5V DC supply (the latter only there when the instrument is on)).

So, if this internal battery goes dead (while the unit is OFF), a 3478A will lose its calibration data.  Both of my units were manufactured over 30 years ago.  Both of their batteries are original, and both still read 3.0 volts.  But how much longer will they last?  I have no idea.

If one would like to proactively replace this battery, remember that the SRAM must always be powered while the battery is being replaced.  If the SRAM loses power for any reason during this operation, you've lost your calibration data.

That's a sobering thought!

Wouldn't it be nice to somehow first back-up that calibration data to a computer and then, if for whatever reason the meter loses this data, restore it from that backed up file?

The manual does not mention any such GPIB commands, but they exist.  They are just undocumented.  The 'W' command reads the SRAM via the GPIB interface, and 'X' command writes to the SRAM via GPIB.  (A great investigation and discussion of these two commands is here).

I mentioned this to Dick Benson, W1QG, who is a Matlab guru and who had just written a Matlab logging program for the 3478A, and he took a cut at the Matlab code to read the SRAM.

Using his 'SRAM-read' code, I wrote Matlab code to write data back into the SRAM.

Both of these Matlab code-blocks are below...


Below is the Matlab code to save an HP 3478A's calibration data to a file on a computer.

(Note: to better view the code, copy and paste it into an app with a wider page size, e.g. Word, Notepad, or...Matlab).


% Authors: W1QG/K6JCA

% *** Read 3478a Cal Data ***
%
% This Matlab script downloads the calibration data from the
% HP 3478A's SRAM and writes it to a file.
%
% Note: this script also requires the "Instrument Control" toolbox.

% To run, first 'uncomment' the appropriate gpib() routine, below,
% based upon GPIB dongle that connects PC to the HP 3478A.

  %HP_3478a = gpib('AGILENT', 7, 23);  % Use if Agilent dongle
   HP_3478a = gpib('ni', 0, 23);       % Use if NI GPIB-USB-B dongle

   fopen(HP_3478a);

   for k=1:256 
      cmd=uint8(['W',k-1,'\n']); % W, address, newline
      fwrite(HP_3478a,cmd);      % fwrite writes 8 bit unsigned integers.
      value(k)=fscanf(HP_3478a); % read the value addressed.
   end;

   fclose(HP_3478a);
   
% Select the appropriate file into which to save the data by
% "uncommenting" the appropriate save command, below.
   save('HP_3478a_Cal_Data','value'); 
 % save('HP_3478a_Cal_Data_SN_2301A','value');
 % save('HP_3478a_Cal_Data_SN_2520A','value');

% reshape and transpose for easy reading

   val_table = reshape(value,[256/16,16])'   % transpose = '



And here is the Matlab code to write calibration data from a file back into an HP 3478A:

% Authors: W1QG/K6JCA

% *** Write 3478a Cal Data ***
% (Note, this script also requires the "Instrument Control" toolbox.)

%                  !!! DANGER  DANGER  DANGER !!! 
%
% This Matlab script overwrites the HP 3478A's calibration data stored
% in the meter's SRAM.  Be VERY CAREFUL when using it, or you might 
% forever lose your meter's calibration data!!!
%
% In fact, I would recommend: DO NOT USE IT unless the SRAM contents are
% already screwed up.

% NOTE:  Before running, turn the front panel's CAL ENABLED Switch so that
%        its slot is vertical.  This enables the SRAM write signal.
%
%        And don't forget, when finished, to turn the switch so that its
%        slot has been returned back to a horizontal orientation.


% To run, first 'uncomment' the appropriate gpib() routine, 
% based upon GPIB dongle that connects PC to the HP 3478A.
  %HP_3478a = gpib('AGILENT', 7, 23);  % Use if Agilent dongle
   HP_3478a = gpib('ni', 0, 23);       % Use if NI GPIB-USB-B dongle

% Now, select which file containing calibration data (created previously
% using the Read_Cal_Data script) will be loaded into the 3478A's SRAM by 
% *uncommenting* the appropriate statement, below.
%
    load('HP_3478a_Cal_Data','value');
%   load('HP_3478a_Cal_Data_SN_2520A','value');
%   load('HP_3478a_Cal_Data_SN_2301A','value');
% ********************************************

% Display the data from the just-loaded file...
   input_val_table = reshape(value,[256/16,16])' % no ending ';' will print
                                                 % the table in the Command
                                                 % Window

% Now, write this data into the instrument, one SRAM address at a time,
% by sequential writing the following triplet of bytes for each SRAM
% address:
%    0x58    -- 'X'  (The "write" command)
%    Address -- 0x00 to 0xFF
%    Data    -- any value between 0x40 and 0x4F.
   fopen(HP_3478a); 
   for k=1:256
      cmd=uint8(['X',k-1,value(k)]); % X, address, value (3 unsigned ints).
      fwrite(HP_3478a,cmd);        % fwrite writes 8 bit unsigned integers.
   end;

% And, to verify the write operation, read back the SRAM's contents.

   for k=1:256
      cmd=uint8(['W',k-1,'\n']); % W, address, newline
      fwrite(HP_3478a,cmd);      % fwrite writes 8 bit unsigned integers.
      value(k)=fscanf(HP_3478a); 
   end;
   fclose(HP_3478a);
   
   % reshape for easy reading 
   val_table = reshape(value,[256/16,16])' % note that ' transposes the
                                           % matrix

   


Note:  be very careful using this code.  Before launching it, make sure you have backed up the calibration data from the 3478A to your computer so that, if you accidentally nuke the SRAM, you can recover!

And I will add -- I have only tested this code on one 3478A (and that was the meter that gave me the "uncalibrated" error message).  Given this code's potential to wreak havoc with the calibration SRAM, I would recommend running it only when your meter's SRAM calibration data has been lost or corrupted.  (Make sure you back up this data, though, before loss or corruption occurs!)

Note:  to write data into the 3478A's calibration SRAM, the CAL ENABLE switch must be rotated so that its slot is oriented vertically.  (It is shown in its horizontal, cal disabled, position, below).


This switch enables or disables writing to the calibration data SRAM.  But it is not read by the processor.  The processor indirectly verifies if calibration is enabled or disabled by alternating writes of 0x0 and 0xF to Address 0 of this SRAM.  If the data does not change, then the processor infers that the CAL ENABLE switch is disabled.  Otherwise, if the data changes, the processor infers that the calibration is enabled.

Note, when calibration is finished, be sure to rotate the CAL ENABLE switch back to its disabled position.

Here's the schematic.  Note that the CAL ENABLE switch only gates the write signal to the SRAM.  It is not read by the processor.



Verification:

First, I had already read the data from my recently-calibrated 3478A and stored it in a file (using the Matlab "Read" routine, above).  This first test would be to write this file to the 3478A's SRAM (making sure first that the CAL ENABLE switch is in its "enabled" vertical orientation).


With the exception of the first data byte (which can toggle between 0x40 and 0x4F if CAL is ENABLED and the 3478A is alternatively writing 0x0 and 0xF to it (see explanation above)), the data is identical.  (Note, it would be identical, too, if I ran the same Write code but forgot to turn the CAL ENABLE switch to its enabled position).

Next, I read the data from my second 3478A and stored it in a file (using the Read code, above).  I then reconnected my GPIB dongle to my recently-calibrated 3478A, made sure its CAL ENABLE switch was in the disabled position, and attempted to write  my second 3478A's data file into the recently-calibrated 3478A using the Write routine.

Here are the results:


The SRAM data did not update!  Good -- because the meter's CAL ENABLE switch was disabled.

For my third test, I rotated the CAL ENABLE switch on this same 3478A to its enabled position and reran the test above.  This time, the SRAM's data changed to be that of my second 3478A:


After this write I checked a few of the DC voltage ranges and verified that the 3478A still worked (although its readings were, not surprisingly, off -- after all, it now was using a different unit's CAL data).

And finally, I rewrote the 3478's original CAL data into its SRAM and finished by turning the CAL ENABLE switch to its disabled (horizontal) position:


This was not an extensive verification test, but it did verify, for me, that I could both read and write the 3478A's calibration SRAM, and that the meter still operated properly after performing the write.


Notes:

1.  The Matlab code (listed above) requires the "Instrument Control" toolbox to run (to access the  gpib() function).

2.  The 3478A's calibration SRAM is 4 bits wide, but the data readouts above imply that there are five bits (or more).  E.g. the ASCII character '@' is 0x40, and ASCII 'O' is 0x4F.  The SRAM actually contains, in these two cases, 0x0 and 0xF, and the DMM's software OR's this least-significant nybble with 0x40 to create an 8-bit data byte for transmission via the GPIB interface.

3.  HP 3468A/B DMM's also have internal "keep-alive" batteries for their calibration SRAM.  Unfortunately, their instrument-control interfaces are not GPIB (also known as HP-IB), but instead they are the much less common HP-IL interface.  It might be possible to interface them to GPIB controllers with an HP 82169A HP-IL/HP-IB Interface module, should someone like to attempt it.  (Otherwise, if you have an HP 3468A/B, you might want to leave it on!)

4.  PDFs of 3478 Operation and Service manuals can be found on the Keysight site:
 https://www.keysight.com/main/techSupport.jspx?cc=US&lc=eng&nid=-536900193.536897126&pid=3478A%3Aepsg%3Apro&pageMode=OV



Standard Caveat:

I might have made a mistake in my code, designs, equations, schematics, models, etc.  If anything looks confusing or wrong to you, please feel free to comment below or send me an email.

Also, I will note:

This information is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Friday, December 1, 2017

Repair Log: Tektronix SC-504 Oscilloscope

[Note:  My "Repair Log" blog posts contain my notes on equipment I've recently repaired.  Posted here in case someone else might find them useful.]

After repairing my Tektronix SC 502 oscilloscope module (see this blog post: SC-502), I noticed I also had an SC 504 oscilloscope module squirreled away in a dark corner of a closet shelf.


I had just finished with the '502 and I was still familiar with the disassembly/assembly procedure.  Why not tackle the '504?

So I plugged it into my TM503 chassis and powered it up.  The Power LED came on, but nothing else.

OK, so it's broken.  I knew it was.

The first thing I noticed after removing the covers was that one (of three) fuses on the A3 Trigger board was missing.  This was fuse F3488, a 0.3A slow-blow fuse that is in-line with 33.5VDC to the High Voltage power supply.


I installed a new fuse and reapplied power:  F3488 blew.

OK -- something is making the fuse blow.  Per the SC 504 Manual, F3488 protects transistor Q1380, which is part of the High Voltage supply's voltage regulator.


Poking around Q1380, Q1381, and Q1378, it was clear that the base-emitter and base-collector junctions of Q1380 no longer exhibited a (roughly) 0.7 volt drop, but were instead shorted and that this transistor would need to be replaced.

Digikey had the required  D44H11 transistor,  I ordered a few, they arrived, and I installed one.

The fuse still blew!
If fuse F3488 is blown, I would recommend a much simpler test than I describe  below in this post (which details my steps to discover what the problem was).

First, check Q1380 and replace it if it is no good.  And install a good fuse in F3488.

Then, before powering up the scope, disconnect the wire from T1475 pin 8 (to the HV Multiplier module) and check if the power-supply now comes up when you turn on the AC power. If the HV Multiplier module (Tek p/n 152-0634-00) is the problem (as it was in my unit), the power supply should now start working (without F3488 blowing) and you should measure 70 volts DC on the 70 volt power line.

(Note that the problem might not be the HV Multiplier module, but a short (or low impedance) from its output to ground.  This can be checked by disconnecting the HV connector to the CRT (with the wire from T1475 pin 8 still connected to the HV Module) and checking if the problem goes away, as I describe below.)
As an experiment to see why the "regulator" (which is actually an oscillator) was not oscillating, I attached a current-limited 33.5V bench supply (set to about 20V) to the J3490 side of F3488's fuse clip, and then connected a second bench supply, set to 0V, to pin 6 of T1475 -- this second supply essentially breaks the feedback path: I wanted to see if I could "start" the oscillator by increasing the voltage of this supply.  (Note:  I also needed to parallel this supply's output with 20 ohms because, otherwise, U1270 was forcing this point to be about 1.0 VDC.  The 20 ohm resistor creates enough of a voltage drop through R1370 to allow me to start increasing the voltage from below the turn-on point of Q1378.

As I increased the voltage at T1475.6 to about 0.6V, the regulator circuit started oscillating, but with a very loud audible squeal.  This oscillation stopped when the voltage went beyond about 1.07V, at which point Q1380 seemed to go into saturation.

OK, the HV supply's oscillator can be forced to oscillate, but when this occurs the +70V supply derived from this circuit only goes to up to about +30V, and there is that annoyingly loud squealing.

The squealing probably meant that an abnormal amount of current was flowing through the transformer's windings, causing its windings to vibrate and create an audible squeal.

Was the transformer overloaded?  What would happen if I disconnected T1475.8 from the High Voltage (HV) Multiplier module's input.

The squealing stopped!

Hmmm...maybe the HV Multiplier's load is the issue.  What happens if I leave the HV Multiplier connected to T1475.8, but now disconnect the multiplier's output from the CRT's anode?

The squeal is back!

So, the problem would seem to be the HV Multiplier itself.

Tektronix HV Multiplier, P/N 152-0634-00

I found a replacement HV Multiplier on eBay and purchased it.  When it arrived, I installed it, re-assembled the module, and then powered up the scope...

Success!  A trace!


OK -- that problem was fixed -- what else was wrong?

Channel 2's Vertical Gain knob shaft was broken and the knob spun freely.  This is an integrated knob/shaft combo (Tek P/N 366-1733-01), which I've highlighted in yellow, below:


Unfortunately, this part is difficult to find.  So, until I can find a replacement, I will be using the scope as a single-channel instrument (which was my cunning plan, anyway).

(By the way -- omniscient Google informs me that this Tek knob has an NSN number:  5355-01-186-1111.)

Another problem I had was that the focus shaft had had its tip broken off (to which a now-missing Focus knob attached), thus making the shaft too short.

I had a long length of 1/8" diameter clear plastic rod (available from Tap Plastics) and a spare 1/8" coupler.  So I clipped off a short piece of rod and used my extra coupler to extend the shaft:


(I also dug through my junkbox and found "good enough" replacement knobs for the missing Focus and the broken Intensity knobs).

Finally -- the Time Base knob's skirt had detached from the knob.  Superglue fixed this.

That's it!  Here's the SC 504 on the bench for testing with my FPGA SDR and ATU...



Resources:

Instruction Manual PDFs (which include schematics) can be downloaded here:

http://w140.com/tek_sc504.pdf

http://bama.edebris.com/manuals/tek/sc504/


Standard Caveat:

I might have made a mistake in my designs, equations, schematics, models, etc.  If anything looks confusing or wrong to you, please feel free to comment below or send me an email.

Also, I will note:

This information is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.