Show by Label

Friday, September 15, 2017

DIY build of a Tektronix SG502 Sinewave Generator

Because I sold all of my Tektronix gear, I was a bit sad to loose three particular instruments.
One was the DIY 5CT Curve Tracer with my readout modifications that was already covered in another post, the 5A22N Differential Amplifier, and the SG502 Sinewave Generator.

When I was at Tek, I build several instruments from parts, the SG502 being one of them.

I really liked the SG502, for its simplicity using analog(!) discrete parts only, and the overall specifications that made it perfect for most if not all of my applications. This instrument covers the frequency range from <5Hz to >500KH and has a pretty good distortion performance with only 0.0035% THD between 20Hz and 50Khz. The output is 5V RMS open circuit or 2.5V RMS into 50 Ohm. It also has a good step attenuation ranging from 0-70dB. Finally, it has a 5Vp-p square wave output that can also function as a trigger out.

The reason I seldom used it over the last years was that it comes as a TM500 plugin, and that uses a lot of real estate. The TM500 series are very deep, and they are heavy. I don't have room for them on my desk or counter anymore, so eventually I cut the umbilical cord and sold everything I had from Tek. Well, not really everything (sorry Raymond). I kept a few goodies.

I also have the so called Victor Mickevich Ultra Low Distortion 1kHz sinewave generator with a reported 0.00001% THD for special measurements (also described in another post: simple-but-precisice-1khz-distortion-tool), and I recently purchased the FeelTech FY6600S-30 14 bit DDS. That instrument is a Dual Channel Function/Arbitrary Waveform Generator, very versatile, but, it's digital...

If you consider building one, the SG502 has a few critical or rather special (unobtainium) parts. One is the dual FET (Tek p/n 151-1021-00), used for the input differential amplification, a J-FET (Tek pn/ 151-1054-00) used in the AGC, and the precision dual 10K tracking pot and satellite adjustment contraption, used to set the frequency. Less critical is the matched capacitor set (10uF, 1uF, 0.1uF 0.01uF and 0.001uF). They are used in the bridged T notch filter in a rather clever dual purpose way. The last rather special item is the SG3501D (156-0208-00) IC that is the center of the dual tracking +/- 20V supply. I recently found that this IC died in my SG, but I was able to order replacements on flea-bay.

I happened to have all these items as "spare" parts, and kept them since the early 70's, waiting to be used again. I did not have the special matched set of timing capacitors, but individual ones and testing revealed that they were so close and precise that they didn't need any further matching or adjusting.

Just to kinda take care of my guilt in letting my trusted and self build Tek gear go, I decided to rebuild the SG502, but in a much smaller enclosure. I use the TEKO KL22 enclosure in black/aluminum a lot for my projects. They cost less than 15 Euros, and have just the right size for most of my projects. I used them already for my three power supplies, my DC load, and now my SG502.

I first dabbled with the idea to upgrade the design with modern OpAmps and see if I could improve on the specifications. After thinking about this for a while, I decided not to. I could have build the SG505, Tek's own upgrade to the SG502 which uses OpAmps, but in my opinion, this classic should stay the way it was designed in the early 70's. Period! 

BTW, the PG505 has been described as a real masterpiece of analog design wizzardry. The instrument was designed by Bruce Hofer who now is at Audio Precision, and is a true analog design genius. So, my statement "I could have built the SG505", must be taken with a handful grains of salt. It will not be easy to replicate that instrument.

In contrast, rebuilding the SG502 instrument turned out to be rather simple. If you follow some common sense design and layout rules, anybody with a little above average skills can do it. If you can't get your hands on the critical parts, you could try to find an SG502 unit on flea bay or on one of those surplus markets where they sell old electronics. Sometimes these SG's can be bought for less than 20 Euro's. Because all components are THT, it's real easy to harvest and use the most critical parts.

I'm not going to cover the design, you can find the Tektronix Instruction Manual online, it has everything you ever wanted to know about this instrument. One thing you should note is that Tek made some important changes to the original design (especially the ACG, the voltage supply and the output attenuation circuit), and I used the latest available Change Reference (M34075 from 1-19-79) in my redesign.

