Show by Label

Showing posts sorted by date for query fft. Sort by relevance Show all posts
Showing posts sorted by date for query fft. Sort by relevance Show all posts

Monday, November 3, 2025

The DIY SG505 mains power supply

This post will detail the mains related portion of the SG505 generator. I decided to split the whole power section in two, the quiet parts stay with the main generator, and the mains related and otherwise inherently noisier parts will go into another enclosure, all by themselves.

Think of it as a dedicated substitute for the TM5XX mainframe the original SG505 would have as its home.

After a few revisions, this is the final version of the supply, Version 4. (I'm showing it here so it shows-up on the title page of the Blog post)




The V3 Mains Power Supply

In an earlier version, the power supply was on the main SG505 generator board. This circuit  is inherently noisy and will no longer be in the same enclosure as the generator. 

This is the schematic of the new version I'm now working from. There are not too many changes, but I added ferrite coils in between the larger reservoir caps, and I used a common mode coil at the output. I also added a few more capacitors to quiet the thing down as much as possible.





The dimensions of the board are such that it can go in any kind of enclosure, and mounted on studs through the 4 mounting holes.



Discovered an issue

After trying the new setup, I discovered that I made a mistake...


A wimpy transformer

With the generator working, I started on the counter section. However, when I flipped the power switch, the generator almost stopped working, the output dropped significantly. To make a long and embarrassing story short, I misjudged the amount of power that the counter circuit draws on the supply. I measured it at 120mA, and was under the impression that with the 50mA for the generator I was within the power budget of the transformer. We're not because there is a significant voltage drop of the raw supply, dropping the headroom for the 40V regulator, and then also for the shunt regulators.

Here is the culprit, the VPP28-180, a 2x14VAC @ 180mA. It's not beefy enough. I had that one in my stock so used it. I should have know better, and I should have tested it better.

A new transformer will require a turn of the board, but I'll wait to be sure. Extra sure. This time.


To continue with the rest of the assembly and testing, I took off the 12V regulator parts from the main board, so they would not interfere and I could supply an external 12V to power the counter circuit.

The rest of the generator worked fine, so I could spend some more time on the power supply fixes that resulted in a board turn and a version 4.


Power Supply V4

To counter the lost head room when the current goes up, I tried a 15-0-15VAC transformer that I have in stock and is much beefier with 800mA. I used one of the spare V3 PCB's to build-up a new version, and also made some changes, reflected in the new schematic.

I used larger filter capacitors with 2200uF/63V, the only ones that I have with this voltage. The 1000uF/50V that I used before is a little tricky now with the higher input voltage. I ordered 1000uF/63V, and also 3300uF/63V to give them a try later. 

The second 75mA fuse is gone. The larger load and the filter capacitors cause an in-rush current that is blowing the fuse. I now use a 500mA PTC instead while testing, it will be lowered to 200mA after my testing.

When using the new 30VAC transformer, I measure the ripple at a load current of 200mA (using my Dynamic Load), and I only see 400mV, the raw voltage is 42.5V, which is not enough head-room for the regulator to provide 40V. 

When I increase the current to 240mA, the voltage regulator drops out of regulation.

At a load of 160mA, the raw voltage is 43.2V and this is the expected current draw of the instrument as far as I can tell. I need to measure that again, but I need to put the parts that I removed from the 12V circuit back on the main board in to do that. That requires a disassembly of the instrument again, and is next on my list, but not today.

I added the 12V regulator components on the main board and started testing again. The generator works fine when the counter is off, but when I switch it on, the positive 16.5V supply drops, this is due to the 40V dropping a bit, and that is because the raw unregulated voltage is dropping too much for the 40V regulator to continue to provide a steady 40V. That was to be expected because there is not enough headroom. 

The result of this investigation is that even a 2x15VAC is not enough, even though the transformer should have plenty of power.

Here is what I measured at the DC unregulated side with that supply:

Open : 49V, Generator 46V, Generator + Counter 42.7V: not enough, another wimpy transformer.

Using a beefier version

Next try is with a VPP36-560, a 2x18VAC transformer, another one that I have in stock. It was a left over from the Curve Tracer project. I don't need the 560mA it provides, but this transformer type is also available in a 280VA version.

When I measured this transformer, it showed these results:

Open : 60V, Generator 56V, Generator + Counter 51V.
The ripple is still 200mVp-p but we have plenty of headroom now.

With the unregulated input this high, the 40V regulator must now have a good heatsink, which was not required with the lower voltages. It's easy to create some room on the PCB to add one though.

With this transformer, there is no voltage drop anymore, and the other good news is that the generator continues to function very well with the counter on or off.

New power supply, counter off:


And below is with the counter on.
 
Note that this FFT is not as nice as the previous one, it has some hum and I had to readjust the H2 but this time could not make it disappear. I also found that the Vernier adjustment changes the H2 distortion level a bit. Looking at the circuit, that seems to make sense as it is in the feed-back loop of U1 where also the AGC is used as a summing-input. I'm speculating that the hum could be the result of the 40V regulator needing to work so much harder due to the significantly higher raw input voltage.



There is virtually no change in the noise floor (-128dBV and also in the harmonics). The 12V section is now quiet enough although for very clean measurements, you could switch it off, just in case.

THD is now 0.00033%. 

Adding a pre-regulator

With the extra head-room that the 2x18V transformer provides, I can now also implement a pre-tracking regulator. Because the job is then split in two, with one working on the line regulation, and the other on regulating the voltage output. The load is shared, so I can use two much smaller heatsinks.

Besides, the split will also create more separation between the mains related hum and the output voltage. The U1 pre-regulator provides about a 5V head-room for the U2 voltage regulator. Only 4 additional parts are needed for this pre-reg circuit.

Below is the text-book (from the LM317 datasheet) implementation of the pre-regulator, or tracking regulator.


(this is not the final version, have a look at the Github site (link below) for the most current information)

With the Manhattan style modification to try it out, and the long flying leads to the transformer, I can't see the benefits in the FFT, but my hope is that it will, once everything is on a proper PCB. 


I can even reduce the size of the heatsinks you see above, the regulators are not getting hot.

As soon as the ordered filter capacitors come in, I can try the 1000uF versions and see if they are adequate.

In the mean-time, I'm working on the new layout for the power supply.




The layout has provisions for the VPP36-560 transformer (11,62 Euro's at DigiKey) the one I already have and will use, and the smaller VPP36-280 (8,62 Euro's at DigiKey) which should be sufficient.

I also measured the supply with the 2x1000uF/63V and also the 2x 2200uF/63V for the main filter capacitors C6 and C7. The ripple voltage measured across C7 with the 1000uF was 320mV and with the 2200uF 200mV. Both values are adequate but the PCB will support both types.

Happy with these results, I uploaded the updated power supply V4 and the updated front panel Gerber files to PCBWay for production under our sponsoring arrangement. (even though I screwed-up twice, nice of them)

It will usually take about a week for them to arrive.


Final results

The boards from PCBWay arrived in the usual very good quality and I build-up one of them. Check them out for your own projects: https://www.pcbway.com/

Everything worked flawlessly, so I adjusted the output to 42.00V and connected the generator board. After a few minutes, while calibrating the voltages, the power dropped to zero. It turned out that I used a 100mA PTC for F2, and that is getting too warm and cuts out. I'm now using a 200mA PTC that I planned to use earlier, and that works fine.

I calibrated the output voltage again but now measuring the Vreg on the generator board, to account for a few 100mV power losses, and then proceeded to calibrate the +17V and the -17V. 

I could not adjust the +17, it stopped at about 16.4V, however, the -17V worked fine. This is due to a Vreg that is a little too low for the balancing to work, so I raised the Vreg voltage to 43V and all was well. To add a little bit more headroom, I'm now setting Vreg to 44.00V.

The heat sink I selected for the main voltage regulator (U2) is a tad too small, because the device gets a little warmer that I hoped for. I can still touch the tab without burning my finger so there is no real issue, but still. The U1 pre-regulator is only warm to the touch so fine.




Below is the now completed enclosure for the power supply.



The front panel is the back panel from the SG502 that I'm using here as the front panel.


And below is the setup of my instrument bench. 

The top shelf has the actual instruments. From left to right: the DC Dynamic Load, the SG505, my frequency counter, and the GPSDO on top of the master clock, the rest is out of sight) BTW, these are all instruments that are listed on my Blog. Below that shelf is room for the supporting stuff, like the power supplies.




This concludes this project for the time being.

Here is the overall project Github with all the design files: 
https://github.com/paulvee/DIY-Rebuild-of-the-SG505

Here is the Shared Project listing on the PCBWay website:
Shared Project DIY SG505 Power Supply


Thursday, September 25, 2025

DIY rebuild of the Tek SG505 Part 3 (final)

This Blog post will detail the third stage of my project to rebuild the Tektronix SG505 instrument.




Here is the link to the post describing the second version of the design: 

https://www.paulvdiyblogs.net/2025/08/diy-rebuild-of-tek-sg505-instrument.html

Here is the first post about this project:

https://www.paulvdiyblogs.net/2025/03/diy-build-of-tek-sg505.html


The reason for the third revision

After the investigations of the second version, I wanted to separate the Power Supply from the Generator in the same enclosure. I also wanted to put the Generator circuits into a full metal enclosure to make the output of the generator as clean as possible and as a minimum, remove the mains hum.



After a very long search, this is the only enclosure I could find that has the required height and width for the front panel layout. It is a ProMa 130 0044 and is also available from Amazon. The outside dimensions are 165x110x80. I would have liked a black enclosure, but alas I couldn't find one. There is one available from ProMa though, with part number 130 0045. I can always spray paint it black myself if I develop the urge. The current Front Panel design will need some modifications and will replace the aluminum panel. The generator PCB will slide in a slot close to the bottom. Unfortunately, the dimensions are a little different so I can't use the current PCB in this enclosure, not even to try it out. 

This all means a new PCB for the Generator, for the Power Supply and for the Front Panel.


Splitting the Power Supply

There will be a separation of the noisy mains related parts of the circuit, that need to go outside of the enclosure for the generator. In essence, it means that the transformer, the bridge rectifier, the main capacitor reservoirs and the 40V regulator need to be on a separate PCB that will be housed outside of the generator.

This part of the project will be described in a dedicated post here:
https://www.paulvdiyblogs.net/2025/11/the-diy-sg505-mains-power-supply.html

The shunt supplies for the +/-16V rails can move to the main generator, and also the 12V supply can move to the main board. They are quiet and will have no negative effect on the generator. I hope. It also makes the interface from the Power Supply enclosure simple, because I will only need to use two wires for the 40V supply that feeds the other three rails.

The circuit after the transformer and the bridge will get some more filtering to avoid mains related noise getting into the generator.


The Power Rails on the Generator PCB

These three rails are very quiet by themselves and can now move to the generator PCB.


(this is not the final version, have a look at the Github site (link below) for the most current information)

No major changes from the previous design, I just added a few extra capacitors and ferrite beads to the power input lines. This may still change a little based on the new layout.

Just when I was about to order the PCB from PCBWay, I decided to skip the idea of using a heat sink for the LM317, because it will still get too hot and raise the temperature in the box. It will now be mounted isolated to the side of the aluminum enclosure.

The Generator circuits

The other circuits stay the same, will just get a revised layout and incorporate the three power rails and needs to fit in the new enclosure.

I finished the new version of the generator PCB, now with the power rails on it.



This is what is ordered. On the bottom part you can see that the LM317 is now flipped around and moved closer to the edge of the board. It will be mounted isolated on the side of the enclosure to remove a considerable heat source.


The Front Panel

This is the updated front panel fitting the new enclosure.

The golden rings around the holes connect the front ground fill to the back ground fill to add an EMI shield to the inside circuits. 


The rings on the back are larger so will connect to the metal parts of the switches, connecting them to the shield. The 4 mounting holes in the corners also have exposed holes on the back and will connect the shield to the aluminum enclosure. 


The enclosure itself is not connected to earth ground but floating. I have created the possibility to connect the GND of the PCB circuits close to the output BNC to an exposed pad on the front panel. In that case, the circuit GND will be connected to earth GND when the BNC is connected to a DSO.


Building up the boards

I received the shipment with the three PCB's and I have built up the power supply by transferring most of the parts from the old board, added the additional parts and tested it. No problems.

The next step was to add the solder paste droplets to the main generator board and transfer the parts one by one from the old board. I used my heat gun to remove them and put them on the new board. When that was done, I reflow soldered the board. Because I used smaller solder paste droplets this time, the reflow process went a lot better, with only a few tiny solder ball bearings and a lot less of the flux gue. I did not clean the board just yet, I wanted to test the functionality first.


Discovering issues

Bad Solder joint

At first I wanted to check the voltage levels of the three power rails. The +16 was only about 9V and then dropped to 3V, the negative 16V was about 30V, the 12V was OK. Although nothing got warm, I quickly shut it off. After connecting the switches and potmeters to the connectors such that the generator could function, I applied power again and saw a welcoming sinewave, albeit with some distortion at the top half. Hmmm, partial good news. When I checked the 16V rails, I still noticed a large unbalance, and that explained the distortion. The good news is that the most complicated circuit seemed to work OK, but the most simple circuit did not, but why?

The hunt for the shunt supply imbalance turned out to become more and more strange. To a point where I started to remove the parts from the shunt supplies one by one, but without any improvement. Using my Lab Supply instead to first power the +16.5V and the -16.5V everything worked, I then supplied the 40V supply, further up-stream and that also showed the correct currents and the system worked fine. Now really puzzled, I used another one of the spare generator boards and started to add the minimum amount of the same parts I just took from the board for the shunt regulator to make it function, which it did flawlessly. Even powering the generator from the second board showed the correct balanced voltages. I was flabbergasted. After thoroughly cleaning the board and resoldering the components back to the board in pairs, everything worked. Bad solder joint!

Wimpy transformer

I also discovered that the mains power supply had a wimpy transformer, so that also needed attention. Details are in the other post: 
https://www.paulvdiyblogs.net/2025/11/the-diy-sg505-mains-power-supply.html


Mistake on the front panel

When putting everything together, I first mounted the construction for the main potmeter and the reduction unit. It fitted perfectly, unlike with the first front panel. So, happy with that result, I added all the other switches and potmeters and proceeded to slide the board into position, when I hit a barrier.

Turns out that I made a serious measurement mistake with the position of the rotary switch for the multiplier. It was bumping to the board and also bumping to the reduction unit. Moving the hole up and left solved that issue, but it will mean another turn of the front panel.

This is how it looks now, so close...



This is the inside view of the now fully working instrument:




Mains related hum

When I did the first FFT tests, I still saw some 50Hz hum and some harmonics. When touching the metal parts of the front panel, it got sometimes worse, sometimes better. I did not have the main potmeter knob mounted, and when I touched the metal axel, the hum got worse. Connecting the Earth GND from the output BNC to the metal parts of the main potmeter and reduction unit with a wire did not do anything, but connecting it to the common GND of the main board reduced the hum dramatically.

It turned out that the mounting holes for the main potmeter support and the reduction unit did not connect the metal parts to the common ground of the PCB. I used star washers on each support to improve that. I also added a blank ring to the layout around one more hole of the contraption to improve that going forward.


Connecting earth GND to common GND?

I intentionally connected the front panel shielding to the metal enclosure to create a Faraday cage, but I separated it from the common GND of the board.  

In my current setup, with the USB connected EMU0202, however, that produced too much unwanted mains related hum. 

I already added a solder tab on the back of the front panel as an option to make the connection possible. When I soldered a wire to it, and connected the other end to a solder lug I added to one of the supports for the main potmeter to connect the two GND's together, it solved the hum issue completely. But now the instrument is earth grounded through the EMU to the laptop, which by the USB-C cable to the power supply is connected to earth GND.

