Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsElectronicsBasicsRepairDesignCADComponentsEquipmentElectrical Engineering
ElectronicsKB.com
Contact UsLink To UsSearch & Site Map

Electronics Forum / Basics / August 2006



Tip: Looking for answers? Try searching our database.

waveform generator

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mark Fortune - 19 Aug 2006 17:43 GMT
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:

- produces 3 basic waveforms: sine, square, triangle

- symetry of the waveforms is adjustable

- 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.

looking forward to any suggestions,

regards,
Mark
colin - 19 Aug 2006 18:12 GMT
> I am playing around with the idea of building a budget waveform
> generator at present. Ideally I would like 3 types of basic waveform:
[quoted text clipped - 37 lines]
> regards,
> Mark

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.

Colin =^.^=
Chris - 19 Aug 2006 18:23 GMT
> I am playing around with the idea of building a budget waveform
> generator at present. Ideally I would like 3 types of basic waveform:
[quoted text clipped - 37 lines]
> regards,
> Mark

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.

Good luck
Chris
John Woodgate - 19 Aug 2006 18:50 GMT
>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.

Why on earth would any beginner need the kist of whistles that you
recommended?

Signature

OOO - Own Opinions Only. Try www.jmwa.demon.co.uk and www.isce.org.uk
2006 is YMMVI- Your mileage may vary immensely.

John Woodgate, J M Woodgate and Associates, Rayleigh, Essex UK

martin griffith - 19 Aug 2006 19:32 GMT
snip
>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
[quoted text clipped - 17 lines]
>Good luck
>Chris

MAX038
High-Frequency Waveform Generator

Not Recommended for New Designs

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.

martin
Chris - 19 Aug 2006 19:59 GMT
> snip
> >The "single IC" solutions are both good.  The less expensive one is
[quoted text clipped - 30 lines]
>
> martin

Ouch.  Maxim does it again!  They're the electronic fab version of the
tease highschool cheerleader.

I guess that leaves the -2206-based kit.  Oh, well.  It does most of
what the OP wants, too.

Thanks for the spot
Chris
martin griffith - 19 Aug 2006 22:16 GMT
>> snip
>> >The "single IC" solutions are both good.  The less expensive one is
[quoted text clipped - 39 lines]
>Thanks for the spot
>Chris
I'm not in the fab biz  or any at the mo:-( , so what happens to the
old tinfoil masks thingummies that they used for the 038.

Dumpster?

martin
Eduardo - 19 Aug 2006 18:26 GMT
>......
> So is there a _relatively_ simple circuit which meets the following
[quoted text clipped - 14 lines]
>
> - p-p voltage does not change noticably with varying frequency.

The Exar  XR2206  meets all requirements except Fmax=200kHz

Eduardo.
John Woodgate - 19 Aug 2006 18:48 GMT
>The Exar  XR2206  meets all requirements except Fmax=200kHz

The data sheet says:

Frequency of operation can be selected externally over a range of 0.01Hz
to more than 1MHz.
Signature

OOO - Own Opinions Only. Try www.jmwa.demon.co.uk and www.isce.org.uk
2006 is YMMVI- Your mileage may vary immensely.

John Woodgate, J M Woodgate and Associates, Rayleigh, Essex UK

John Woodgate - 19 Aug 2006 18:47 GMT
>I have seen a few waveform generators on a single IC before, are these
>any good?

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.

>i'm a little loath

Full marks for getting that verb right, minus one for not starting with
'I'. (;-)

>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.

You can buy on line, although I wouldn't want to persuade you to forgo
healthy exercise.
Signature

OOO - Own Opinions Only. Try www.jmwa.demon.co.uk and www.isce.org.uk
2006 is YMMVI- Your mileage may vary immensely.

John Woodgate, J M Woodgate and Associates, Rayleigh, Essex UK

Apostrophe Police - 19 Aug 2006 20:17 GMT
>>i'm a little loath
>
> Full marks for getting that verb right, minus one for not starting with
> 'I'. (;-)

Adjective. ;-)

Cheers!
Rich
John Woodgate - 19 Aug 2006 20:59 GMT
>>>i'm a little loath
>>
>> Full marks for getting that verb right, minus one for not starting with
>> 'I'. (;-)
>
>Adjective. ;-)

Just testing. And it's ultra vires for the apostrophe police to deal
with a parsing offence!
Signature

OOO - Own Opinions Only. Try www.jmwa.demon.co.uk and www.isce.org.uk
2006 is YMMVI- Your mileage may vary immensely.

John Woodgate, J M Woodgate and Associates, Rayleigh, Essex UK

Don Bowey - 19 Aug 2006 22:28 GMT
On 8/19/06 10:37 AM, in article 44e73eac$0$2552$fa0fcedb@news.zen.co.uk,

> I am playing around with the idea of building a budget waveform
> generator at present. Ideally I would like 3 types of basic waveform:
[quoted text clipped - 37 lines]
> regards,
> Mark

The 8038 will do everything you want, with few external parts.  Here's a
link to the Intersil datasheet:

http://www.intersil.com/data/FN/FN2864.pdf
Rich Grise - 21 Aug 2006 16:33 GMT
> The 8038 will do everything you want, with few external parts.  Here's a
> link to the Intersil datasheet:
>
> http://www.intersil.com/data/FN/FN2864.pdf

Great!

Now, where do you get one? ;-)

Thanks,
Rich
Don Bowey - 21 Aug 2006 17:46 GMT
On 8/21/06 8:33 AM, in article pan.2006.08.22.15.32.08.502969@example.net,

>> The 8038 will do everything you want, with few external parts.  Here's a
>> link to the Intersil datasheet:
[quoted text clipped - 7 lines]
> Thanks,
> Rich

The last one I bought was at Radio Shack;   276-2334.
John Jardine. - 19 Aug 2006 22:47 GMT
> I am playing around with the idea of building a budget waveform
> generator at present. Ideally I would like 3 types of basic waveform:
[quoted text clipped - 37 lines]
> regards,
> Mark

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.   http://bama.sbc.edu/ . 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
Mark Fortune - 20 Aug 2006 04:48 GMT
> 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
[quoted text clipped - 4 lines]
> Simplest way forward is to look at the circuitry for (say) a B+K 3010 0-1MHz
> function generator.   http://bama.sbc.edu/ . This is a super classic design

Fantastic! that's more or less exactly what i've been after

> 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.

I shall have a more in-depth look into this once i get home, at least
there is some light at the end of the tunnel now.
Don Klipstein - 20 Aug 2006 05:05 GMT
>I am playing around with the idea of building a budget waveform
>generator at present. Ideally I would like 3 types of basic waveform:
[quoted text clipped - 32 lines]
>electronics shop. but if someone can convince me they're that good then
>I may consider it.

 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.

- Don Klipstein (don@misty.com)
Tim Williams - 20 Aug 2006 06:41 GMT
Perhaps a little more complicated than absolutely necessary.  But it gets
the job done, as such.
http://webpages.charter.net/dawill/Images/Function%20Generator.gif
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:
http://webpages.charter.net/dawill/Images/FET_Splitter.gif
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...
http://webpages.charter.net/dawill/Images/Function%20Generator.gif
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

Signature

Deep Fryer: a very philosophical monk.
Website: http://webpages.charter.net/dawill/tmoranwms

>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
[quoted text clipped - 36 lines]
> regards,
> Mark
Bob Masta - 22 Aug 2006 14:19 GMT
>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.

<snip>

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
          www.daqarta.com
Home of DaqGen, the FREEWARE signal generator
Mark Fortune - 22 Aug 2006 21:08 GMT
>>I am playing around with the idea of building a budget waveform
>>generator at present. Ideally I would like 3 types of basic waveform:
[quoted text clipped - 22 lines]
>            www.daqarta.com
> Home of DaqGen, the FREEWARE signal generator

Marvelous! when will you be releasing a linux version?

Mark
Bob Masta - 23 Aug 2006 13:50 GMT
>>>I am playing around with the idea of building a budget waveform
>>>generator at present. Ideally I would like 3 types of basic waveform:
[quoted text clipped - 24 lines]
>
>Marvelous! when will you be releasing a linux version?

Mark, thanks for the compliment.  But no plans for a Linux
version are in the works.  DaqGen is the signal generator
portion of the upcoming Daqarta for Windows shareware,
which is about a month away from initial release.  Daqarta
will allow you to use the sound card to view waveforms,
spectra, and spectrograms of incoming signals, as well
as to generate driving signals and keep the input and output
displays in sync.  This has been a huge project, learning
all the arcane details of the Windows API.  That's not
something I am ready to repeat with a totally different
API for Linux.  Sorry!

Best regards,

Bob Masta
dqatechATdaqartaDOTcom

           D A Q A R T A
Data AcQuisition And Real-Time Analysis
          www.daqarta.com
Home of DaqGen, the FREEWARE signal generator
Mark Fortune - 24 Aug 2006 16:42 GMT
>>>>I am playing around with the idea of building a budget waveform
>>>>generator at present. Ideally I would like 3 types of basic waveform:
[quoted text clipped - 46 lines]
>            www.daqarta.com
> Home of DaqGen, the FREEWARE signal generator

Personally I find the linux API lovelly, compared to windows which
appears to be a jumbled mess of redundacy and nonesense. I wrote a
simple "hello world" program for windows in C once, Jesus christ, how
many parameters does a function need to take? how many lines of code?!

Then a while ago I suckered up and decided to try graphics programming
with SDL under linux (kind of like directx). Took about 10-20 lines of
code to open up a graphics window and have a ball bouncing around inside
it.. piece of pi...

still, I guess it would still be a PITA to port over a large project.

Mark
Joel Kolstad - 24 Aug 2006 17:04 GMT
> Personally I find the linux API lovelly, compared to windows which appears
> to be a jumbled mess of redundacy and nonesense.

The sound/multimedia APIs in Windows are pretty bad.

> I wrote a simple "hello world" program for windows in C once, Jesus christ,
> how many parameters does a function need to take? how many lines of code?!

Umm... "hello world" is the same in Windows and Linux... int main(int
argC,char *argV[]), no?

> Then a while ago I suckered up and decided to try graphics programming with
> SDL under linux (kind of like directx). Took about 10-20 lines of code to
> open up a graphics window and have a ball bouncing around inside it.. piece
> of pi...

SDL claims it works on Windows as well.  During the great "OpenGL vs. DirectX"
debate, OpenGL clearly had the edge when it came to ease of programming...
unfortunately DirectX won the battle, due IMO largely to Microsoft not wanting
to use a public standard. :-(

---Joel
David Brown - 30 Aug 2006 14:23 GMT
>> Personally I find the linux API lovelly, compared to windows which appears
>> to be a jumbled mess of redundacy and nonesense.
[quoted text clipped - 18 lines]
>
> ---Joel

SDL works perfectly well with windows, and is probably the best choice
if you want to write portable graphics-intensive code.  It is even
easier (so say those that know - I haven't tried it personally) if you
use something like pyGame instead of C.
jasen - 30 Aug 2006 11:04 GMT
> Then a while ago I suckered up and decided to try graphics programming
> with SDL under linux (kind of like directx). Took about 10-20 lines of
> code to open up a graphics window and have a ball bouncing around inside
> it.. piece of pi...
>
> still, I guess it would still be a PITA to port over a large project.

SDL is available for windows.

directX does a bunch of other things too (like embedding in browsers)

Bye.
  Jasen
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.