One of the challenges is to get or replace the S50 push button switch set for the frequency selection and also the S160 push buttons used for the output attenuation. I used the same technique again that I already used for my DIY 5CT, and that is by using (reed) relays to do the switching. This will allow you to use inexpensive single deck rotary switches, in combination with diode matrices if required.

Here is the schematic of the range switching for the frequency selection:

Here is the schematic for the AGC damping (top) and the output attenuation:

After completing the unit, and testing it, I noticed a "design flaw" in my output attenuation switching design. When you switch between especially the higher attenuation settings, there is a short moment in-between the "clicks" that the output goes back to full scale. I need to add a delay to the relay fall-off times, to create the equivalent of a make-before-break action, change the rotary switch to make-before-break, or add a master output relays contact that prevents glitches to the DUT in-between setting changes.

I also redesigned the power supply somewhat. Normally, the SG502 uses the big transformer, diode bridge, electrolyte smoothing capacitors and the power transistors from the TM50X mainframe. I measured that the original SG502 uses about 70 mA on each 20V supply rail, so I could get away with a much simpler design.

First of all, I am a big fan of not putting mains transformers into the measurement enclosures. It keeps the hum out, and you don't have to deal with the bulky transformers, the main switch, filter, bridge etc. It allows me to use smaller enclosures, and put the transformer and the needed other stuff in a separate box that I can put someplace out of sight or away from my precious desk or bench space. Another benefit is that I can get multiple usages out of these transformers/supplies boxes.

Here is a photo of the 24-0-24V AC 160mA transformer box :

I didn't produce a schematic for the supply, so let me describe what I did. In the enclosure above, I put a 24-0-24VAC 160mA PCB transformer. I put a dual pole switch, a fuse and a neon indicator lamp on the primary side. On the secondary side, I connected the 24-0-24 AC outputs to 4mm binding posts.

Because the current demands are so small, I put the rectifier (1N4002) diodes directly on the 4 mm binding posts in the SG enclosure and also mounted the two smoothing caps (1000uF/50V) Manhatten style on them. On a little circuit board, I mounted the power section directly from the SG502 manual, and used two smallish power transistors that I had for the series transistors. I selected the voltage setting resistor (R348) to get as close as possible to the +/- 20V DC. Tek also hand selects this resistor, and I ended up with a value of 14K7, probably due to the fact that I used different power transistors.

To drive the two sets of (reed) relays, I wanted to balance the transformer and rectification loads a little, so I used an LM317/LM337 pair with 270 and 820 Ohm resistors to get + and - 5V rails. The +5V section is used to drive all the reed relays for the frequency selection and AGC dampening, and the -5V drives the 3 output attenuation relays. The grounds of both the 5V supplies are not connected to the analog ground on the analog circuit boards.

Here is a photo of the power board:

The left section on the board deals with the +/-5V and the right side with the +/-20V. I just happened to have the SG3501D chip, otherwise I could have used another set of LM317/337 to obtain the +/- 20V supplies. With these  more modern components, I really don't believe the supplies need to be tracking, because the LM317/337 are stable  and good enough.

The oscillator section is mounted on the main board, and looks like this:

Top left is the AGC damping section with 5 reed relays. On the right half is the frequency selection with the two sets of 5 reed relays. The large 10uF precision capacitor is mounted on top of the 1uF and 0.1uF capacitors to save some space. On this picture, the two output transistors(Q82 and Q83) are still the (isolating plastic!) 2N3904 and the 2N3906, they have been replaced by the 2N2222 and the 2N2907 metal can transistors after I was happy with the performance and took the picture. (Watch out for the different pin-out between these transistor types, as I forgot myself (;-o) )

I'm showing the backside with the rats nest, because it's a testament to the quality of the original design that I could stay well within the specifications without using a properly laid out PCB.

The output amplifiers for the sine wave and the output attenuation, in addition to the square wave generation and amplifier are on a separate board.

This board will be mounted through the output level potmeter to the front panel, and also on a stud to the main board.

The rest is mounted directly on the front panel:
The open hole on the left is for the output potmeter, and the hole on the right for the power LED.

