(Co)sine wave generator with phase shift

Perhaps this is a dumb idea, (I'm just a student, so please don't kill me over it), but can't you just create some squiggly traces on the PCB board to make your signal from one oscillator be time delayed to your outputs by 0 120 and 240 degrees?
 

bertus

Joined Apr 5, 2008
22,928
Perhaps this is a dumb idea, (I'm just a student, so please don't kill me over it), but can't you just create some squiggly traces on the PCB board to make your signal from one oscillator be time delayed to your outputs by 0 120 and 240 degrees?
That could only work for very high frequency rf signals and for one specific frequency.
 

atferrari

Joined Jan 6, 2004
5,012
When I was already bidding farewell to the PICs 16F84A, I designed with the last two in my drawer, two separate sine oscillators sharing the same PSU and xtal.

One of them was used as the reference. The other "moved" back and forth to decrease/increase phase by stealing/adding a clock pulse at a time.

It worked quite well.
 

MrAl

Joined Jun 17, 2014
13,708
Perhaps this is a dumb idea, (I'm just a student, so please don't kill me over it), but can't you just create some squiggly traces on the PCB board to make your signal from one oscillator be time delayed to your outputs by 0 120 and 240 degrees?
Hi,

Wow! That's the dumbest question I've ever seen on the internet so far! (Ha ha, just kidding, it's actually kind of insightful)

I think it is insightful because it links electrical activity with the physical world itself, where frequency, and wave propagation work together.

In theory, you can actually do that, although as others here mentioned you probably want to go to higher frequencies if you only use traces on the PCB. What you end up creating is an actual transmission line, and so it would follow the laws associated with transmission lines which also link the physical to the electrical. If you didn't mind using a few inductors and capacitors, you could mimic a transmission line with given inductance per unit length and capacitance per unit length, which would give you predetermined phase shifts at a given frequency. You can even solder in lengths of an actual transmission line to get phase shifts at relatively higher frequencies, but to work at 50Hz or 60Hz you'd have to use inductors and capacitors. We could look at a simple design that could work at just about any given frequency, so it would still be a passive network.

To use PCB traces alone and designing around the propagation delay, the traces would have to be something like 1 million meters long to get a phase shift of 120 degrees at 50Hz.
To use PCB traces along designing around L and C values of those traces, it would depend on how you create the L and C using board traces (like parallel, zig zag, circular, spiral, etc.).
It's much easier and practical to use regular size L and C components.

If you would like to look into the theory behind transmission lines you would find out a lot more about this.
 

drjohsmith

Joined Dec 13, 2021
1,609
Hi,

Wow! That's the dumbest question I've ever seen on the internet so far! (Ha ha, just kidding, it's actually kind of insightful)

I think it is insightful because it links electrical activity with the physical world itself, where frequency, and wave propagation work together.

In theory, you can actually do that, although as others here mentioned you probably want to go to higher frequencies if you only use traces on the PCB. What you end up creating is an actual transmission line, and so it would follow the laws associated with transmission lines which also link the physical to the electrical. If you didn't mind using a few inductors and capacitors, you could mimic a transmission line with given inductance per unit length and capacitance per unit length, which would give you predetermined phase shifts at a given frequency. You can even solder in lengths of an actual transmission line to get phase shifts at relatively higher frequencies, but to work at 50Hz or 60Hz you'd have to use inductors and capacitors. We could look at a simple design that could work at just about any given frequency, so it would still be a passive network.

To use PCB traces alone and designing around the propagation delay, the traces would have to be something like 1 million meters long to get a phase shift of 120 degrees at 50Hz.
To use PCB traces along designing around L and C values of those traces, it would depend on how you create the L and C using board traces (like parallel, zig zag, circular, spiral, etc.).
It's much easier and practical to use regular size L and C components.

If you would like to look into the theory behind transmission lines you would find out a lot more about this.
As we're off topic a bit ,
We used to use mercury delays lines
Tanks a meter or two tall
Transsduceres tip and bottom
Move the top one up and down to adjust the delay !
 

WBahn

Joined Mar 31, 2012
32,874
If you wanted to create a perfect (co)sine wave you could use a Colpitts or a Hartley oscillator.Suppose for some reason you needed to add a phase shift to the circuit,in the laplace domain if the phase shift was φο ,then in the laplace domain that would be the laplace transform of the (co)sine signal * e^(-φο/s).But how can I do this as a circuit?
I've scanned the entire thread and, as you can see, there are several possible ways to achieve what you want, using both analog and digital techniques. But which ways are reasonable depends heavily on what frequency your sine waves is at. It also depends on whether your frequency is fixed, or whether it is variable.

If you just want three phase-locked sinusoids in simulation, that's trivial to achieve with three AC voltage sources in LTSpice. But if you want a circuit that will do it, you can't rely on three independent oscillators staying in the proper phase relationship for long at all, no matter how hard you try to make them identical. You need to use a single oscillator that either inherently produces the three waveforms, or to which all of the waveforms are phase locked.

To really start homing in on something that will do what you really need, you need to provide more information.
 

LvW

Joined Jun 13, 2013
2,030
You need to use a single oscillator that either inherently produces the three waveforms, or to which all of the waveforms are phase locked.
In this context, the free-running oscillator circuit from post #32 (crutschow) seems to me to be the best (and most logical) option.
The circuit consists of three identical active low-pass filters (inverting) with sufficient gain (oscillation condition) - connected in a closed loop.
The circuit has three low-impedance outputs.
At the oscillator frequency, each low-pass filter causes a phase shift of -60 degrees.
 
Last edited:

MrAl

Joined Jun 17, 2014
13,708
As we're off topic a bit ,
We used to use mercury delays lines
Tanks a meter or two tall
Transsduceres tip and bottom
Move the top one up and down to adjust the delay !
Hi,

Well, if it is in fact a delay then that would cause a phase shift, and that would be on topic I would think. I do have to doubt however if anyone would want to use one these days with all the environmental concerns, or even if it would be practical for low frequencies.

You reminded me about the 'bucket brigade' IC chips that were used to create delays in analog signals. They would store the incoming analog signal in capacitors as a voltage level, then transfer that to the next capacitor in the 'brigade', then to the next, and the next, etc. There could be a thousand in the pipeline. The output would be significantly delayed. It was used to develop a reverb effect for audio as the output would be mixed with the input to some degree.

Since these chips would easily handle a sine wave, it would delay it and thus create a phase shift. The phase shift is related to the clock frequency, but I don't remember much more about it like what the signal and clock limits are. I might still have one of those chips around. Not sure if they make them anymore though.
 

AnalogKid

Joined Aug 1, 2013
12,142
You reminded me about the 'bucket brigade' IC chips that were used to create delays in analog signals.
You reminded me of video delay lines that were quartz glass. IIRC the video signal was modulated onto an FM carrier, and that signal was pushed down a piece of glass. At the far end it was demodulated back into the original video signal. This was an acoustic delay line, and the big name in the field was Anderson Labs. The delay time was exactly 1 horizontal line. This was used in the image enhancer circuits of cameras to detect if there was a big change in the video level between a pixel and the one immediately above it.

https://www.ebay.com/itm/276542041464
https://www.surplussales.com/items/164680/delay-line/

ak
 

WBahn

Joined Mar 31, 2012
32,874
In this context, the free-running oscillator circuit from post #32 (crutschow) seems to me to be the best (and most logical) option.
The circuit consists of three identical active low-pass filters (inverting) with sufficient gain (oscillation condition) - connected in a closed loop.
The circuit has three low-impedance outputs.
At the oscillator frequency, each low-pass filter causes a phase shift of -60 degrees.
Agreed, which is a single oscillator that inherently produces the three waveforms.

There will, of course, be an error in the phase shifts since the low-pass filters won't be identical. The TS has given no indication of how accurate the phase relationships need to be. Adding some adjustability to the filters would allow this to be adjusted out, though the stability of the correction over time/temp could be an issue. Also, the nature of the oscillators/filters/adjustment is dependent on frequency, which the TS still hasn't given any hint on. But I'm guessing that it's reasonably low.
 

crutschow

Joined Mar 14, 2008
38,526
There will, of course, be an error in the phase shifts since the low-pass filters won't be identical.
Adding some adjustability to the filters would allow this to be adjusted out, though the stability of the correction over time/temp could be an issue.
All that is generally true for any analog solution.

A digital solution, perhaps one of those suggested here, would likely be needed for minimum errors.
 

WBahn

Joined Mar 31, 2012
32,874
All that is generally true for any analog solution.
Agreed. But it is a point that is commonly not appreciated by the thread starters that ask these kinds of questions, as indicted here by the notion that using independent oscillators made from identical components would deal with the issue.

A digital solution, perhaps one of those suggested here, would likely be needed for minimum errors.
Again, agreed, although digital solutions have their own drawbacks, a big one being the initial investment and learning curve associated with them.
 

MrAl

Joined Jun 17, 2014
13,708
Agreed. But it is a point that is commonly not appreciated by the thread starters that ask these kinds of questions, as indicted here by the notion that using independent oscillators made from identical components would deal with the issue.



Again, agreed, although digital solutions have their own drawbacks, a big one being the initial investment and learning curve associated with them.
Hi,

I don't think there is too much of a learning curve assuming a constant frequency. Square waves are fairly easy to generate and three phases would just mean something like three divide by 3 counters (or something like that) with initial digital conditions set beforehand. Followed by three bandpass filters. Preceded of course with a clock signal of the right frequency to match the center frequency of the bandpass filters.
Of course, just like anything else, the curvature of the learning curve depends on the past experience of the designer.
 
Top