Mini DIY signal generator

Started by merlinb, April 15, 2010, 05:11:24 PM

Previous topic - Next topic

merlinb

Since the all-in-one function generator chips seem to be out of production (well, I can't find any here in Britian) I came up with this simple circuit using a quad opamp instead. Thought it might amuse some folks here, plus its small enough to fit into a MXR-style enclosure.

It produces sine and square waves from 18Hz to 10kHz in three ranges:
18Hz to 180Hz
180Hz to 1.8kHz
1.8kHz to 10kHz

One shortcoming is that the amplitude of the sine wave varies a lot as you change the frequency (this is also why it only goes up to 10kHz, since I had to chop off the last bit of the range or the amplitude skyrockets) , but hey, what do you expect for a circuit the size of a match box! The square wave stays nice and constant though. The other shortcoming is that it needs two 9V batteries.
Maximum output amplitude is 10Vp-p.
Output impedance 47 ohms.
Square wave rise time 2microsecs

Skruffyhound


KazooMan


Thanks!

I have a simple, single frequency oscillator to trace circuits, but your signal generator should provide some new options when troubleshooting a pedal.

The more tools available the better!

Now the problem will be what to do with my old oscillator.  It is one of the first circuits I ever built and the components all sit proudly well spaced on a piece of perfboard.  One frequency with three levels out.  A real masterpiece, but it did allow me to troubleshoot some builds.  Maybe belongs in the stompbox hall of fame (or shame).

Thanks again!

John Lyons

Neat! thanks for posting. Any chance to get the schematic
for us non strip board builders?

John
Basic Audio Pedals
www.basicaudio.net/

slotbot

second on the schematic.

also your tube website is AMAZING. keep up the good work.

andymac1962

i have one i built from an electronics magazine in Australia several years ago. It just used op amps, but had a harmonic cancellation circuit to do amplitude stabilsation rather than ptc's of zeners.....
Did 20hZ - 20kHz in 4 ranges,    easy to build...

Will see if i can dig it out over the weekend, scan it & post......

Brymus

Yeah welcome to the board Merlin,your tube site is the bees knees  8)
I have used it many ,many times
And thanks for sharing the sig gen,I could use a schematic too if you dont mind,
Bryan
I'm no EE or even a tech,just a monkey with a soldering iron that can read,and follow instructions. ;D
My now defunct band http://www.facebook.com/TheZedLeppelinExperience

merlinb

#7
Thanks guys! Here's a quick ghetto schem. Note that the part numbers do not correspond to the layout I posted! The layout also has an LED, but I'm sure you can figure out how to do that on your own  ;)

The circuit is a conventional Wein bridge oscillator in a Cambridge configuration (that's OP3) to allow a single pot to tune the frequency. I used a DPDT-centre off switch to select the frequency range, rather than the conventional rotary switch, because the whole point of the project was to be as tiny as possible. Anyone can build a good sig gen if it doesn't have to be small! :icon_lol:
The sine wave is then sent to OP1 which is a Schmitt trigger and converts it to a square wave. A 10pF cap is added to improve the rise time, but some opamps might not like that, so it is optional. The square wave is then padded down to make it the same amplitude as the max sine amplitude. The rest should be obvious.

EDIT: I just noticed that R9 is redundant- you can leave it out.


Auke Haarsma

Thanks for sharing the layout  and circuit!

Quote from: merlinb on April 15, 2010, 05:11:24 PM
Since the all-in-one function generator chips seem to be out of production

The XR2206 is readily available. If I am not mistaken it has even been put back into production.

Available at e.g. http://www.conrad-uk.com/goto.php?artikel=179973 (I live in the Netherlands, so I am not fully up to speed on the UK market, however, this link popped up with a quick google search).

Kain

Nice one.

I use Visual Analyser's waveform generator (sine, square, sweeps, noise, pulses, saw...). With same software you can also see the scope and spectrum.

Laptop (VA waveform generator) > omega lexicon output > magical mystery diy box > omega lexicon input > laptop (Visual analyser), works well. Very entertaining and educational also.
Kain / Vasuri Kabala
Octavia/D-Reverb/Ampeg Scrambler/2*TS-808/Fuzz Face 69/Ross Compressor/Oscillator/May Queen/Drawdio/Professor Tweed/Supreaux/2*Ruby/ZVEX Fuzz Factory/Valve Caster

Skruffyhound

XR2206 also available from leemoon611 on ebay, where I got mine

andymac1962

Heres the low distortion audio oscillator circuit, originally from Silicon Chip magazine in Australia.
Adjust the 1K trimpot for approx 2.5Vrms on the output. As i recall, it worked by subracting harmonics, and ended up with a pretty good sine wave of approx 2% distortion, with excellent amplitude stability over the whole range.
sorry cant work out how to paste into my reply, so here is the link
http://www.eserviceinfo.com/equipment_mfg/books_41.html

i have some books on pdf i will upload next week, including GEC valve audio amps, stompbox cookbook, guitar amp book, radiotron valve handbook, solidstate guitar amp book, high pwoer audio amp book.
You dont have to join the site to download

diydave

[qoute]The circuit is a conventional Wein bridge oscillator in a Cambridge configuration[/quote]

What's a Cambridge configuration?
I understand the principles of a Wien Bridge oscillator, but the Cambridge thing is new.

Btw: love your site, merlinb. It has helped me a lot in tinkering with my own amps.

merlinb

Quote from: diydave on April 16, 2010, 07:34:44 AM
What's a Cambridge configuration?
With ordinary oscillator you invariably need to vary two resistances simultaneously in order to sweep the frequency. Andymac's post is another example of this; you need a dual-ganged pot. Obviously this can be a pain if you're trying to save space, plus I never seem to have any dual pots in my spares box, and I have never even seen a dual-gang trim pot.

W. Cambridge published a modification for the Wein bridge that avoids the dual gang pot, by using another opamp to compensate for the loss in the bridge as you vary only one resistor. Since the input to the extra opamp is a virtual earth, the opamp amplifies whatever current flows in the pot and applies this to the negative input of the main oscillator. Ideally it will exactly compensate for the loss in the bridge by simultaneously increasing the gain of the oscillator. Ideally.

In practice, however, it doesn't work. At least, not as well as you would hope. At low frequencies it is excellent, but at high frequencies the gain of the opamp departs from the ideal and the whole thing falls apart. That's why I have the odd feedback path around the extra opamp (which was not in Cambridge's design); it tames the gain a bit and keeps the oscillator from producing a stupidly large output at the highest frequency.


PRR

> never seem to have any dual pots in my spares box

Old (old-old?) stereo hi-fi amps. 1970s Sansui etc. Volume control is dual audio, usually 100K. And you get a really nice knob!

> at high frequencies the gain of the opamp departs from the ideal

You have a 10K:100 ratio, 100:1, amp needs gain of exactly 100 at 10KHz. The gain-bandwidth must be "much greater than" 100*10KHz= 1MHz. If not, not only is gain a bit short, phase-shift messes the bridge frequency.

TL074? or TL061/TL064?

TL061 has GBW of just 1MHz, more or less. So where gain should be 100, it is more like 50, more or less. TL074 has higher GBW, might give gain of ~~80, which fits your 120 ohm fudge resistor. But there is no tolerance zone on GBW. Various-vendor chips may need other values.

It wants a faster amp or a smaller range.

Still a slick trick. Have never seen that one.

> W. Cambridge published a modification for the Wein bridge

Cite? Hint?
  • SUPPORTER

merlinb

#15
Quote from: PRR on April 16, 2010, 10:53:29 PM
Old (old-old?) stereo hi-fi amps. 1970s Sansui etc. Volume control is dual audio, usually 100K.
I never seem to have any of them in my spares box either! Plus you want linear, ideally, and there's no way I could fit one in a MXR enclosure.

Quote
TL074? or TL061/TL064?
Both work. I have TL064 in it right now.

Quote
It wants a faster amp or a smaller range.
Um, but it works on the range it has already...

QuoteYou have a 10K:100 ratio, 100:1, amp needs gain of exactly 100 at 10KHz. The gain-bandwidth must be "much greater than" 100*10KHz= 1MHz. If not, not only is gain a bit short, phase-shift messes the bridge frequency.
Incidentally, the problem area is the lower end of the highest range (about 1.8k to 3kHz region), where the amplitude really drops off. Above that the amplitude shoots up instead.

Quote
Cite? Hint?
The source I have is the Newnes Circuit ideas Pocket Book Part Three, p258. Year unknown, probably early 90s.

Gurner

#16
Quote from: merlinb on April 15, 2010, 05:11:24 PM
Since the all-in-one function generator chips seem to be out of production (well, I can't find any here in Britian) I came up with this simple circuit using a quad opamp instead. Thought it might amuse some folks here, plus its small enough to fit into a MXR-style enclosure.

Old(ish) thread I know (referenced by another thread running a couple down from this),   was put onto the XR2206 by Taylor a couple of days ago, from a component count perspective, it's gotta be the way to go if you need a condensed sig gen!

So, for the Brits...

http://uk.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&R=6866039




Earthscum

Give a man Fuzz, and he'll jam for a day... teach a man how to make a Fuzz and he'll never jam again!

http://www.facebook.com/Earthscum

akkar

Sorry but the Schmitt trigger doesn't need a resistor in the positive feedback?
I'm asking this because my builded board doesn't work... ::)

akkar

I've placed a 220k resistor in place of that capacitor, it doesn't work fine anyway... ???
Can anyone help me?