# 90 degree phase shift

#### kunalpowar1203

Joined Feb 26, 2012
7
How do i create a signal which is shifted by the original one by 90 degrees. ??? This signal has a max freq of about 30khz.All the other characteristics must be the same.

#### MrChips

Joined Oct 2, 2009
23,290
Is the signal at a fixed frequency? Otherwise it would be difficult.

#### praondevou

Joined Jul 9, 2011
2,942
What waveform is it? Sine, square, etc.?

#### kunalpowar1203

Joined Feb 26, 2012
7
It is a square wave and yes the frequency is varying..ooooppps...

#### MrChips

Joined Oct 2, 2009
23,290
Well that makes it a bit easier.
I can think of a number of ways of doing it - phase-locked loop, digital counter, shift register etc.
Simple solution is to use a frequency doubler and D-flip-flops.
What kind of resolution do you need?

#### crutschow

Joined Mar 14, 2008
27,023
For a square-wave 90° delay you could measure the period with a microprocessor and then have it generate a square-wave delayed by 1/4 of the period.

#### kunalpowar1203

Joined Feb 26, 2012
7
Thanks a lot

#### praondevou

Joined Jul 9, 2011
2,942
All the other characteristics must be the same.
What are "all other characteristics"?

There is voltage (is it bipolar?) and duty cycle (is it 50% ?). What else?

#### crutschow

Joined Mar 14, 2008
27,023
.........I can think of a number of ways of doing it - phase-locked loop, digital counter, shift register etc.
Simple solution is to use a frequency doubler and D-flip-flops.
What kind of resolution do you need?
How do those methods generate a 90° shift? Any approach that uses the edges of the signal will generally be changing states at 0° or 180°.

#### MrChips

Joined Oct 2, 2009
23,290
I would use a PLL to generate a square wave that is x2 the signal frequency.

#### kunalpowar1203

Joined Feb 26, 2012
7
Its not bipolar and yes the duty cycle is 50percent.

#### crutschow

Joined Mar 14, 2008
27,023
I would use a PLL to generate a square wave that is x2 the signal frequency.
OK, that would work if you use a phase detector with 0° phase-shift at lock, such as the Type II detector in the CD4046. Then you use a divide by 2 counter clocked at the falling edge of the doubled signal to get the shift. You would need to also reset the counter at the rising edge of the input signal to insure that the delay is 90° and not 270°.

This only works, of course, over the lock range of the PLL.