The other possible connection for the instrument to get earth GND connected is through a BNC cable to a CRT or DSO and that will connect it to earth GND as well.

The original SG505 has a switch to connect the common GND to earth GND. If you also want to have the option to separate or connect the enclosure from earth GND, you could add a toggle switch to the back of the unit, or a sliding switch on the side. I'm undecided at this moment, but it's easy to add afterwards.


Result after the fixes

After all these mishaps and corrections, I wanted to share the first FFT from the generator, hot of the press. Note that I was able to quickly trim the second Harmonic visually into oblivion (0.00002%).


Result, no hum, no noise. 

Unfortunately, with H2 visually gone, H3 is now sticking out, but the rest of the harmonics are virtually invisible. 

During my testing with the updated power supply and mounting everything on the front panel a few times while fixing things, I noticed that I could no longer adjust the H2 harmonic as low as it was above. There is now also some hum visible, so when the new supply arrives, I will look at it again in more detail. 

Just for reference, my DIY version of the generator seems a bit better than the original one. Albeit using different measurement tools.


I'm almost there...

Building the final version

Happy with all these results, I uploaded the updated power supply V4 and the updated front panel to PCBWay for production. They gracefully continue to sponsor my activities, despite my screw-ups.😇

It will usually take about a week for the shipment to arrive.

I got the front panel, but made a mistake ordering the power supply board, so that will come in another week. See the dedicated Blog post for that part of the project here

In the meantime, I started working on the various BOM's, including an off-board one for the front panel parts. They, and all other information will be on my Github site that I will publish when I'm done. 

I have been using a lot of parts I already had, but needed to find parts that I could put on the BOM so others can order them. Here are some details for the off-board parts.

Output signal potmeter

One of the challenges was to find a potmeter for the output volume with a switch, that is activated at the end of the rotation. Most of the ones I found switch at the beginning, at 50 degrees according to the specifications.

I put one together with parts I had from a previous life, and that looks like this:


These potmeters come in separate segments you can take apart so you can create stereo versions, or use two different resistor values, and optionally also add a switch segment. I was able to turn the switch segment around to get the right action. To have the switching indent at the end of the range is more natural, because the switch fixes the generator output by a resistor divider just below the maximum output. This is also how the original SG505 has it. I put a potmeter in the BOM with a SPDT switch, but it will be activated in the beginning of the rotation. If you are able to find a potmeter with the switch activated at the end of the rotation, let me know in a PM so I can share it with others.

Mounting the main board

You can add all the components on the main board, but do not solder the 12V regulator in position yet. The height of the regulator to the board needs to be determined first. 

It's now time to mount the main potmeter and the reduction unit using metal brackets to fix the position of the axel in the middle of the hole of the front panel. Add a solder lug on the screw that fixes the reduction unit with the screw hole that has an exposed ring on the bottom of the PCB. The is the one closest to output on/off switch connector. Lightly tighten the screws and nuts and try the position of the whole contraption with the hole in the front panel. When you're happy, see if you can tighten the nuts while the PCB is still on position. If not, you need to carefully slide the PCB a few cm out of the enclosure slots such that you have access to the screws on the bottom. Fix everything and try it again.

When that is done, you should have the main board flush to the front panel, with the potmeter axel in the middle of the hole. 

To mount and fix the 12V regulator, we need to drill a 3.5mm hole in the side of the enclosure to give it a good heat sink. Position a sticker on the inside of the enclosure about in the position where the regulator will be. My hole was drilled in the middle of the third rib from the bottom. The hole should be drilled the middle of that cooling rib, because the head of the screw need to be in the center between the ribs. Position the main PCB in position, such that it will be flush with the front panel. Put the LM317 in position after you have clipped a few mm from the legs so they don't connect to the bottom. With the regulator inserted in the PCB, note the position of the hole and mark it on the sticker. Use a caliper to measure the distance from the front edge of the enclosure to where you marked the center of the hole of the LM317. Transfer that measurement to the outside and mark the position in the middle of the rib. Remove the main board and drill a 3.5mm hole in the enclosure. Grate the hole on the inside so there is no burr. Slide the main board in position again, and maneuver the hole of the LM317 to align with the hole in the enclosure. use a screw and nut to position the LM317 and solder one or all of the pins to the regulator when it is in the correct position. Remove the screw and carefully slide the main board out of the enclosure. You can now permanently solder all three pins to the main board. 

Important! When you will fully mount the regulator later, (not now) you have to use an isolation pad (mica or silicon) and a plastic isolation ring to make sure the metal pad of the LM317 is fully isolated from the enclosure, or you will have a dead short of the supply rails.

Fixing the OLED display to the front panel

Do not mount any of the other parts to the front panel yet. It allows you to handle it and the fragile display easier. 

I first used a black permanent marker to color the inside of the rectangle in the panel pitch black. Do that from the inside so you don't smear ink on the face side. 

Make sure you can power the display from the main board while positioning it so you can see where the text is, relative to the viewing area. It will be virtually impossible to position it correctly otherwise. If your main generator board is not inside the enclosure with the 12V regulator cooled by it, you have to use an external heat sink, because the regulator will get too hot otherwise.

Using glue

