simple analog function generator design - Page 1
Forum section: electronics / beginners

author: buck converter
author_rank: Regular Contributor
timestamp: March 30, 2017, 10:04:50 pm
content: This is my very first post!I am Teen hobbyist and can't justify buy signal generator, so thought i could learn something by building one (crappy Chinese kit does do not count). I want it to be analog. I was thinking of something like this, But want to add adjustable amplitude and offset.How much bandwidth can I expect from this if I use a good enough op amp.For amplitude adjustment, can use a classic inverting amplifier? Or is there any reason it should be non-inverting?for the offset adjustment, Which op amp has necessary bandwidth and a null adjustment?

author: TimFox
author_rank: Super Contributor
timestamp: March 30, 2017, 10:10:22 pm
content: In your circuit, the square wave will have a constant amplitude with frequency, but the triangle wave amplitude will fall off as 1/(freq) and the filtered triangle wave will not look very sinusoidal at low frequencies.A normal function generator starts off with an integrator for the triangle generator, with the current into the integrator reversing when the triangle reaches positive and negative thresholds for a Schmitt-trigger comparator, which also gives the square wave. The sine-wave output requires a non-linear circuit (resistors, diodes, etc.) after the triangle wave that does not vary with frequency.

author: Zero999
author_rank: Super Contributor
timestamp: March 30, 2017, 10:15:18 pm
content: The problem with that circuit is the frequency cannot be adjusted, without also altering the amplitude of the signal. Increasing the frequency will also reduce the amplitude. A triangle wave oscillator and waveshaping circuit can be used to provide adjustable frequency with very little change in amplitude.Another op-amp based amplifier can be used to alter the amplitude and offset.

author: buck converter
author_rank: Regular Contributor
timestamp: March 30, 2017, 10:20:48 pm
content: How much bandwidth can I expect from this circuit if i used a faster op amp and another to amplify the output ?Quote from: Hero999 on March 30, 2017, 10:15:18 pmWhich op amp has a null pin and can handle the bandwidth?

author: Audioguru
author_rank: Super Contributor
timestamp: March 31, 2017, 12:07:00 am
content: A lousy old LM324 was the first quad opamp designed to use low supply current. Therefore it has crossover distortion, hiss and a problem at high levels with frequencies above only 2kHz as shown in its datasheet.Every single opamp has offset null pins. Every audio opamp has low distortion, low hiss and good response to at least 100kHz. Look at the OPA134 single, OPA2134 dual and OPA4134 quad audio opamps.

author: MrAl
author_rank: Super Contributor
timestamp: March 31, 2017, 01:17:28 am
content: Hello,First, there is a circuit on the web that does the square and triangle and doesnt need amplitude adjustment.Second, the output is not a sine wave. It is close but it is more like an x^2 wave over the short period. Also, the output of that second integrator will always need adjustment as the frequency is adjusted.So it will work as is but needs three different adjustments. With the circuit on the web you need two adjustments.

author: cncjerry
author_rank: Unknown
timestamp: March 31, 2017, 03:06:28 am
content: At one time there was an analog generator on a chip, it was made by XR, like an XR2210?? and didn't cost much at all. I used to have one and if I can find it, it would be yours and I'll even cover the postage. I think you just needed a couple of switches, pots and extraneous parts for a decent little generator to maybe 100K.The other way to make one is to use a switched capacitor LP filter that runs right at the frequency of the incoming square wave. You don't get a triangle wave but square and sine. The switched cap filter takes the harmonics out of the square wave to make the sine. You would use a PLL chip to do fractional N divide of the clock. I built one with all discrete components years ago and thought it was pretty interesting design because the amplitude was pretty constant and clean. Not my design, one of the engineers at IBM designed it. I can't remember how the filter worked but it was easy to interface.If you look up the schematics for the FG modules that go into the TM500 frames you can see how they did the sine, triangle and square, but not in that order.These days on eBay you can pickup a signal generator for the cost of a slice of pizza. I'll look for that XR chip and let you know if I find it.Years ago I spent a lot of time on these circuits and I can't remember why. It might have been before PCs had sound cards

author: Zero999
author_rank: Super Contributor
timestamp: March 31, 2017, 08:12:29 am
content: Quote from: buck converter on March 30, 2017, 10:20:48 pmYou haven't even stated your requirements yet, so it's a bit premature to look at different op-amps.The first thing you'll notice bandwidth wise, with that circuit, is the slew rate limitation of the op-amp, which is around 0.5V/µs or 2µs/V, so if your square wave has an amplitude of 20V peak-to-peak, then the rise and fall times will be 40µs. As the frequency is increased, the square wave will start to look more like a triangle wave and when the period becomes 80µs or less (a frequency of >12.5kHz) it will be a triangle wave. Of course, the maximum usable frequency will be much less than 12.5kHz, as by then it's no longer a square wave.http://www.ti.com/product/LM324A faster op-amp will give much faster rise and fall times. For example the TL072 has a slew rate of 13V/µs or 77ns/V. With a 20Vp-p square wave the rise and fall times will be 1.54µs.http://www.ti.com/product/TL072?keyMatch=TL072&tisearch=Search-EN-EverythingIdeally the squarewave section should use a comparator IC, such as the LM393 or LM311, which is designed for this, so the squarewave section will no longer be the limiting factor. The op-amp's slew rate will then limit the maximum slope of the triangle wave and thus the frequency, as calculated above.QuoteThere is no need for a null pin. An inverting amplifier with the non-inverting pin connected to the offset voltage will introduce the offset you require.

author: Kleinstein
author_rank: Super Contributor
timestamp: March 31, 2017, 09:34:01 am
content: Like already written: It is much better to start with a combined triangle / square oscillator with just one frequency setting capacitor, and nonlinear sine shaping.With a suitable choice of OPs / comparator a upper frequency in the 1 MHz range is reasonable. HP got it considerably faster ( >20 MHz) this way, this usually included special chips for the sine shaping. For a beginner I would stick to about 100 kHz, maybe 1 MHz with less perfect waveform.The offset adjustment pins at OPs are there to compensate the OPs internal offset, thus maybe +-10 mV. If used for more or other offsets the drift performance of the OP can deteriorate - so it is generally not a good idea to use it for another purpose.

author: SingedFingers
author_rank: Frequent Contributor
timestamp: March 31, 2017, 10:04:04 am
content: Cheapest decent solution:1. Buy one of thesehttp://www.taydaelectronics.com/xr-2206-xr2206cp-xr2206-monolithic-function-generator-ic.html2. Download this:https://archive.org/download/ExarFunctionGeneratorDataBook/ExarFunctionGeneratorDataBook.pdf3. Refer to page 42.Building a usable function generator from opamps needs:1. One current source and sink, driven via a control circuit to ensure linearity.2. Diode switch3. Switchable bank of capacitors4. Two comparators and a bistable.5. Various offset and amplitude controls and opamps.6. Sine shaper7. Various switching for the above signals.8. power amplifier.It all starts with a couple of ramp generators. One that fills up a capacitor and one that drains it and the comparators switch between charge/drain. This gives constant amplitude and frequency dependent on the charge current and you just use a few stacked diode limiters to approximate a sine wave.XR2206 has a big chunk of that in one IC. You can add a potentiometer on the output to control level, then a summing amplifier for offset, then a pair of driving transistors (bd139/140 or 2n2219/2n2905 are a good bet) as a power amplifier with a couple of 50R resistors in parallel to give a reasonable approximation of 50 ohms.If you want an audio generator any old opamp with a 28v bulb in the feedback loop makes a pretty good low distortion sine oscillator.

