Hi there, there are complete function generators in one chip, maxim do one, they are certainly easy to get going, and produce reasonably good waveforms, with adjustable this that and the other, they arnt as cheap as chips though, but work fine upto 1mhz and more.
you can convert a triangle wave to a sinewave with a fairly simple slope converter, this is how the function generators produce sinewaves.
2 stages of long tailed pairs will acehive a very good triangle to sine aproximation.
DDS is a more expensive aproach but very versatile and produces excelent sinewaves at moderate frequencies and still good sinewaves at quite high frequencies.
another posibility you might want to look at is to use a micro, using a PWM output and low pass filter you can program any desired waveform. quite cheap and simple except maybe for the programming, but I bet someone has done it before and theres probably some software around.
you might want to use an LC oscillator to produce good sinewaves if you want to go a lot higher in frequency.
Hi, Mark. You could put together a limited range function generator with a few op amps. The problems come when you want to get a very wide range (you're talking at least 7 orders of magnitude in your post), and also are looking for constant amplitude.
The "single IC" solutions are both good. The less expensive one is based on the XR2206 IC, but will only give you output to 100KHz. The MAX038 one gives you a much wider frequency range, and also gives you other bells and whistles you'll find you do need.
The issue, of course, is the expense. If you can spring for $88.44 USD, you can get a complete kit from DIY Electronics based on the MAX038 and the David Jones Electronics Australia design that will give you 0.1Hz to 20MHz sine, square wave and triangle wave outputs, with TTL output, a dedicated buffer, enclosure, connectors, switches and other stuff. I helped a friend get one working several years ago, and I was impressed by the kit. AFAIK, the only other thing you'll have to purchase for a complete working function generator is a 9 VAC wall wart.
I'd try the kit. As you gain more competence in basic electronics, it would be a shame to have to ditch your project because it only did half the job.
I am playing around with the idea of building a budget waveform generator at present. Ideally I would like 3 types of basic waveform: sqaure sine and triangle. I would also like the ability to make such waveforms asymmetrical, with its symmetry adjustable by a pot.
So far I have played with 555 timers and op-amps to produce square and triangle waves, with variable symmetry, and variable/switchable frequency from mHz to a few hundred KHz, but am a little lost on sine waves. Mathematically it is easy to convert a triangle into a sine, but in practice I lack the experience/knowledge to do so.
So is there a _relatively_ simple circuit which meets the following criteria:
- frequency of the waveforms is adjustable from say, a few millihertz to perhaps 1MHz or higher. if using an RC network, i dont mind switching between different capacitors to select a range (ie KHz, 10's KHz etc) and using a pot to finely adjust the frequency.
- Single timing circuit - so that if you switch from sine, to square, to triangle, the frequency is the same in all three cases (ie it uses a single adjustment for frequency)
- p-p voltage does not change noticably with varying frequency.
i've done a fair bit of googling on the matter, but so far have turned up only circuits that do square/triange or sine/cosine. I have seen a few waveform generators on a single IC before, are these any good? i'm a little loath to go out and buy one right now as a) I dont have the money and b) it takes me 30 minutes to cycle to the electronics shop. but if someone can convince me they're that good then I may consider it.
Some are. The Exar XR2206 has a good reputation. While it will cover a large frequency range, I wonder whether you have thought that through. For different frequency ranges, different circuit techniques and standard signal interface values mean that your signal source should have different output voltage ranges and different connectors. You may be able to keep the output source impedance at 50 ohms for all ranges.
Full marks for getting that verb right, minus one for not starting with 'I'. (;-)
You can buy on line, although I wouldn't want to persuade you to forgo healthy exercise.
--
OOO - Own Opinions Only. Try www.jmwa.demon.co.uk and www.isce.org.uk
2006 is YMMVI- Your mileage may vary immensely.
This product was manufactured for Maxim by an outside wafer foundry using a process that is no longer available. It is not recommended for new designs. For further information, contact us. The data sheet remains available for existing users.
They're relatively easy to build from bit parts. 99% of all the commercial "function generators" (google) are based on generating a triangle and square and then passing the triangle to a couple of diodes or transistors where the diode action 'bends' or distorts the triangle more and more as the triangle rises and falls. Output looks sinelike and distortion down to 1% is quite easy. Simplest way forward is to look at the circuitry for (say) a B+K 3010 0-1MHz function generator.
formatting link
. This is a super classic design in it's simplicity and comes with an extremely well written handbook. If you're handy with opamps, transistors etc then the sine shaper section could be straightforward to play with on it's own. (The output power amp is simple and could also be regenerated as a separate design.) For much higher performance, check out how the Wavetek designs do it. Same technical basis but faster) john
There was an IC that did all this, although I don't know about how high in frequency upper limit but definitely ultrasonic. I hope I remember the part number correctly - XR2206.
It has a built-in triangle-to-sine converter, which gets fine tuned by varying an external resistor.
I suspect this IC is discontinued.
How I suspect they converted triangle to sine: Use a diode clipper. Have an adjustable triangle voltage, driving a variable resistor in series with a back-t0-back parallel pair of diodes. I think 1N4007's should do well. You could try 1N4148/1N914 to make the clipping harsher or
1 amp 30V Schottky diodes to make the clipping gentler as appropriate, depending on what results you actually get - but first try various combinations of both adjustments.
If you need a symmetry adjustment, then how I figure to do this is to before the diode clipper to split the signal path into two and feed one path through a positive precision halfwave rectifier and the other through a negative precision halfwave rectifier and have a gain adjustment in one of these paths and combine the outputs of the precision halfwave rectifiers. An example of a precision halfwave rectifier is an op-amp circuit where the output drives three diodes, with #1 and #2 diodes being a "matched pair", should be good enough to use two 1N4148 units from the same lot.
#1 - feeds the halfwave rectified output of the "precision halfwave rectifier".
#2 - feeds the inverting input of the op-amp. The inverting input should have a resistor to ground of value as close as possible to the impedance of the load that the first diode is feeding. If you have a need to get an extra adjustment to tweak, then make this resistor a rheostat with maybe a
2.2K or 1K or so in series with it.
Diodes #1 and #2 have for positive halfwave rectification their anodes driven by the op-amp output. For negative halfwave rectification the op-amp output drives their cathodes.
#3 - in parallel with #2 in opposite direction of #2, to limit opposite swings of output voltage of the op-amp. This often makes the op-amp behave better, especially at higher frequencies.
===========================================
Alternative: Learn how to make a microprocessor, such as a Microchip "PIC" one, in combination with a DAC, to do these. You will probably need to add some filtering.
Perhaps a little more complicated than absolutely necessary. But it gets the job done, as such.
formatting link
A master current mirror sets current (Freq resistor), then another sets discharge current. Pull-down current is double, so the pull-up subtracts, causing equal magnitude charge and discharge currents.
Such a geometrical relation is obviously useless for duty cycle control, so instead you might could use something like this:
formatting link
But erm... replace the FET with another resistor, and pull the voltage of the middle node to change relative up/down current. Then cascode I_sink to toggle it on/off.
Ok so back to...
formatting link
FET follower, little discrete comparator, you could use an LM311 or half a
393 instead. If you go discrete, I'm not sure the phase is right on that.. you may have to swap which differential base (or collector) goes where.
Anyways, labeled output is square wave. How in the hell does this help you, you ask? Pick up the signal off the FET source- triangle wave. Then run this through a beefier follower, and hit a diode/resistor network to trim it into a fake sine wave. Bingo, three waveforms, adjustable duty cycle. ;-)
Or you could grab an XR2206 or whatever the hell other chips there are that don't come to mind.
Tim
--
Deep Fryer: a very philosophical monk.
Website: http://webpages.charter.net/dawill/tmoranwms
Not what you asked for, but you might want to take a look at my freeware DaqGen signal generator for Windows. It uses any Windows sound card and offers many waveforms and modulation options, with very precise and repeatable control.
The downside is that sound cards are limited to (typically)
20 kHz on the top end and a few Hz on the bottom. (DaqGen goes down to sub-milliHertz, but you won't see it on the outputs, only in modulations.)
Best regards,
Bob Masta dqatechATdaqartaDOTcom D A Q A R T A Data AcQuisition And Real-Time Analysis
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.