Maker Pro
Maker Pro

Freq. Independent Phase Shifter

B

Bill Murphy

Jan 1, 1970
0
I am using a commercial stereo amp to output continuous wave test
signals in the low audio range, up to about 2KHz. However, I need a
third channel with a 120 degree phase shift. Is there a circuit that
will do this evenly across this entire frequency range?

Is it possible to do same using an off-the-shelf transformer and
current subtraction?

Any advice would be appreciated.

Bill Murphy
 
W

Winston

Jan 1, 1970
0
I am using a commercial stereo amp to output continuous wave test
signals in the low audio range, up to about 2KHz. However, I need a
third channel with a 120 degree phase shift. Is there a circuit that
will do this evenly across this entire frequency range?

Is it possible to do same using an off-the-shelf transformer and
current subtraction?

Any advice would be appreciated.

Bill Murphy


I would approach this using DDS (Direct Digital Synthesis).

http://www.fpga4fun.com/DDS2.html

A binary counter generates an address for two different memory
devices. The devices are programmed with a binary sine wave.
The second device is exactly like the first except the data are
displaced an equivalent of 120 degrees in the address space.
Each data stream drives a separate DAC. The output of the second
DAC is filtered and amplified to drive your 3rd amplifier which
has exactly the same phase characteristics as your first two
amplifiers.

Vary the clock speed into the binary counter to vary
the output frequency.

--Winston





--
I'm already sending extortion money to my state's
"Employment Development Department" but I would
like to support *nationwide* organized crime directly,
particularly for shakedowns of the elderly,
subversion of the Democratic process through graft
and corruption and perhaps the manufacture and
distribution of illegal narcotics. What is the best
way to increase money flow to the Mafia? Should I
double my monthly payment to EDD or can I simply
send checks to the "TRS Recovery" division of
"FirstData Corporation"?
Does the Mob have a website that accepts Paypal payments?
 
W

Winston

Jan 1, 1970
0
The usual DDS technique is to use an accumulator that's clocked at a
constant rate, and at every clock add a fractional value to it that
determines frequency. The MSBs of the accumulator drive the sine
lookup table. So everything happens in one stage.

If you wanted a 12-bit binary counter to make a sine wave at 1 MHz,
you'd have to clock it at 4 GHz. But a DDS accumulator clocked at 4
MHz can easily make a 1 MHz sine wave.

John

That'll be what I learned today.

Sounds like this approach could be coded into a $2.00 PIC
using PWM outputs fairly painlessly.

Thanks, John!

--Winston
 
J

Jamie

Jan 1, 1970
0
Winston said:
I would approach this using DDS (Direct Digital Synthesis).

http://www.fpga4fun.com/DDS2.html

A binary counter generates an address for two different memory
devices. The devices are programmed with a binary sine wave.
The second device is exactly like the first except the data are
displaced an equivalent of 120 degrees in the address space.
Each data stream drives a separate DAC. The output of the second
DAC is filtered and amplified to drive your 3rd amplifier which
has exactly the same phase characteristics as your first two
amplifiers.

Vary the clock speed into the binary counter to vary
the output frequency.

--Winston
Fancy name "DDS" for techniques that have has been around for years. :)

How about selecting a Uc (programmable processor) that has 3 DAC's on
it. and some input so that you can select the freq you need and generate
the output for your 3 phase signal you're creating..

Or, 3 DDS function generators, with their external triggers dasy
chained, or 1 Dual unit like mine, and one extra with the external
trigger put in play to keep all three at 120 apart.

hell, I did a replacement 3 phase generator for an obsolete chip using
Buffered PWM output..

Yawn, to many possibilities.
 
P

Phil Allison

Jan 1, 1970
0
"Bill Murphy"
I am using a commercial stereo amp to output continuous wave test
signals in the low audio range, up to about 2KHz. However, I need a
third channel with a 120 degree phase shift. Is there a circuit that
will do this evenly across this entire frequency range?

** How even is "evenly" ??

How accurate does the 120 degree shift need to be ??

Are the test signals all sine waves or not ??

Is the shifted output level flatness critical or not ??

Any advice would be appreciated.


** Yep - try posting a question that explains what you REALLY want to do.



..... Phil
 
S

Sjouke Burry

Jan 1, 1970
0
Bill said:
I am using a commercial stereo amp to output continuous wave test
signals in the low audio range, up to about 2KHz. However, I need a
third channel with a 120 degree phase shift. Is there a circuit that
will do this evenly across this entire frequency range?

Is it possible to do same using an off-the-shelf transformer and
current subtraction?

Any advice would be appreciated.

Bill Murphy
Use a microprocessor with 3X DAO
 
P

