Phase shifter

May 13, 2011 32 Replies

Hush! Slow-Mans around..

Jamie

I think that's what he did. It should work over a pretty wide range,

100:1 or so, if the details are handled right.

The integrator has to be kept from railing - you've gotta fix the drift and constant-of-integration problems - which implies some DC negative feedback, which limits the low-frequency accuracy. And the amplitide does drop with frequency, so the HF signal gets too small eventually and the comparator gets into trouble. You can do range switching and such to extend the range, if you can tolerate the gear-switching glitches.

You can do a form of hysteresis that adds no phase shift. Arrange for the comparator to always switch at zero, and push the positive-slope and negative-slope offsets away from that.

Another way to do this is to have three comparators: positive, zero, and negative, and do a little logic on them.

Hey, this should work with a single comparator: use the transitions of the square wave to arm a state machine - that will be at the triangle peaks - and fire it based on zero-crossing transitions of the comparator.

I guess one could use multiple integrators to span a wide range, and use a state machine to select the best one at any given frequency. That could be done glitchlessly.

Of course, it could be done digitally, PLL or some sort of DSP thing.

We had a similar thought a while back: one could, in an FPGA, make a huge-range DDS frequency synthesizer, microHertz to megaHertz. Then - the tricky part - close a servo loop to set the DDS to exactly track some external input, like the square wave in this case. Once it's sync'd up, you can synthesize any waveform at any frequency or phase.

I suppose the very exact definition of "90 degree phase shift" is debatable for a time-varying square wave. Sampling theorem and all that. Even an ideal integrator+comparator gets weird when the input frequency changes.

John

With me it's not believing that I don't need to reveal stuff -- it's not realizing that I've left out some pertinent point. So I ask my question, someone says "is this for a feline or a bit of earth moving equipment", I smack my forehead and clarify, etc.

Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html

Is that why you're going bald? ;-)

You can't fix stupid. You can't even put a Band-Aid? on it, because it's Teflon coated.

** The vast majority of posters are anonymous and use "handles" so they are no longer themselves - they have no idea who the other posters are, ie who is cluey and who is a looney or a troll. So it is all a big game for them.

Most posters do not have a question requiring a simple answer, they have a PROBLEM requiring a solution. Arriving at a good solution to any problem depends on all the circumstances and knowing what outcome needs to be achieved.

What most posters are trying to achieve falls into three categories.

  1. The impossible.
  2. The crazy.
  3. The dangerous and illegal.

Sometimes, it is all three and the more cunning are careful to not let on just how crazy, dangerous or impossible their wacky idea is.

So, when folk refuse to reveal exactly what they are up to - I simply assume that 1,2 & 3 all apply.

.... Phil

No, 7474, you wiseass! But you've still got that pesky two- or four-clock thing.

But, there's ">3.  What frequency is it and how does it vary ? The frequency varies with the timer. So it can be from 1kHz up to 12kHz."

Now that we have a freq. range plus the fact that a square wave has a 50% duty cycle [ ;-) ], we can offer some suggestions.

Mine, which of course I consider to be the cleverest, even though it would depend on some startup time, would be a PLL to multiply the F of the input by 4X, then go to your quadrature ring counter, and voila!

But dammit! I thought I had made a vow not to do other people's homework for them for free! )-;

Cheers! Rich

e

this

se

r.

Seems like the communications clcok recovery apps that use a 90o phase shift to sample the data dead center of the eye use an adjustable current source to produce the triangular waveform slewing between fixed limits- then a fixed zero crossing comparator. But in that case the adjustment is made for in-circuit phase shifts significant at the high frequencies they're working with.

A PLL instead of a simple 555 driven at 4 times the desired output frequency??? You're starting to sound like you-know-who! ;)

wave

duty

degrees

four-clock

12kHz."

50%

would

input

for

wow...you're totally genius...haha..that's what my circuit looks like..

--------------------------------------- Posted through

formatting link

The difference in approaches is how you read the OP's OP; is the problem a "90 degree phase shift to my square wave signal", as stated, or is the issue to generate a quadrature output. It makes a difference.

I'm sure everyone's well aware of that, but since the OP already described his system and was happy with the solution that was offered, the PLL approach, offered after the fact, is really irrelevant.

"Not all, perhaps, but sadly, most." hmmm... I'm not sure if that connotes anything different -

Now, for your amusement, punctuate: "John where James had had had had had had had had had had had the teacher's approval."

-- Rich

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required