author: Zero999
author_rank: Super Contributor
timestamp: March 31, 2017, 10:39:43 am
content: There are plenty of triangle wave generator circuits on the Internet. The trouble is, many of them aren't very good. They normally use an op-amp as a comparator (like the circuit posted by the OP here) or a comparator IC with a pull-up resistor which results in an asymmetrical waveform.Attached is a circuit for a triangle wave generator, which gives a fairly symmetrical wave shape (providing the power supply rails are balanced) and should work up to around 100kHz. Higher frequencies will require a faster comparator and op-amp.U1b forms a Schmitt trigger with the upper and lower thresholds equal to2/3of the power supply rails = 10V. U1a has its inputs connected to the opposing inputs of U1b and drives Q1 which pulls the output of U1b very close to +V when U1b is high. The result is a Schmitt trigger circuit with a near rail-to-rail output.U2a is an integrator with a time constant determined by C1 and R1.Changing the values of C1 & R1 alter the frequency but the amplitude remains a constant +/-10V.The operation of the circuit is described in the site linked below:http://www.falstad.com/circuit/e-triangle.htmlAs far as the sine wave is concerned, you need a wave shaping circuit for that. I found this circuit on the Internet awhile ago but can't remember the source.It's designed for a +/-4V signal source but will work with my circuit if R1 is increased to 2k5. In fact, I'd make R1 a 2k2 resistor and a 500R trimmer, as it will probably need some adjustment to get a clean sine wave.https://www.eevblog.com/forum/projects/function-generator-ics/msg66399/#msg66399There are other ways to do this. See the following links:http://www.kelm.ftn.uns.ac.rs/literatura/mi/pdf/Wave-Shaping.pdfhttp://www.intersil.com/content/dam/Intersil/documents/ca31/ca3140-a.pdfhttp://www-personal.engin.umd.umich.edu/~fmeral/ELECTRONICS%20II/03%25c3-Diodes/02a-Diode%20Waveshape%20Illus.pdf

author: SingedFingers
author_rank: Frequent Contributor
timestamp: March 31, 2017, 11:20:21 am
content: Another shaper, from "Art of Electronic Student Manual" pp 203. Built one of these back in the day and it worked pretty well:Basically symmetric diode clamps. Each pair clamps at a portion of the wave. Think the above was adapted from a Krohn Hite function generator schematic. Needs a very low impedance drive that can sink and source well (pair BJTs/opamp) and a high impedance on the next stage (JFET follower/opamp)Some of the cheaper Tek function generators use a similar arrangement albeit slightly obfuscated.However all of these look like shit if you stick them through a relatively ideal differentiator though. If you need a pure sine, then a wein oscillator is the way to go.

author: danadak
author_rank: Super Contributor
timestamp: March 31, 2017, 11:45:21 am
content: Some really low cost function generators -http://www.banggood.com/DIY-ICL8038-Function-Signal-Generator-Module-Sine-Square-Triangle-Wave-Output-KIT-p-1028924.htmlhttp://www.ebay.com/itm/DIY-Function-Signal-Generator-Kit-Sine-Triangle-Square-Output-1HZ-1MHZ-US-N9Q2-/252532057250?hash=item3acc1564a2:g:82oAAOSwGtRXz7Szhttp://www.ebay.com/itm/XR2206-Function-Signal-Generator-DIY-Kit-Sine-Triangle-Square-Output-1HZ-1MHZ-/131932524140?hash=item1eb7ca8e6c:g:q94AAOSwknJX0VLLhttp://www.ebay.com/itm/DDS-Function-Signal-Generator-Module-DIY-Kit-Frequency-Range-1-10000MHz-P3V3-/361938468867?hash=item544536c003:g:FwIAAOSw6EhUN7m-Regards, Dana.

author: Zero999
author_rank: Super Contributor
timestamp: March 31, 2017, 12:11:24 pm
content: I've simulated the sine wave shaper in my previous post and it works quite well. I didn't bother connecting it to the triangle wave generator circuit because it would have taken ages to simulate. I used a +/-10V triangle wave voltage source to simulate it.I used a sinewave voltage source for comparison and it's quite good. It might not work as well in real life with the not so perfect triangle wave, slight differences in +/-V and mismatches in D1 to D6.

author: james_s
author_rank: Super Contributor
timestamp: March 31, 2017, 08:29:20 pm
content: Those XR2206 ICs work pretty well, they do pretty much exactly what you're trying to do, and do it better and at a lower cost.If you really want to build something with op-amps, I've always been fond of the classic HP-invented incandescent lamp stabilized audio oscillator. It only makes a sine wave but it does it really well.From that you could derive a square wave if you wanted, using a 74ALC14 will give you very fast rise and fall times although the output will be TTL levels rather than a full range.

author: buck converter
author_rank: Regular Contributor
timestamp: March 31, 2017, 09:57:03 pm
content: Thank you Hero999 for your schematics and simulations. I will your design when the parts come. For a split power supply, would this work?http://www.ebay.com/itm/3W-DC-DC-Boost-Converter-3-3V-12V-to-15V-Output-Step-up-Power-Supply-Module-/141755085768?hash=item210142f3c8:g:kb4AAOSwgQ9V2bvM

author: MrAl
author_rank: Super Contributor
timestamp: March 31, 2017, 10:34:17 pm
content: Hi,Funny story...I clicked on this thread to read what replies might have come in and i saw the name "buck converter" and so for a second or two i thought i clicked on the wrong thread :-)Just a note, but if you wanted to you could simulate all of the circuits shown in this thread so far using LT's simulator and look at the Fourier components. That would tell you the distortion present in the pseudo sine. You could then play around with the resistor values to see if you could improve it. I have a feeling they may be optimized already, but you never know. If you cant get it better then the circuit is probably optimized already for the resistor values and any other parameters.There's also a wave shaper circuit that uses transistors instead of diodes. That is used in at least one of the BK function generators i know of. I believe that is what is used in the 8038 chips as well as the XR chips for shaping. They may have chosen transistors over diodes because of the impedance benefits.There was also a chip that went up to 20MHz that used shaping (the others usually only go up to 1MHz). That chip was discontinued though and if you find one today i think it is quite expensive.The DSP chips and modules are pretty cheap so you can generate sines, and they go from something like 0.01Hz to 40MHz under 32 bit word control of the frequency.My experience with the wave shaper circuits is that they usually have a somewhat pointed top but it's not really really bad. It would be unsuitable for some tests and suitable for other less demanding tests. For example if you wanted to use it to stimulate an audio amplifier and then check the THD out of the output, it would be quite unsuitable, but if you just want to test some inductors or capacitors with a sine wave input it should work good enough. I used one years and years ago (8038 chip) for just general amplitude gain testing, but never for THD analysis.

author: rstofer
author_rank: Super Contributor
timestamp: March 31, 2017, 11:12:13 pm
content: Quote from: buck converter on March 31, 2017, 09:57:03 pmCharacterized as 120 mV of ripple - that's kind of noisy. Maybe a couple of 100 ufd electrolytic capacitors will help. Plus the usual 0.1 ufd ceramic capacitors, of course.Switching regulators are always more noisy than linear regulators but they are often cheaper to build. Look around and see if you can find a dual (or triple) output supply with far less than 100 mV of noise.Sometimes those links with 'hash=...' are problematic.http://www.ebay.com/itm/3W-DC-DC-Boost-Converter-3-3V-12V-to-15V-Output-Step-up-Power-Supply-Module-/141755085768

author: james_s
author_rank: Super Contributor
timestamp: March 31, 2017, 11:41:40 pm
content: Are we talking a power supply for the function generator, or a bench power supply? If the former then building one out of a 78xx and 79xx linear regulator is likely a better choice as it will be much cleaner without much effort.

author: Zero999
author_rank: Super Contributor
timestamp: March 31, 2017, 11:43:33 pm
content: I've just simulated the triangle wave generator at a higher frequency, by changing R1 and C1 to 10k and 330pF respectively. The amplitude increases and the bottom of the waveform becomes distorted.It seems to be a problem with Q1 not switching fast enough and the increased amplitude due to the LM393's propagation delay. Adding an extra pull-up resistor and speed-up capacitor has helped to speed up the switching of Q1 and reduce the distortion (I was able to increase the frequency further) but the increase in amplitude is still there and can probably only be avoided by using a faster comparator.

author: danadak
author_rank: Super Contributor
timestamp: April 01, 2017, 12:36:49 am
content: Several approaches tri to sine conversion, like usingJFET square law behavior -http://www.timstinchcombe.co.uk/index.php?pge=trisinIn your original post if you replace integrator input R's with R2R DAC laddersyou can control frequency digitally.https://www.ksp-electronics.com/product_files/859555c74e9afd45ab771c615c1e49a6Regards, Dana.

author: MrAl
author_rank: Super Contributor
timestamp: April 01, 2017, 06:29:11 am
content: Hi,Yes and the integration of a triangle also results in a square law, but it depends on time so it has to be adjusted with a change in operating frequency.

author: Neganur
author_rank: Unknown
timestamp: April 01, 2017, 10:01:38 am
content: how about the old Intersil/Maxim 8038, less than 7 USD incl pcb:http://www.ebay.com/itm/DC-12V-ICL8038-Function-Signal-Generator-Module-Square-Triangle-Sine-Wave-Output-/181877555017Actually what the hell, 2.42 USD incl. shippingeBay auction: #191904291275

author: fcb
author_rank: Super Contributor
timestamp: April 01, 2017, 10:19:21 am
content: I'd definitely start by building a triangle generator, square/PWM/sine can be easily created from a good triangle core.If you don't want to start from first principles then use an LM13700 (http://www.ti.com/lit/ds/symlink/lm13700.pdf) - there's many tonnes of data of VCO's built from these. Some have quite a frequency span too.As others have said the 8038 is a no-brainer if you want to be up & running quickly - but you won't learn as much.

author: danadak
author_rank: Super Contributor
timestamp: April 01, 2017, 10:54:57 am
content: Integration of sine does produce square law, and issue here (apartfrom level of distortion) is amplitude change with freq. I used adifferentiator to create effectively an AGC loop so I could sweepthe design with DACs and yield constant amplitude.Regards, Dana.

author: Zero999
author_rank: Super Contributor
timestamp: April 02, 2017, 12:01:10 am
content: The ICL3038 is no longer made. I wonder if they're all old stock or perhaps they're clones?I've done a simulation using the LM311 and it can produce higher frequencies than with the LM393. It's a bit more of a pain to get a push-pull output though.

author: MrAl
author_rank: Super Contributor
timestamp: April 02, 2017, 12:07:29 am
content: Quote from: danadak on April 01, 2017, 10:54:57 amHi there,Yes AGC sounds like a good idea. There should be many ways to implement that too including purely analog methods.

author: MrAl
author_rank: Super Contributor
timestamp: April 02, 2017, 12:13:41 am
content: Hi,The 8038 chip or the XR chip isnt too bad if you only want to go up to 1MHz, but i was never really happen with the waveshape out of these chips as they get more pointed at the top as the frequency goes up. !MHz isnt that great either today. These are some of the reasons i went to the DSP chips that are made just to generate sines. So much better and much higher in range than anything else i know of that is of comparable cost (less than 20 dollars USD).That said, it's still interesting to look at other ideas. I was able to simulate the 12 diode wave shaper circuit and found it to be very reasonable. I was able to get up to 5MHz before the wave shape started to lean to one side too much for my liking (without any other mods). That's with an ideal triangle stimulation though. In real life we'd have to use a high speed op amp to generate the triangle not one of the general purpose types.

author: buck converter
author_rank: Regular Contributor
timestamp: April 02, 2017, 02:10:19 am
content: Thank you for all of the feedback and schematics! I will post pictures from my scope when I build it. It will be while because I don't have the parts now. I will go with analog designs posted by Hero999. Thanks

author: Kleinstein
author_rank: Super Contributor
timestamp: April 02, 2017, 09:02:36 am
content: The ICL8038, like the faster max038 are obsolete and essentially not available any more. The XR2209 is also obsolete, but one can still get some - though it is not sure they are original or a Chinese copy (with some problems).One might want to have a look atLTNS/Tiapplication note 263. There Firgure 11 is a reasonable simple generator. I don't think the rather complex driver for the square signal that hero999 planed is needed. My choice would be more like a logic gate (e.g. 74HC14).For a high speed integrator it might be better to use a capacitor to GND and than use individual positive and negative current sources. This also makes capacitor switching easier. The old HP3311A (manual with schematics) can be found in the web) circuit might be interesting: not that complicated and no really essential special parts. Modern OPs could make the circuit even easier.

author: Zero999
author_rank: Super Contributor
timestamp: April 02, 2017, 10:09:16 am
content: Quote from: Kleinstein on April 02, 2017, 09:02:36 amhttps://www.google.co.uk/search?q=linear+technology+application+note+263&ie=utf-8&oe=utf-8&client=firefox-b&gfe_rd=cr&ei=dMzgWJzrNIuGtgfK-YTgBQI can't find that one. Can you please post a link.QuoteThat won't work off +/-15V though and the upper and lower thresholds are neither stable nor predictable, which would change both the frequency and amplitude of the triangle wave. To avoid distortion, in the wave shaper circuit, it's very important that the amplitude of the triangle is stable.QuoteBut then how do you ensure the positive and negative current sources are well matched?

author: Vtile
author_rank: Super Contributor
timestamp: April 02, 2017, 11:18:05 am
content: Also Textronic CFG260 analog function generator (while not particularly simple 0..11MHz and LED counter 0-100MHz) is mainly build around a handfull of UA741 and discrete BJT transistors. The schematics can be found by googling "CFG280_Schematic.pdf".

author: Kleinstein
author_rank: Super Contributor
timestamp: April 02, 2017, 11:20:17 am
content: Sorry for confusing with the application note: it is AN263 from National (now Ti):http://www.ti.com/lit/an/snoa665c/snoa665c.pdfThe 74HC14 output level is very well defined, though limited to about 0/5 V. It is so well defined that HP uses it in the 3458 to define the fine down-integrate steps. The transistor circuit shown is more of a problem in this respect. The lower output level can be a limitation.In the sine shaper the amplitude range is usually relative to the diodes voltage drop (or sometimes KT/e and thus proportional to temperature), so the amplitude should ideally scale the same way. So unless one uses extra regulation the sine shaper will show some drift anyway.The HP3311A uses current sources a little like a current mirror, one corrected with an OP (to make is a linear VCO). For getting the same current size, there is an adjustment pot. Other circuits might need adjustment too, maybe at the integrator offset or the level of the square wave.Attached is a schematics from the HP3311A. Note that Q5, the transistor for a negative current source, is actually an NPN transistor and not PNP like shown in this picture.

author: Zero999
author_rank: Super Contributor
timestamp: April 02, 2017, 06:35:55 pm
content: Quote from: Kleinstein on April 02, 2017, 11:20:17 amBut the datasheet says the hysteresis voltage can vary from 0.6V to 1.6V and there's no guarantee it's centred perfectly around1/2VCC. There will need to be a few trim pots to adjust for this.http://assets.nexperia.com/documents/data-sheet/74HC_HCT14.pdfI would have thought it would be better to use a couple of 74HC04 sections in series (non-inverting buffer) and positive feedback resistors to make the hysteresis more predictable.QuoteThat's true but powering the shaper from a fairly high voltage helps to mitigate that to some extent. Using Schottky diodes may also help.QuoteThanks for posting that. It's an interesting schematic.

author: Kalvin
author_rank: Super Contributor
timestamp: April 02, 2017, 07:01:33 pm
content: Here's an interesting web page on generating sine waves "Triangle wave to sine wave conversion":http://www.timstinchcombe.co.uk/index.php?pge=trisin

author: oldway
author_rank: Super Contributor
timestamp: April 03, 2017, 08:14:03 am
content: A very simple square wave oscillator can be realized with a 555 version Cmos (lmc555 for example) ... It works well up to 200Kh and even 400Khz ...The square voltage is symmetrical with respect to the common. (+ And -5V)We also have a triangular wave in high impedance.Even if it is not perfect, it is sufficient in the majority of the cases.Simply add an operational amplifier to lower the output impedance.There are several schemes in this topic to generate a sine wave from the triangular wave.The harmonic distortion is of the order of 3 to 4%

author: Zero999
author_rank: Super Contributor
timestamp: April 03, 2017, 08:59:48 am
content: Quote from: oldway on April 03, 2017, 08:14:03 amOn the right track but the triangle wave isn't very good. Because it's being charged/discharged by a resistor, rather than a constant current source, it will have an exponential, rather than linear shape.The RC circuit could be replaced with an integrator. The op-amp integrator is inverting, so you'd need an inverting stage before that.The VCO shown below does a similar thing. The 555 Schmitt trigger controls a MOSFET, so the uneven saturation of the 555's output stage is not a problem.https://www.eevblog.com/forum/beginners/spikes-on-triangle-wave-in-vco/msg825224/#msg825224

author: oldway
author_rank: Super Contributor
timestamp: April 03, 2017, 10:09:38 am
content: This circuit is intentionally made as simple as possible ...Why do you want to complicate this?QuoteWho cares?As I said, the non-linear triangular wave is not perfect, but it gives a relatively good sine wave (3 or 4% distortion) after shapingAs written, you MUST use a Cmos version of 555 in my schematic ... There is no saturation problem with the Cmos version of 555 and the duty cycle is very close of 50% ... This is a good square wave.For me, a schematic with fets, it is no longer a simple circuit for beginners because of the ESD problems.

author: Zero999
author_rank: Super Contributor
timestamp: April 03, 2017, 10:41:43 am
content: Quote from: oldway on April 03, 2017, 10:09:38 am3% to 4% distortion is pretty poor. . .One extra MOSFET is hardly complex and regarding your ESD concerns with using MOSFETs: what do you think is inside the CMOS 555? Lots of MOSFETs! The MOSFET in my circuit could easily be replaced with a BJT and a suitable base resistor, if you want a MOSFET-free solution.If a VCO isn't required, then the extra MOSFET/BJT isn't needed. Use the unused op-amp in your circuit as an integrator and you have a good, linear triangle wave, with the same number of parts, as you originally suggested.

author: oldway
author_rank: Super Contributor
timestamp: April 03, 2017, 11:56:16 am
content: This circuit will not work with adjustable frequencies from 10Hz to 200 Khz, as intended in my design.QuoteThey are protected against ESD, discrete Fet's are generally not

author: Zero999
author_rank: Super Contributor
timestamp: April 03, 2017, 12:02:55 pm
content: Quote from: oldway on April 03, 2017, 11:56:16 amYes, it will. Change the values of C10 & R2.

author: oldway
author_rank: Super Contributor
timestamp: April 03, 2017, 12:16:31 pm
content: I looked for slew rate of TL082, it's 13V/µs, higher than I thought....you right, that'is enough, it will work.Sorry....

author: jakeisprobably
author_rank: Regular Contributor
timestamp: April 04, 2017, 03:37:43 pm
content: An extensive tutorial on the XR 2206 is available here:https://youtu.be/D3OGcUU1oGEI've been working on the same LM324 project schematic from the OP while looking for other options as well.Also a really cool function generator project idea to consider is here:https://youtu.be/Kqb5zcrgv7sAlan (A2AEW) is on this forum as well. His version of this stair step generator opened up my understanding of the circuit really well.

author: Zero999
author_rank: Super Contributor
timestamp: April 04, 2017, 06:26:42 pm
content: I've just had an idea to overcome the problem of the 555 timer or a Schmitt trigger IC only working off 5V.The square wave output from the 555 is level shifted and attenuated before going to the integrator, then is level shifted back down again before going to the input of the 555 timer. The result is a +/-10V triangle wave, +/-1V square wave and 5V square wave.