# phase shift a square wave signal

Discussion in 'The Projects Forum' started by xisco, Mar 15, 2010.

1. ### xisco Thread Starter New Member

Mar 2, 2010
14
0
To whom it may concern,

I am trying to phase shift a square wave I was trying to use a op. amp. as an all pass in order to phase shift the input signal however I don't know why i can't but when the input signal is sinewave it is ok . I thought of using a 555 in order to shift the signal... is it possible?

Thank you,

Best regards,

Francis

2. ### SgtWookie Expert

Jul 17, 2007
22,194
1,763
Square waves require a great deal of bandwidth; as they are composed of the fundamental frequency, and all of the odd harmonics.

Tell us what is the frequency and duty cycle of your input, and how much you wish to delay the output signal.

3. ### xisco Thread Starter New Member

Mar 2, 2010
14
0
Hello,

I want to use this phase shifted signal in order to measure the phase detector gain of a PFD, I am using a TTL signal and the frequency it does not really matter since at the moment it is only for that purpose. I would like to have a phase shift of 30 degrees or 60 degrees. I am trying right now a RC circuit I read it should give a phase difference of 60 degrees, 120 degrees and so on, It is doing this for sinwave.

Thank you

4. ### kubeek AAC Fanatic!

Sep 20, 2005
4,872
863
The frequency matters a lot, because you can´t actually make a phase shift on a square wave (maybe it is possible using a phase locked loop, but I am not too sure about this), all you can actually do is a delay. The phase shift is then the ratio of delay vs period of the signal.

5. ### t_n_k AAC Fanatic!

Mar 6, 2009
5,448
784
I like kubeek's idea of the phase locked loop.

Probably you could use a 4046 PLL IC with an active PI filter stage to adjust the VCO input. Use Phase Comparator I as the error signal generator. A control pot would be needed as the set-point source input to the PI stage. Adjusting this input would set the required phase shift - notionally in the range from 0-180 degrees. There would be phase jitter which you would have to live with.

Just a suggestion - and it would take some effort setting this up.

6. ### SgtWookie Expert

Jul 17, 2007
22,194
1,763
Here is a simple circuit using a 74HC14 hex Schmitt-trigger inverter and a few passive components. You could possibly use other ICs that had inverting outputs and Schmitt-trigger inputs. The Schmitt trigger is necessary for reliable operation.

Note that R1 should not be omitted; if you need a lower delay than you can obtain by the range of VR1, change C1 to a lower value of capacitance.

Note also that any unused INPUTS of the 74HC14 should be grounded or tied to Vcc.

Another possibility could be using your system clock source to clock your signal through a serial-in, parallel-out shift register. You can then select from the shift registers' parallel outputs to obtain a signal delayed by 1 to 8 clocks.

File size:
78.1 KB
Views:
401
7. ### xisco Thread Starter New Member

Mar 2, 2010
14
0
Hello,
Thank you for your suggestions, Kubeek and tnk the thing is that i am trying to do the phase shifting in order to be able to calculate the phase detector gain of the phase comparator II of the PLL 74HC4046, i need the phase detector gain in order to calculate the components for the loop filter. sgtWookie thank you very much for the circuit i really appreciate this.

Best regards

8. ### t_n_k AAC Fanatic!

Mar 6, 2009
5,448
784
I have seen a discussion of 4046 PCII which would suggest the

'Gain'=Vdd/2Pi volts per radian of phase difference.

So

if the phase diff =0 the mean output is Vdd/2

if the phase diff =-Pi the mean output is zero

if the phase diff = +Pi the mean output is Vdd

where Vdd is the chip +ve supply voltage.