Show by Label

Tuesday, March 4, 2025

DIY Build of the Tek SG505 Oscillator

 

The rather famous SG505 oscillator






I'm going out on a limb here. Although I already built a copy of the SG502, described here, the SG505 is a very different beast all together. At the time I did the SG502, I was not ready to attempt the SG505, a masterpiece of analog engineering by wizard designer Bruce Hofer. After a number of years mulling about it, I was recently looking at the instrument again after seeing it used in a YouTube series, and this time decided to give it a try.

As with many, if not most Tektronix designs, they incorporate special parts, or the parts are obsolete by now. The added difficulty is that with these older designs (this one was created in 1980) that pre-date the internet, you can't find any datasheets for these parts. Most manufacturers went defunct or merged and do not show these old parts on their websites.

So when looking at the SG505, I first wanted to try to build the sine wave oscillator. I used the information from the Option 2, that has the balanced outputs, because that has improved schematics and parts.



Here is where you can find a lot of information about the SG505 and it's designer Bruce Hofer.


So what is so special about the SG505

First of all, among specialists, it has the status of a real piece of analog art, designed by one of the great masters himself, Bruce Hofer. While at Tektronix, Bruce was responsible for many products and designs in the 7000 oscilloscopes and the TM500/5000 series. He also designed the AA501, the first automatic audio analyzer that worked in tandem with the SG505. As a matter of fact, I understand they designed the AA501 to verify the SG505 after production. In the manual for the SG505, you can see the rather elaborate method to calculate the total harmonic distortion, and the equipment needed. 

Just the specification of 0.0003% THD from 20Hz to 20KHz will give you an idea of the design quality. 

The SG505 has at least one patent that I know of, describing a "State variable oscillator having improved rejection of leveler-induced distortion". Have a look here : patent.

When Tektronix management was not interested in taking the AA501 and later the AA5001 distortion analyzer concept further, Bruce co-founded Audio Precision and that is the current and undisputed leader of this field.

You may ask why I'm so interested in rebuilding the SG505? First of all, it's a great design made by one of the few analog wizards. It is very well documented and also has been manufactured for several years so the selection of components went through this test. This "fitness for manufacturing" should not be underestimated, because the parts (source, value, tolerance, tempco, etc) in every possible permutation will have to meet the specification of the final product over the years. In other words, the bugs are out. This cannot be said about many other DIY designs.

The other reason for selecting the SG505 is that you can freely select any frequency by just selecting the desired range, and using the dial and vernier adjustment to select the frequency you want. There are several other pure oscillator designs that are more modern, and even have better specifications. In almost all of their applications, they are used in a THD measurement, and in those cases, you "only" need a few fixed frequencies. That makes it easier to get better specifications because you can tune both sine and cosine oscillators with fixed parts. None of them use an analog variable frequency selection.


Some Small print:
As I normally do on my Blogs, I describe the way I get to the final design, with trials and errors, ups and downs, warts and all, but hopefully in a way that you learn something, and avoid my mistakes. With my projects, it's not going to be an IKEA hand-holding type design. Some effort is required. And most importantly, there are no guarantees it will work for you too, I'll do my utmost but that's about it.

I will add information to this Blog and the Github as I go, and with this pretty extensive project, it may take a long time. As a matter of fact, I may not be able to finish it with the sought after quality, so take that into account before you heat-up your soldering iron or start to order parts. I'm not a really experienced engineer, and I'm not hampered in any way with specific know-how or experience, nor do I have the proper equipment to verify and test the design. I'll do my best, and will make you part of the process, but that is as far as I can promise.


Interesting articles and information:

There are many articles about sine wave oscillators, because building a simple one is easy, but a really good one is a real challenge. Over the years I have collected a few interesting ones:

Rod Elliot has a lot of interesting information on his site, but there is one particular posting where he explains the various architectures with their pro's and con's.
https://sound-au.com/articles/sinewave.htm

A few other articles can be found on my Github site here:
https://github.com/paulvee/DIY-Rebuild-of-the-SG505.

Then there are several Forum posts that deal with the modernization and rebuild of the Bob Cordell THD Analyzer that contains a very good oscillator, just like the SG505 (that original article is on my Github). The latest and most impressive rebuild of that instrument that is 30 years old, but now with a processor to drive the measurements is on this Github from Emile666, a very impressive and complete design. Also have a look at the diyAudio site, there are designs that deal with specific 1KHz and 10KHz pure oscillators of outstanding specifications (search for "LT AN67 1KHz or 10KHz oscillator", from Frex) The AN67 application note is listed on my Github. The author of that impressive design is the rather flamboyant Dale Eagar, who worked for my buddy in crime Bud at LT. Small world.


Component Issues & Challenges