Paul Keinanen

Jan 1, 1970
0
...although you'll need rather more filtering on the output in the later case!


Since the OP only needed frequencies up to 2 kHz and was using COTS
amplifiers, a cheap dedicated computer running a multiple (4-6)
channel sound card running at 8-48 kHz sampling frequency would do the
trick.

Two separate stereo sound cards can not be used, since the cards
generate their own sampling frequency from their own crystal, which
are not synchronized.
 
P

Paul Keinanen

Jan 1, 1970
0
I'd suggest reading up on Hilbert transformers. Once you have an 90
degree phase shift, you have a sine and cosine, hence an orthogonal
pair. Then you can make any phase you need from those signals.

In many cases you just need the two signals to be orthogonal, but of
no particular phase to the reference sine wave. You can get two
filters that will be 90 degrees out of phase from old single sideband
radio designs.

If you only need the 90 degree phase shift without fast frequency
swings, the PLL can be used, since the phase detector produces zero
output (after averaging), when the VCO is 90 degree out of phase
relative to the reference.
 
J

Joerg

Jan 1, 1970
0
Bill said:
I am using a commercial stereo amp to output continuous wave test
signals in the low audio range, up to about 2KHz. However, I need a
third channel with a 120 degree phase shift. Is there a circuit that
will do this evenly across this entire frequency range?

Is it possible to do same using an off-the-shelf transformer and
current subtraction?

Any advice would be appreciated.

Paul's suggestion with multi-channel sound cards is a good one. But keep
in mind that phase shifts in the very low range (tens of Hertzes) can be
iffy on some cards, output cap tolerances and all that. Unless you want
to go in there with a solder iron.

A Hilbert shifter works well, depends on the precision and how many
octaves you want. Also, you'd need to get hold of 0.5% or better film
capacitors which is not easy anymore these days. That was different in
the 80's.
 
J

Joerg

Jan 1, 1970
0
Jan said:
It is too much, all you need is 3 EPROMS, a 4040 counter, and a 4046 PLL as VCO,
add a pot to set the frequency.
Add 3 R2R networks, or 3 cheap DACS.
I have made one variable sine wave generator like that in the long ago past.
Milliwats, and in a small box.
Mine had auto sweep too, so I could test filters.
Just an integrator and a FF, and 2 comparators added.
256 point 8 bits sinewaves.
After al this is s.e.d. not 'alt.pc.sales' or whatever.

It all depends. When you do this for a living you need to weigh the time
it takes to whip this up against the cost and installation time of a
multi-channel sound card. When you are retired, different thing. But
many of us aren't there yet.

[...]
 
P

Paul Keinanen

Jan 1, 1970
0
Paul's suggestion with multi-channel sound cards is a good one. But keep
in mind that phase shifts in the very low range (tens of Hertzes) can be
iffy on some cards,

Some manufacturers make 4-6 channel codecs suitable for sound cards
and home theater systems. These are typically specifies for
frequencies above 3 Hz.

How low does a typical COTS stereo amplifier go ?

While the amplitude response may be bad, why would the phase shift
characteristics suffer from this ?
output cap tolerances and all that.

The cap tolerances would indeed cause problems.
Unless you want
to go in there with a solder iron.

For low production run devices, it would be perfectly feasible to use
production measurements and software to compensate for the capacitor
variations.

In discussing, which is the "best" way of implementing something, you
always must consider the expected size of the production run. It is
quite different to design a one off product or design a product for
100, 10,000 or 1,000,000 unit production / year, each requiring a
different approach.
 
J

Joerg

Jan 1, 1970
0
Jan said:
Well, if that takes so much time, say more then 2 hours, I think you
need more time to go shopping or order the soundcard thing.
Plus put it in a PC, plus write the soft, plus it is not real time adjustable
with a pot, plus it is not GREEN, it sucks power, plus well it is all so obvious.
Who knows, you may not reach your pension... may as well build it now!

Hint: One can load revolving wave tables into a sound card :)
 
J

Joerg

Jan 1, 1970
0
Paul said:
Some manufacturers make 4-6 channel codecs suitable for sound cards
and home theater systems. These are typically specifies for
frequencies above 3 Hz.

How low does a typical COTS stereo amplifier go ?

The one I use for testing small power supplies for international power
standards or 400Hz aircraft supplies goes to under 10Hz. My sound card
on the lab bench goes to 3Hz where it's 6dB down.

While the amplitude response may be bad, why would the phase shift
characteristics suffer from this ?


The cap tolerances would indeed cause problems.

Yup, that's what messes up the phase down there.

For low production run devices, it would be perfectly feasible to use
production measurements and software to compensate for the capacitor
variations.

