DIYstompboxes.com

DIY Stompboxes => Building your own stompbox => Topic started by: Brian Marshall on February 18, 2004, 02:44:40 AM

Title: sine wave oscillator with variable freq, and low parts count
Post by: Brian Marshall on February 18, 2004, 02:44:40 AM
a cool little oscilator with variable frequency, and almost sine wave output.  pretty damn close.

(http://subdecay.com/oscilator1.gif)

based on some square/triangle wave oscilators I've seen arround.

the main addition is the 10 uf cap to ground that turns the square wave generator in to a relxation wave generator.  

unfortunately i cant seem to think of a way to make a stable amplitude control.  all of them seem to effect the frequency.

Brian
Title: sine wave oscillator with variable freq, and low parts count
Post by: downweverything on February 18, 2004, 03:05:00 AM
for the amplitude control why not add just another inverting op amp stage (inverting so you can have + or - gain)
Title: sine wave oscillator with variable freq, and low parts count
Post by: Brian Marshall on February 18, 2004, 03:16:12 AM
i dont know if you have seen my posts over the last week or so, but i have been trying to come up with something with the least ammount of parts.

one thing i didnt even think of was a good old volume pot.  I was thinking it wouldnt work, because when i switched from wave for to wave form the impedance would change, but i dont think that will matter that much if i keep the impedane high.

I was dead set againsst using another opamp.

brian
Title: sine wave oscillator with variable freq, and low parts count
Post by: Tim Escobedo on February 18, 2004, 03:29:38 AM
It's a pretty common design. What do you want to use it on? Seems the "relaxation" wave isn't that useful if you have a triangle out of the integrator.
Title: sine wave oscillator with variable freq, and low parts count
Post by: Brian Marshall on February 18, 2004, 03:40:38 AM
well actually because the relaxation wave is much lower in harmonics than a square wave the integrator makes a sine wave, not a triangle.

At the same time the relaxaton wave is a better test carrier (for me anyways) when you want some harmonics, but not a square wave.


main thing i wanted was a sine wave for testing circuits i am working on, and there was a pretty long discussion about it over the week end.  no really good answers for anything wth variable frequency that would get me a sine wave.

I'd probably need an osciloscope to do any better than this... i had to keep taking it in to my studio, and recording it on cakewalk, and look at the wave.
Title: sine wave oscillator with variable freq, and low parts count
Post by: Jason Stout on February 18, 2004, 10:39:00 AM
For those that don't know of the MAX038, well here it is..

(http://www.maxim-ic.com/tarticle/images/E19Fig08.gif)

http://www.maxim-ic.com/quick_view2.cfm/qv_pk/1257/ln/en

Extremely flexible, low part count function generator, and at $9.50 a piece you pay for it! I wish it was so, but simple, clean, variable frequency with constant amplitude and sine wave just don't go in the same sentence :( unless you are using a dedicated IC.
Title: sine wave oscillator with variable freq, and low parts count
Post by: aron on February 18, 2004, 03:18:45 PM
Where can I order this? Mouser doesn't seem to have them.
Title: sine wave oscillator with variable freq, and low parts count
Post by: R.G. on February 18, 2004, 03:41:34 PM
The standard for making sine in waveform chips (and what happens inside the Max038, the icl8038, and the XR2206) is that there is a triangle generator and the triangle is then fed through a shaper to round off the top and bottom peaks. This can get you well within audible perfection on the sine.

Sine shapers require a fixed amplitude, which fortunately is what most triangle wave generators produce.
Title: sine wave oscillator with variable freq, and low parts count
Post by: R.G. on February 18, 2004, 03:49:27 PM
The CA3280 application note shows both a triangle generator (2Hz to 1Mhz) and a triangle-to-sine shaper application (someone just pointed me to the datasheet and I noticed them in there)
Title: sine wave oscillator with variable freq, and low parts count
Post by: Jay Doyle on February 18, 2004, 03:54:06 PM
I'm pretty sure that the 3080 app note has the triangle to sine thing as well.

You are basically overdriving the diff input rounding the peaks.

OK, so this post adds nothing...
Title: sine wave oscillator with variable freq, and low parts count
Post by: aron on February 18, 2004, 03:59:25 PM
Well, since it's taking me YEARS to get a "pure sine" wave, what should I build? Or should I just eat it and spend $125 on the Lodestar whatchamacallit (sp) generator????
Title: sine wave oscillator with variable freq, and low parts count
Post by: R.G. on February 18, 2004, 04:40:17 PM
QuoteWell, since it's taking me YEARS to get a "pure sine" wave, what should I build? Or should I just eat it and spend $125 on the Lodestar whatchamacallit (sp) generator????
well, there are five sine generators on ebay right now under $50. the prize is probably the Heathkit one that works but is $5.00 because the top cover is missing.
Title: sine wave oscillator with variable freq, and low parts count
Post by: Brian Marshall on February 19, 2004, 02:15:24 AM
I saw a post on an earlier thread that you could get damn close if you use a triangle generator.... (remove the 10uf cap from above drawing and you have one obviously) and add another integrator circuit, and your there.

On the drawing above there is a slight 2nd harmonic, but that's all i can see.
Title: sine wave oscillator with variable freq, and low parts count
Post by: gez on February 19, 2004, 08:24:23 AM
Quote from: Brian MarshallI saw a post on an earlier thread that you could get damn close if you use a triangle generator.... (remove the 10uf cap from above drawing and you have one obviously) and add another integrator circuit, and your there.

You can feed a second integrator from the output creating the triangle wave to get a sine and that will work, but you have to find a way of controlling the amplitude of the sine if it's set up for variable fequency.

you might get away with including a second integrator in the feedback network but you'd need to re-jig the Schmidt to use the inverting input, but I'm not too sure whether the sine would be as smooth as it is when not included in the feedback network (I've been meaning to try this but haven't got round to it yet).
Title: sine wave oscillator with variable freq, and low parts count
Post by: Paul Perry (Frostwave) on February 19, 2004, 09:40:45 PM
Quote from: R.G.The standard for making sine in waveform chips (and what happens inside the Max038, the icl8038, and the XR2206) is that there is a triangle generator and the triangle is then fed through a shaper to round off the top and bottom peaks. This can get you well within audible perfection on the sine.
.
The ICL8038 data sheet has an internal circuit diagram, showing the shaper. Maybe it would inspire a newish overdrive  :wink:
Title: sine wave oscillator with variable freq, and low parts count
Post by: brett on February 20, 2004, 12:16:50 AM
Hi.  This is very cheapo and low tech (two of my favourite concepts!), but a cheap keyboard puts out a variety of waveforms at a wide range of frequencies.  Happily, they tend to be the right frequencies for testing audio circuits.  Too cheap and nasty?
Title: sine wave oscillator with variable freq, and low parts count
Post by: Paul Perry (Frostwave) on February 20, 2004, 04:09:50 AM
No problem there, Brett! If it helps, I have a drum rhythm machine fixed to my bench for "real world" siganl testing! And a CD player too (until it broke...)
Title: sine wave oscillator with variable freq, and low parts count
Post by: Nasse on February 20, 2004, 01:01:15 PM
:D CD player *IS* indeed a nice audio freq waveform generator. I think I have a test signal CD lying somewhere in my cupboard, got it free when I bought by mail order one cheap 12" subwoofer element. The subw is crap, btw. Someone wrote somewhere that it is better use a speaker cabinet design program *before* buying the element. With these you see that bad elements are bad. Well, maybe I´ll box it anyway someday.

But I believe Hi-Fi magazines and shops and car-hifi shops sell test signal cds, and there is test signals around online. Some audio edit programs have tools that allow you to make waveforms, sweeps and bursts.

Dont remember havin seen sine wave LFO:s made with shift registers and resistor arrays in effect pedal circuits. These are quite complex and high part count systems, and clock feedtrough and current consumption might be a problem. But believe these might be useful in bass synthezisers, sub-octave generators and multisync lfos...
Title: sine wave oscillator with variable freq, and low parts count
Post by: smoguzbenjamin on February 20, 2004, 01:08:58 PM
Speaker cab design programs? Nasse, have you got any links for a program like that?
Title: sine wave oscillator with variable freq, and low parts count
Post by: Gringo on February 20, 2004, 01:20:07 PM
Hey Nasse, for a test signal cd, you can record some clean guitar stuff in your pc, and then burn an audio cd.

I know i'm gonna do that!

Have fun!
Title: sine wave oscillator with variable freq, and low parts count
Post by: Nasse on February 20, 2004, 01:37:37 PM
QuoteSpeaker cab design programs? Nasse, have you got any links for a program like that?

http://www.linearteam.dk/ (ISD online downloadable version too)

I think it is about same make but maybe different online version at Ljudia pages (www.ljudia.com) but these are swedish, norwegian or finnish

Dont know if these are useful with quitar speakers, but PA and hifi for sure. Jensen guitar speaker T-S parameters are available online.

:oops: Was this thread about few parts & simple sine wave generator :oops:
Title: sine wave oscillator with variable freq, and low parts count
Post by: smoguzbenjamin on February 20, 2004, 01:43:48 PM
Sweet thanks nasse
Title: sine wave oscillator with variable freq, and low parts count
Post by: Paul Perry (Frostwave) on February 20, 2004, 07:54:08 PM
Did someone say digital? http://www.tinaja.com/magsn01.asp
Don Lancaster's stuff on Magic Sinewaves :!:  :?:  :idea:  :shock:  :roll:
Title: sine wave oscillator with variable freq, and low parts count
Post by: Jason Stout on February 20, 2004, 10:03:11 PM
Here's a DIY idea...
Pocket Tones Guitar Tuner (http://www.musiciansfriend.com/srs7/sid=040220185316069162028190095757/g=home/search/detail/base_pid/215600/url)
Title: sine wave oscillator with variable freq, and low parts count
Post by: Nasse on February 21, 2004, 01:34:14 AM
Paul Perry (Frostwave) wrote

QuoteDid someone say digital?

:oops: Was it me? :oops:

But thanx for the link. So exciting theory and number tables, it must have been nice and exciting job to develop this stuff...I mean really really interesting

My only experience with PICs is when I soldered a Velleman mini programmable rolling text display

Wonder what someone more clever and decent people than me can make out of this demo chip and sourcecode