To the left is the 5 position  rotary switch for the frequency multiplier then the special potmeter with the fine adjustment hardware contraption, and to the right the 8 position rotary switch with the diode matrix for the output attenuation (0 to -70dB in -10dB steps).

Together it looks a little bit cramped, but it fits easily.

The cool ribs you see on right at the outside of the back are not needed. I just stumbled on this old adhesive CPU cooler, and added it to the back initially, just in case.

And here is the front panel in detail:

I typically make a design of the front panel in PowerPoint, together with the drill map. I print the design on a color printer, using the best photo paper I can find, and in the highest resolution and best color quality.
I use double sided tape to secure the front panel and use a very sharp knife to cut the holes, I then carefully, without twisting the front layer of the paper, mount the hardware. Note that I try to use the same color scheme Tek used in the 70's. I really like it and use that for all my designs.

And here is the final unit.

While I was building the various sections, I was checking and verifying the results. When I was at Tek, I used to repair these instruments and I was amazed how well the original design worked, even with my modifications and wire nests and felt proud to have been part of this bit of T&M history. In retrospect, I'm glad I started on this project.

Using the procedure in the Instruction Manual, I verified everything as good as I could. I don't have a distortion analyzer or dedicated spectrum analyzer so I can't specify the distortion level. I used the FFT capability of my Rigol DS2302A scope, and that looked very good.

A small bit of info:
I went from using Tek equipment to a Rigol scope. Well, you probably didn't know this, but the Rigol subsidiary for the America's is located in Lake Oswego, which is only a few minutes from Beaverton, the home of Tek. You wonder why Rigol picked this location? (;-))

At a later date I will try to do a comparison with my Mickevic oscillator, my active double-T notchfilter together with an external sound card and my PC based analyzer software.

Everything else, except the rise/fall times for the square wave (>50nSec instead of <50)  is well within specification. I have not investigated this edge issue yet, for me it's good enough.

I did tweak the capacitor for the 50-500kHz range to match the other ranges. The 100Khz signal is the most critical, so I went back and force a few times to adjust the value of C55 the timing capacitor so when I switch ranges, the frequency setting is well within the specification. The original C565 value is 87pF, I ended up with 92pF.

What that means is that when I set the frequency setting to the (reference) 100.0MHz in the X100K setting, and switch to the X10K setting, the frequency is 10.17kHz, in the X1K setting 1.03kHz, in the X100 setting 101.7Hz and in the X10 setting 10.2Hz. That is excellent I think.

One caveat, and you may have already missed it. I don't have room for the frequency dial. First of all, I don't have one in the first place, but because I normally attach my scope anyway, it has a digital read out of the frequency setting, so I don't need the dial.

Even though I did not have the calculated precision resistors for the attenuation switch, I got really close by getting the closest E96 resistor value or selected a couple, and again, I was able to stay well within the specification.
If you're interested why Tek used these funny resistor value: have a look here :
matching-t-attenuator-calculator (use the 600 Ohm input/output setting and you'll see that the values match exactly to those that the Tek designers probably calculated with a slide ruler (;-))

One thing I need to do still, is to order copper sheet metal and use that on the inside of the (plastic) enclosure. Whenever I use my T12 solder iron, the high frequency pulses from the heater come right through. That's not just this unit alone though, but I want to create an extra barrier for this one.

All in all, I am mightily impressed with the design quality the Tek engineers at the time were able to pull off in the 70's. Rebuilding this unit and staying well within the original specification is again a testament to their skills. Hats off!

UPDATE 22-11-2017

After a lot of issues, I was finally able to create a vastly improved setup to measure FFT's, so I can now present the THD distortion number. A measured THD of 0.026% is even better than the specification for the original, which is 0.035% for the 20Hz to 50KHz range.
Here is the screenshot:


If you like what you see, please support me by buying me a coffee:


William Jessie said...
This comment has been removed by a blog administrator.
Anonymous said...

I like your DIY style. However, your wiring (under the ECB) is sloppy. No matter, your neat front-panel and layout decision-making make up for it. I designed part of the PG508 and the legendary FG506 sweeping function generator that sweeps logarithmically from 10 Hz to 100 kHz without range changing. It never was put onto the market but about 6 prototypes were built. I would like to talk with you more directly; my email address is at