For this particular project, let's discuss the road-blocks and challenges for a rebuild, based on the components that are used in the instrument.

First off, there are several special parts and some of them are no longer available on the market.

The potentiometer that sets the frequency is a high quality single turn dual 10K wirewound version without a stop. It was originally made by Spectrol, but is now part of Vishay. The part used is a Model 100 with the following part number: 100B2-103-103-XXXX

According to the datasheet, it has +/- 3% tolerance and the independent linearity between the two sections is only +/- 0.5%. Unfortunately, the datasheet does not specify the THD. This part is still active and manufactured it seems, but nobody has it in stock. 

The next item is a mechanical part that is used in combination with the potentiometer, to create a finer adjustment by reducing the number of rotations 6:1. The Tek part number is 401-0161-00 and the manufacturer is Jackson Bros (London). Their part number is listed as 4511/DAF in the SG505 manual, and believe it or not, you can still buy this part for a reasonable price, here. This reduction unit also gives a very smooth and controlled action on the potmeter. Highly recommended!

I am the lucky owner of having the potmeter and the reduction unit, it is used in my SG502, but for others, I'm going to try to find a replacement part or method for it. It's the most critical part of the design so it would be critical to find an alternative. I have some ideas using other potmeters, even digital ones but I have no experience with them whatsoever so I need to give that a try when I have a functioning oscillator.


The next item in the list is the special drum switch (or cam shaft) that Tek manufactured themselves that select the output attenuation. This in addition to the special pushbuttons that are used to select the frequency multipliers. In my design for other Tek instruments, like my 5CT1 (below) where I added readout capabilities and also for the SG502, I used reed switches or a small relay in combination with a simple rotary switch and diode matrixes to re-create the sometimes rather complex switching arrangements. 



Luckily, the SG505 switching used is quite simple. At first I was contemplating using analog CMOS switches or MOSFET's, but I understand that will add too much resistance or add to the THD distortion budget, so I will most likely use reed switches again.

Next-up is the J-FET used in the AGC circuit. The Tek part number is 151-1021-00 and is used in many Tek products. In the manual, they show the FN815 from Siliconix. I have not been able to find any information about that part at all, and I know I'm in good company because of the frequent use in other products. Many makers are looking for replacements. There is another J-FET 151-1025-00, an SFB8129 made by TI that is also used in many designs. This J-FET is used in the power supply as a current source, but that one is a lot less critical. Lastly, that same J-FET is also used in the output buffer amplifier. 

One of the most critical components, in terms of the distortion budget, is the special hybrid substrate that is used to select the dBm output settings. I happen to know that the construction used in the SG502 is the source of some extra distortion, so Bruce Hofer created an unofficial modification to change that for the SG502, significantly reducing the total harmonics from an original 0.035% THD to well under 0.002%. My assumption is that using discrete components is going to be a challenge, but on the other hand, we now have very good SMT devices Bruce didn't have at the time.

Lastly in this list is the set of matched timing capacitors used in the oscillator phase-shift amplifiers. Luckily, for a DIY project, the absolute values that are matched in the SG505, are less critical. In a manufacturing process, you don't want to tune the product, it has to work right of the production line with as few adjustments as possible. The critical factor for the original design was to create a situation by which the frequency dial is set to say 1, and by selecting the X10, X100, X1K and X10K, you would would get the exact reading of 10Hz, 100Hz, 1KHz, 10KHz and 100KHz +/- a few percent, but we don't really care do we? Besides, we don't have the frequency dial anyway. We will need to work around that.

I already have a little and simple side-project working, using an Arduino Nano and a small OLED display to measure and show the frequency.


Simplifications for the DIY design

From the outset, I will be concentrating on the sine wave oscillator itself. I'm not planning to add the differential output that the Option 2 provides. What I will eventually use as the sync output is still open. All I want is a way to trigger my DSO on the signal, and an edge of a square wave is actually more stable to trigger on than the slope of a sine wave. 

I will also not implement the Intermodulation Module because I don't see the need for it in my projects.

Next up is a more simple instrument setup. The original SG505 has to function in a TM500 or TM5000 mainframe, together with a host of other instruments right next to it. Some of them can be very unruly and noisy neighbors. The SG505 is completely floating from real earth ground inside this environment. My plan is to keep it that way, but build it in an enclosure that has no earth ground connection anyway, so it will be floating from the outset.

The power supply is a critical element in the chain and will deserve a lot of attention, but I will address that later. I will use my lab dual power supply in the beginning.


My Plan

My plan is to build a prototype PCB that will give me a functioning oscillator that will allow me to test and try some different strategies and components, and build a reference platform for my measurements using my mostly home-brew set of inexpensive tools. Some if which I already have, some I may need to build to verify and test the specifications. I envision something similar as the design of the VBA Curve Tracer, where we went a step at a time over the course of about two years.

After going through the documentation many times, and watching YouTube videos and strolling the internet for information, I started by creating a schematic in KiCad. I then spent many long hours pouring over the Replaceable Electrical Parts list selecting and finding the parts for the prototype. I used Google, Mouser, DigiKey and LCSC for days, and eventually decided on a BOM to order from LCSC because of the total price including S&H. It turned out that they did not have one particular resistor value from all the parts I need, so I ordered a combination of two to get the missing part.

I did not save money on the parts but selected the best quality. All resistors are 1% metal film, better than the original THT resistor specifications. I also matched or exceeded the higher precision resistors (like 0.1% at 25ppm). However, I did not use Mica capacitors, but good quality NPO with the same 1 or 2%  tolerance. The electrolytes are all Tantalum except for the two used in the supply rails.

Almost in parallel, and now knowing the parts and footprints, I started to design a PCB and ordered it as well. Both the parts and the PCB's will be on their way soon. Talking about on their way, another "way", PCBWay has agreed again to sponsor me with this project, and I'm grateful to get boards from them for free and with a very high quality. I may need to go through a number of re-designs while progressing so this support is very helpful.


The schematic for the prototype


The component names and values are the same as in the original schematic in the Option 2 manual. Where they do not, or I had to use other parts, I indicated that.

However, I deviated quite a bit from simply redrawing the original schematic in the manual, to show the many intricate and not-so-obvious feed-back and feed-forward connections, as well as the many compensation circuits, especially around the inverting Opamp U1510. This is where most of the magic happens.  I suggest you read the Theory of Operation in the manual and also the patent application for the feed-forward invention, that allowed Bruce to significantly reduce the harmonics. In essence, he applied his wizardry to remove the fundamental frequency AC signal from the AGC circuit DC-level in several places. I know that the picture above is not of great quality, but a Github project is available here and I will upload files as the project progresses.

The three hierarchical boxes in the schematic are currently "hiding" the frequency and dampening switches and parts but are inconsequential at this moment. I just followed the original design, but used jumpers instead of switches.


The 2-layer PCB prototype


The layout of the PCB largely follows the schematic, so there is a full circle with the circuits following the State Variable design as is in the schematic as well.

I made the decision, right or wrong, to use ground fills on both sides of the PCB. We'll see if that will show up as an issue, in which case I need to go to a "star" grounding method with all ground going to the output BNC connector.

For this prototype, I will be using jumpers to select, add and try components and also activate the capacitors for the frequency selection and the AGC damping. For the frequency selection, I will use a normal dual (stereo) cermet 20K potmeter, just to have a functioning oscillator. 


J-Fet Selection

I added two kind of foot prints for the J-FET so I can use SMD and TFT to experiment. The TFT version has a socket. I actually have the original but now elusive unobtanium J-FET, and I also have a Curve Tracer, described here, so I can verify or measure the specifications if needed. I already ordered or had a small selection of J-FET's to try.


The elusive, unspecified & unobtanium 151-1021-00 J-FET

More about this selection procedure later.


Capacitor Selection

For the frequency setting capacitors, I used good quality Polypropylene film capacitors, but now that modern NPO and COG ceramic capacitors are available in good quality and with very precise tolerances, I may want to experiment with them as well. I will most likely trim the Polypropylene values to match by using the ceramic parts, and measure the effects.



I'm very anxious to see what the results of this prototype is going to be. When I built the SG502, I was pleasantly surprised that my rats-nest construction (no PCB) produced a slightly better THD specification than the production version one had. A testament to the conservative specs and the quality of the original design. 

Who knows what I find with this one...


How am I going to verify the results?

As I stated earlier, I do not possess all the proper equipment that is required to really verify the SG505.

I will have to do with less and see how far I can get. If needed and possible, I can build something, like the passive notch filter that Tek uses. 

I already have an active T-notch filter for 1KHz that I may need to duplicate or extend for the other frequency ranges (10Hz, 100Hz, 10KHz and 100KHz), we'll see about that when we get there.

Luckily, I have a kind-off reference oscillator, the Viktor Mickevich 1KHz design that has a very respectable THD. He claims (verified by others), a whopping <0.00001% THD. 

With my simple DIY equipment, (look at this post and this one) I could measure the THD for his oscillator as far down as 0.00096%, so that is a very good start.




For the rest, time will tell.


Possible solutions as an alternative to the dual 10K potmeter

As I mentioned earlier above, this potmeter is a very critical part that is crucial for the operation and more importantly, the specification of the oscillator. The specification needs to be tight because of the "State variable" design of the oscillator. Each section of the pot sets the frequency of the two 90 degree phase shift circuits (states). If there is a difference in the resistance between the two sections, it will negatively impact the phase shift. The timing capacitors also have an equally important role, but they can be more easily matched to each other or the value tuned by adding parallel capacitors.

The combination of the 1-turn 360 degree 10K potmeter and the 4511/DAF 6:1 reduction allows the sensitivity or rather resolution to be as follows. For the potmeter, 10K / 360 degrees is 27.7Ohm per degree of rotation, further reduced by 6 to 4.6 Ohm per degree of rotation. And then there is the vernier adjustment of +/- 1% of the frequency. 

Looking at it from a frequency perspective, with the multiplier at 1K, the potmeter can adjust the frequency from just below 1KHz to just over 10KHz. That translates to 1,000 Ohm for every 1,000 Hz, or 1 Ohm per Hz. 1 degree of rotation is 4.6 Ohm and therefore 4.6 Hz. The vernier range is 1% of the frequency so that translates to 10Hz at 1KHz and 100Hz at 10KHz. That will be not so easy to duplicate.

So, provided you can't your hands on the original Model 100 potmeter, what are the possible options?

After quite some time looking at alternatives, I came up with a few potentials.

1. Use a dual (stereo) cermet potmeter
With the right shaft diameter, it can also be used in combination with the 4511/DAF 1:6 mechanical reduction. The challenge is that these potmeters do not have very tight specifications. A good quality one will still cost about 25 Euro's.

2. Use a dual 10 turn precision potmeter
This will give you a much higher resolution in setting the frequency, you don't need the 4511/DAF reduction and the vernier circuit can stay as it is. The specifications for tolerance (3%) and linearity can be better than for a cermet potmeter, but there is a significant price differential. A suitable one will cost about 46 Euro's. The downside is that you need to turn the knob a lot (10x) to go from the beginning of a range to the end. Even with this quirk it could still be the most viable solution.

3. Use a digital potmeter.
I have no experience with using them, but I first thought this could be the solution. So after reading a lot about these devices, I found that there are actually a few stumbling blocks for this application. With most devices, the voltage range of the potmeter is limited to 0..5V. The regular maximum granularity is 256 steps (there is a special one with 1024 steps). This means that from a 10K value, every step will be 39 Ohm. That's 8.4 times more than the original resolution, so the vernier adjustment has to be modified to cover the difference. That can be done, but digital pots have other issues, like the linearity and tolerance, and then there are the resistance of the wiper and, a bit less important, the end and beginning resistance. When you change from one setting to the next, there could be a jump or glitch in the frequency, although there are ways (zero crossing) to avoid or suppress that. On top of that they are not that good with temperature changes. 

Based on our particular circuit, one of the best solutions could be the TI PGA2310 designed for hi-end audio stereo volume control. It has excellent specifications, even removing some of the issues with other digital pots. The chip is not cheap however, with a price of  about 28 Euro's.

Most importantly, these digital pots will need some form of digital logic to drive them. Normally, you would use a rotary encoder as the input, and use logic or a processor to drive the electronic potmeter settings. I like to avoid that source of inevitable digital noise, but it could also be a blessing, because we could add a small TFT or OLED screen to display the frequency, because we don't have a dial remember. I have not discounted this solution, it provides some potential but it's not my favorite to develop at the moment.

4. Use a rotary switch.
You need a rotary switch with a double deck and one pole per deck with at least 10 positions, so you can create 10 segments of 1KOhm each by using fixed resistors. By using tight specifications for the resistors, you can really get the best linearity and matching between the two sections and probably also get the best Tempco results, surpassing the original design. The downside is that you can't smoothly turn through the whole frequency range, you have to select a section (1/10th of the range) and than use the modified vernier (modified to 10x the adjustment) for a finer resolution within the section. You can select shorting and non-shorting versions of these switches to avoid large frequency jumps when you switch. The suitable devices I found will set you back by about 45 Euro's.

So depending on your particular application for the oscillator, there are a few options you can select from.


I received the boards, unfortunately, the parts are still in China... And now a week later, they are moving and now in Hong-Kong, progress is very slow...





Frequency Display

As mentioned above, because we don't have, or will have a dial, I'm planning to use a small display to show the frequency of the SG505.

Here is the prototype with an Arduino Nano and the tiny OLED display I'm planning to use. I like the yellow color. The dimensions are 0.9" with 128x32 pixels.  I tested the FreqCount library from Paul Stoffregen with my function generator, and it easily covers the range of 10Hz to 200KHz.








Stay tuned, there will be more to come when I have a functioning prototype...

A Github project is available here it will be updated during the project.


If you like what you see, please support me by buying me some Java: https://www.buymeacoffee.com/M9ouLVXBdw

For those that already did, thank you!


No comments: