Who knows the XR2206 function generator? - Page 1
Forum section: electronics / projects

author: Jidis
author_rank: Regular Contributor
timestamp: June 20, 2015, 02:43:23 am
content: Yeah, I know it's obsolete old junk, but I'd like to see it "go".I was wondering if any of you guys who have dealt with it might spot anything obviously funky in this schematic before I go through too much headbanging or desoldering. I copied it from a design on the web, but I'm not sure if this schematic is exactly the same as whatever the kit had in it, or if there's any possible flaw. Only difference between mine and theirs is that I've got an NP box cap in that C8 220nF position.Doesn't seem to output anything but a nice 60Hz sine from the AC and doesn't respond to any switch/pot movements. All power and ground pins on the ICs are getting the correct levels and all cap polarity is correct.FWIW- I initially built a more barebones XR2206 circuit and was wondering what improvements this more elaborate version might provide, but that also allowed me to test the chip in a known good circuit, so I guess I can rule that out as a culprit.I'll poke at it some more tonight and post back if I can find anything.Much Thanks!PS- I'll stick the example schematic from their datasheet on here too if it helps any.

author: Deathwish
author_rank: Unknown
timestamp: June 20, 2015, 03:07:56 am
content: you say all the pins have the right voltage but I dont see any connection or reference to pin 4 VCC on ic1 in your circuit diag

author: Jidis
author_rank: Regular Contributor
timestamp: June 20, 2015, 03:59:40 am
content: Hi Deathwish,They've got the power pins and associated parts for everything but the opamp separated from the rest of the diagram. They're over on the right.-Thanks!

author: mij59
author_rank: Frequent Contributor
timestamp: June 20, 2015, 04:06:47 am
content: What kind of power supply are you using ?What is the voltage of pin 2 with respect to GND ?

author: Jidis
author_rank: Regular Contributor
timestamp: June 20, 2015, 05:08:10 am
content: Mij59,Right now, it's a DC wall wart. I think it outputs something like 17V at no load. Now that you mention it, I may try another one, but I figured I was OK on that, as the 7812 was outputting 11.77 or something and the 7805 is right around 5V. Neither of them seemed hot either.Are you talking about the XR2206's pin 2 (the main wave output)? I'll get it back up and check that.Thanks!

author: Jidis
author_rank: Regular Contributor
timestamp: June 20, 2015, 05:47:48 am
content: Mij59,I owe you one!Somehow the supply seems to have been it, despite what I thought were normal readings on the regulators. I switched to my bench supply and dropped it down to 15V and suddenly everything worked. Odd thing is, it looks like my regulator output levels are the same as they were before. By the way (with the working supply) from main ground to that 2nd pin of the 2206 is around 5VDC right now (seems to have changed since I've been playing with it). From the floating ground, it's about -0.5, but was a +0.3 at first.On a wonderful side note, it appears to *not* be plagued with the nasty spike that the basic circuit seems to have on the crest of all the sine waves. I pushed it up to the top (377kHz) at max amplitude and it never showed up. I've got a pair of resistors (200ohms total) on that distortion adjustment loop. I may fine tune that to see what it does too.Thanks again!

author: mij59
author_rank: Frequent Contributor
timestamp: June 20, 2015, 06:43:10 am
content: Nice find!The 60 Hz obviously the mains frequency, so check the wall wart.May be its just a transformer with a bridge rectifier.To check if the output of the voltage regulator is working properly use the ac voltage setting of your multi meter, reading should be (close to) zero.BTW, Scullcom has a nice video on the XR2206https://www.youtube.com/channel/UCDqryeq1kMDSEQwltWqASrA

author: Jidis
author_rank: Regular Contributor
timestamp: June 20, 2015, 05:12:16 pm
content: Much thanks for that link too mij59. Watching it now. Looks like an even more elaborate version of the one I just tried. Surprisingly new too (last month). I'll be waiting on the second half and may think about trying it.It's interesting to see the range of circuits that the 2206 and that Maxim chip show up in. The smaller one I tried was about 4 or 5 resistors and caps, withnoextra ICs, but I'm guessing those sorts may also have something to do with the horrible reputation those chips have these days.Take Care

author: nitro2k01
author_rank: Frequent Contributor
timestamp: June 20, 2015, 05:22:23 pm
content: I've built the following circuit, which is using the XR2206 as an audio oscillator, and I know this circuit works. You could compare your schematic to this one, or maybe even build this one without modification if it fits your needs.http://www.birthofasynth.com/Thomas_Henry/Pages/XR-VCO.html

author: Jidis
author_rank: Regular Contributor
timestamp: June 24, 2015, 04:36:57 am
content: If anybody knows enough about the how the distortion and symmetry controls are implemented-I was wondering if they're "set and forget" type of controls specific to each unit, or if there are different conditions where you need to re-tweak them. I went ahead and hung them off this one I built to see what they did, and was wondering if I could just replace them with equivalent fixed resistors once I find the values for minimum distortion. I didn't really design the enclosure to accommodate any extra pots.Thanks for the link too nitro2k01!

author: Alex Eisenhut
author_rank: Super Contributor
timestamp: June 24, 2015, 02:44:00 pm
content: Can't beat this IMO.https://archive.org/details/radio_electronics_1988-05The interface of that site is awful, but the content is there.

author: Jidis
author_rank: Regular Contributor
timestamp: June 24, 2015, 09:58:12 pm
content: Quote from: Alex Eisenhut on June 24, 2015, 02:44:00 pmThanks! I hadn't been there before. They've probably got a bunch of articles I'd like. That version of the generator makes me wish I could justify building one. I've even got a couple of those enclosures on hand, but when I started playing with these things, it was mainly just to get sines and squares. I'd be wasting much of the functionality.The reason I got into the distortion & symmetry tweaks was that my XR2206 circuit has some weird habit of turning its sines into some half wave thing where it lops off the negative side. It would usually happen when I'd connect it to my distortion meter, so I couldn't actuallyseewhy the distortion was so high. I'm going to try to figure out what it is when I get a chance.Speaking of undistorted sines though,this Twin-T thingsurprised the heck out of me. It shows as being all the way down in the hundredths of a percent, though it only outputs a single frequency. I think component tolerance may be critical though. The through hole version I built has much higher distortion than the SMD and doesn't use the exact specified values.Take Care

author: Deathwish
author_rank: Unknown
timestamp: June 25, 2015, 12:14:12 am
content: https://ia802704.us.archive.org/12/items/ExarFunctionGeneratorDataBook/ExarFunctionGeneratorDataBook.pdf

author: Jidis
author_rank: Regular Contributor
timestamp: August 19, 2017, 08:25:54 pm
content: Sorry to drag this ancient thread back up, but I had put that generator aside due to the wacky half sines I mentioned in post eleven and I have other stuff which serves the same purpose.I got curious about it the other day and breadboarded a clone to try to see what was causing it. Comparing differences in the schematic I used and Exar's datasheet, it seems to be in the parts tied to that amplitude pot on the 2206's pin3. Everyone other than that schematic I used seems to include that pair of 5.1k resistors between the pot and Vcc/ground. Adding them seems to straighten things up here, but I was wondering what the ideal way to implement that would be, considering mine is using this opamp based floating ground. Are the earthbound 5.1k resistor and the cap in the datasheet now taken to AGND? In the schematic I had, there is a 1uF cap in a similar location, but it's tied to the regular circuit ground. If they do float, are they, and the ground for the wave output jack the only things which should be using AGND?Thanks (in the picture, the faulty schematic is at the top, Datasheet version is bottom)

author: bd139
author_rank: Super Contributor
timestamp: August 19, 2017, 08:37:30 pm
content: Exar's datasheet is shit. I couldn't get the XR2206 to do it's thing with the two 5.1K's in place (I used two 10k in parallel). Seems to be a crap attempt at a virtual ground. Have a look at the Exar Applications Handbook here, particularly AN-14 though - this one works!:https://archive.org/details/Exar-ApplicationsDataBookOCRYou need two rails for this. The amplitude is actually ground referenced.Really though, if you're going to do this, use the XR2206 to generate the waveform (say 1v p-p each mode) and control the DC offset and amplitude after the generator with a summing op amp and pot. It doesn't like getting close to the rails and malfunctions heavily.

author: Lee Leduc
author_rank: Regular Contributor
timestamp: August 19, 2017, 08:48:00 pm
content: Exar TAN-005 application note for the XR2206.Also the instructions are available for the Jameco XR2206 kit athttps://www.jameco.com/Jameco/Products/ProdDS/20685KitInstructions.pdf

author: Jidis
author_rank: Regular Contributor
timestamp: August 19, 2017, 10:55:10 pm
content: Thanks for the replies! I wasn't aware Exar had a bunch of other books online. I'm going to look over that stuff when I get back and try to keep the breadboarded circuit together until I work something out.bd139- To be clear, the grounding scheme I used on that one I etched is the top one in the picture, which uses a 741 opamp, but obviously it didn't work as it was supposed to. If those two resistors are serving a similar purpose, maybe that's why they weren't in mine, but they seemed to be the one thing that cleaned up the wave.Lee- Looks like I had that 005 ap note in my folder already. I'm still not getting what they claim on distortion though. I bought two of the chips, and the other is on a simpler circuit with no add-ons, and I haven't seen either version get lower than 2.5% (assuming my meter is accurate). The more elaborate one has the two trim pots, and 2.5 seems to be what it getsaftertweaking. I may be expecting too much of this chip from the way some of you guys talk about it though. That supply issue bd139 mentions doesn't sound promising, and I'm also running eBay chips, so who knows if they're even up to spec.Thanks!

author: Jidis
author_rank: Regular Contributor
timestamp: August 21, 2017, 12:00:05 am
content: Am I doing something wrong with my test connections to this thing? The sine looks clean if I use the main circuit ground, but if I clip my scope probe's ground clip to the floating AGND (which is where the wave out is supposed to get ground), I get the attached picture. Same holds true if anything else gets grounded to AGND (other than the amplitude trimmer) or it somehow makes its way back to that main ground.AFAIK, the test gear, including the regulated supply that's feeding the XR2206, is all getting AC/Ground from the same strip. I thought the whole point of a floating ground was to avoid these sort of conflicts. Seems anything you use this output signal for is going to have some path back to it from its power source. I'm also figuring if it were some sort of ground loop issue, it would just be noisier or something and wouldn't instantly jump into this weird single pole shape. I'm feeding it a clean 12V, but it stays roughly the same shape at lower voltages. Am I missing something?Thanks Again!

author: MickM
author_rank: Regular Contributor
timestamp: August 21, 2017, 03:27:48 am
content: Hi;I watched this a couple of days ago:"Fixing the issues with the XR2206 Function-Generator from EBay ".

author: bd139
author_rank: Super Contributor
timestamp: August 21, 2017, 08:17:04 am
content: Quote from: Jidis on August 21, 2017, 12:00:05 amI haven't tried it with a floating ground. I used two rails.Check the voltage between your XR2206 floating ground and your scope's ground. If there are more than zero volts there then when you clip the ground probe of the scope to the output it is not going to work as it's shorting the bottom half of the supply out.You can AC couple the output however! Connect your scope ground to the real ground (not the virtual one) and stick a 10uF or so capacitor (negative side to the scope probe) between the probe and the XR2206. That will block the DC component. That should let you know if it's an issue with the virtual ground or the generator itself.

author: Jidis
author_rank: Regular Contributor
timestamp: August 21, 2017, 08:30:38 am
content: Thanks Mick, hadn't seen that yet. I guess on the bright side my chip doesn't go haywire on higher voltages like his does, so maybe that's a good sign as to its authenticity. It didn't start bouncing until up past 18V here, but that's on this messy breadboarded one. I'm going to finish that video tomorrow and try to see that other one he mentions as well, though these circuits seem to vary pretty widely, so I'm not sure how much will apply to this one.Still baffled as to how this floating ground is supposed to act if anybody has any ideas.Take Care

author: Jidis
author_rank: Regular Contributor
timestamp: August 21, 2017, 06:22:04 pm
content: bd139-There is indeed a significant difference between the two grounds (5.98V). Is there any solution to that, or something else to check? Using the real ground to test doesn't really tell me much in this case even with the probe filtered through that cap, as it doesn't malfunction until that floating ground is in use. It looks OK even without the cap.Do you see anything inherently wrong with the way they did that opamp ground section?FWIW- I double checked the bench supply and scope's power source. They're plugged right next to each other on the same power strip and the ground continuity measures fine between them.Thanks!

author: bd139
author_rank: Super Contributor
timestamp: August 21, 2017, 07:21:23 pm
content: I'm wondering if that's a dodgy XR2206. Where did you get it from?

author: Jidis
author_rank: Regular Contributor
timestamp: August 21, 2017, 08:22:48 pm
content: Quote from: bd139 on August 21, 2017, 07:21:23 pmeBay and probably China (...hangs head in shame)Like I say though, it doesn't screw up at higher voltages like some, but who knows if they all have the same stuff wrong with them. I can't remember if the auction listed it as authentic or not.Take Care<EDIT>- To add- I just attached one of the Twin-T sine wave oscillators to the same opamp ground circuit, and the wave from that stays clean using the floating ground or the regular one. The XR2206 does however have that additional pot using the floating ground though.

author: bd139
author_rank: Super Contributor
timestamp: August 21, 2017, 08:33:11 pm
content: Ahh that might be it. They are out of production now so it might be a hooky one.I found a source here:http://www.taydaelectronics.com/xr-2206-xr2206cp-xr2206-monolithic-function-generator-ic.htmlThey actually have mid 90s date codes on them which is a good sign and they work properly. I've had 3-4 of them from there.

author: Jidis
author_rank: Regular Contributor
timestamp: August 21, 2017, 10:01:51 pm
content: Thanks again bd139! Got one on the way from them to see what it does, along with a handful of other junk. Wasn't aware of that place. Looks like a good assortment of stuff they have, and I hate having to pay UPS shipping rates for two bucks worth of junk from Mouser.Looking at one of the chips here, mine has F0918 printed on it, so I guess that's a 2009, like one of the ones in the video Mick linked to. I didn't realize people kept making them that recently. For some reason I was thinking it was something that died way back before 2000.Take CarePS- I kick myself every time I see one of those 1054 scopes from that video. Missed that bus by about six months (1052E here).

author: bd139
author_rank: Super Contributor
timestamp: August 21, 2017, 11:59:30 pm
content: Yeah they're really good. Also they mark it up as $10 commercial samples always so you never get screwed for importI think Exar stopped selling them in about 2001.1054Z here as well bought about three weeks ago. Nice bit of kit. I'm sure something better will come out in a month and make me feel the same

author: rdl
author_rank: Super Contributor
timestamp: August 23, 2017, 06:13:32 am
content: I'm pretty sure the XR2206 was discontinued in 2011

author: bd139
author_rank: Super Contributor
timestamp: August 23, 2017, 10:42:01 am
content: I think that's when the last fab run stock ran out and they decided there wasn't enough cash to do another one so pulled it off the market. The genuine ones I've had were all latest 01 date code going as far back as 2009. It hasn't exactly had a good time with DDS ICs and microcontrollers with DSPs in them for less cost on the scene.

author: Conrad Hoffman
author_rank: Super Contributor
timestamp: August 23, 2017, 04:52:40 pm
content: The original Exar is a good part, but long gone. A few years ago I got some from Jameco that obviously weren't good copies of the original. They generally work OK, but won't meet the sweep specs for a real Exar part, and only come close for one specific supply voltage. I'd be wary of using them in any circuit where a wide range DC signal is used for frequency control.

author: Alex Eisenhut
author_rank: Super Contributor
timestamp: August 23, 2017, 05:08:35 pm
content: I was sure I had a NOS part in my bin to give away, turns out it's a 556! Who knew Exar made 556s?

author: rdl
author_rank: Super Contributor
timestamp: August 23, 2017, 05:54:49 pm
content: I remembered I bought two from Mouser around 2004 or 2005.I can only find one.Now I will probably waste the next hour or so looking for the other.Sigh.

author: Jidis
author_rank: Regular Contributor
timestamp: August 23, 2017, 06:54:21 pm
content: I wonder why mine have an "F" in front of the date code?Fake?

author: blackdog
author_rank: Frequent Contributor
timestamp: August 23, 2017, 07:17:56 pm
content: Hi Group,About four years ago i designed a XR2206 generator for a peace of measuring test set, bus its also usable stand alone.But first a picture of the schematic.It uses 3 frequency ranges, so designed that you can quickly sweep between 10HZ and 50KHz.The output impedance is a nice 50 Ohm (Do NOT load it with 50 OHM) it is a one site terminated setup.It hase a LOG range amplitude control potmeter and one switch so you wil have a 0.3mV to 3.4V RMS range.This design has olmost no overshoot on the top of the Sinus wave!The squarewave is nice without abberations and nog load dependendDo NOT change the way i designed the frequency control, you wil be sad afterwardsThere was a lot of design time in this relative "simpel" generator, but it gets everything out of de XR2206 and olso a stable output output impedance for Sinus and Square wave.On a Dutch forum i have a article about generator, have a look, also this desing is mentioned, you can always use Google translate...https://www.circuitsonline.net/forum/view/112672/1/0Kind regards,Blackdog

author: gtrc
author_rank: Newbie
timestamp: August 23, 2017, 09:39:45 pm
content: I found this old topic about the XR2206 function generator and wanted to share my experience on a project. I made a device that continuously recorded 'environmental data.' The XR2206 was the audio interface to a PC sound card demodulator. The system plotted a continuous time vs signal level graph. The computer produced and saved data for 30 minute recordings of information. Really cool system. Put a few hundred hours into the project, including the programming for the computer and the inst amplifier and conditioning circuit for the system. Long and the short of it was that after 6 weeks of continuous recording, in the middle of one 30 minute plot, the frequency produced by the XR2206 started increacing by itself. In increased about 20 hz in each half hour, or possibly more. This continued until the program could no longer plot any trace on the screen. I changed to another XR2206 and 6 weeks later the same failure occured. Bought more from a different supplier trying to get a different lot, and same thing happened again. Very disheartening to say the least. Called XR factory and they said they would look into it. Never heard anything back. My circuit was an exact duplicate of the datasheet. I went from being thrilled at having created a living thing, to complete desolation at having wasted so much time. And the chip was tunable to get very low harmonic distortion of the sine wave. I'm sure it was just a weak trace inside or some little part that slowly eroded away. Anyway, I would not recomend the chip for continuous duty. 6 weeks gives you a lot of hours of operating time, and maybe intermittent use preserves the chip. I think the chip should be redesigned to fix that problem. Then it would be a nice device for experimenters.

author: blackdog
author_rank: Frequent Contributor
timestamp: August 24, 2017, 07:57:49 am
content: Hi gtrc,On witch frequency was the XR2206 used?If it was 100Hz then 20Hz is a lot, if it was 20 Hz om 15KHz it is not zo much...Some tipsUse stable components!Do not load the XR2206Use a stable power supply.Short wiring, groundplane on the circuit boardsKind regardsBlackdog

author: Jidis
author_rank: Regular Contributor
timestamp: August 24, 2017, 06:59:47 pm
content: Blackdog,Wish I had looked into yours when I did the one here with the floating ground issue. It's already got an enclosure and panels, but I may still think about replacing it if it doesn't perform much better when my "hopefully authentic" chip shows up.If mine could do anything remotely close to that distortion spec you got, that would be well worth it. Out of curiosity, does it get much noisier down at 1kHz?Thanks!

author: blackdog
author_rank: Frequent Contributor
timestamp: August 24, 2017, 08:00:45 pm
content: Hi Jidis,The distortion spec is on most of the frequency range below 0.8% and you can tune the distortion in de audio range for a big part to about 0.5 a point 0.6%.Depending on de XR2206 you have at the moment.I cant remember reail noise issues and just measured one of the generators.It is not difficult to get the distortion below 0.6%, but if you make the sweep range to big say from 500Hz to 35Khz, you never get this low distortion figure over the whole range.Look @ the pictures below, the distortion was of no big inportance for the use of this generator (Build in a old Cico Pix firewall housing)How one of the generators is build.1KHZ distortion, its a little high but thats because i used a big range for this generator.Analyzing the 1KHZ distortion.10Khz, and now the distortion is better because we are in the middle of the frequency range.Analyzing the 10KHZ distortion, now we have a neat distortion figure for a XR2206Kind regards,Blackdog

author: Jidis
author_rank: Regular Contributor
timestamp: August 24, 2017, 08:50:59 pm
content: Thanks Blackdog!I think one of the replies I skimmed over at that circuitsonline thread gave me the impression that you were actually getting those <0.0x% figures from a 2206 circuit, though <1% would still be a heck of an improvement over what I was able to get on mine. I've still got those Twin-T things if the goal is to try to check something's distortion at 1k anyway.Take Care

author: Jidis
author_rank: Regular Contributor
timestamp: August 27, 2017, 03:07:03 am
content: bd139-Unfortunately, it's a no-go on that Exar chip from Tayda (got here today). I was sort of expecting it when I saw the same "F0918" code on theirs. It's weird that they're the exact same number, being as mine were bought on eBay over two years ago. If I had any sense I would have specified when I ordered that I was looking for something other than that (ideally older). They had a box on the order page for additional instructions.Either way, thanks again for the tip on them. Only four days to get it here in VA. It says it came from Colorado or something. Packaging is nice too with nice bold printed labels on all the bags. All my Mouser stuff used some sort of gag gift disappearing ink, so I've got drawers full of parts now with no labels.If you or anyone here ever gets a chance to check one of the older ones with that same opamp floating ground I used, I'd be very interested to know if there's something that works with it. The site that was on (Nuxie?) had premade boards and kits, which I doubt they'd do if nobody ever checked it. The floating ground part is pretty simple (opamp,3 resistors, and a cap or something). I guess it would do the same no matter what the rest of your XR2206 circuit looked like, but note they do have the amplitude pot using the opamp ground too.Take Care

author: coromonadalix
author_rank: Super Contributor
timestamp: August 27, 2017, 04:32:44 am
content: Bring back memories, i had an xr2206 kit, very well made, i'm trying to find the schematics ... had symetrical supply with push pull transistors for outputs, could go at 10v pk pk and drive 50 ohms loads, 1 v pk to pk at 1 mhz ...Changed to a max038 design, it was fun at the time ordering free samples from Maxim lolll

author: bd139
author_rank: Super Contributor
timestamp: August 27, 2017, 09:13:50 am
content: Quote from: Jidis on August 27, 2017, 03:07:03 amThat's a bit annoying. I will order one as well and rig up something and see where I get. Will post back in a few days.

author: Jidis
author_rank: Regular Contributor
timestamp: August 27, 2017, 09:00:36 pm
content: Quote from: bd139 on August 27, 2017, 09:13:50 amDon't go to any trouble on it. I was under the impression that you still had the old ones you got from them laying around somewhere. I'd imagine you'd get the same thing I got if you ordered one now.Thanks!

author: Jidis
author_rank: Regular Contributor
timestamp: August 31, 2017, 01:03:13 am
content: This is nerve racking. I got a reply from Tayda that they only import the 0918 ones because several times 0919's were rejected after failing tests there. Both of those seem to be all over eBay with 0918's probably being more common.What exactly is that number anyhow? I'm figuring the "09" would be year, but "18" obviously isn't month. I also saw ones on eBay with numbers (1435) which made no sense if it was discontinued in 2011. Speaking of which, optimistically assuming a bunch of them are legit, why is there this wholeslewof them with these same two numbers? Shouldn't the factory have been pumping them out all along until they stopped in '11, with numbers from just about every year prior, or areallthe ones we get now just high functioning fakes where the counterfeiters just didn't bother to print different numbers on them?Thanks!

author: JoeO
author_rank: Frequent Contributor
timestamp: August 31, 2017, 02:57:07 am
content: Quote from: Jidis on August 31, 2017, 01:03:13 amThe second number is the week. So 1435 is the 35th week of 2014.

author: Jidis
author_rank: Regular Contributor
timestamp: August 31, 2017, 03:34:51 am
content: Quote from: JoeO on August 31, 2017, 02:57:07 amThanks Joe! That makes sense, though it still doesn't explain how they were making them three years after Exar stopped on that particular one though.

author: bd139
author_rank: Super Contributor
timestamp: August 31, 2017, 02:03:07 pm
content: Quote from: Jidis on August 27, 2017, 09:00:36 pmI have a use case for one (FSK modulator) and a whole pile of stuff to order ($30 worth which is a lot of stuff for Tayda!) so no problems running a couple of tests first. It left Thailand on Tuesday so will see what happens when it arrives.

author: LukeW
author_rank: Frequent Contributor
timestamp: September 01, 2017, 11:55:43 am
content: They're fun, interesting chips from before the "do everything with microcontrollers" generation.It's a shame there's no reliable way to get them any more.

author: bd139
author_rank: Super Contributor
timestamp: September 01, 2017, 12:41:02 pm
content: You can make one pretty easily with discrete components to be honest. All you need is a current source, sink, high Z follower, window comparator and diode switch with a diode based shaper. I'll knock one up at some point. That's how all the commercial (Tektronix / HP etc) generators worked.