You can try to glue the OLED display in position to the new front panel. You need to add some glue (not instant glue) sparingly(!) so it does not flow into the visible area when you gently(!) press the two together. Add the glue on the front panel backside. Power the display so you can see what needs to be visible and position it horizontally, put it in position, and keep it there until the glue is dry enough.  I first tried that, but abandoned it.

What not to do

In my earlier glue attempt, I used a washing cloth clamp to secure the OLED display in position when letting the glue harden. We'll that seemed to have destroyed the display because it turned black. I first thought that the clamp must have pressed too hard and damaged the flexible cable connection between the glass and the PCB. I had no spares so needed to order a new display. 

Well, after the new display's arrived, none of them worked. Tongue in cheek and red faced I have to admit that it wasn't the display. While trouble shooting, I measured the SDA and CLK signals with my DSO and I measured 5V on the display PCB with my DMM, so I started on a rat race trying to find the issue. After a while searching, it turned out that the crimping of the GND wire on one side of the interconnect cable was bad and must have disconnected while I was clamping to let the glue dry. Although visually the crimping looked OK and I did not look further, but searched for other causes. Long story short, what I did wrong was that I connected the GND of my DMM to a GND pin on the main PCB, in effect bypassing the bad GND wire connection when measuring the 5V. I did the same with my DSO, but that still showed the presence of signals so I did not look further. I replaced the GND wire in the extension cable and did a better job crimping the connecter and all is well again.

In hindsight, it's probably safer to use some normal Scotch tape to keep the OLED display in position while the glue is drying. Or, don't use the glue method at all. 


Using Scotch tape

I ended up using Scotch tape to secure the display, I used electrical tape earlier but that's too flexible and the display sagged down a bit. 

In the picture below, I used another PCB on top of the front panel so I could position the OLED board better. In my case, the distance between the top of the OLED board and the top of the front panel was 20.78mm. You can easily check the horizontal adjustment that way by sliding the display horizontally into position. Because I used clamps to press the two boards together, I could rather easily adjust the vertical and horizontal position of the OLED display within the rectangle opening. To do that you have to power the OLED display from the main board so you can see where the text is.



After positioning the display with one piece of tape while positioning it, I used some more Scotch tape to finally secure it in position. Do not cover the onboard regulator with tape. I used a piece of double sided foam tape to bridge the distance to the front panel en the OLED display where the connector is. It should help with the stress put on the rather flimsy OLED board sandwich with the glass display when you plug the connector in.


It does not look very pretty, but does the job and is not permanent.


Assembling the front panel

Do not fasten the front panel to the enclosure just yet. First mount the switches with their cable harnesses already in place, with the solder ends shrink-wrapped for sturdiness. Ask me why. Mount the Vernier potmeter and the volume potmeter. Solder an about 8-10cm thick ground wire to the solder pad on the back of the front panel, with the wire going upwards. 

Mount the rotary switch into position with the connected wires on the top side, away from the main board.

Get the front panel roughly in position to the enclosure with the main board already in place. Solder the other side of the ground wire to a solder lug you should have installed on one of the mounting screws of the potmeter delay unit.  Take one of the screws that have a ground ring on the bottom so there is a solid ground connection. Check with an Ohm meter for only a few Ohms max. between the front panel exposed holes to one of the GND test pins on the main board and the outer ring of the BNC connector.

You can now connect the wire harnesses from the 0/-10dB switch to their locations. The wiggling room is very tight which is why it should be clear by now that you should not have fully mounted the front panel yet.  Then connect the output on/off switch connector. At this point, make sure the switch operation is correct, because you can still turn them 180 degrees to fix that. The other connections are not critical, so you can now mount the front panel into position with the two screws going into the bottom half of the enclosure.

You can now add the ring and nut for the BNC connector and tighten it lightly such that the main board is flush against the front panel. You should have tried this position already when you mounted the voltage regulator to the side of the enclosure such that you don't put too much force on the leads of the LM317. With the front panel mounted, you can now also mount the LM317 into position. Remember to not forget the isolation! Double check again that the metal tab is indeed isolated from the enclosure.

You can now connect all the other wire harness connectors and add the knobs into position.




Calibration procedure

Now it's time to add power and check all controls and that the switches are in the correct working position.

By now, you should have a sinewave output and the counter should show the frequency. If all the controls work correctly, it's time to let the unit warm-up for at least 15 minutes. After that, it's time to finely adjust the 44V main rail, while measuring the voltage on the main board using the +Vreg and -Vreg test points. Adjust the rail voltage with the trimmer on the main power supply board.

With that done, you can now verify the voltages of the +17V and -17V rails. They should be within 0.5V of each other and 17V +/- 100mV. If not, you can change the resistors that are setting the voltage for the TL431's. If you installed the optional trimmers, you can set both rails as close as you can to +/-17V and equal to each other.

To adjust the 2nd harmonic adjustment, you need to use an FFT to see the effect. With the unit now sufficiently warmed-up and the rails adjusted, you can trim the 2nd H trimmer for a minimum height or dB value. You probably have to use some averaging of the measurement to see it well.

Now we can calibrate the 0dB output level. Select the 0dB output level with the switch. Select the Cal position switch setting on the output potmeter. Connect the output of the generator through a 600 Ohm in-line terminator to a DMM in the AC mode. Select the 1KHz frequency on the generator, because the DMM will most likely be precise at this frequency. Adjust RV2, the 0dBm adj. trimmer for a reading of 0.77459Vrms or 0dB.

