Skip to main content

Improving THD in an XR2206 Function Generator

Ever on the lookout for new test gear to add to my collection I stumbled across the XR2206-based function generator. These can be bought as a kit pretty cheaply from AliExpress or from eBay, they're easy to put together and use offering 1Hz - 1MHz of range through the use of some jumpers. It has two output terminals, one that gives a square wave and one that gives either a triangle or sine wave, depending on the position of a jumper. The heart of the device is an XR2206 which is an "obsolete" function generator chip with some pretty good specs and a low external parts count.

 

I bought one of these kits because my ultra low THD sine generator (a Wien Bridge oscillator with a bulb) is fixed at ~1kHz and being able to steep the frequency (and use other waveforms) is a huge help in analysing a circuit 

My Ultra Low THD Oscillator

After building the kit I fired up Arta to measure the THD, the results were... disappointing, 2.7% if you set the amplitude right but around 4-5% most of the time

The XR2206 Oscillator

If we take a look at the datasheet for the XR2206 and look at the test circuit though we'll see that ~0.5% THD should be achievable, and that there should be two trimmers which weren't included on the kit! The schematic for the kit is pretty much just this test circuit with the trimmers either removed in the case of the Symmetry Adjust or replaced with a fixed resistor in the case of the THD Adjust.

https://cdn.discordapp.com/attachments/841620004751540244/1010659884146098327/unknown.png Installing the THD Adjust Trimmer was easy, I just had to desolder the fixed 500R resistor and mount a trimmer in it's place. The Symmetry Adjust trimmer was a bit harder, the two pins of the XR2206 weren't connected to anything on the PCB so I used some thin 30AWG Kynar wire to connect the trimmer legs, I then soldered the wiper contact to the ground terminal of the power jack. Circuit modifications done it was on to testing and trimming. 

 

Trimmers Installed

To start trimming I set the function generator to around 1kHz and I set the amplitude to the half way position (more on this later), then I left Arta running with averaging off so that I could get a real-time THD readout.

I started with the THD Adjust trimmer making fine movements to get as close as I could to an optimal value, this already made a huge difference bringing the THD down to about 0.85%!

Next I moved onto the Symmetry Adjust, this was a lot more finicky with a very narrow optimal range, one wrong move and the THD skyrocketed! In the end this trimmer made almost no difference to the THD. In future I'll replace this with a multiturn pot to try and improve the overall result. 

And what was the final result you may ask? I eventually got it down to 0.7% THD at 1kHz and at mid amplitude. A pretty respectable figure for such a simple and cheap device. I've no doubt that with multiturn pots this can be improved further down to the 0.5% of the datasheet.


A much better result

And finally, the "dark side" of this function generator. The THD figure is amplitude dependent. The further from your trimmed amplitude you go the worse your THD gets. 

I chose to trim in the middle since this gives the best THD over the whole range but as you can see below at the maximum amplitude the THD gets pretty bad, although nowhere close to the untrimmed 5%. The minimum amplitude THD isn't quite this poor although it still rises in comparison to the centre amplitude

The highest THD figure post-trimming

 

Hopefully this post will help others wanting to get the best out of their cheap test gear. If/when I get around to installing a couple of multiturn pots I'll make a followup post showcasing the results

Comments

Popular posts from this blog

Astrosim Cabinet Simulator / Portable Headphone Amp

Here's a fun little project I finished this weekend. A two-in-one cabinet simulator and headphone amp from "Deadastronaut", you can see their information here . As the name implies this pedal simulates the effects of a guitar cabinet, providing the same EQ and sound, this avoids that unprocessed DI sound that you get when not using a microphone and amp.  This particular cabsim has another trick up it's sleeve, a headphone out, which makes it the perfect candidate for a portable headphone amp. Think the Vox Amplug but cooler. This is very useful for silent practice when I don't want to be using my 40W Fender amp.  I've created my own veroboard layout which is a cut back version of the layout created by dylan159. It excludes any XLR out and indeed the line out. It doesn't save a whole lot of space on the board but you do save an op amp and have the ability to fit it in a smaller box.  After I had built and verified the circuit it was time to box it u...

The White Russian - My DIY Big Muff Pi

Here's my take on the Big Muff Pi. I started with the "Green Russian" circuit and added some modifications that make it my most versatile dirt pedal. It runs the gamut from clean boost to full on fuzz. I used the Tagboard Effects layout as a base. I'll start with the modification that's not obvious from looking at it which is the tone stack, I modified the values to more closely match the original circuit and provide what I thought was a better response.  As for the extra knobs and switches I'll run through them in order.    Bias Knob This 100k pot replaces the 100k bias resistor on the 4th stage transistor, turning this to the right brings the value down and further mis-biases the circuit. This lets you get some interesting effects even if it's not the most useful.  The further right the quieter your sound and the more gated it becomes, at the extreme settings you can get some truly weird noises where only your transients get through.  Tone Wicker  This ...

My Audio Probe

This is just a short post to explain the concept of an audio probe and the design I went with for mine An audio probe is a common device in audio electronics which allows you to poke at a circuit and listen to the signal at that point, this lets you work through the signal path and pinpoint any faults  While you could just connect a lead to an amplifier and poke the signal you risk damage to the amp with any DC that might be present at that point. While a lot of amps have an input cap which will block the DC it shouldn't be relied upon, for this reason we need to add our own cap As you can see from the picture below the construction of an audio probe is pretty simple, I have a standard audio jack with a ground clamp which stays connected to the ground of the signal, I then have a 100nF capacitor going to a banana jack that lets me connect a regular multimeter probe.  Some people take apart a lead or use the leg of the capacitor itself for probing but I've found that cumbersome...