It's temperature and often drive voltage dependent, for example if they
used a Z5U cheapie in there. You can't tell even when looking at it.

In discussing, which is the "best" way of implementing something, you
always must consider the expected size of the production run. It is
quite different to design a one off product or design a product for
100, 10,000 or 1,000,000 unit production / year, each requiring a
different approach.

Sure, that's why cost thinking has to go all the way, not just parts and
labor.
 
B

Bill Murphy

Jan 1, 1970
0
Since the OP only needed frequencies up to 2 kHz and was using COTS
amplifiers, a cheap dedicated computer running a multiple (4-6)
channel sound card running at 8-48 kHz sampling frequency would do the
trick.

What about a single card with 4.1 or 5.1 outputs?

Either way, how would I generate the three 120 degree offset channels
in software?

Thank you for your reply.

Bill Murphy
 
P

Paul Keinanen

Jan 1, 1970
0
What about a single card with 4.1 or 5.1 outputs?

Perfectly OK, if the channels are truly discrete (no psychoacoustic
matrix surround generation) and transparent (no band limiting in the
..1 channel etc.).
Either way, how would I generate the three 120 degree offset channels
in software?

You can precalculate a few (thousand) future samples into memory
buffers (queue) and then let the sound card output the buffer at the
speed specified by the sample clock. The buffers need to be updated,
before the sound card has consumed all previous samples.

The actual sample generation is done in the same way as in DDS with a
numerically controlled oscillator (NCO).

You need a 32 bit integer variable "phase accumulator" which is
updated with a specific value at each iteration of a program loop,
which defines the frequency. Take the high bits from the phase
accumulator and use it to index a sine table. The value from the sine
table is inserted into the queue going into the sound card (or written
e.g. to a .WAV file).

To generate signals with a fixed phase relative to the master signal,
take the current phase accumulator value, add a constant (the phase
shift) and using the upper bits, access sine look up table and insert
result into the queue for a different audio channel.

If the sample values are written into a .WAV file, the data can be
replayed using any audio player.

The sine instruction is surprisingly fast on some x86 processors, so
it could replace the sine look-up table. However, the phase
accumulator must be an integer register, which overflows in a
predictable way. A floating point register can not be used as a phase
accumulator, since after long time, the least significant bits are
lost and the sine function returns a constant value.
 
B

Bill Murphy

Jan 1, 1970
0
What are the two other channels making?

Same signal, all spearated by 120 degrees. Done in CoolEdit.
If you have two signals at 90 degrees, you can get any other phase
and the same amplitude.

Can you give me a hint how, or where to find out please?

Bill Murphy
 
P

Phil Allison

Jan 1, 1970
0
"Joerg"
A Hilbert shifter works well, depends on the precision and how many
octaves you want. Also, you'd need to get hold of 0.5% or better film
capacitors which is not easy anymore these days.


** The use of 0.5% tolerance caps implies a phase ripple or error of better
than 1 degree max.

Using 1% tolerance or 1% values selected from 5% stock, the max phase error
is not more than 2 degrees.

There is no problem designing a Hilbert phase shift network that covers from
22 Hz to 20 kHz using only 10nF and 1nF polystyrene caps of nominal 1%
tolerance, 1% MF resistors and a few FET op-amps.




..... Phil
 
P

Phil Allison

Jan 1, 1970
0
"Bill Murphy"
Can you give me a hint how, or where to find out please?


** Just by summing them in various ratios !!

Call one " 0 " and the other " 90" - then summing equally gives 45
degrees relative to " 0" .

Invert the " 0 " signal - then summing in various ratios with " 90 "
gives all the angles between 90 and 180 degrees.

Draw a phasor diagram and you will easily see it.


..... Phil
 
J

JosephKK

Jan 1, 1970
0
What about a single card with 4.1 or 5.1 outputs?

Either way, how would I generate the three 120 degree offset channels
in software?

Thank you for your reply.

Bill Murphy

You should have said you wanted a tunable 3-phase supply (exciter).
 
S

Spehro Pefhany

Jan 1, 1970
0
"Joerg"



** The use of 0.5% tolerance caps implies a phase ripple or error of better
than 1 degree max.

Using 1% tolerance or 1% values selected from 5% stock, the max phase error
is not more than 2 degrees.

There is no problem designing a Hilbert phase shift network that covers from
22 Hz to 20 kHz using only 10nF and 1nF polystyrene caps of nominal 1%
tolerance, 1% MF resistors and a few FET op-amps.

0.1% resistors are cheap these days. Where can you buy PS caps of any
tolerance ? NPO ceramic parts are available, but $$$$.


Best regards,
Spehro Pefhany
 
Top