Verify that the -10dB output switch setting results in about 0.24494Vrms or -10dB. 

Change the output value potmeter out of the calibration setting, and verify that you can adjust the output from just over 1.0Vrms down to 300mVrms.

With a 1.000KHz frequency output in the X1K range, and the Freq Vernier in the middle, verify that the Freq Vernier setting has a range of at least +/- 10Hz from the set frequency or 20Hz in total.

Verify that switching to the X100 range shows a frequency of 100Hz +/- 5%. Switch to the X10 range and verify that the frequency is 10Hz +/- 5%. Switch to the X1K setting and verify that the frequency is 100KHz +/- 5%. If not in that range, you can change the value of C19 and C26, but make sure they are matched in value.


That concludes the calibration and verification of the unit.


Final steps

In the meantime, the new power supply boards arrived and I built one up. The details can be found here.

I now have a fully functioning setup and will show some more measurements soon.




Final results

After a complete calibration and verification, below is the final result. The cover is on, and there is no difference with the frequency counter on or off.


H2 is 0.000048%.
H3 is 0.00031%
H5 is 0.000025%
H6 is 0.000024%

Total THD is 0.00033%, THD+N is 0.0024%
No mains related hum.

I think this is not bad at all, and using my tools, it seems even better than the original.

It took a while, but in the end, I'm very happy with the result.

I added this project to the Shared Project on the PCBWay website so others can easily participate:
Shared Project DIY SG505
Shared Project DIY SG505 Power Supply

Because I think this is an interesting instrument to have on your bench, I also added it to the yearly PCBWay contest that will give it some more visibility.


Here is the setup on my instrument bench:


The top shelf has the actual instruments. From left to right: the DC Dynamic Load, the SG505, my frequency counter, and the GPSDO on top of the master clock, the rest is out of sight) BTW, these are all instruments that are listed on my Blog. Below that shelf is room for the supporting stuff, like the power supplies.


There is a Github project with all the information you need to build this instrument.


Friday, April 18, 2025

The SuperReg Power Supply

This will be a post to describe my efforts to more or less regurgitate and resurrect the Walt Jung/Jan Didden power supply design that gained a reputation as a SuperReg.

I wanted to use this supply for my SG505 project because it deserves and will hopefully get a very quiet and responsive power supply.



A lot has been written about this design over several decades, and many attempts have been made to improve on it, mostly for audio applications. The majority, at least the ones I found, were tailored to hi-end audio power amplifiers, with an obvious focus on supplying lots of power. I need less than 100mA for both rails, which is more in line with pre-amps, DAC's etc. For these type of applications the original design from Walt Jung is more than sufficient. It does not need a lot of special parts, and is deceivingly simple.

The secret to success is to stay close to the original design principles as much as possible, which is what I'm planning to do.

If you want to have some more background on the original Superreg design, the performance measurements and the evolution over time, here is a link with all the information that will keep you busy for a while. SuperRegs  Here is another link to the articles from Walt Jung: directory

I will follow the latest version (2.3) and try to replicated that. The information can be found in the above archive, but this is the document I'm using as the reference for my copy. Version2.3
Here is another refinement/update for the reference: article
If you're interested in buying the original PCB's, you can do that here.

And finally, there is a discussion at diyaudio.com that can be followed here.


Below is a picture of the V2.3 PCB that Jan Didden designed.


I'm going to use SMD components where possible, hopefully without messing-up, and create a version with +17V and -17V outputs and also add the +5V rail I need.

Here is the schematic design I came up with:



Even though I'm hesitant to deviate from the original, there are a few required differences with the original. 

First of all, I added the rectification and reservoir capacitors. This means that I only need to feed two AC transformer winding connections, and leave the transformer, on-off switch, and the EMI filters in another separate enclosure, away from the more sensitive parts.

Because I need to make some changes, I used 499R for R4 and 5K1 for R5 because I'm also not going to use the LM329. It's only available in TO92, and it's pretty expensive. The 4K99 value will cause a current in the Zener of about 2mA. According to the specifications, the device also works with 1mA. However, the recommended combined Zener current by Walt should be around 4mA, so the value for R5/R12 should be 2K7 which sets the current to 3.8mA. The schematic still has the 5K1 value though because I'm not sure yet that I need that much current.

The original information by Walt Jung in the first article about the Superreg also talks about the 499 Ohm for R4 as having the same value as the parallel value of R7 and R6, both 1K, (to better balance the load on the Opamp inputs). The value for the 4K99 most likely comes from a very early version of the supply, called the Sulzer regulator, shown in figure 7a and 7b, in Walt's first document. In that version they use 51K for R5 and R10 (now R12) in those schematics. The voltage setting resistors (R4, R3 and R9 and R8) were 3K16 each. In a newer version, Walt used lower values for these resistors to improve the regulator. My assumption is that he used a factor of 10 to lower the values, and he used wire-wound metal film THT resistors that were only available in the 4K99 value.  

Because I'm going to deviate from the LM329 by using the recommended combination by Walt of two Zener diodes in a back-to-back configuration to keep the noise and the tempco down. It's an old trick to use a normal diode in a back-to-back configuration with Zener, because the tempco's of both cancel each other out. On top of that, a 6V3 Zener is typically at the sweet spot of the tempco for Zener diodes.  I also need an output of +17V. So the voltage output divider values of R6 and R7 have to change. 

In one of the articles from 2/95, there is a table 1 on page 31 that shows different resistor values for different output voltages. There is a 16V and a 18V row, but not a 17V one. In all cases, R1 is 499 Ohm, just as I want to use. I wanted R7 and R14 to stay close to the 1K value to keep the Opamp balance almost the same with the 499R value of R4 and R11, so I selected a 820R value, which is just about in the middle for the recommended 16V (866R) and 18V (806R) outputs.
To get the +/-17V (+/-1%) output voltage with E24 values, I needed to use a trimming resistor, so R6a has a companion of R6b, the same as with R13a/b. 
The formula to calculate the resistor values is :  Vout = Vref x (1+ (R4/R3))

This means that we need a 1K25 value for R6 and R13 with the 6V9 reference (although that value needs to be confirmed), see actual measured values below.

The parallel combination of R6 and R7 with these values is 495 Ohm which dictates R4 to be 495 Ohm as well. Keeping the 499 Ohm value should be good enough initially, but can be changed later on.

The recommended Opamp is the AD825, Jan Didden mentioned that the NE5534 can be used, or even has to be used for higher supply output voltages anyway, and since I already use them in the SG505, I might as well use them here too. They are a lot less expensive at 1/10th the price of the AD825. You could swap them out if you want as long as you use an SOIC package. I also ordered two AD825's which I'm going to use first.

Most of the parts are SMD, with the exception of the larger capacity electrolytes, and the 10nF film capacitors for the rectifying bridges.

It seems that Walt very carefully selected the series transistors, the D44H11/D45H11 so I'm going to use them too. They are not expensive.
The bias transistors for the series transistors I'm using are the equivalent SMD versions of the BC546/556 TO-92 version.

Because the required output is +/-17V, I raised the voltage for the series Zener diodes (D2 and D7) to 7V5, to keep the Opamp output just about centered within the rail voltage, as is recommended. The Zener values are not overly critical, I just happen to have this value in stock.

Note that the recommended Panasonic HFQ series for the 120uF/35V electrolytes have been discontinued for a very long time, so I selected decent quality replacements.

I will need small heatsinks, so I will not put a footprint on the PCB, just use the U-shape parts that you can screw on the TO-220 package.

I've also added the +5V section, and tried to keep that out of the way of the other two supplies as much as possible. That's why I tap the AC inputs from both transformer windings, the keep them balanced and separate the two supplies at the AC level, and also create a "digital" GND for the Arduino Nano and the relays I will use with the next version of the generator.


The layout is now done, and the request for sponsoring from PCBway for the production and shipment has been done. They generously support my activities so I can spend the money on parts.



Don't worry about the apparently reversed picture of the terminal blocks, they will be installed correctly. (;-))

The parts and the PCB arrived and I quickly put together a working version, again using my new reflow hotplate.



When I first powered it up and checked the output rails, I was pleasantly surprised with a +/-18.9V output. This is without the trimmer resistors. 

However, when I tested the +5V supply I was greeted with a 0V output. Bummer! On careful inspection, I spotted my mistake. I was planning all along to tie all the common grounds to the GND pin of the output BNC. When I was testing the supply, the digital GND for the +5V was still floating and not connected to either common. Well that makes sense. However, when I thought about it some more, I realized that I did not need to connect the digital or DGND to the analog common GND's. I could keep the digital supply completely separate because it will only power the Arduino Nano with the OLED display, and the relays I'm planning to use for the range switching. I could keep all of that "out of the way" from the generator by creating a dedicated and separate DGND. That required a small modification of two diodes and two 10nF capacitors to tap the other two windings and create a negative return path.

While making the changes to the schematic, we now have a V1.1:



Note that the two Opamps are still shown as the NE5534, but I installed the AD825. (KiCad does not have a symbol for it so I'm leaving the NE5534 as a place holder)

The two optional diodes and two filter caps for the separate +5V supply DGND are added underneath the board.

First step now is to tune the voltage rails.
I first measured the Zener diode combination. The plus supply was 6V99 and the minus supply was 7V01. They are very close to each other. When I used a 6K2 trimming resistor for R6b1 and R13b1, the voltages after warming up are now +17V04 and -17V04. Excellent!

The parallel resistance of the 1K3 and the 6K2 are now 1K075, very close to the original 1K. 1K075 in parallel to 820R makes 466 Ohm, I could lower the 499 to 470 Ohm to better balance the Opamp inputs but I'm going to leave the 499 Ohm as is for the time being.

The downside of using hi-efficiency SMD LED's for the current source is that they are very, very bright. I think that I'm going to use a black pen to darken them a bit.


I used my thermal IR camera, and was surprised to see that the current source transistor (Q2) was getting a lot warmer than I anticipated. I am using the SMD version instead of the original TO-92, but even so. There is 1.97V across R1, so with 240 Ohm, that's 8mA of current. The earlier version (Fig 8a and 8b) used a 100 Ohm value that Jan Didden changed to a 249 value. I used a standard 240 Ohm value.



To the right is the positive supply with the (hot) 330 Ohm load, to the left is the negative supply with no load. The green LED's are also contributing to the hot spots on the display.

Even without a load, the voltage differential with an input voltage of 36V across the series transistor makes them warmer than I had anticipated. (you can easily see the difference between the left unloaded and right loaded versions)

With a 330 Ohm 1W resistor as a 50mA load, the series transistor gets a little warm but not overly so. Because the generator setup I have now will only need about half of that current, this will be OK. If not, I can use a larger heatsink.

Next step is to make an FFT of the outputs to see how quiet they hopefully are.


This is the positive supply, also with a 330 Ohm/50mA load. Can you believe that I checked and double checked my measurements? This is unbelievable, wow! There is no difference with a shorted input lead, so the supply does not add anything it seems.
With the 50mA load, the input to the regulator has a 1Vp-p mains ripple, that's completely gone, and no harmonics or noise. Too good to be true? 

I was planning to use a mains input filter, I'm reconsidering that for the moment. Even in my noisy environment, there is nothing to worry about.

Here is the negative supply:


Walt, I'm mightily impressed, hats off for your design.

I was already formulating plans to modify the +/-17V supplies to a shunt version that Walt published in a later document, to separate the raw DC side even more, but that is not needed in my case.

And now the final test, the generator with the new supply:


A very clean output with only a tiny bit of mains related harmonics on the left.
I do not really trust the measured and reported THD+N number of 0.0056%, but visually, it looks great with only a tiny third harmonic spike visible, and this is still without any shielding whatsoever.

This power supply is great and that part of my problem is solved!


The +5 Volt circuit

I'm going to hi-jack this SuperReg post by showing information about the +5V circuit I added. It has nothing to do with the SuperReg, but I'm adding that adventure here because I put it on the same PCB.

Here is the FFT from the loaded +5V supply with the positive and negative still loaded with the 50mA:


This is with a 51R resistor for 100mA load. The 50Hz mains harmonics comes through but is otherwise very clean as well. Even when I extend the measurement to 100KHz, there is an uptick in the noise floor after 30KHz, but no additional hash. 


But...
When I connect the Arduino counter circuit to the +5V supply, I get this...



My solution to create a 5V rail is causing an issue, and with it, the transformer gets very hot so something is very wrong with my design. The diodes must be shortening the two transformer windings or something like that.
The Arduino only draws 14mA, that's not the problem. I need to figure that out.

I now modified the 5V input by tapping only the transformer winding for the positive section, by using two diodes. Of course, the three power supplies still get GND connected on the generator PCB, because I need to tap the sinewave as an input to the counter. Now that I don't connect the two windings of the transformer, there is no current flowing between them anymore, and the transformer stays cool. That part of the problem is solved, but I'm not there yet.

Here is the new schematic V1.1a:




This is the still disappointing result:


A bit better, but no success whatsoever. There are two possible solutions I can think of. One is to galvanically separate the pick-up for the counter from the generator, by using a pretty fast opto-coupler. The other possible solution is to use a separate transformer for the 5V supply. That's the easiest solution to try.

Here I'm using a separate 12VDC Wallwart just to give it a quick shot. I also tried my Lab Supply with an 8VDC input, with the same results.


A lot better, but not good enough yet. It proves to me that I need to galvanically separate the output amplifier of the generator going to the Arduino counter.

Here is also evidence why I don't trust the THD+N results from the software. You can clearly see more harmonics, but with a better result than the earlier 0.0056% ???

I'm now using an H11L1M opto-isolator, that has an internal amplifier and Schmitt-trigger gate. In order to get enough signal drive for the transmitter, I had to bridge out the output capacitor that you can see in the amplifier circuit above. That works, so the counter is functioning again. However, there are still added harmonics. The solution I think is to use an additional output amplifier buffer, solely for the counter input. As long as it produces a logic level signal, the opto-coupler will be happy.

Here is the result with a hodge-podge of wires and an additional protoboard to test the opto-coupler:


Getting better, but I'm not happy yet. If it turns out that driving the transmitter is causing the added harmonics, I will need to reconsider if I want to continue with the counter. (PS this time the THD+N is more realistic I think. Go figure...)

As a next step, I created a simple sine wave to square wave amplifier and let that drive the opto-coupler to create more isolation with the generator. Now we're finally getting there:



Here is the amplifier section with the circuit to connect to the Arduino Nano:



I'm done with this post for now, and will continue with the SG505 post.

I have purchased another transformer for the SuperReg that I will try later on. It has a copper shield around the windings that can be connected to Earth GND for extra shielding:




Plan to update to a new version

I like this SuperReg very much but because I made a mess with the +5V supply I may create a new version 1.1 that removes that circuit and only has the positive and negative supplies on it. When I do, I will create the layout such that these two sections can be easily separated so you can use them individually, and use one extra side to create another supply. To apply the lessons learned, make it more universal and also support higher currents, I will allow space for larger electrolyte smoothing caps for the raw DC supply, create a bit of a PCB heat-sink for the current source, create room for larger heatsinks for the series transistors and provide a ground plane while keeping the "star" GND connections. Don't hold your breath though, I will wait with the redesign until I have a project that needs it.


I'm not using it for the SG505 project anymore

During the design process for the DIY SG505 rebuild, where the above supply was intended to be used, I decided that this supply was a little over-kill for that project so I decided to create a smaller and more dedicated shunt supply.
That process is explained in the DIY SG505 V2 and V3 Blog posts: