Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Variable Freq Sin Wave Generator?

Status
Not open for further replies.

rogerj1

Electrical
Jan 5, 2007
23
Folks,
Sort of a newbie to this side of the forum, I lurk around the Power Eng. I'm a sys protection EE (utilities)by profession and audio/musician geek at heart. Anyhow, I'm working on an audio processing project in which I need to create a variable freq sine wave oscillator to modulate the output of an amplifier AND/OR multiple amplifiers. I'll be working in +/- 9VDC range for power supplies, so something 2 to 8 VAC range is sufficient. I'm more partial to analog devices, its been a while since the up days and frankly it turns me away. I'd like something simple to create a sinusoidal wave and to have a circuit to take that same wave and introduce 0 to 360 deg of phase shift by means of a pot resistor. Then use both of these signals to control outputs of multiple amplifiers ( something like VCA's? ) Also, I'd like to have separate controls over the frequencies of the waves and also control the speed (or time) it takes to change states. For instance... say the low freq is 20Hz, and the higher freq is 200Hz.. I'd like to have control over how it ramps up to and down between the those two. This is starting to get long.... so I'll stop now. Anyhow, looking for something minimal to create:
1. Sin/Cos wave
2. Introduce phase shift between two waves
3. Manual control over the phase shift
4. Manual/separate controls over each of those waves' freq.
5. Manual control over transistion from low to high freq & vice versa.
Thanks for any help or suggestions! I can hopefully trade out with any relaying questions you may have!
Scott
 
Replies continue below

Recommended for you

Plenty of single-chip solutions out there, some analog, some digitally controlled. Search for "waveform generator" chips...

Dan - Owner
Footwell%20Animation%20Tiny.gif
 
If you feel like being adventurous, you could take a look at some of the DSP evaluation kits. Pick one with an ADC, a DAC, and some other features and you could experiment with all sorts of possibilities. It could probably even make a decent hobby project for the next few years learning all about it. Cost would likely be a few hundred dollars.

You said you are partial to AD, who makes a wide variety of DSP kits. Theri website should have plenty of information on them.


 
Thanks for the suggestions. I'm finding more about what I need. Looks like I'll need a VCO to produce a sine wave with two switchable frequencies. One being slow and the other faster, but, the rate at which the frequency changes is to be manually controlled.. ie "the time it speeds up from the lower Hz and the time is slows down from the higher Hz" I've found a 555 circuit to do exactly what I want, but I need to produce sine waves. The 555 circuit as it is will produce square waves...I assume filtering the squares can produce sines (or "sine-like").. but I'd also assume there is a way to do the same thing to a sine wave generator. Thanks again,
Scott
 
Noway,

If you read the post again, his partiality was "analog devices" (lower case, as in analog components), not "Analog Devices" (capitalized, as in the chip manufacturer) ;-)

Dan - Owner
Footwell%20Animation%20Tiny.gif
 
Actually I caught that the first time, but realized that it still makes a good play on words and decided to role with it. I will admit that my sense of humor provides me with an appreciation for bad puns.

 
I'd be tempted by an analogue / digital hybrid design and use an EEPROM loaded with a digitised sine wave feeding a DAC. The EEPROM addresses can be clocked by a simple counter. By changing the clock frequency of the oscillator driving the counter the frequency of the synthesised waveform can be controlled. The beauty of this method over a pure analogue solution is the ease with which a phase-locked sine / cosine pair can be generated and which maintains the phase relationship as frequency is swept.



----------------------------------
image.php

If we learn from our mistakes I'm getting a great education!
 
This is probably overkill, but you might look at DSS, Direct Digital Synthesis. This is sort of an upscale integrated version of Scotty's PROM/DAC. Analog Devices has several flavors.
Various versions can output anything from microHertz to hundreds of MHz with quadrature output and 48 bit tuning control, all with quartz crystal frequency accuracy.

For a more analog approach, here's a TI app note that may help.


Scroll down to the quadrature oscillator, that's the heart of what you want. National has similar app notes, this was just at the top of my Google search.

Introduce variable phase shift by summing appropriate amounts of sine, cosine, -sine and -cosine. You can also build a simple all-pass phase shifter, but then the phase shift will vary depending on the frequency.

The control for frequency is resistor and capacitor values, but with a little more digging, look up transconductance amplifiers, like the LM13700, which will allow you to vary parameters with a voltage control if you need that.

Another fun chip is the Maxim MAX083. Based on the old Intersil 8038. A wide range voltage controlled oscillator with sine, square and triangle outputs.
 
Hiya-

You might want to look at the Exar XR-2206 Monolithic Function Generator. They are a little hard to find although Jameco has them. A quick search on the internet mentions Mouser as well.

This is a tri output VCO. Sine, ramp and pulse outputs. Frequency control is via variable resistor and caps. The frequency and amplitude can be modulated.

I built a simple function generator with this chip and it has served me well. Please note that the output is high impedance and should be buffered before use.

Hope that this helps!

Cheers,

Rich S.
 
There's the old Intersil ICL8038 too but they are getting hard to find and are pricey if you do find them.

I am still pretty sure that a fully analogue solution which can generate a pair of sinusoids with variable phase and variable frequency will be a tricky circuit to design. In the 'old days' - when I was at college [blush] - we had a number of variable phase oscillators made by Feedback Instruments which I think were fully analogue. They occasionally turn up on eBay at low prices. Look for the Feedback VPG608.



----------------------------------
image.php

If we learn from our mistakes I'm getting a great education!
 
Thanks to all of you for your help and suggestions! So, at this point, I have an idea for the Sine Wave generator, with manual (pot) control of the freq. Now, from here, I want to take the Sine and introduce up to 360 deg (if possible..??) through another circuit by manual control (pot). I'm needing the sine wave, along with a phase shifted variation of that wave. I'm finding alot about using multiple stages of RC (poles) to introduce a fixed amount of phase shift, or the Sin/Cos generators, etc... I just need something that can produce a variable amount of phase shift (like a "phase shift dial"....), not a fixed value. This is probably right under my nose....? Thanks again to all of you for the discussion!
 
How about one of those "bucket brigade" devices, which create an analog delay that varies depending on a clock signal? I seem to recall that Panasonic made some chips that did that.
 
Do you need the phase shift independent of the frequency? That can be tricky. (See my previous post about summing appropriate levels of sine, cosine, -sine -cosine.)

If it's sufficient to re-adjust the phase if you change the frequency, then an "all pass" filter should work. A simple circuit with an op amp, a variable resistor, two fixed resistors and a capacitor will yield up to 90 degrees pase shift. A quad op amp, ganged quad potentiometer and a handful of components will give you 360 degrees.

(Why does Eng Tips edit in a mono-spaced font and then post in a differently kerned font? This will look horrible, but if you copy the text and past it into a text document and convert it to a mono-spaced font, it should make some sense)

---+---[R]---+---[R]--+
| | |
| +--|\ |
| | >---+---
+--[pot]--+--|/
|
[C]
_|_

You might need to switch in different values of capacitor to cover the full audio range. Besides the phase being a function of frequency, it will also be rather nonlinear.

Again, using a bank of operational transconductance amplifiers instead of potentiometers may make things easier and cheaper. I haven't looked at quad pots in a while.
 
Thanks again for informing me and keeping this discussion going. I've got my sine generator and I want a phase (time delayed essentially...??) lagged version of that same wave, at the same frequency. I've settled on 180 deg of phase shift as the max, but yes, I do want to have manual control of the phase shift from 0 to 180 deg. The idea is to chop off the top halves of these waves to modulate an audio signal with VCAs. These sine waves will be very low Hz signals, but they will be used to control separate VCA's as to which VCA will pass the audio signal. If you can tell by my pictorial typing, these would be the waves I want and the phase shift to vary from a very small amount (if not 0, but at least 10 or 20 deg?) up to 180 deg.
.-. .-.
. . .
.__. . .
*-variable phase shift
can this be done? In my mind, it seems like I need a time delayed, unlatching relay that would pass the top half of the wave, depending upon a time dial setting. Maybe the original sine wave can be a controlling parameter to allow a secondary circuit to pass the wave, based on a setting. I'm open to any possibilities to make this happen! Thanks again,
 
One way would be to use two separate identical sine wave generators, one phase locked to the other, but with an adjustable phase offset.

If you are using the XR2206 function generator chips suggested above, that would probably be how I would do it.

One XR2206 would be the "master" that sets the operating frequency. The other "slave" would form part of a phase locked loop.

If you compare the square wave outputs from both these chips in a phase comparator, using an XOR logic gate, and add in a dc offset (phase) adjustment, normally only 90 degrees total phase range will be possible. But if you divide both these square wave frequencies down with flip flops before doing the phase comparison, it should then be possible to get 180 or 360 degrees of total phase adjustment range.
 
I mentioned a commercially available variable phase oscillator in a previous post.

Here's one for £75:
And another for about £100:
Unless you're building this for the fun of building it rather than building it as a necessary evil for whatever the application is (music stuff goes way over my head) the costs look fairly reasonable. Might depend where you are for shipping costs - I don't recall these as being particularly heavy, so international shipment might be an option.


----------------------------------
image.php

If we learn from our mistakes I'm getting a great education!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor